@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.Checkbox = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
9
10
|
var _Icon = require("../Icon");
|
|
10
11
|
var _CheckboxModule = _interopRequireDefault(require("./Checkbox.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -30,7 +31,8 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/React.forwardRef((_ref, forward
|
|
|
30
31
|
align,
|
|
31
32
|
classNames,
|
|
32
33
|
tabIndex = 0,
|
|
33
|
-
ariaLabel = ''
|
|
34
|
+
ariaLabel = '',
|
|
35
|
+
testId
|
|
34
36
|
} = _ref;
|
|
35
37
|
const checkboxInput = /*#__PURE__*/React.createRef();
|
|
36
38
|
React.useImperativeHandle(forwardRef, () => checkboxInput.current);
|
|
@@ -56,7 +58,10 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/React.forwardRef((_ref, forward
|
|
|
56
58
|
}
|
|
57
59
|
}, [indeterminate]);
|
|
58
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
59
|
-
"data-testid":
|
|
61
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
62
|
+
base: testId,
|
|
63
|
+
slot: 'root'
|
|
64
|
+
}),
|
|
60
65
|
className: (0, _classify.default)(_CheckboxModule.default.checkboxContainer, {
|
|
61
66
|
[_CheckboxModule.default.disabled]: disabled,
|
|
62
67
|
[_CheckboxModule.default.horizontalCheckbox]: align === 'horizontal-fixed',
|
|
@@ -67,6 +72,10 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/React.forwardRef((_ref, forward
|
|
|
67
72
|
className: (0, _classify.default)(_CheckboxModule.default.checkboxSquare, {
|
|
68
73
|
[_CheckboxModule.default.disabled]: disabled
|
|
69
74
|
}, classNames?.checkboxSquare),
|
|
75
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
76
|
+
base: testId,
|
|
77
|
+
slot: 'square'
|
|
78
|
+
}),
|
|
70
79
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
71
80
|
tabIndex: disabled ? -1 : tabIndex,
|
|
72
81
|
type: "checkbox",
|
|
@@ -76,29 +85,49 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/React.forwardRef((_ref, forward
|
|
|
76
85
|
className: (0, _classify.default)(_CheckboxModule.default.inputCheckbox),
|
|
77
86
|
disabled: disabled,
|
|
78
87
|
name: name,
|
|
79
|
-
"aria-label": ariaLabel || children
|
|
88
|
+
"aria-label": ariaLabel || children,
|
|
89
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
90
|
+
base: testId,
|
|
91
|
+
slot: 'input'
|
|
92
|
+
})
|
|
80
93
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
81
94
|
className: (0, _classify.default)(_CheckboxModule.default.checkboxSquareInner, {
|
|
82
95
|
[_CheckboxModule.default.enabled]: !disabled && !error,
|
|
83
96
|
[_CheckboxModule.default.disabled]: disabled,
|
|
84
97
|
[_CheckboxModule.default.error]: error && !disabled
|
|
85
98
|
}),
|
|
99
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
100
|
+
base: testId,
|
|
101
|
+
slot: 'inner'
|
|
102
|
+
}),
|
|
86
103
|
children: [indeterminate && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
87
104
|
color: disabled ? 'disabled' : 'inversePrimary',
|
|
88
105
|
name: "hyphen",
|
|
89
106
|
size: "small",
|
|
90
|
-
type: "regular"
|
|
107
|
+
type: "regular",
|
|
108
|
+
testId: (0, _qa.generateTestId)({
|
|
109
|
+
base: testId,
|
|
110
|
+
slot: 'indeterminate-icon'
|
|
111
|
+
})
|
|
91
112
|
}), checked && !indeterminate && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
92
113
|
color: disabled ? 'disabled' : 'inversePrimary',
|
|
93
114
|
name: "check",
|
|
94
115
|
size: "small",
|
|
95
|
-
type: "regular"
|
|
116
|
+
type: "regular",
|
|
117
|
+
testId: (0, _qa.generateTestId)({
|
|
118
|
+
base: testId,
|
|
119
|
+
slot: 'check-icon'
|
|
120
|
+
})
|
|
96
121
|
})]
|
|
97
122
|
})]
|
|
98
123
|
}), React.Children.count(children) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
99
124
|
className: (0, _classify.default)(_CheckboxModule.default.checkboxLabel, {
|
|
100
125
|
[_CheckboxModule.default.labelDisabled]: disabled
|
|
101
126
|
}, classNames?.label),
|
|
127
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
128
|
+
base: testId,
|
|
129
|
+
slot: 'label'
|
|
130
|
+
}),
|
|
102
131
|
children: children
|
|
103
132
|
})]
|
|
104
133
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/CheckboxGroup.tsx"],"names":[],"mappings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iB,CAChD,kBAAkB,EAClB,cAAc,CA4Ff,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.CheckboxGroup = 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 _CheckboxGroupModule = _interopRequireDefault(require("./CheckboxGroup.module.css"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -25,7 +26,8 @@ const CheckboxGroup = exports.CheckboxGroup = /*#__PURE__*/React.forwardRef((_re
|
|
|
25
26
|
classNames,
|
|
26
27
|
error = false,
|
|
27
28
|
errorText = '',
|
|
28
|
-
children
|
|
29
|
+
children,
|
|
30
|
+
testId
|
|
29
31
|
} = _ref;
|
|
30
32
|
const onChangeHandler = _ref2 => {
|
|
31
33
|
let {
|
|
@@ -63,13 +65,22 @@ const CheckboxGroup = exports.CheckboxGroup = /*#__PURE__*/React.forwardRef((_re
|
|
|
63
65
|
onChange: childOnChange,
|
|
64
66
|
align,
|
|
65
67
|
error: errorChild || error,
|
|
66
|
-
disabled: disabledChild || disabled
|
|
68
|
+
disabled: disabledChild || disabled,
|
|
69
|
+
testId: (0, _qa.generateTestId)({
|
|
70
|
+
base: testId,
|
|
71
|
+
slot: 'checkbox',
|
|
72
|
+
index: value
|
|
73
|
+
})
|
|
67
74
|
});
|
|
68
75
|
}
|
|
69
76
|
return child;
|
|
70
77
|
});
|
|
71
78
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72
79
|
className: (0, _classify.default)(_CheckboxGroupModule.default.checkboxGroupContainer, classNames?.wrapper),
|
|
80
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
81
|
+
base: testId,
|
|
82
|
+
slot: 'root'
|
|
83
|
+
}),
|
|
73
84
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
85
|
className: (0, _classify.default)({
|
|
75
86
|
[_CheckboxGroupModule.default.vertical]: align === 'vertical',
|
|
@@ -77,10 +88,18 @@ const CheckboxGroup = exports.CheckboxGroup = /*#__PURE__*/React.forwardRef((_re
|
|
|
77
88
|
[_CheckboxGroupModule.default.horizontalFluid]: align === 'horizontal-fluid'
|
|
78
89
|
}, classNames?.checkboxGroup),
|
|
79
90
|
ref: forwardRef,
|
|
91
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
92
|
+
base: testId,
|
|
93
|
+
slot: 'group'
|
|
94
|
+
}),
|
|
80
95
|
children: childrenWithProps
|
|
81
96
|
}), error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
82
97
|
className: (0, _classify.default)(classNames?.errorText),
|
|
83
98
|
color: "danger",
|
|
99
|
+
testId: (0, _qa.generateTestId)({
|
|
100
|
+
base: testId,
|
|
101
|
+
slot: 'error'
|
|
102
|
+
}),
|
|
84
103
|
children: errorText
|
|
85
104
|
})]
|
|
86
105
|
});
|
|
@@ -27,6 +27,7 @@ export interface BaseChipProps {
|
|
|
27
27
|
onClick?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined;
|
|
28
28
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
29
29
|
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
30
|
+
testId?: string;
|
|
30
31
|
}
|
|
31
32
|
export interface LargeChipProps extends Omit<BaseChipProps, 'iconName' | 'iconType' | 'dismissable' | 'onDismiss' | 'size'> {
|
|
32
33
|
iconName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;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ACV,aAAa,EACb,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,GAAG,MAAM,CAC/D;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EACN,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IACnE,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,CAAC;AAE1E,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,CAgJhE,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Chip = exports.CHIP_SEMANTIC = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classify = require("../../utils/classify");
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
9
10
|
var _Icon = require("../Icon");
|
|
10
11
|
var _StatusIndicator = require("../StatusIndicator");
|
|
11
12
|
var _Truncate = require("../Truncate");
|
|
@@ -32,6 +33,7 @@ const Chip = exports.Chip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
32
33
|
disabled,
|
|
33
34
|
line = 1,
|
|
34
35
|
wordBreak,
|
|
36
|
+
testId,
|
|
35
37
|
// There is no reason for hover state to be active when there is no click handler attached
|
|
36
38
|
disableHoverState = !onClick,
|
|
37
39
|
...restProps
|
|
@@ -68,7 +70,10 @@ const Chip = exports.Chip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
68
70
|
}
|
|
69
71
|
};
|
|
70
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
|
-
"data-testid":
|
|
73
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
74
|
+
base: testId,
|
|
75
|
+
slot: 'root'
|
|
76
|
+
}),
|
|
72
77
|
...restProps,
|
|
73
78
|
ref: ref,
|
|
74
79
|
className: (0, _classify.classify)(_ChipModule.default.chipWrapper, {
|
|
@@ -95,17 +100,29 @@ const Chip = exports.Chip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
95
100
|
classNames: {
|
|
96
101
|
wrapper: (0, _classify.classify)(_ChipModule.default.statusIndicatorBlock, classNames?.statusIndicator)
|
|
97
102
|
},
|
|
98
|
-
disabled: disabled
|
|
103
|
+
disabled: disabled,
|
|
104
|
+
testId: (0, _qa.generateTestId)({
|
|
105
|
+
base: testId,
|
|
106
|
+
slot: 'status'
|
|
107
|
+
})
|
|
99
108
|
}), iconName && size !== 'small' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
100
109
|
className: (0, _classify.classify)(_ChipModule.default.chipIcon, {
|
|
101
110
|
[_ChipModule.default.alignTop]: line > 1
|
|
102
111
|
}, classNames?.icon),
|
|
103
112
|
name: iconName,
|
|
104
113
|
type: iconType,
|
|
105
|
-
size: "small"
|
|
114
|
+
size: "small",
|
|
115
|
+
testId: (0, _qa.generateTestId)({
|
|
116
|
+
base: testId,
|
|
117
|
+
slot: 'icon'
|
|
118
|
+
})
|
|
106
119
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
107
120
|
line: line,
|
|
108
121
|
wordBreak: wordBreak,
|
|
122
|
+
testId: (0, _qa.generateTestId)({
|
|
123
|
+
base: testId,
|
|
124
|
+
slot: 'text'
|
|
125
|
+
}),
|
|
109
126
|
children: children
|
|
110
127
|
}), dismissable && size !== 'small' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.CloseIcon, {
|
|
111
128
|
classNames: {
|
|
@@ -118,6 +135,10 @@ const Chip = exports.Chip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
118
135
|
size: "small",
|
|
119
136
|
ariaLabel: "Dismiss",
|
|
120
137
|
disabled: disabled,
|
|
138
|
+
testId: (0, _qa.generateTestId)({
|
|
139
|
+
base: testId,
|
|
140
|
+
slot: 'dismiss'
|
|
141
|
+
}),
|
|
121
142
|
onClick: event => {
|
|
122
143
|
event.stopPropagation();
|
|
123
144
|
if (!disabled && onDismiss) {
|
|
@@ -23,18 +23,21 @@ export interface CollapsibleCardProps {
|
|
|
23
23
|
headerIconName?: string;
|
|
24
24
|
headerIconType?: IconType;
|
|
25
25
|
semantic?: CollapsibleCardSemanticType;
|
|
26
|
+
testId?: string;
|
|
26
27
|
onChange?: ((e: React.SyntheticEvent<HTMLElement>, isOpen: boolean, id?: string) => unknown) | null | undefined;
|
|
27
28
|
}
|
|
28
29
|
export interface CollapsibleCardActionProps {
|
|
29
30
|
children: React.ReactNode;
|
|
30
31
|
className?: string;
|
|
32
|
+
testId?: string;
|
|
31
33
|
}
|
|
32
|
-
export declare const CollapsibleCardAction: ({ children, className, }: CollapsibleCardActionProps) => React.JSX.Element;
|
|
34
|
+
export declare const CollapsibleCardAction: ({ children, className, testId, }: CollapsibleCardActionProps) => React.JSX.Element;
|
|
33
35
|
export interface CollapsibleCardContentProps {
|
|
34
36
|
children: React.ReactNode;
|
|
35
37
|
className?: string;
|
|
38
|
+
testId?: string;
|
|
36
39
|
}
|
|
37
|
-
export declare const CollapsibleCardContent: ({ children, className, }:
|
|
40
|
+
export declare const CollapsibleCardContent: ({ children, className, testId, }: CollapsibleCardContentProps) => React.JSX.Element;
|
|
38
41
|
export declare const CollapsibleCard: Flow.AbstractComponent<CollapsibleCardProps, HTMLDivElement>;
|
|
39
42
|
export {};
|
|
40
43
|
//# sourceMappingURL=CollapsibleCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleCard.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsibleCard/CollapsibleCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"CollapsibleCard.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsibleCard/CollapsibleCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAMrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAOlD,eAAO,MAAM,yBAAyB;;;;;;EAMpC,CAAC;AAEH,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EACL,CAAC,CACC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACpC,MAAM,EAAE,OAAO,EACf,EAAE,CAAC,EAAE,MAAM,KACR,OAAO,CAAC,GACb,IAAI,GACJ,SAAS,CAAC;CACf;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB,GAAI,kCAInC,0BAA0B,sBAO5B,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,sBAAsB,GAAI,kCAIpC,2BAA2B,sBAO7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAAI,CAAC,iBAAiB,CAClD,oBAAoB,EACpB,cAAc,CA0Ff,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.CollapsibleCardContent = exports.CollapsibleCardAction = exports.CollapsibleCard = exports.COLLAPSIBLE_CARD_SEMANTIC = 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 _Icon = require("../Icon");
|
|
11
12
|
var _Truncate = require("../Truncate");
|
|
@@ -23,10 +24,15 @@ const COLLAPSIBLE_CARD_SEMANTIC = exports.COLLAPSIBLE_CARD_SEMANTIC = Object.fre
|
|
|
23
24
|
const CollapsibleCardAction = _ref => {
|
|
24
25
|
let {
|
|
25
26
|
children,
|
|
26
|
-
className
|
|
27
|
+
className,
|
|
28
|
+
testId
|
|
27
29
|
} = _ref;
|
|
28
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
29
31
|
className: (0, _classify.default)(_CollapsibleCardModule.default.actionContainer, className),
|
|
32
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
33
|
+
base: testId,
|
|
34
|
+
slot: 'wrapper'
|
|
35
|
+
}),
|
|
30
36
|
children: children
|
|
31
37
|
});
|
|
32
38
|
};
|
|
@@ -34,10 +40,15 @@ exports.CollapsibleCardAction = CollapsibleCardAction;
|
|
|
34
40
|
const CollapsibleCardContent = _ref2 => {
|
|
35
41
|
let {
|
|
36
42
|
children,
|
|
37
|
-
className
|
|
43
|
+
className,
|
|
44
|
+
testId
|
|
38
45
|
} = _ref2;
|
|
39
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
47
|
className: (0, _classify.default)(_CollapsibleCardModule.default.contentContainer, className),
|
|
48
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
49
|
+
base: testId,
|
|
50
|
+
slot: 'wrapper'
|
|
51
|
+
}),
|
|
41
52
|
children: children
|
|
42
53
|
});
|
|
43
54
|
};
|
|
@@ -52,14 +63,18 @@ const CollapsibleCard = exports.CollapsibleCard = /*#__PURE__*/React.forwardRef(
|
|
|
52
63
|
children,
|
|
53
64
|
semantic = 'neutral',
|
|
54
65
|
headerIconName,
|
|
55
|
-
headerIconType = 'solid'
|
|
66
|
+
headerIconType = 'solid',
|
|
67
|
+
testId
|
|
56
68
|
} = _ref3;
|
|
57
69
|
const [collapsibleCardIsOpen, setCollapsibleCardIsOpen] = React.useState(Boolean(isOpen));
|
|
58
70
|
React.useEffect(() => {
|
|
59
71
|
setCollapsibleCardIsOpen(Boolean(isOpen));
|
|
60
72
|
}, [isOpen]);
|
|
61
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
62
|
-
"data-testid":
|
|
74
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
75
|
+
base: testId,
|
|
76
|
+
slot: 'wrapper'
|
|
77
|
+
}),
|
|
63
78
|
className: (0, _classify.default)(_CollapsibleCardModule.default.wrapper, classNames?.wrapper),
|
|
64
79
|
ref: ref,
|
|
65
80
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.UnstyledButton, {
|
|
@@ -70,6 +85,10 @@ const CollapsibleCard = exports.CollapsibleCard = /*#__PURE__*/React.forwardRef(
|
|
|
70
85
|
onChange?.(e, !collapsibleCardIsOpen, id);
|
|
71
86
|
setCollapsibleCardIsOpen(!collapsibleCardIsOpen);
|
|
72
87
|
},
|
|
88
|
+
testId: (0, _qa.generateTestId)({
|
|
89
|
+
base: testId,
|
|
90
|
+
slot: 'header-button'
|
|
91
|
+
}),
|
|
73
92
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
74
93
|
className: _CollapsibleCardModule.default.headerContent,
|
|
75
94
|
children: [!!headerIconName && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -78,22 +97,42 @@ const CollapsibleCard = exports.CollapsibleCard = /*#__PURE__*/React.forwardRef(
|
|
|
78
97
|
name: headerIconName,
|
|
79
98
|
type: headerIconType,
|
|
80
99
|
size: "small",
|
|
81
|
-
className: _CollapsibleCardModule.default[semantic]
|
|
100
|
+
className: _CollapsibleCardModule.default[semantic],
|
|
101
|
+
testId: (0, _qa.generateTestId)({
|
|
102
|
+
base: testId,
|
|
103
|
+
slot: 'header-icon'
|
|
104
|
+
})
|
|
82
105
|
})
|
|
83
106
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
107
|
+
testId: (0, _qa.generateTestId)({
|
|
108
|
+
base: testId,
|
|
109
|
+
slot: 'title'
|
|
110
|
+
}),
|
|
84
111
|
children: title
|
|
85
112
|
})]
|
|
86
113
|
}), collapsibleCardIsOpen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
87
114
|
name: "chevron-up",
|
|
88
115
|
color: "secondary",
|
|
89
|
-
size: "small"
|
|
116
|
+
size: "small",
|
|
117
|
+
testId: (0, _qa.generateTestId)({
|
|
118
|
+
base: testId,
|
|
119
|
+
slot: 'chevron-up'
|
|
120
|
+
})
|
|
90
121
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
91
122
|
name: "chevron-down",
|
|
92
123
|
color: "secondary",
|
|
93
|
-
size: "small"
|
|
124
|
+
size: "small",
|
|
125
|
+
testId: (0, _qa.generateTestId)({
|
|
126
|
+
base: testId,
|
|
127
|
+
slot: 'chevron-down'
|
|
128
|
+
})
|
|
94
129
|
})]
|
|
95
130
|
}), collapsibleCardIsOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
96
131
|
className: (0, _classify.default)(_CollapsibleCardModule.default.content, classNames?.content),
|
|
132
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
133
|
+
base: testId,
|
|
134
|
+
slot: 'content'
|
|
135
|
+
}),
|
|
97
136
|
children: children
|
|
98
137
|
})]
|
|
99
138
|
});
|
|
@@ -72,6 +72,7 @@ export interface ComboboxProps {
|
|
|
72
72
|
dropdownName?: string;
|
|
73
73
|
dropdownPlaceholder?: string;
|
|
74
74
|
dropdownBoxRef?: React.Ref<HTMLDivElement>;
|
|
75
|
+
testId?: string;
|
|
75
76
|
}
|
|
76
77
|
export declare const Combobox: Flow.AbstractComponent<ComboboxProps, HTMLDivElement>;
|
|
77
78
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/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IACd,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,cAAc,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAC3D,iBAAiB,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjE,wBAAwB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,cAAc,CA+OxE,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Combobox = 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 _Dropdown = require("../Dropdown");
|
|
10
11
|
var _Input = require("../Input");
|
|
11
12
|
var _Text = require("../Text");
|
|
@@ -57,7 +58,8 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
57
58
|
onDropdownContainerClick,
|
|
58
59
|
dropdownName,
|
|
59
60
|
dropdownPlaceholder,
|
|
60
|
-
dropdownBoxRef
|
|
61
|
+
dropdownBoxRef,
|
|
62
|
+
testId
|
|
61
63
|
} = props;
|
|
62
64
|
const inputRef = React.useRef(null);
|
|
63
65
|
const dropdownRef = React.useRef(null);
|
|
@@ -104,15 +106,31 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
104
106
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
105
107
|
ref: ref,
|
|
106
108
|
className: (0, _classify.default)(_ComboboxModule.default.wrapper, classNames?.wrapper),
|
|
109
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
110
|
+
base: testId,
|
|
111
|
+
slot: 'root'
|
|
112
|
+
}),
|
|
107
113
|
children: [Boolean(label) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
108
114
|
className: _ComboboxModule.default.info,
|
|
115
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
116
|
+
base: testId,
|
|
117
|
+
slot: 'label'
|
|
118
|
+
}),
|
|
109
119
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
110
120
|
className: _ComboboxModule.default.infoContent,
|
|
111
121
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.FormLabelSmall, {
|
|
112
122
|
color: "secondary",
|
|
123
|
+
testId: (0, _qa.generateTestId)({
|
|
124
|
+
base: testId,
|
|
125
|
+
slot: 'label-text'
|
|
126
|
+
}),
|
|
113
127
|
children: label ?? ''
|
|
114
128
|
}), "\xA0", required && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.FormLabelSmall, {
|
|
115
129
|
color: "danger",
|
|
130
|
+
testId: (0, _qa.generateTestId)({
|
|
131
|
+
base: testId,
|
|
132
|
+
slot: 'required'
|
|
133
|
+
}),
|
|
116
134
|
children: "*"
|
|
117
135
|
})]
|
|
118
136
|
})
|
|
@@ -122,6 +140,10 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
122
140
|
}, classNames?.box),
|
|
123
141
|
onClick: !(disabled || locked) ? onContainerClick : undefined,
|
|
124
142
|
ref: boxRef,
|
|
143
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
144
|
+
base: testId,
|
|
145
|
+
slot: 'box'
|
|
146
|
+
}),
|
|
125
147
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.Dropdown, {
|
|
126
148
|
ref: dropdownRef,
|
|
127
149
|
menu: menu,
|
|
@@ -147,7 +169,11 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
147
169
|
onBlur: onDropdownBlur,
|
|
148
170
|
onKeyDown: onDropdownKeyDown,
|
|
149
171
|
onContainerClick: onDropdownContainerClick,
|
|
150
|
-
name: dropdownName
|
|
172
|
+
name: dropdownName,
|
|
173
|
+
testId: (0, _qa.generateTestId)({
|
|
174
|
+
base: testId,
|
|
175
|
+
slot: 'dropdown'
|
|
176
|
+
})
|
|
151
177
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
|
|
152
178
|
ref: inputRef,
|
|
153
179
|
boxRef: inputBoxRef,
|
|
@@ -182,15 +208,31 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
182
208
|
maxLength: maxLength,
|
|
183
209
|
pattern: pattern,
|
|
184
210
|
min: min,
|
|
185
|
-
max: max
|
|
211
|
+
max: max,
|
|
212
|
+
testId: (0, _qa.generateTestId)({
|
|
213
|
+
base: testId,
|
|
214
|
+
slot: 'input'
|
|
215
|
+
})
|
|
186
216
|
})]
|
|
187
217
|
}), (Boolean(helperText) || error) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
188
218
|
className: _ComboboxModule.default.info,
|
|
219
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
220
|
+
base: testId,
|
|
221
|
+
slot: 'helper'
|
|
222
|
+
}),
|
|
189
223
|
children: error && errorText ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
190
224
|
color: "danger",
|
|
225
|
+
testId: (0, _qa.generateTestId)({
|
|
226
|
+
base: testId,
|
|
227
|
+
slot: 'error'
|
|
228
|
+
}),
|
|
191
229
|
children: errorText
|
|
192
230
|
}) : typeof helperText === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
193
231
|
color: disabled ? 'disabled' : 'secondary',
|
|
232
|
+
testId: (0, _qa.generateTestId)({
|
|
233
|
+
base: testId,
|
|
234
|
+
slot: 'helper-text'
|
|
235
|
+
}),
|
|
194
236
|
children: helperText
|
|
195
237
|
}) : helperText
|
|
196
238
|
})]
|
|
@@ -16,7 +16,8 @@ interface CalendarProps {
|
|
|
16
16
|
};
|
|
17
17
|
today: string;
|
|
18
18
|
t: ((key: string, fallback: string) => string) | null | undefined;
|
|
19
|
+
testId?: string;
|
|
19
20
|
}
|
|
20
|
-
export declare const Calendar: ({ value, minDate, maxDate, handlers, hoverDay, dateRange, inHoverRange, today, t, }: CalendarProps) => React.JSX.Element;
|
|
21
|
+
export declare const Calendar: ({ value, minDate, maxDate, handlers, hoverDay, dateRange, inHoverRange, today, t, testId, }: CalendarProps) => React.JSX.Element;
|
|
21
22
|
export {};
|
|
22
23
|
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAC,OAAO,E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@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _moment = _interopRequireDefault(require("moment"));
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
10
|
var _dateRangePicker = require("../../utils/date-range-picker");
|
|
11
|
+
var _qa = require("../../utils/qa");
|
|
11
12
|
var _Day = require("./Day");
|
|
12
13
|
var _Text = require("../Text");
|
|
13
14
|
var _CalendarModule = _interopRequireDefault(require("./Calendar.module.css"));
|
|
@@ -24,19 +25,36 @@ const Calendar = _ref => {
|
|
|
24
25
|
dateRange,
|
|
25
26
|
inHoverRange,
|
|
26
27
|
today,
|
|
27
|
-
t
|
|
28
|
+
t,
|
|
29
|
+
testId
|
|
28
30
|
} = _ref;
|
|
29
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
30
32
|
className: _CalendarModule.default.calendar,
|
|
33
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
34
|
+
base: testId,
|
|
35
|
+
slot: `calendar-${value}`
|
|
36
|
+
}),
|
|
31
37
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
38
|
className: _CalendarModule.default.calendarRow,
|
|
39
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
40
|
+
base: testId,
|
|
41
|
+
slot: 'weekdays'
|
|
42
|
+
}),
|
|
33
43
|
children: _utils.WEEKDAYS.map(day => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
34
44
|
className: _CalendarModule.default.calendarRowItem,
|
|
35
45
|
color: _Text.TEXT_COLORS.tertiary,
|
|
46
|
+
testId: (0, _qa.generateTestId)({
|
|
47
|
+
base: testId,
|
|
48
|
+
slot: `weekday-${day}`
|
|
49
|
+
}),
|
|
36
50
|
children: (0, _dateRangePicker.getTranslation)(t, day)
|
|
37
51
|
}, day))
|
|
38
52
|
}), (0, _utils.getDaysInMonth)(value).map((week, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
53
|
className: _CalendarModule.default.calendarRow,
|
|
54
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
55
|
+
base: testId,
|
|
56
|
+
slot: `week-${index}`
|
|
57
|
+
}),
|
|
40
58
|
children: week.map(date => {
|
|
41
59
|
const isRangeValid = (0, _utils.isStartDateEndDateSame)(dateRange);
|
|
42
60
|
const isStart = (0, _utils.isStartOfRange)(dateRange, date);
|
|
@@ -58,7 +76,11 @@ const Calendar = _ref => {
|
|
|
58
76
|
highlighted: highlighted && !isRangeValid,
|
|
59
77
|
startOfRange: isStart && !isRangeValid,
|
|
60
78
|
value: dateValue.date().toString(),
|
|
61
|
-
hoverDay: hoverDay
|
|
79
|
+
hoverDay: hoverDay,
|
|
80
|
+
testId: (0, _qa.generateTestId)({
|
|
81
|
+
base: testId,
|
|
82
|
+
slot: `day-${date}`
|
|
83
|
+
})
|
|
62
84
|
}, date);
|
|
63
85
|
})
|
|
64
86
|
}, week[index]))]
|
|
@@ -16,6 +16,7 @@ export interface DateRangePickerProps {
|
|
|
16
16
|
endDateLabel?: string;
|
|
17
17
|
t?: ((key: string, fallback: string) => string) | null | undefined;
|
|
18
18
|
locale?: string;
|
|
19
|
+
testId?: string;
|
|
19
20
|
}
|
|
20
21
|
export declare const DateRangePicker: Flow.AbstractComponent<DateRangePickerProps, HTMLDivElement>;
|
|
21
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,OAAO,KAAK,EAEV,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAyBnB,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,UAAU,CAAC;IAC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