@orsetra/shared-ui 1.10.29 → 1.10.30

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.
@@ -21,10 +21,15 @@ interface SecretInputProps {
21
21
  exclude?: string[]
22
22
  }
23
23
 
24
- function Notice({ children }: { children: React.ReactNode }) {
24
+ const NOTICE_TONES = {
25
+ neutral: { box: "border-ibm-gray-30 bg-ibm-gray-10 text-ibm-gray-70", icon: "text-ibm-gray-60" },
26
+ warning: { box: "border-ibm-orange-60 bg-ibm-orange-10 text-ibm-orange-70", icon: "text-ibm-orange-60" },
27
+ }
28
+
29
+ function Notice({ children, tone = "neutral" }: { children: React.ReactNode; tone?: keyof typeof NOTICE_TONES }) {
25
30
  return (
26
- <div className="flex items-start gap-2 border border-ibm-gray-30 bg-ibm-gray-10 px-3 py-2 text-xs text-ibm-gray-70">
27
- <AlertTriangle className="h-3.5 w-3.5 mt-0.5 flex-shrink-0 text-ibm-gray-60" />
31
+ <div className={`flex items-start gap-2 border px-3 py-2 text-xs ${NOTICE_TONES[tone].box}`}>
32
+ <AlertTriangle className={`h-3.5 w-3.5 mt-0.5 flex-shrink-0 ${NOTICE_TONES[tone].icon}`} />
28
33
  <div className="min-w-0 space-y-1.5">{children}</div>
29
34
  </div>
30
35
  )
@@ -107,12 +112,12 @@ export function SecretInput({
107
112
  </div>
108
113
 
109
114
  {selectedElsewhere && !selectedUndistributed && (
110
- <Notice><p>The configuration selected no longer exists, or is of another kind. Select another one.</p></Notice>
115
+ <Notice tone="warning"><p>The configuration selected no longer exists, or is of another kind. Select another one.</p></Notice>
111
116
  )}
112
117
 
113
118
  {!loading && undistributed.length > 0 && (
114
- <Notice>
115
- <p>
119
+ <Notice tone="warning">
120
+ <p className="font-medium">
116
121
  {undistributed.length === 1 ? "One configuration is" : `${undistributed.length} configurations are`} not available in {environmentLabel} yet.
117
122
  </p>
118
123
  <ul className="space-y-1">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.10.29",
3
+ "version": "1.10.30",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",