From 55bcbcef83badd842a9708964494f20db4e8beb4 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Wed, 30 Oct 2024 16:59:28 +0000 Subject: [PATCH] GrafanaUI: Export Combobox from @grafana/ui (#95622) --- packages/grafana-ui/src/components/index.ts | 3 +++ packages/grafana-ui/src/unstable.ts | 1 - .../core/components/SharedPreferences/SharedPreferences.tsx | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/index.ts b/packages/grafana-ui/src/components/index.ts index ce90f14a8f7..5edf0b5e60d 100644 --- a/packages/grafana-ui/src/components/index.ts +++ b/packages/grafana-ui/src/components/index.ts @@ -230,12 +230,15 @@ export { InlineFieldRow } from './Forms/InlineFieldRow'; export { FieldArray } from './Forms/FieldArray'; // Select +// Note - Select is nearly deprecated in favor of Combobox export { default as resetSelectStyles } from './Select/resetSelectStyles'; export * from './Select/Select'; export { SelectMenuOptions } from './Select/SelectMenu'; export { getSelectStyles } from './Select/getSelectStyles'; export * from './Select/types'; +export { Combobox, type ComboboxOption } from './Combobox/Combobox'; + export { HorizontalGroup, VerticalGroup, Container } from './Layout/Layout'; export { Badge, type BadgeColor, type BadgeProps } from './Badge/Badge'; export { RadioButtonGroup } from './Forms/RadioButtonGroup/RadioButtonGroup'; diff --git a/packages/grafana-ui/src/unstable.ts b/packages/grafana-ui/src/unstable.ts index 00891d3a93d..4ff84f73255 100644 --- a/packages/grafana-ui/src/unstable.ts +++ b/packages/grafana-ui/src/unstable.ts @@ -10,5 +10,4 @@ */ export * from './utils/skeleton'; -export * from './components/Combobox/Combobox'; export * from './components/ScrollContainer/ScrollContainer'; diff --git a/public/app/core/components/SharedPreferences/SharedPreferences.tsx b/public/app/core/components/SharedPreferences/SharedPreferences.tsx index 8bde5bd7b4e..dabf652a4da 100644 --- a/public/app/core/components/SharedPreferences/SharedPreferences.tsx +++ b/public/app/core/components/SharedPreferences/SharedPreferences.tsx @@ -15,8 +15,9 @@ import { TimeZonePicker, WeekStartPicker, FeatureBadge, + Combobox, + ComboboxOption, } from '@grafana/ui'; -import { Combobox, ComboboxOption } from '@grafana/ui/src/unstable'; import { DashboardPicker } from 'app/core/components/Select/DashboardPicker'; import { t, Trans } from 'app/core/internationalization'; import { LANGUAGES, PSEUDO_LOCALE } from 'app/core/internationalization/constants';