@orsetra/shared-ui 1.5.18 → 1.5.20

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.
@@ -43,6 +43,8 @@ export interface DetailPageHeaderProps {
43
43
  activeTab?: string
44
44
  /** Extra classes applied to the root element */
45
45
  className?: string
46
+ /** Whether to show the tab bar */
47
+ enableTabs?: boolean
46
48
  }
47
49
 
48
50
  export function DetailPageHeader({
@@ -56,6 +58,7 @@ export function DetailPageHeader({
56
58
  tabBar,
57
59
  tabBarPosition = "left",
58
60
  activeTab,
61
+ enableTabs = true,
59
62
  className,
60
63
  }: DetailPageHeaderProps) {
61
64
  return (
@@ -101,6 +104,7 @@ export function DetailPageHeader({
101
104
  </div>
102
105
 
103
106
  {/* Tab bar — always rendered to keep header height consistent */}
107
+ {enableTabs && (
104
108
  <nav
105
109
  className={`flex gap-0 overflow-x-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] px-4 sm:px-6 min-h-10 ${
106
110
  tabBarPosition === "right" ? "justify-end" : "justify-start"
@@ -127,7 +131,7 @@ export function DetailPageHeader({
127
131
  </Link>
128
132
  )
129
133
  })}
130
- </nav>
134
+ </nav>)}
131
135
 
132
136
  </div>
133
137
  </div>
@@ -16,6 +16,7 @@ export interface EnvironmentPickerDialogProps {
16
16
  fetchEnvironments: (projectName: string) => Promise<{ envs: Environment[] }>
17
17
  onSelect: (envName: string, envAlias: string) => void
18
18
  excludeEnvs?: string[]
19
+ includeEnvs?: string[]
19
20
  title?: string
20
21
  description?: string
21
22
  }
@@ -27,6 +28,7 @@ export function EnvironmentPickerDialog({
27
28
  fetchEnvironments,
28
29
  onSelect,
29
30
  excludeEnvs = [],
31
+ includeEnvs,
30
32
  title = "Select an environment",
31
33
  description,
32
34
  }: EnvironmentPickerDialogProps) {
@@ -41,8 +43,10 @@ export function EnvironmentPickerDialog({
41
43
  setLoading(true)
42
44
  try {
43
45
  const response = await fetchEnvironments(projectName)
44
- const all = response.envs || []
45
- setEnvironments(excludeEnvs.length ? all.filter((e) => !excludeEnvs.includes(e.name)) : all)
46
+ let all = response.envs || []
47
+ if (includeEnvs) all = all.filter((e) => includeEnvs.includes(e.name))
48
+ else if (excludeEnvs.length) all = all.filter((e) => !excludeEnvs.includes(e.name))
49
+ setEnvironments(all)
46
50
  } catch {
47
51
  // silent
48
52
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.5.18",
3
+ "version": "1.5.20",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",