diff --git a/CHANGELOG.md b/CHANGELOG.md
index 75aab6db4a4..340d0eff1f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
- Added collapsble behavior to `EuiResizableContainer` panels ([#3978](https://github.com/elastic/eui/pull/3978))
- Updated `EuiResizablePanel` to use `EuiPanel` ([#3978](https://github.com/elastic/eui/pull/3978))
- Changed `showTimeSelect` prop to true when `showTimeSelectOnly` prop is set to true. ([#4372](https://github.com/elastic/eui/pull/4372))
+- Updated `EuiSuperSelect` recently used list to render as `
` and `` elements ([#4370](https://github.com/elastic/eui/pull/4370))
**Bug fixes**
diff --git a/src/components/date_picker/super_date_picker/quick_select_popover/_commonly_used_time_ranges.scss b/src/components/date_picker/super_date_picker/quick_select_popover/_commonly_used_time_ranges.scss
deleted file mode 100644
index bebe1133aea..00000000000
--- a/src/components/date_picker/super_date_picker/quick_select_popover/_commonly_used_time_ranges.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-.euiCommonlyUsedTimeRanges__item {
- font-size: $euiFontSizeS;
- line-height: $euiFontSizeS;
-}
diff --git a/src/components/date_picker/super_date_picker/quick_select_popover/_index.scss b/src/components/date_picker/super_date_picker/quick_select_popover/_index.scss
index 0b110a05b7f..4fc081c561d 100644
--- a/src/components/date_picker/super_date_picker/quick_select_popover/_index.scss
+++ b/src/components/date_picker/super_date_picker/quick_select_popover/_index.scss
@@ -1,4 +1,3 @@
@import 'quick_select_popover';
@import 'quick_select';
@import 'refresh_interval';
-@import 'commonly_used_time_ranges';
diff --git a/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss b/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss
index 2fd91cce5a0..b5ff375837b 100644
--- a/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss
+++ b/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss
@@ -8,7 +8,7 @@
max-height: $euiSizeM * 11;
overflow: hidden;
overflow-y: auto;
- padding: $euiSizeXS 0; // Offset negative margin from flex items
+ padding: $euiSizeS 0 $euiSizeXS; // Offset negative margin from flex items
}
// sass-lint:disable no-important
@@ -20,3 +20,12 @@
.euiQuickSelectPopover__anchor {
height: 100%;
}
+
+.euiQuickSelectPopover__sectionItem {
+ font-size: $euiFontSizeS;
+ line-height: $euiFontSizeS;
+
+ &:not(:last-of-type) {
+ margin-bottom: $euiSizeS;
+ }
+}
diff --git a/src/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.tsx b/src/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.tsx
index 7f857e24b96..8c5aec3655a 100644
--- a/src/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.tsx
+++ b/src/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.tsx
@@ -49,7 +49,7 @@ export const EuiCommonlyUsedTimeRanges: FunctionComponent
+ className="euiQuickSelectPopover__sectionItem">
{label}
@@ -60,7 +60,7 @@ export const EuiCommonlyUsedTimeRanges: FunctionComponent
-
+
= ({
dateFormat,
recentlyUsedRanges = [],
}) => {
+ const legendId = generateId();
+
if (recentlyUsedRanges.length === 0) {
return null;
}
@@ -50,27 +53,31 @@ export const EuiRecentlyUsed: FunctionComponent = ({
applyTime({ start, end });
};
return (
-
+
{prettyDuration(start, end, commonlyUsedRanges, dateFormat)}
-
+
);
});
return (
-
+
- Recently used date ranges
+
+
+
-
-
-
- {links}
-
-
+
-
+
);
};