@camunda/ccma-saas-frontend 0.15.1 → 0.17.0

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.
Files changed (129) hide show
  1. package/lib/esm/components/c4-audit-log/c4-audit-log.js +53 -42
  2. package/lib/esm/components/c4-billing-page/c4-billing-page.js +5 -1
  3. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +8 -3
  4. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.d.ts +10 -0
  5. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +9 -1
  6. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +13 -5
  7. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.d.ts +14 -0
  8. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.js +18 -0
  9. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +18 -7
  10. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +2 -2
  11. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +4 -10
  12. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +1 -4
  13. package/lib/esm/components/c4-cluster-overview/applications.d.ts +16 -0
  14. package/lib/esm/components/c4-cluster-overview/applications.js +130 -17
  15. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +34 -1
  16. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +31 -0
  17. package/lib/esm/components/c4-cluster-overview/cluster-details.js +11 -9
  18. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +4 -3
  19. package/lib/esm/components/c4-cluster-overview/cluster-load.js +17 -13
  20. package/lib/esm/components/c4-cluster-overview/ds-section.d.ts +23 -0
  21. package/lib/esm/components/c4-cluster-overview/ds-section.js +19 -0
  22. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.d.ts +33 -0
  23. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +34 -0
  24. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +7 -1
  25. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +6 -1
  26. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +5 -2
  27. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +4 -5
  28. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +40 -15
  29. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +24 -4
  30. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +12 -0
  31. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +2 -1
  32. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.d.ts +11 -0
  33. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.js +16 -0
  34. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +4 -1
  35. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +6 -2
  36. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.d.ts +6 -0
  37. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +1 -1
  38. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -0
  39. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +1 -1
  40. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +13 -6
  41. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +24 -5
  42. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +4 -4
  43. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +1 -1
  44. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +1 -1
  45. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +3 -1
  46. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +7 -1
  47. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +8 -4
  48. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +6 -1
  49. package/lib/esm/components/c4-management-settings/c4-management-settings.js +58 -42
  50. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -0
  51. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +11 -10
  52. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +4 -0
  53. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +9 -1
  54. package/lib/esm/components/c4-sm-cluster-details/details.js +2 -8
  55. package/lib/esm/components/c4-tabs/c4-tabs.js +6 -1
  56. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +3 -3
  57. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -8
  58. package/lib/esm/externalUrls.const.d.ts +1 -1
  59. package/lib/esm/externalUrls.const.js +1 -2
  60. package/lib/esm/i18n/en/modals/billing.json +2 -2
  61. package/lib/esm/i18n/en/modals/clusterclients.json +6 -6
  62. package/lib/esm/i18n/en/modals/invitations.json +1 -0
  63. package/lib/esm/i18n/en/modals/users.json +1 -0
  64. package/lib/esm/i18n/en/pages/clusterdetails.json +4 -1
  65. package/lib/esm/i18n/en/pages/createcluster.json +5 -0
  66. package/lib/esm/i18n/en/pages/dashboard.json +7 -5
  67. package/lib/esm/i18n/en/pages/orgmanagement.json +4 -0
  68. package/lib/esm/index.d.ts +1 -1
  69. package/lib/esm/index.js +1 -1
  70. package/lib/esm/runtime/c4-console-events-context.d.ts +5 -1
  71. package/lib/esm/runtime/c4-console-events-context.js +16 -2
  72. package/lib/esm/runtime/c4-console-runtime-context.d.ts +7 -6
  73. package/lib/esm/runtime/c4-console-runtime-context.js +29 -12
  74. package/lib/esm/runtime/c4-console-runtime.types.d.ts +7 -7
  75. package/lib/esm/runtime/c4-user-notifications-context.js +6 -2
  76. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +5 -1
  77. package/lib/esm/runtime/use-hub-api-naming.d.ts +8 -11
  78. package/lib/esm/runtime/use-hub-api-naming.js +9 -12
  79. package/lib/esm/runtime/use-is-qa-user.d.ts +23 -0
  80. package/lib/esm/runtime/use-is-qa-user.js +64 -0
  81. package/lib/esm/ui/c4-cluster-tag.d.ts +11 -0
  82. package/lib/esm/ui/c4-cluster-tag.js +39 -0
  83. package/lib/esm/ui/ds-compact-code-block.d.ts +15 -0
  84. package/lib/esm/ui/ds-compact-code-block.js +33 -0
  85. package/lib/esm/ui/index.d.ts +13 -3
  86. package/lib/esm/ui/index.js +14 -7
  87. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +21 -6
  88. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +4 -2
  89. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  90. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +31 -12
  91. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +6 -1
  92. package/lib/esm/widgets/cluster-details/cluster-region-code.d.ts +8 -0
  93. package/lib/esm/widgets/cluster-details/cluster-region-code.js +17 -0
  94. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +44 -6
  95. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +6 -4
  96. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -14
  97. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +7 -0
  98. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +23 -11
  99. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +11 -15
  100. package/lib/esm/widgets/cluster-details/upgrade-gate.d.ts +23 -0
  101. package/lib/esm/widgets/cluster-details/upgrade-gate.js +36 -0
  102. package/lib/esm/widgets/cluster-details/use-upgrade-gate.d.ts +24 -0
  103. package/lib/esm/widgets/cluster-details/use-upgrade-gate.js +73 -0
  104. package/lib/esm/widgets/clusters/c4-clusters-page.js +0 -4
  105. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +4 -1
  106. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +44 -17
  107. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -3
  108. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +12 -11
  109. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +2 -3
  110. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  111. package/lib/esm/widgets/group-details/c4-group-details-page.js +10 -3
  112. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +5 -0
  113. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  114. package/lib/esm/widgets/management/c4-management-app.js +34 -36
  115. package/lib/esm/widgets/management/c4-management-app.types.d.ts +10 -9
  116. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +0 -1
  117. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -2
  118. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -1
  119. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +2 -2
  120. package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +3 -1
  121. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +2 -2
  122. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  123. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -2
  124. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +5 -0
  125. package/package.json +23 -23
  126. package/lib/esm/runtime/cluster-duplication.d.ts +0 -10
  127. package/lib/esm/runtime/cluster-duplication.js +0 -15
  128. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.d.ts +0 -13
  129. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +0 -26
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
3
  * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
@@ -8,8 +8,11 @@ import { InlineLoading } from '@carbon/react';
8
8
  import { Checkmark, Launch } from '@carbon/react/icons/index.esm.js';
9
9
  import { useCallback, useEffect, useRef, useState } from 'react';
10
10
  import { C4_ASSET_URLS } from '../../assetUrls.js';
11
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
11
12
  import { Button, Checkbox, Link, Modal, Stack } from '../../ui/index.js';
13
+ import { SettingsTile } from '../c4-cluster-settings/elements/settings-tile.js';
12
14
  import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
15
+ const AUDIT_LOG_DESCRIPTION = 'The audit log records user and client operations across administration, deployed resources, and user tasks. It helps your team trace events, when they occurred, what was affected, and whether they were successful.';
13
16
  const ALL_CATEGORIES = [
14
17
  'ADMIN',
15
18
  'DEPLOYED_RESOURCES',
@@ -28,6 +31,7 @@ function arraysEqual(a, b) {
28
31
  return sortedA.every((item, index) => item === sortedB[index]);
29
32
  }
30
33
  export const C4AuditLog = ({ enabled, userCategories, clientCategories, onUpdate, onEnable, onDisable, learnMoreUrl, permissions, }) => {
34
+ const isDs = useC4DesignSystem() === 'ds';
31
35
  const [localUserCategories, setLocalUserCategories] = useState(userCategories);
32
36
  const [localClientCategories, setLocalClientCategories] = useState(clientCategories);
33
37
  const [isDirty, setIsDirty] = useState(false);
@@ -98,52 +102,59 @@ export const C4AuditLog = ({ enabled, userCategories, clientCategories, onUpdate
98
102
  label: 'Learn more about audit log',
99
103
  } }));
100
104
  }
101
- return (_jsxs(Stack, { gap: 6, children: [_jsx("div", { style: {
105
+ const settingsBody = (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { style: {
106
+ fontWeight: 'bold',
107
+ marginBottom: '0.5rem',
108
+ color: 'var(--cds-text-primary)',
109
+ }, children: "User operations to log" }), _jsx("p", { style: {
110
+ fontSize: 'var(--cds-body-compact-01-font-size)',
111
+ color: 'var(--cds-text-secondary)',
112
+ marginBottom: '0.5rem',
113
+ }, children: "Operation categories" }), _jsx("div", { style: {
114
+ display: 'flex',
115
+ gap: isDs ? '1.5rem' : 'var(--cds-spacing-06)',
116
+ flexWrap: 'wrap',
117
+ }, children: ALL_CATEGORIES.map((category) => (_jsx("div", { children: _jsx(Checkbox, { id: `user-category-${category}`, labelText: CATEGORY_LABELS[category], checked: localUserCategories.includes(category), disabled: !permissions.mayChange || isSaving, onChange: (_, { checked }) => handleUserCategoryChange(category, checked) }) }, `user-${category}`))) })] }), _jsxs("div", { children: [_jsx("p", { style: {
118
+ fontWeight: 'bold',
119
+ marginBottom: '0.5rem',
120
+ color: 'var(--cds-text-primary)',
121
+ }, children: "Client operations to log" }), _jsx("p", { style: {
122
+ fontSize: 'var(--cds-body-compact-01-font-size)',
123
+ color: 'var(--cds-text-secondary)',
124
+ marginBottom: '0.5rem',
125
+ }, children: "Operation categories" }), _jsx("div", { style: {
126
+ display: 'flex',
127
+ gap: isDs ? '1.5rem' : 'var(--cds-spacing-06)',
128
+ flexWrap: 'wrap',
129
+ }, children: ALL_CATEGORIES.map((category) => (_jsx("div", { children: _jsx(Checkbox, { id: `client-category-${category}`, labelText: CATEGORY_LABELS[category], checked: localClientCategories.includes(category), disabled: !permissions.mayChange || isSaving, onChange: (_, { checked }) => handleClientCategoryChange(category, checked) }) }, `client-${category}`))) })] }), permissions.mayChange && (_jsxs("div", { style: {
130
+ display: 'flex',
131
+ flexDirection: 'column',
132
+ gap: 'var(--cds-spacing-05)',
133
+ }, children: [_jsx("div", { style: {
134
+ display: 'flex',
135
+ alignItems: 'center',
136
+ gap: '1rem',
137
+ flexWrap: 'wrap',
138
+ }, children: saveConfirmed ? (_jsxs("div", { style: {
139
+ display: 'flex',
140
+ alignItems: 'center',
141
+ gap: 'var(--cds-spacing-03)',
142
+ paddingLeft: 'var(--cds-spacing-05)',
143
+ height: '2.5rem',
144
+ fontSize: 'var(--cds-body-compact-01-font-size)',
145
+ }, children: [_jsx(Checkmark, { size: 16, style: { color: 'var(--cds-support-success)' } }), _jsx("span", { style: { color: 'var(--cds-text-secondary)' }, children: "Updated" })] })) : isSaving ? (_jsx(InlineLoading, { description: 'Saving...' })) : (_jsx(Button, { kind: 'tertiary', size: 'md', disabled: !isDirty, onClick: handleUpdate, children: "Update" })) }), _jsx("div", { children: _jsx(Button, { kind: 'ghost', size: 'md', style: { color: 'var(--cds-support-error)' }, onClick: () => setShowDisableModal(true), children: "Disable audit log" }) })] }))] }));
146
+ // ds mode: the same card, heading and separator line as the "Cluster
147
+ // settings" block of the Settings tab.
148
+ const settingsPanel = isDs ? (_jsx(SettingsTile, { headingLevel: 'h2', title: 'Audit log of operations', description: AUDIT_LOG_DESCRIPTION, children: _jsx(Stack, { gap: 6, children: settingsBody }) })) : null;
149
+ return (_jsxs(Stack, { gap: 6, children: [settingsPanel ?? (_jsx("div", { style: {
102
150
  backgroundColor: 'var(--cds-layer-01)',
103
151
  padding: '2rem',
104
152
  }, children: _jsxs(Stack, { gap: 6, children: [_jsxs("div", { children: [_jsx("h2", { style: {
105
153
  fontSize: 'var(--cds-heading-04-font-size)',
106
154
  fontWeight: 'var(--cds-heading-04-font-weight)',
107
155
  marginBottom: '0.75rem',
108
- }, children: "Audit log of operations" }), _jsx("p", { style: { color: 'var(--cds-text-secondary)', maxWidth: '40rem' }, children: "The audit log records user and client operations across administration, deployed resources, and user tasks. It helps your team trace events, when they occurred, what was affected, and whether they were successful." })] }), _jsxs("div", { children: [_jsx("p", { style: {
109
- fontWeight: 'bold',
110
- marginBottom: '0.5rem',
111
- color: 'var(--cds-text-primary)',
112
- }, children: "User operations to log" }), _jsx("p", { style: {
113
- fontSize: 'var(--cds-body-compact-01-font-size)',
114
- color: 'var(--cds-text-secondary)',
115
- marginBottom: '0.5rem',
116
- }, children: "Operation categories" }), _jsx("div", { style: {
117
- display: 'flex',
118
- gap: 'var(--cds-spacing-06)',
119
- flexWrap: 'wrap',
120
- }, children: ALL_CATEGORIES.map((category) => (_jsx("div", { children: _jsx(Checkbox, { id: `user-category-${category}`, labelText: CATEGORY_LABELS[category], checked: localUserCategories.includes(category), disabled: !permissions.mayChange || isSaving, onChange: (_, { checked }) => handleUserCategoryChange(category, checked) }) }, `user-${category}`))) })] }), _jsxs("div", { children: [_jsx("p", { style: {
121
- fontWeight: 'bold',
122
- marginBottom: '0.5rem',
123
- color: 'var(--cds-text-primary)',
124
- }, children: "Client operations to log" }), _jsx("p", { style: {
125
- fontSize: 'var(--cds-body-compact-01-font-size)',
156
+ }, children: "Audit log of operations" }), _jsx("p", { style: {
126
157
  color: 'var(--cds-text-secondary)',
127
- marginBottom: '0.5rem',
128
- }, children: "Operation categories" }), _jsx("div", { style: {
129
- display: 'flex',
130
- gap: 'var(--cds-spacing-06)',
131
- flexWrap: 'wrap',
132
- }, children: ALL_CATEGORIES.map((category) => (_jsx("div", { children: _jsx(Checkbox, { id: `client-category-${category}`, labelText: CATEGORY_LABELS[category], checked: localClientCategories.includes(category), disabled: !permissions.mayChange || isSaving, onChange: (_, { checked }) => handleClientCategoryChange(category, checked) }) }, `client-${category}`))) })] }), permissions.mayChange && (_jsxs("div", { style: {
133
- display: 'flex',
134
- flexDirection: 'column',
135
- gap: 'var(--cds-spacing-05)',
136
- }, children: [_jsx("div", { style: {
137
- display: 'flex',
138
- alignItems: 'center',
139
- gap: '1rem',
140
- flexWrap: 'wrap',
141
- }, children: saveConfirmed ? (_jsxs("div", { style: {
142
- display: 'flex',
143
- alignItems: 'center',
144
- gap: 'var(--cds-spacing-03)',
145
- paddingLeft: 'var(--cds-spacing-05)',
146
- height: '2.5rem',
147
- fontSize: 'var(--cds-body-compact-01-font-size)',
148
- }, children: [_jsx(Checkmark, { size: 16, style: { color: 'var(--cds-support-success)' } }), _jsx("span", { style: { color: 'var(--cds-text-secondary)' }, children: "Updated" })] })) : isSaving ? (_jsx(InlineLoading, { description: 'Saving...' })) : (_jsx(Button, { kind: 'tertiary', size: 'md', disabled: !isDirty, onClick: handleUpdate, children: "Update" })) }), _jsx("div", { children: _jsx(Button, { kind: 'ghost', size: 'md', style: { color: 'var(--cds-support-error)' }, onClick: () => setShowDisableModal(true), children: "Disable audit log" }) })] }))] }) }), _jsx(Link, { href: learnMoreUrl, target: '_blank', rel: 'noopener noreferrer', renderIcon: Launch, children: "Learn more about audit log" }), _jsx(Modal, { open: showDisableModal, modalHeading: 'Disable the audit log', primaryButtonText: 'Disable', secondaryButtonText: 'Cancel', danger: true, onRequestClose: () => setShowDisableModal(false), onRequestSubmit: handleDisableConfirm, onSecondarySubmit: () => setShowDisableModal(false), children: _jsxs("p", { children: ["Are you sure you want to disable the audit log for the cluster?", _jsx("br", {}), "User and client operations will no longer be logged."] }) })] }));
158
+ maxWidth: '40rem',
159
+ }, children: AUDIT_LOG_DESCRIPTION })] }), settingsBody] }) })), _jsx(Link, { href: learnMoreUrl, target: '_blank', rel: 'noopener noreferrer', renderIcon: Launch, children: "Learn more about audit log" }), _jsx(Modal, { open: showDisableModal, modalHeading: 'Disable the audit log', primaryButtonText: 'Disable', secondaryButtonText: 'Cancel', danger: true, onRequestClose: () => setShowDisableModal(false), onRequestSubmit: handleDisableConfirm, onSecondarySubmit: () => setShowDisableModal(false), children: _jsxs("p", { children: ["Are you sure you want to disable the audit log for the cluster?", _jsx("br", {}), "User and client operations will no longer be logged."] }) })] }));
149
160
  };
@@ -6,6 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  */
7
7
  import { Column, Grid } from '@carbon/react';
8
8
  import styled from 'styled-components';
9
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
9
10
  import { Stack } from '../../ui/index.js';
10
11
  import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
11
12
  import { ClusterReservations } from './elements/cluster-reservations.js';
@@ -32,7 +33,10 @@ const Wrapper = styled.div `
32
33
  }
33
34
  `;
34
35
  export const C4BillingPage = ({ title, subheading, planDetails, usageAlerts, clusterReservations, currentUsageMetrics, isEnterpriseOrg = false, }) => {
35
- const component = (_jsx(C4PageLayout, { children: _jsx(Wrapper, { children: _jsxs(Stack, { gap: 6, children: [_jsx(Grid, { style: { ...STYLES.grid }, children: _jsx(Column, { span: 16, style: { ...STYLES.grid }, children: _jsxs(Stack, { gap: 6, children: [title && _jsx("h1", { children: title }), subheading && (_jsx("span", { style: { color: 'var(--cds-text-secondary)' }, children: subheading }))] }) }) }), _jsxs(Stack, { gap: 5, children: [_jsxs(TopRowWrapper, { style: { ...STYLES.grid }, children: [_jsx("div", { children: _jsx(PlanDetails, { ...planDetails }) }), _jsx("div", { children: usageAlerts && _jsx(UsageAlerts, { ...usageAlerts }) })] }), _jsx(Grid, { style: { ...STYLES.grid }, children: _jsx(Column, { span: 16, style: { ...STYLES.grid }, children: _jsx(CurrentUsageMetrics, { ...currentUsageMetrics, isEnterpriseOrg: isEnterpriseOrg }) }) }), _jsx(Grid, { style: { ...STYLES.grid }, children: _jsx(Column, { span: 16, style: { ...STYLES.grid }, children: _jsx("div", { style: {
36
+ // ds mode: the page sits in a tab under the `h1` page title of the page
37
+ // template, so its own title is an `h2`. Carbon keeps its `h1`.
38
+ const TitleHeading = useC4DesignSystem() === 'ds' ? 'h2' : 'h1';
39
+ const component = (_jsx(C4PageLayout, { children: _jsx(Wrapper, { children: _jsxs(Stack, { gap: 6, children: [_jsx(Grid, { style: { ...STYLES.grid }, children: _jsx(Column, { span: 16, style: { ...STYLES.grid }, children: _jsxs(Stack, { gap: 6, children: [title && _jsx(TitleHeading, { children: title }), subheading && (_jsx("span", { style: { color: 'var(--cds-text-secondary)' }, children: subheading }))] }) }) }), _jsxs(Stack, { gap: 5, children: [_jsxs(TopRowWrapper, { style: { ...STYLES.grid }, children: [_jsx("div", { children: _jsx(PlanDetails, { ...planDetails }) }), _jsx("div", { children: usageAlerts && _jsx(UsageAlerts, { ...usageAlerts }) })] }), _jsx(Grid, { style: { ...STYLES.grid }, children: _jsx(Column, { span: 16, style: { ...STYLES.grid }, children: _jsx(CurrentUsageMetrics, { ...currentUsageMetrics, isEnterpriseOrg: isEnterpriseOrg }) }) }), _jsx(Grid, { style: { ...STYLES.grid }, children: _jsx(Column, { span: 16, style: { ...STYLES.grid }, children: _jsx("div", { style: {
36
40
  display: 'flex',
37
41
  flexDirection: 'column',
38
42
  overflowX: 'auto',
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { BreadcrumbSkeleton, CodeSnippet, Link, OverflowMenu, OverflowMenuItem, Stack, Tag, } from '../../ui/index.js';
2
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
3
+ import { BreadcrumbSkeleton, CodeSnippet, DsHeading, Link, OverflowMenu, OverflowMenuItem, Stack, Tag, } from '../../ui/index.js';
3
4
  import { useBreadcrumbFamily } from '../../ui/families.js';
4
5
  const breadCrumbWrapperStyles = {
5
6
  minHeight: '40px',
@@ -16,6 +17,8 @@ const headerRowStyles = {
16
17
  };
17
18
  export const C4Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu, tag, indicator, subtitleBadges, codeSnippet, }) => {
18
19
  const { Breadcrumb, BreadcrumbItem } = useBreadcrumbFamily();
20
+ const designSystem = useC4DesignSystem();
21
+ const isDs = designSystem === 'ds';
19
22
  let breadcrumb = null;
20
23
  if (loading) {
21
24
  // Same "no elements, no breadcrumb" rule as the loaded branch that
@@ -32,9 +35,11 @@ export const C4Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu,
32
35
  element.onClick();
33
36
  }
34
37
  }, style: { cursor: 'pointer' }, children: element.label }) }, element.key));
35
- }) })), (menu || title || tag || indicator || codeSnippet) && (_jsxs("div", { style: headerRowStyles, children: [_jsxs(Stack, { orientation: 'horizontal', gap: 4, children: [title && _jsx("h2", { style: { marginTop: '2px' }, children: title }), tag && _jsx(Tag, { type: 'blue', children: tag }), codeSnippet?.text && (_jsx(CodeSnippet, { feedback: codeSnippet?.copyFeedback, type: 'inline', children: codeSnippet.text }))] }), menu && (_jsx(OverflowMenu, { "aria-label": 'cluster operations', children: menu.map((item) => {
38
+ }) })), (menu || title || tag || indicator || codeSnippet) && (_jsxs("div", { style: headerRowStyles, children: [_jsxs(Stack, { orientation: 'horizontal', gap: 4, ...(isDs ? { className: 'items-center' } : {}), children: [title &&
39
+ (isDs ? (_jsx(DsHeading, { as: 'h1', variant: 'heading-lg', className: 'm-0', children: title })) : (_jsx("h2", { style: { marginTop: '2px' }, children: title }))), tag && _jsx(Tag, { type: 'blue', children: tag }), codeSnippet?.text && (_jsx(CodeSnippet, { feedback: codeSnippet?.copyFeedback, type: 'inline', children: codeSnippet.text }))] }), menu && (_jsx(OverflowMenu, { "aria-label": 'cluster operations', children: menu.map((item) => {
36
40
  return (_jsx(OverflowMenuItem, { id: item.key, onClick: () => item.onClick(), itemText: item.label, isDelete: item.isDelete }, item.key));
37
- }) })), indicator && _jsx("div", { style: { marginLeft: 'auto' }, children: indicator })] })), subtitleBadges && (_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '0.5rem' }, children: subtitleBadges }))] }));
41
+ }) })), indicator && _jsx("div", { style: { marginLeft: 'auto' }, children: indicator })] })), subtitleBadges &&
42
+ (isDs ? (_jsx("div", { className: 'flex flex-wrap items-center gap-1.5', children: subtitleBadges })) : (_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '0.5rem' }, children: subtitleBadges })))] }));
38
43
  }
39
44
  return _jsx("div", { style: breadCrumbWrapperStyles, children: breadcrumb });
40
45
  };
@@ -1,3 +1,13 @@
1
1
  import type { JSX } from 'react';
2
2
  import type { C4ClusterByomClientsProps } from './c4-cluster-byom-clients.types.js';
3
+ /**
4
+ * True when `C4ClusterByomClients` renders an empty-state card of its own
5
+ * (an error, or no clients after loading) instead of its table. A host that
6
+ * adds a card around the component uses this to avoid a second card.
7
+ */
8
+ export declare function byomClientsShowsOwnCard(props: {
9
+ hasError: boolean;
10
+ isLoading: boolean;
11
+ clients: readonly unknown[];
12
+ }): boolean;
3
13
  export declare const C4ClusterByomClients: ({ clients, isLoading, hasError, text, urls, permissions, onActivateEndpoint, onCreateClient, onRotatePassword, onDeleteClient, onRefresh, onOpenDocs, }: C4ClusterByomClientsProps) => JSX.Element;
@@ -5,6 +5,14 @@ import { CodeSnippet, Stack } from '../../ui/index.js';
5
5
  import { C4DataTable } from '../c4-data-table/c4-data-table.js';
6
6
  import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
7
7
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
8
+ /**
9
+ * True when `C4ClusterByomClients` renders an empty-state card of its own
10
+ * (an error, or no clients after loading) instead of its table. A host that
11
+ * adds a card around the component uses this to avoid a second card.
12
+ */
13
+ export function byomClientsShowsOwnCard(props) {
14
+ return props.hasError || (!props.isLoading && props.clients.length === 0);
15
+ }
8
16
  export const C4ClusterByomClients = ({ clients, isLoading, hasError, text, urls, permissions, onActivateEndpoint, onCreateClient, onRotatePassword, onDeleteClient, onRefresh, onOpenDocs, }) => {
9
17
  const tableData = clients.map((client, index) => ({
10
18
  ...client,
@@ -105,7 +113,7 @@ export const C4ClusterByomClients = ({ clients, isLoading, hasError, text, urls,
105
113
  icon: Renew,
106
114
  } }));
107
115
  }
108
- if (!isLoading && clients.length === 0) {
116
+ if (byomClientsShowsOwnCard({ hasError, isLoading, clients })) {
109
117
  return (_jsx(C4EmptyState, { card: true, icon: {
110
118
  path: C4_ASSET_URLS.monitoringIcon,
111
119
  altText: 'monitoringIcon',
@@ -5,12 +5,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { InlineLoading, Layer } from '@carbon/react';
8
- import { Download, Save } from '@carbon/react/icons/index.esm.js';
8
+ import { Download as CarbonDownload, Save as CarbonSave, } from '@carbon/react/icons/index.esm.js';
9
+ import { Download as LucideDownload, Save as LucideSave } from 'lucide-react';
9
10
  import { useState } from 'react';
11
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
10
12
  import { Button, CodeSnippet, Modal, Stack } from '../../ui/index.js';
11
13
  import { useTabsFamily } from '../../ui/tabs.js';
12
14
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
13
15
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
16
+ import { DsCredentialItems } from './ds-credential-items.js';
14
17
  export const C4ClusterClientCredentialsModal = (props) => {
15
18
  const { Tabs, Tab, TabList, TabPanel, TabPanels } = useTabsFamily();
16
19
  return (_jsx(Modal, { passiveModal: true, onRequestClose: props.onRequestClose, open: props.isOpen, modalHeading: props.heading, size: 'lg', children: _jsxs(Stack, { gap: 6, children: [_jsx("div", { children: props.description }), _jsx(C4InlineNotification, { lowContrast: true, kind: 'warning', title: props.notificationText, hideCloseButton: true }), _jsxs(Tabs, { children: [_jsx(TabList, { "aria-label": 'download', children: props.variants.map((variant) => (_jsx(Tab, { children: variant.tabTitle }, variant.key))) }), _jsx(TabPanels, { children: props.variants.map((variant) => {
@@ -18,8 +21,12 @@ export const C4ClusterClientCredentialsModal = (props) => {
18
21
  return (_jsxs(TabPanel, { children: [variant.type === 'codesnippet' && (_jsx(C4ClusterClientCredentialsVariantCodeSnippet, { ...variantProps })), variant.type === 'items' && (_jsx(C4ClusterClientCredentialsVariantItems, { ...variantProps }))] }, key));
19
22
  }) })] })] }) }));
20
23
  };
21
- const C4ClusterClientCredentialsVariantDownload = (props) => (_jsx(Button, { kind: 'tertiary', size: 'md', renderIcon: Download, onClick: props.onClick, children: props.label }));
24
+ const C4ClusterClientCredentialsVariantDownload = (props) => {
25
+ const isDs = useC4DesignSystem() === 'ds';
26
+ return (_jsx(Button, { kind: 'tertiary', size: 'md', renderIcon: isDs ? LucideDownload : CarbonDownload, onClick: props.onClick, children: props.label }));
27
+ };
22
28
  const C4ClusterClientCredentialsVariantAdditionalAction = (props) => {
29
+ const isDs = useC4DesignSystem() === 'ds';
23
30
  const [isLoading, setIsLoading] = useState(false);
24
31
  const handleClick = async () => {
25
32
  setIsLoading(true);
@@ -39,7 +46,7 @@ const C4ClusterClientCredentialsVariantAdditionalAction = (props) => {
39
46
  if (isLoading) {
40
47
  return _jsx(InlineLoading, { description: 'Saving...' });
41
48
  }
42
- return (_jsx(Button, { kind: 'tertiary', size: 'md', renderIcon: Save, onClick: handleClick, children: props.label }));
49
+ return (_jsx(Button, { kind: 'tertiary', size: 'md', renderIcon: isDs ? LucideSave : CarbonSave, onClick: handleClick, children: props.label }));
43
50
  };
44
51
  export const C4ClusterClientCredentialsVariantCodeSnippet = (props) => {
45
52
  const variant = props;
@@ -52,12 +59,13 @@ export const C4ClusterClientCredentialsVariantCodeSnippet = (props) => {
52
59
  };
53
60
  export const C4ClusterClientCredentialsVariantItems = (props) => {
54
61
  const variant = props;
55
- const content = (_jsxs(Stack, { gap: 5, children: [_jsx("div", { children: variant.description }), _jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, style: { minWidth: '0' }, children: _jsx(C4StructuredListBody, { children: variant.items.map((item, index) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: { width: '200px' }, children: item.label }), _jsx(C4StructuredListCell, { children: _jsx(Layer, { children: _jsx(CodeSnippet, { type: 'single', wrapText: true, copyText: item.value, style: {
62
+ const isDs = useC4DesignSystem() === 'ds';
63
+ const content = (_jsxs(Stack, { gap: 5, children: [_jsx("div", { children: variant.description }), isDs ? (_jsx(DsCredentialItems, { items: variant.items })) : (_jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, style: { minWidth: '0' }, children: _jsx(C4StructuredListBody, { children: variant.items.map((item, index) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: { width: '200px' }, children: item.label }), _jsx(C4StructuredListCell, { children: _jsx(Layer, { children: _jsx(CodeSnippet, { type: 'single', wrapText: true, copyText: item.value, style: {
56
64
  zIndex: `${(variant.items.length - index) * 100}`,
57
65
  }, onClick: () => {
58
66
  if (item.onClick) {
59
67
  item.onClick();
60
68
  }
61
- }, children: item.value }) }) })] }, item.key))) }) }), (variant.download || variant.additionalAction) && (_jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [variant.download && (_jsx(C4ClusterClientCredentialsVariantDownload, { ...variant.download })), variant.additionalAction && (_jsx(C4ClusterClientCredentialsVariantAdditionalAction, { label: variant.additionalAction.label, onClick: variant.additionalAction.onClick }))] })), variant.content && (_jsx("div", { style: { borderTop: '1px solid black' }, children: variant.content }))] }));
69
+ }, children: item.value }) }) })] }, item.key))) }) })), (variant.download || variant.additionalAction) && (_jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [variant.download && (_jsx(C4ClusterClientCredentialsVariantDownload, { ...variant.download })), variant.additionalAction && (_jsx(C4ClusterClientCredentialsVariantAdditionalAction, { label: variant.additionalAction.label, onClick: variant.additionalAction.onClick }))] })), variant.content && (_jsx("div", { style: { borderTop: '1px solid black' }, children: variant.content }))] }));
62
70
  return content;
63
71
  };
@@ -0,0 +1,14 @@
1
+ import type { JSX } from 'react';
2
+ /**
3
+ * ds-mode only. The credential values of a client credentials dialog: per row,
4
+ * a label and a compact copyable value. The Carbon structured list stretched
5
+ * each value to the full row height.
6
+ */
7
+ export declare function DsCredentialItems(props: {
8
+ items: Array<{
9
+ key: string;
10
+ label: string;
11
+ value: string;
12
+ onClick?: () => void;
13
+ }>;
14
+ }): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DsCompactCodeBlock, DsText } from '../../ui/index.js';
3
+ /**
4
+ * ds-mode only. The credential values of a client credentials dialog: per row,
5
+ * a label and a compact copyable value. The Carbon structured list stretched
6
+ * each value to the full row height.
7
+ */
8
+ export function DsCredentialItems(props) {
9
+ return (_jsx("dl", { className: 'm-0 flex flex-col gap-3', children: props.items.map((item) => (_jsxs("div", { className: 'grid items-center gap-4', style: { gridTemplateColumns: '10rem minmax(0, 1fr)' }, children: [_jsx("dt", { className: 'm-0', children: _jsx(DsText, { variant: 'label-md', children: item.label }) }), _jsx("dd", { className: 'm-0 min-w-0', children: _jsx(DsCompactCodeBlock
10
+ // Report only a copy that worked, not a failed or empty one.
11
+ , {
12
+ // Report only a copy that worked, not a failed or empty one.
13
+ onCopy: (_text, success) => {
14
+ if (success) {
15
+ item.onClick?.();
16
+ }
17
+ }, children: item.value }) })] }, item.key))) }));
18
+ }
@@ -5,24 +5,34 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { InlineLoading, Layer } from '@carbon/react';
8
- import { Download, Save } from '@carbon/react/icons/index.esm.js';
8
+ import { Download as CarbonDownload, Save as CarbonSave, } from '@carbon/react/icons/index.esm.js';
9
+ import { Download as LucideDownload, Save as LucideSave } from 'lucide-react';
9
10
  import { useState } from 'react';
10
- import { Button, CodeSnippet, Modal, Stack } from '../../ui/index.js';
11
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
12
+ import { Button, CodeSnippet, DsCompactCodeBlock, DsText, Modal, Stack, } from '../../ui/index.js';
11
13
  import { useTabsFamily } from '../../ui/tabs.js';
14
+ import { DsCredentialItems } from '../c4-cluster-client-credentials/ds-credential-items.js';
12
15
  import { C4Divider } from '../c4-divider/c4-divider.js';
13
16
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
14
17
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
15
18
  export const C4ClusterClientCredentialsIdentityModal = (props) => {
16
19
  const { Tabs, Tab, TabList, TabPanel, TabPanels } = useTabsFamily();
20
+ const isDs = useC4DesignSystem() === 'ds';
17
21
  return (_jsx(Modal, { passiveModal: true, onRequestClose: props.onRequestClose, open: props.isOpen, modalHeading: props.heading, preventCloseOnClickOutside: true, selectorPrimaryFocus: '.cds--btn--tertiary', size: 'lg', children: _jsxs(Stack, { gap: 4, children: [_jsx("strong", { children: props.step1Header }), _jsxs(Tabs, { children: [_jsx(TabList, { "aria-label": 'download', contained: true, children: props.variants.map((variant) => (_jsx(Tab, { children: variant.tabTitle }, variant.key))) }), _jsx(TabPanels, { children: props.variants.map((variant) => {
18
22
  const { key, ...variantProps } = variant;
19
23
  return (_jsxs(TabPanel, { style: { marginTop: '-12px', padding: '1rem' }, children: [variant.type === 'codesnippet' && (_jsx(C4ClusterClientCredentialsIdentitysVariantCodeSnippet, { ...variantProps })), variant.type === 'items' && (_jsx(C4ClusterClientCredentialsIdentitysVariantItems, { ...variantProps }))] }, key));
20
- }) })] }), _jsx(C4Divider, {}), _jsx("strong", { children: props.step2Header }), _jsx("div", { children: props.step2Description }), _jsxs(Stack, { gap: 2, children: [_jsx("p", { style: { color: 'var(--cds-text-helper)', alignSelf: 'end' }, children: "Client ID" }), _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.clientId })] }), _jsx(Button, { kind: 'primary', size: 'md', onClick: () => {
24
+ }) })] }), _jsx(C4Divider, {}), _jsx("strong", { children: props.step2Header }), _jsx("div", { children: props.step2Description }), _jsxs(Stack, { gap: 2, children: [isDs ? (_jsx(DsText, { as: 'p', variant: 'label-md', className: 'm-0', children: "Client ID" })) : (_jsx("p", { style: { color: 'var(--cds-text-helper)', alignSelf: 'end' }, children: "Client ID" })), isDs ? (
25
+ // Full width, like the credential values of step 1.
26
+ _jsx(DsCompactCodeBlock, { children: props.clientId })) : (_jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.clientId }))] }), _jsx(Button, { kind: 'primary', size: 'md', onClick: () => {
21
27
  window.open(props.identityLink, '_blank');
22
28
  }, children: props.identityButtonText })] }) }));
23
29
  };
24
- const C4ClusterClientCredentialsIdentitysVariantDownload = (props) => (_jsx(Button, { id: 'credentials-download-button', kind: 'tertiary', size: 'md', renderIcon: Download, onClick: props.onClick, children: props.label }));
30
+ const C4ClusterClientCredentialsIdentitysVariantDownload = (props) => {
31
+ const isDs = useC4DesignSystem() === 'ds';
32
+ return (_jsx(Button, { id: 'credentials-download-button', kind: 'tertiary', size: 'md', renderIcon: isDs ? LucideDownload : CarbonDownload, onClick: props.onClick, children: props.label }));
33
+ };
25
34
  const C4ClusterClientCredentialsIdentitysVariantAdditionalAction = (props) => {
35
+ const isDs = useC4DesignSystem() === 'ds';
26
36
  const [isLoading, setIsLoading] = useState(false);
27
37
  const handleClick = async () => {
28
38
  setIsLoading(true);
@@ -42,7 +52,7 @@ const C4ClusterClientCredentialsIdentitysVariantAdditionalAction = (props) => {
42
52
  if (isLoading) {
43
53
  return _jsx(InlineLoading, { description: 'Saving...' });
44
54
  }
45
- return (_jsx(Button, { kind: 'tertiary', size: 'md', renderIcon: Save, onClick: handleClick, children: props.label }));
55
+ return (_jsx(Button, { kind: 'tertiary', size: 'md', renderIcon: isDs ? LucideSave : CarbonSave, onClick: handleClick, children: props.label }));
46
56
  };
47
57
  export const C4ClusterClientCredentialsIdentitysVariantCodeSnippet = (props) => {
48
58
  const variant = props;
@@ -57,13 +67,14 @@ export const C4ClusterClientCredentialsIdentitysVariantCodeSnippet = (props) =>
57
67
  };
58
68
  export const C4ClusterClientCredentialsIdentitysVariantItems = (props) => {
59
69
  const variant = props;
60
- const content = (_jsxs(Stack, { gap: 5, children: [_jsx("div", { children: variant.description }), _jsx(C4InlineNotification, { lowContrast: true, kind: 'warning', title: props.notificationText, hideCloseButton: true, style: { maxInlineSize: '100%' } }), _jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, style: { minWidth: '0' }, children: _jsx(C4StructuredListBody, { children: variant.items.map((item, index) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: { width: '200px' }, children: item.label }), _jsx(C4StructuredListCell, { style: { paddingRight: '0px' }, children: _jsx(Layer, { children: _jsx(CodeSnippet, { type: 'single', wrapText: true, copyText: item.value, style: {
70
+ const isDs = useC4DesignSystem() === 'ds';
71
+ const content = (_jsxs(Stack, { gap: 5, children: [_jsx("div", { children: variant.description }), _jsx(C4InlineNotification, { lowContrast: true, kind: 'warning', title: props.notificationText, hideCloseButton: true, style: { maxInlineSize: '100%' } }), isDs ? (_jsx(DsCredentialItems, { items: variant.items })) : (_jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, style: { minWidth: '0' }, children: _jsx(C4StructuredListBody, { children: variant.items.map((item, index) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: { width: '200px' }, children: item.label }), _jsx(C4StructuredListCell, { style: { paddingRight: '0px' }, children: _jsx(Layer, { children: _jsx(CodeSnippet, { type: 'single', wrapText: true, copyText: item.value, style: {
61
72
  zIndex: `${(variant.items.length - index) * 100}`,
62
73
  maxInlineSize: '100%',
63
74
  }, onClick: () => {
64
75
  if (item.onClick) {
65
76
  item.onClick();
66
77
  }
67
- }, children: item.value }) }) })] }, item.key))) }) }), (variant.download || variant.additionalAction) && (_jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [variant.download && (_jsx(C4ClusterClientCredentialsIdentitysVariantDownload, { ...variant.download })), variant.additionalAction && (_jsx(C4ClusterClientCredentialsIdentitysVariantAdditionalAction, { label: variant.additionalAction.label, onClick: variant.additionalAction.onClick }))] }))] }));
78
+ }, children: item.value }) }) })] }, item.key))) }) })), (variant.download || variant.additionalAction) && (_jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [variant.download && (_jsx(C4ClusterClientCredentialsIdentitysVariantDownload, { ...variant.download })), variant.additionalAction && (_jsx(C4ClusterClientCredentialsIdentitysVariantAdditionalAction, { label: variant.additionalAction.label, onClick: variant.additionalAction.onClick }))] }))] }));
68
79
  return content;
69
80
  };
@@ -2,10 +2,10 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  export const defaultText = {
3
3
  title: 'Client credentials',
4
4
  subtitle: 'Open a set of credentials to see the base URLs, connection information, and more.',
5
- subtitleIdentityPrefix: "To set up permissions, copy the client ID over to the cluster's Identity and configure the required access and roles. Learn more about",
5
+ subtitleIdentityPrefix: "To set up permissions, copy the client ID over to the cluster's Admin and configure the required access and roles. Learn more about",
6
6
  subtitleIdentityLinkLabel: 'client credentials',
7
7
  subtitleIdentitySuffix: '.',
8
- identityButton: 'Configure authorizations in Identity',
8
+ identityButton: 'Configure authorizations',
9
9
  createButton: 'Create new client',
10
10
  createFirstClient: 'Create your first client',
11
11
  searchLabel: 'Search',
@@ -1,16 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /*
3
- * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
- * under one or more contributor license agreements. Licensed under a commercial license.
5
- * You may not use this file except in compliance with the commercial license.
6
- */
7
- import { C3ClusterTag, } from '@camunda/camunda-composite-components';
8
2
  import { Add, WarningAltFilled } from '@carbon/react/icons/index.esm.js';
9
3
  import { useCallback, useEffect, useRef, } from 'react';
10
4
  import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
11
- import { Button, Link } from '../../ui/index.js';
5
+ import { Button, ClusterTag, Link } from '../../ui/index.js';
12
6
  import { ClusterStatusElement, normalizeClusterStatus, } from '../c4-cluster-overview/applications.js';
13
- import { C4IconAndTextElement, getClusterLoadConfig, } from '../c4-cluster-overview/c4-cluster-overview.js';
7
+ import { C4IconAndTextElement, getClusterLoadConfig, getDsClusterLoadPresentation, } from '../c4-cluster-overview/c4-cluster-overview.js';
14
8
  import { C4DataTable } from '../c4-data-table/c4-data-table.js';
15
9
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
16
10
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
@@ -288,7 +282,7 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
288
282
  options: {
289
283
  wrapperOptions: {
290
284
  wrapper: (row) => {
291
- return row.tags?.length > 0 ? (_jsx(C3ClusterTag, { stage: row.tags[0] })) : (permissions.canUpdateTag && (_jsx(C4LinkButton, { label: translations.tags.addLabel, onClick: () => onAssignTag(row.id), disabled: !permissions.canUpdateTag, style: { alignSelf: 'center' }, icon: _jsx(Add, {}) })));
285
+ return row.tags?.length > 0 ? (_jsx(ClusterTag, { stage: row.tags[0] })) : (permissions.canUpdateTag && (_jsx(C4LinkButton, { label: translations.tags.addLabel, onClick: () => onAssignTag(row.id), disabled: !permissions.canUpdateTag, style: { alignSelf: 'center' }, icon: _jsx(Add, {}) })));
292
286
  },
293
287
  },
294
288
  },
@@ -312,7 +306,7 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
312
306
  }
313
307
  const currentClusterLoadConfig = getClusterLoadConfig(row.currentClusterLoad);
314
308
  return (_jsx(_Fragment, { children: row.currentClusterLoad === undefined ||
315
- isClusterPaused(row.id) ? (_jsx("span", { children: "-" })) : (_jsx(C4IconAndTextElement, { text: `${row.currentClusterLoad.toFixed(2)}%`, color: currentClusterLoadConfig.color, icon: currentClusterLoadConfig.icon, tooltip: {
309
+ isClusterPaused(row.id) ? (_jsx("span", { children: "-" })) : (_jsx(C4IconAndTextElement, { text: `${row.currentClusterLoad.toFixed(2)}%`, color: currentClusterLoadConfig.color, icon: currentClusterLoadConfig.icon, dsIcon: getDsClusterLoadPresentation(row.currentClusterLoad), tooltip: {
316
310
  label: translations.tooltips.clusterLoad,
317
311
  align: row.originalIndex > 1 ? 'top' : 'bottom',
318
312
  } })) }));
@@ -23,10 +23,7 @@ export interface ClusterListPermissions {
23
23
  canSeeClusterLoad: boolean;
24
24
  canWakeCluster: boolean;
25
25
  canFailoverCluster?: boolean;
26
- /**
27
- * Gated by the `console.clusterDuplication` flag as well as by the create
28
- * permission: a duplicate makes a cluster.
29
- */
26
+ /** Gated by the create permission: a duplicate makes a cluster. */
30
27
  canDuplicateCluster?: boolean;
31
28
  createClusterButtonDisabled: boolean;
32
29
  }
@@ -1,4 +1,5 @@
1
1
  import { type JSX } from 'react';
2
+ import { type DsStatusIcon } from './ds-status-icon-text.js';
2
3
  export declare enum StatusColor {
3
4
  HEALTHY = "var(--cds-support-success)",
4
5
  UNHEALTHY = "var(--cds-support-error)",
@@ -9,6 +10,20 @@ export declare enum StatusColor {
9
10
  }
10
11
  export type ClusterStatus = 'healthy' | 'unhealthy' | 'creating' | 'updating' | 'waitingForInput' | 'suspended' | 'resuming' | 'maintenance' | 'restoring';
11
12
  export declare const normalizeClusterStatus: (status: string | undefined | null) => ClusterStatus | undefined;
13
+ /**
14
+ * The DS badge variant of each status, as the cluster and environment headers
15
+ * in Hub use it.
16
+ */
17
+ declare const DS_CLUSTER_STATUS_BADGE_VARIANT: Record<ClusterStatus, 'success' | 'danger' | 'info' | 'warning' | 'neutral'>;
18
+ /**
19
+ * The icon, label and badge variant of a status for a DS `Badge` (ds mode
20
+ * only). It gives `undefined` for a value that `normalizeClusterStatus` does
21
+ * not know.
22
+ */
23
+ export declare function getDsClusterStatusBadge(status: string | undefined): (DsStatusIcon & {
24
+ label: string;
25
+ variant: (typeof DS_CLUSTER_STATUS_BADGE_VARIANT)[ClusterStatus];
26
+ }) | undefined;
12
27
  export interface ApplicationTileProps {
13
28
  name: string;
14
29
  status?: ClusterStatus;
@@ -69,3 +84,4 @@ export interface ApplicationsProps {
69
84
  variant?: 'tile' | 'plain';
70
85
  }
71
86
  export declare const Applications: (props: ApplicationsProps) => JSX.Element;
87
+ export {};