@orsetra/shared-ui 1.10.14 → 1.10.16

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.
@@ -42,31 +42,14 @@ const Wordmark = ({ className }: { className?: string }) => (
42
42
  role="img"
43
43
  aria-label="Camel X"
44
44
  >
45
- <text
46
- x="5"
47
- y="16"
48
- fontFamily="Helvetica Neue, Arial, sans-serif"
49
- fontWeight="500"
50
- fontSize="26"
51
- letterSpacing="-0.5"
45
+ <path
52
46
  fill="#161616"
53
- textAnchor="start"
54
- dominantBaseline="central"
55
- >
56
- CAMEL
57
- </text>
58
- <text
59
- x="94.6"
60
- y="16"
61
- fontFamily="Helvetica Neue, Arial, sans-serif"
62
- fontWeight="800"
63
- fontSize="26"
47
+ d="M20.29 18.77 22.75 19.4Q21.97 22.43 19.96 24.02Q17.95 25.62 15.04 25.62Q12.03 25.62 10.15 24.39Q8.26 23.17 7.28 20.84Q6.29 18.52 6.29 15.85Q6.29 12.95 7.41 10.78Q8.52 8.62 10.57 7.49Q12.62 6.37 15.08 6.37Q17.87 6.37 19.78 7.79Q21.68 9.22 22.43 11.79L20.01 12.36Q19.36 10.33 18.13 9.41Q16.9 8.48 15.03 8.48Q12.88 8.48 11.44 9.51Q10.0 10.54 9.42 12.27Q8.83 14.0 8.83 15.84Q8.83 18.22 9.53 19.99Q10.22 21.76 11.68 22.63Q13.14 23.51 14.84 23.51Q16.91 23.51 18.34 22.32Q19.78 21.12 20.29 18.77Z M23.24 25.3 30.39 6.69H33.04L40.66 25.3H37.85L35.68 19.66H27.9L25.85 25.3ZM28.61 17.66H34.92L32.98 12.5Q32.09 10.15 31.66 8.64Q31.3 10.43 30.65 12.2Z M42.05 25.3V6.69H45.75L50.16 19.87Q50.77 21.71 51.05 22.62Q51.37 21.61 52.04 19.64L56.5 6.69H59.81V25.3H57.43V9.72L52.03 25.3H49.8L44.42 9.46V25.3Z M63.33 25.3V6.69H76.79V8.88H65.8V14.59H76.09V16.77H65.8V23.1H77.22V25.3Z M80.02 25.3V6.69H82.49V23.1H91.65V25.3Z"
48
+ />
49
+ <path
64
50
  fill="#0F62FE"
65
- textAnchor="start"
66
- dominantBaseline="central"
67
- >
68
- X
69
- </text>
51
+ d="M94.6 25.3 100.96 15.59 95.2 6.69H99.59L103.32 12.67L106.98 6.69H111.33L105.54 15.73L111.9 25.3H107.37L103.25 18.86L99.11 25.3Z"
52
+ />
70
53
  </svg>
71
54
  )
72
55
 
@@ -39,6 +39,15 @@ export interface ProjectSelectorModalProps extends ProjectSelectorProps {
39
39
  title?: string
40
40
  description?: string
41
41
  currentProjectId?: string
42
+ /**
43
+ * Escape hatch shown next to "Create & Continue" only in the zero-business-unit state (this
44
+ * dialog otherwise can't be dismissed while no project is selected — see `onInteractOutside`
45
+ * below — so without this a user who can't or doesn't want to create one here has no way out).
46
+ * Omit to keep the dialog exactly as strict as before.
47
+ */
48
+ escapeHref?: string
49
+ /** Label for `escapeHref`. Defaults to "Go to main app". */
50
+ escapeLabel?: string
42
51
  }
43
52
 
44
53
  export function ProjectSelectorModal({
@@ -50,6 +59,8 @@ export function ProjectSelectorModal({
50
59
  getProjects,
51
60
  createProject,
52
61
  doInit,
62
+ escapeHref,
63
+ escapeLabel = "Go to main app",
53
64
  }: ProjectSelectorModalProps) {
54
65
  const [projects, setProjects] = React.useState<Project[]>([])
55
66
  const [loading, setLoading] = React.useState(true)
@@ -213,6 +224,14 @@ export function ProjectSelectorModal({
213
224
  )}
214
225
 
215
226
  <div className="flex items-center justify-end gap-3 pt-2">
227
+ {!loading && projects.length === 0 && escapeHref && (
228
+ <a
229
+ href={escapeHref}
230
+ className="inline-flex items-center justify-center rounded-none border border-ibm-gray-30 text-ibm-gray-100 hover:bg-ibm-gray-30 active:bg-ibm-gray-40 font-semibold h-10 px-4 text-base transition-colors mr-auto"
231
+ >
232
+ {escapeLabel}
233
+ </a>
234
+ )}
216
235
  <Button
217
236
  type="submit"
218
237
  className="rounded-none"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.10.14",
3
+ "version": "1.10.16",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",