dashboard-shell-shell 3.0.5-test.5 → 3.0.5-test.6

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 (212) hide show
  1. package/assets/brand/harvester/favicon.png +0 -0
  2. package/assets/brand/suse/favicon.png +0 -0
  3. package/assets/images/pl/half-logo.svg +23 -2
  4. package/assets/images/pl/harvester.png +0 -0
  5. package/assets/styles/app.scss +0 -4
  6. package/assets/styles/base/_basic.scss +2 -2
  7. package/assets/styles/base/_mixins.scss +1 -1
  8. package/assets/styles/base/_typography.scss +1 -2
  9. package/assets/styles/base/_variables.scss +4 -11
  10. package/assets/styles/global/_button.scss +25 -43
  11. package/assets/styles/global/_columns.scss +1 -3
  12. package/assets/styles/global/_form.scss +13 -45
  13. package/assets/styles/global/_labeled-input.scss +26 -54
  14. package/assets/styles/global/_layout.scss +3 -8
  15. package/assets/styles/global/_select.scss +17 -25
  16. package/assets/styles/global/_table.scss +1 -7
  17. package/assets/styles/global/_tooltip.scss +8 -56
  18. package/assets/styles/themes/_dark.scss +0 -3
  19. package/assets/styles/themes/_light.scss +43 -66
  20. package/assets/styles/vendor/vue-select.scss +9 -22
  21. package/assets/translations/en-us.yaml +4 -28
  22. package/assets/translations/zh-hans.yaml +189 -452
  23. package/components/ActionDropdown.vue +1 -2
  24. package/components/ActionMenu.vue +2 -2
  25. package/components/ActionMenuShell.vue +0 -2
  26. package/components/AppModal.vue +5 -46
  27. package/components/BrandImage.vue +0 -1
  28. package/components/ButtonDropdown.vue +4 -26
  29. package/components/ButtonMultiAction.vue +0 -1
  30. package/components/ClusterIconMenu.vue +1 -1
  31. package/components/CodeMirror.vue +6 -20
  32. package/components/ConsumptionGauge.vue +5 -24
  33. package/components/CopyToClipboard.vue +0 -15
  34. package/components/CruResource.vue +8 -9
  35. package/components/CruResourceFooter.vue +2 -2
  36. package/components/DashboardOptions.vue +17 -29
  37. package/components/Drawer/Chrome.vue +2 -2
  38. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +23 -23
  39. package/components/Drawer/ResourceDetailDrawer/index.vue +2 -2
  40. package/components/ExplorerMembers.vue +3 -18
  41. package/components/ExplorerProjectsNamespaces.vue +5 -19
  42. package/components/GlobalRoleBindings.vue +48 -112
  43. package/components/GrafanaDashboard.vue +4 -4
  44. package/components/GrowlManager.vue +1 -3
  45. package/components/HardwareResourceGauge.vue +3 -39
  46. package/components/IndentedPanel.vue +10 -4
  47. package/components/InfoBox.vue +3 -3
  48. package/components/InputOrDisplay.vue +2 -28
  49. package/components/LabelValue.vue +1 -20
  50. package/components/ModalWithCard.vue +3 -12
  51. package/components/PodSecurityAdmission.vue +1 -1
  52. package/components/PromptModal.vue +1 -1
  53. package/components/PromptRemove.vue +11 -30
  54. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +3 -1
  55. package/components/Resource/Detail/Metadata/KeyValue.vue +4 -8
  56. package/components/Resource/Detail/Metadata/index.vue +1 -2
  57. package/components/Resource/Detail/TitleBar/Title.vue +3 -4
  58. package/components/Resource/Detail/TitleBar/index.vue +24 -103
  59. package/components/ResourceDetail/Masthead/legacy.vue +38 -181
  60. package/components/ResourceDetail/legacy.vue +14 -32
  61. package/components/ResourceList/Masthead.vue +54 -226
  62. package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
  63. package/components/ResourceTable.vue +2 -24
  64. package/components/SideNav.vue +20 -74
  65. package/components/SortableTable/THead.vue +3 -33
  66. package/components/SortableTable/index.vue +464 -1017
  67. package/components/SortableTable/paging.js +16 -26
  68. package/components/SortableTable/selection.js +2 -2
  69. package/components/Tabbed/Tab.vue +3 -3
  70. package/components/Tabbed/index.vue +30 -48
  71. package/components/YamlEditor.vue +1 -0
  72. package/components/auth/Principal.vue +13 -37
  73. package/components/auth/RoleDetailEdit.vue +7 -58
  74. package/components/auth/SelectPrincipal.vue +0 -1
  75. package/components/form/ArrayList.vue +33 -41
  76. package/components/form/ArrayListGrouped.vue +2 -10
  77. package/components/form/ArrayListSelect.vue +1 -1
  78. package/components/form/BannerSettings.vue +59 -64
  79. package/components/form/ChangePassword.vue +4 -4
  80. package/components/form/ColorInput.vue +8 -32
  81. package/components/form/Footer.vue +8 -11
  82. package/components/form/InputWithSelect.vue +5 -8
  83. package/components/form/KeyValue.vue +7 -47
  84. package/components/form/LabeledSelect.vue +242 -214
  85. package/components/form/Labels.vue +3 -3
  86. package/components/form/MatchExpressions.vue +7 -24
  87. package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
  88. package/components/form/Members/MembershipEditor.vue +1 -1
  89. package/components/form/NameNsDescription.vue +20 -59
  90. package/components/form/Password.vue +7 -16
  91. package/components/form/PodAffinity.vue +5 -4
  92. package/components/form/ResourceQuota/Namespace.vue +4 -4
  93. package/components/form/ResourceQuota/NamespaceRow.vue +17 -18
  94. package/components/form/ResourceQuota/Project.vue +4 -4
  95. package/components/form/ResourceQuota/ProjectRow.vue +6 -3
  96. package/components/form/Select.vue +2 -5
  97. package/components/form/SimpleSecretSelector.vue +9 -29
  98. package/components/form/Taints.vue +1 -2
  99. package/components/form/UnitInput.vue +3 -8
  100. package/components/form/WorkloadPorts.vue +123 -143
  101. package/components/formatter/BadgeStateFormatter.vue +5 -8
  102. package/components/formatter/LiveDate.vue +3 -3
  103. package/components/nav/Favorite.vue +1 -5
  104. package/components/nav/Group.vue +99 -132
  105. package/components/nav/Header.vue +27 -124
  106. package/components/nav/HeaderPageActionMenu.vue +0 -1
  107. package/components/nav/NamespaceFilter.vue +15 -19
  108. package/components/nav/TopLevelMenu.vue +119 -182
  109. package/components/nav/Type.vue +41 -63
  110. package/composables/useClickOutside.ts +1 -1
  111. package/config/private-label.js +11 -15
  112. package/config/product/auth.js +7 -17
  113. package/config/product/settings.js +9 -19
  114. package/config/settings.ts +0 -28
  115. package/config/table-headers.js +2 -3
  116. package/dialog/ForceMachineRemoveDialog.vue +2 -2
  117. package/dialog/ScalePoolDownDialog.vue +2 -2
  118. package/edit/management.cattle.io.user.vue +4 -17
  119. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
  120. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
  121. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +12 -36
  122. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
  123. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  124. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
  125. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
  126. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
  127. package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
  128. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
  129. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
  130. package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
  131. package/edit/namespace.vue +2 -1
  132. package/edit/token.vue +12 -31
  133. package/edit/workload/index.vue +4 -4
  134. package/list/management.cattle.io.setting.vue +13 -22
  135. package/list/management.cattle.io.user.vue +3 -7
  136. package/list/namespace.vue +0 -3
  137. package/list/provisioning.cattle.io.cluster.vue +7 -6
  138. package/mixins/brand.js +0 -17
  139. package/package.json +1 -1
  140. package/pages/account/index.vue +25 -79
  141. package/pages/auth/login.vue +52 -220
  142. package/pages/auth/setup.vue +19 -142
  143. package/pages/c/_cluster/_product/namespaces.vue +5 -5
  144. package/pages/c/_cluster/auth/roles/index.vue +1 -19
  145. package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
  146. package/pages/c/_cluster/settings/banners.vue +102 -174
  147. package/pages/c/_cluster/settings/brand.vue +302 -350
  148. package/pages/c/_cluster/settings/performance.vue +38 -61
  149. package/pages/home.vue +30 -70
  150. package/pages/prefs.vue +25 -27
  151. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  152. package/public/index.html +4 -4
  153. package/rancher-components/BadgeState/BadgeState.vue +55 -38
  154. package/rancher-components/Banner/Banner.vue +8 -12
  155. package/rancher-components/Card/Card.vue +8 -7
  156. package/rancher-components/Form/Checkbox/Checkbox.vue +0 -4
  157. package/rancher-components/Form/LabeledInput/LabeledInput.vue +3 -42
  158. package/rancher-components/Form/Radio/RadioButton.vue +11 -35
  159. package/rancher-components/Form/Radio/RadioGroup.vue +5 -13
  160. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
  161. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -1
  162. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -12
  163. package/rancher-components/RcDropdown/RcDropdown.vue +7 -35
  164. package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
  165. package/rancher-components/RcDropdown/RcDropdownMenu.vue +6 -12
  166. package/rancher-components/RcDropdown/types.ts +0 -1
  167. package/rancher-components/StringList/StringList.vue +1 -1
  168. package/static/favicon.ico +0 -0
  169. package/static/favicon.png +0 -0
  170. package/static/loading-indicator.html +3 -3
  171. package/store/i18n.js +2 -5
  172. package/store/modal.ts +3 -3
  173. package/store/prefs.js +4 -11
  174. package/store/type-map.js +2 -32
  175. package/types/shell/index.d.ts +67 -74
  176. package/utils/error.js +8 -87
  177. package/utils/router.js +0 -21
  178. package/utils/select.js +3 -26
  179. package/utils/string.js +5 -8
  180. package/utils/title.ts +1 -1
  181. package/assets/icons/demo.css +0 -539
  182. package/assets/icons/demo.css:Zone.Identifier +0 -0
  183. package/assets/icons/demo_index.html +0 -1131
  184. package/assets/icons/demo_index.html:Zone.Identifier +0 -0
  185. package/assets/icons/iconfont.css +0 -216
  186. package/assets/icons/iconfont.css:Zone.Identifier +0 -0
  187. package/assets/icons/iconfont.js +0 -1
  188. package/assets/icons/iconfont.js:Zone.Identifier +0 -0
  189. package/assets/icons/iconfont.json +0 -324
  190. package/assets/icons/iconfont.json:Zone.Identifier +0 -0
  191. package/assets/icons/iconfont.ttf +0 -0
  192. package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
  193. package/assets/icons/iconfont.woff +0 -0
  194. package/assets/icons/iconfont.woff2 +0 -0
  195. package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
  196. package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
  197. package/assets/images/API.svg +0 -3
  198. package/assets/images/action.svg +0 -6
  199. package/assets/images/login/password.svg +0 -20
  200. package/assets/images/login/user.svg +0 -6
  201. package/assets/images/login-bg.png +0 -0
  202. package/assets/images/login-left.png +0 -0
  203. package/assets/images/login-logo.svg +0 -19
  204. package/assets/images/logo.png +0 -0
  205. package/assets/images/pl/logo.png +0 -0
  206. package/assets/images/promp-yellow.svg +0 -5
  207. package/assets/images/user.png +0 -0
  208. package/assets/styles/all.scss +0 -63
  209. package/components/DotState.vue +0 -84
  210. package/components/breadcrumb/index.vue +0 -340
  211. package/pages/account/pri.vue +0 -229
  212. package/utils/errorTranslate.json +0 -1336
@@ -287,33 +287,6 @@ export default {
287
287
  </div>
288
288
 
289
289
  <div>
290
- <div
291
- v-if="showAdd && !isView"
292
- class="footer mmt-6"
293
- >
294
- <slot
295
- v-if="showAdd"
296
- name="add"
297
- :add="add"
298
- >
299
- <button
300
- type="button"
301
- class="btn role-tertiary add"
302
- :class="[addClass]"
303
- :disabled="loading || disableAdd"
304
- :data-testid="`${componentTestid}-button`"
305
- :aria-label="_addLabel"
306
- role="button"
307
- @click="add()"
308
- >
309
- <i
310
- class="mr-5 icon"
311
- :class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
312
- />
313
- {{ _addLabel }}
314
- </button>
315
- </slot>
316
- </div>
317
290
  <template v-if="rows.length">
318
291
  <div
319
292
  v-if="showHeader"
@@ -430,6 +403,33 @@ export default {
430
403
  </div>
431
404
  </slot>
432
405
  </div>
406
+ <div
407
+ v-if="showAdd && !isView"
408
+ class="footer mmt-6"
409
+ >
410
+ <slot
411
+ v-if="showAdd"
412
+ name="add"
413
+ :add="add"
414
+ >
415
+ <button
416
+ type="button"
417
+ class="btn role-tertiary add"
418
+ :class="[addClass]"
419
+ :disabled="loading || disableAdd"
420
+ :data-testid="`${componentTestid}-button`"
421
+ :aria-label="_addLabel"
422
+ role="button"
423
+ @click="add()"
424
+ >
425
+ <i
426
+ class="mr-5 icon"
427
+ :class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
428
+ />
429
+ {{ _addLabel }}
430
+ </button>
431
+ </slot>
432
+ </div>
433
433
  </div>
434
434
  </div>
435
435
  </template>
@@ -451,20 +451,19 @@ export default {
451
451
  .value {
452
452
  flex: 1;
453
453
  INPUT {
454
- height: $input-height;
455
- border: solid var(--border-width) var(--input-border);
456
- padding: 4px 11px;
457
- &:hover{
458
- box-shadow: 0 4px 6px 0 var(--input-border-box-shadow);
459
- }
454
+ height: $unlabeled-input-height;
460
455
  }
461
456
  }
462
457
  }
458
+
459
+ .box.hide-remove-is-view {
460
+ grid-template-columns: auto;
461
+ }
462
+
463
463
  .remove {
464
464
  text-align: right;
465
465
  }
466
466
  .footer {
467
- margin-bottom: 24px;
468
467
  .protip {
469
468
  float: right;
470
469
  padding: 5px 0;
@@ -474,11 +473,4 @@ export default {
474
473
  .required {
475
474
  color: var(--error);
476
475
  }
477
- :deep() .labeled-input.compact-input{
478
- padding: 0px;
479
- }
480
- :deep() .box{
481
- margin-bottom: 10px;
482
- }
483
-
484
476
  </style>
@@ -127,16 +127,8 @@ export default {
127
127
  & > .remove {
128
128
  position: absolute;
129
129
 
130
- top: 10px;
131
- right: 10px;
132
- & > .close{
133
- width: 32px;
134
- min-width: 32px !important;
135
- color: var(--body-text);
136
- &:hover{
137
- color: var(--link);
138
- }
139
- }
130
+ top: 0;
131
+ right: 0;
140
132
  }
141
133
 
142
134
  & > .info-box {
@@ -98,6 +98,6 @@ export default {
98
98
 
99
99
  <style lang="scss" scoped>
100
100
  :deep() .unlabeled-select {
101
- height: 30px;
101
+ height: 61px;
102
102
  }
103
103
  </style>
@@ -117,7 +117,7 @@ export default ({
117
117
 
118
118
  <template>
119
119
  <div>
120
- <div class="row">
120
+ <div class="row mb-20">
121
121
  <div class="col span-6">
122
122
  <ColorInput
123
123
  v-model:value="value[bannerType].color"
@@ -137,7 +137,7 @@ export default ({
137
137
  />
138
138
  </div>
139
139
  </div>
140
- <div class="row mb-20">
140
+ <div class="row pb-10">
141
141
  <ToggleSwitch
142
142
  v-model:value="isHtml"
143
143
  :aria-label="`${t(`banner.${bannerType}`)} ${t('banner.toggleTextHtml')}`"
@@ -147,76 +147,71 @@ export default ({
147
147
  :on-label="t('banner.type.html')"
148
148
  />
149
149
  </div>
150
- <div v-if="!isHtml">
151
- <div
152
- class="row"
150
+ <div
151
+ v-if="!isHtml"
152
+ class="row"
153
+ >
154
+ <p
155
+ :id="bannerTitleId"
156
+ class="sr-only"
153
157
  >
158
+ {{ t(`banner.${bannerType}`) }}
159
+ </p>
160
+ <div class="col span-6">
161
+ <LabeledInput
162
+ v-model:value="value[bannerType].text"
163
+ :disabled="isUiDisabled"
164
+ :label="t('banner.text')"
165
+ type="multiline"
166
+ :aria-describedby="bannerTitleId"
167
+ />
154
168
  <p
155
- :id="bannerTitleId"
156
- class="sr-only"
169
+ v-if="isConsentBanner"
170
+ class="banner-input-footnote mt-5 mb-20"
157
171
  >
158
- {{ t(`banner.${bannerType}`) }}
172
+ {{ t('banner.consentFootnote') }}
159
173
  </p>
160
- <div class="col span-6">
161
- <LabeledInput
162
- v-model:value="value[bannerType].text"
163
- :disabled="isUiDisabled"
164
- :label="t('banner.text')"
165
- type="multiline"
166
- :aria-describedby="bannerTitleId"
167
- />
168
- <p
169
- v-if="isConsentBanner"
170
- class="banner-input-footnote mt-5 mb-20"
171
- >
172
- {{ t('banner.consentFootnote') }}
173
- </p>
174
- </div>
175
- <div class="col span-6">
176
- <LabeledSelect
177
- v-model:value="value[bannerType].fontSize"
178
- :data-testid="`banner_font_size_options${bannerType}`"
179
- :disabled="isUiDisabled"
180
- :label="t('banner.bannerFontSize.label')"
181
- :options="uiBannerFontSizeOptions"
182
- :aria-describedby="bannerTitleId"
183
- />
184
- </div>
185
174
  </div>
186
- <div class="row">
187
- <div class="col span-6">
188
- <RadioGroup
189
- v-model:value="value[bannerType].textAlignment"
190
- name="bannerAlignment"
191
- :data-testid="`banner_alignment_radio_options${bannerType}`"
192
- :label="t('banner.bannerAlignment.label')"
193
- :options="radioOptions.options"
194
- :labels="radioOptions.labels"
175
+ <div class="col span-2">
176
+ <RadioGroup
177
+ v-model:value="value[bannerType].textAlignment"
178
+ name="bannerAlignment"
179
+ :data-testid="`banner_alignment_radio_options${bannerType}`"
180
+ :label="t('banner.bannerAlignment.label')"
181
+ :options="radioOptions.options"
182
+ :labels="radioOptions.labels"
183
+ :mode="mode"
184
+ :aria-label="`${t(`banner.${bannerType}`)} ${t('banner.bannerAlignment.label')}`"
185
+ />
186
+ </div>
187
+ <div class="col span-2">
188
+ <h3 id="decoration-banner-title-id">
189
+ {{ t('banner.bannerDecoration.label') }}
190
+ </h3>
191
+ <div
192
+ v-for="(o, i) in textDecorationOptions"
193
+ :key="i"
194
+ >
195
+ <Checkbox
196
+ v-model:value="value[bannerType][o.style]"
197
+ name="bannerDecoration"
198
+ :data-testid="`banner_decoration_checkbox${bannerType}${o.label}`"
199
+ class="banner-decoration-checkbox"
195
200
  :mode="mode"
196
- :aria-label="`${t(`banner.${bannerType}`)} ${t('banner.bannerAlignment.label')}`"
201
+ :label="o.label"
202
+ :aria-describedby="`${bannerTitleId} decoration-banner-title-id`"
197
203
  />
198
204
  </div>
199
- <div style="display: flex;" class="col span-6">
200
- <p style="width: 160px;" id="decoration-banner-title-id">
201
- {{ t('banner.bannerDecoration.label') }}
202
- </p>
203
- <div style="display: flex;">
204
- <div
205
- v-for="(o, i) in textDecorationOptions"
206
- :key="i"
207
- >
208
- <Checkbox
209
- v-model:value="value[bannerType][o.style]"
210
- name="bannerDecoration"
211
- :data-testid="`banner_decoration_checkbox${bannerType}${o.label}`"
212
- class="banner-decoration-checkbox"
213
- :mode="mode"
214
- :label="o.label"
215
- :aria-describedby="`${bannerTitleId} decoration-banner-title-id`"
216
- />
217
- </div>
218
- </div>
219
- </div>
205
+ </div>
206
+ <div class="col span-2">
207
+ <LabeledSelect
208
+ v-model:value="value[bannerType].fontSize"
209
+ :data-testid="`banner_font_size_options${bannerType}`"
210
+ :disabled="isUiDisabled"
211
+ :label="t('banner.bannerFontSize.label')"
212
+ :options="uiBannerFontSizeOptions"
213
+ :aria-describedby="bannerTitleId"
214
+ />
220
215
  </div>
221
216
  </div>
222
217
  <div
@@ -355,7 +355,7 @@ export default {
355
355
  v-if="isRandomGenerated"
356
356
  :class="{'row': isCreateEdit}"
357
357
  >
358
- <div :class="{'col': isCreateEdit, 'span-6': isCreateEdit}">
358
+ <div :class="{'col': isCreateEdit, 'span-8': isCreateEdit}">
359
359
  <Password
360
360
  v-model:value="passwordGen"
361
361
  class="mt-10"
@@ -370,7 +370,7 @@ export default {
370
370
  class="userGen"
371
371
  :class="{'row': isCreateEdit}"
372
372
  >
373
- <div :class="{'col': isCreateEdit, 'span-6': isCreateEdit}">
373
+ <div :class="{'col': isCreateEdit, 'span-4': isCreateEdit}">
374
374
  <Password
375
375
  v-model:value="passwordNew"
376
376
  data-testid="account__new_password"
@@ -380,7 +380,7 @@ export default {
380
380
  :ignore-password-managers="!isChange"
381
381
  />
382
382
  </div>
383
- <div :class="{'col': isCreateEdit, 'span-6': isCreateEdit}">
383
+ <div :class="{'col': isCreateEdit, 'span-4': isCreateEdit}">
384
384
  <Password
385
385
  v-model:value="passwordConfirm"
386
386
  data-testid="account__confirm_password"
@@ -405,7 +405,7 @@ export default {
405
405
  class="text-error"
406
406
  :class="{'row': isCreateEdit}"
407
407
  >
408
- <div :class="{'col': isCreateEdit, 'span-6': isCreateEdit}">
408
+ <div :class="{'col': isCreateEdit, 'span-8': isCreateEdit}">
409
409
  <Banner
410
410
  v-for="(err, i) in errorMessages"
411
411
  :key="i"
@@ -112,7 +112,8 @@ export default {
112
112
 
113
113
  <template>
114
114
  <div
115
- class="color-input-box"
115
+ class="color-input"
116
+ :class="{[mode]:mode, disabled: isDisabled}"
116
117
  :data-testid="componentTestid + '-color-input'"
117
118
  :tabindex="isDisabled ? -1 : 0"
118
119
  @keydown.space.prevent
@@ -134,7 +135,6 @@ export default {
134
135
  </label>
135
136
  <div
136
137
  :data-testid="componentTestid + '-color-input_preview-container'"
137
- :class="{[mode]:mode, disabled: isDisabled}"
138
138
  class="preview-container"
139
139
  @click.stop="$refs.input.click($event)"
140
140
  >
@@ -143,31 +143,28 @@ export default {
143
143
  class="color-display"
144
144
  >
145
145
  <input
146
- style="margin-bottom: 6px;"
147
146
  ref="input"
148
147
  :aria-disabled="isDisabled ? 'true' : 'false'"
149
148
  :aria-label="ariaLabel"
150
149
  :aria-describedby="ariaDescribedBy"
151
150
  type="color"
152
- class="color-input"
153
151
  :disabled="isDisabled"
154
152
  tabindex="-1"
155
153
  :value="inputValue"
156
154
  @input="$emit('update:value', $event.target.value)"
157
155
  >
158
156
  </span>
159
- <span class="color-value">{{ inputValue }}</span>
157
+ <span class="text-muted color-value">{{ inputValue }}</span>
160
158
  </div>
161
159
  </div>
162
160
  </template>
163
161
 
164
162
  <style lang='scss' scoped>
165
- .color-input-box {
166
- display: flex;
167
- .text-label {
168
- display: flex;
169
- align-items: center;
170
- }
163
+ .color-input {
164
+ border: 1px solid var(--border);
165
+ border-radius: var(--border-radius);
166
+ padding: 10px;
167
+
171
168
  &:focus-visible {
172
169
  @include focus-outline;
173
170
  }
@@ -204,26 +201,6 @@ export default {
204
201
 
205
202
  .color-value {
206
203
  margin-left: 4px;
207
- color: var(--input-label);
208
- }
209
-
210
- &.disabled, &.disabled .selected, &[disabled], &[disabled]:hover {
211
- color: var(--input-disabled-text);
212
- outline-width: 0;
213
- border-color: var(--input-disabled-border);
214
- cursor: not-allowed;
215
-
216
- label, span, div, input {
217
- cursor: not-allowed !important;
218
- }
219
-
220
- .color-value {
221
- color: var(--muted);
222
- }
223
-
224
- &::placeholder {
225
- color: var(--input-disabled-placeholder);
226
- }
227
204
  }
228
205
  }
229
206
 
@@ -249,5 +226,4 @@ export default {
249
226
  }
250
227
  }
251
228
  }
252
-
253
229
  </style>
@@ -55,7 +55,7 @@ export default defineComponent({
55
55
  <div v-if="!isView">
56
56
  <div class="spacer-small" />
57
57
 
58
- <!-- <div
58
+ <div
59
59
  v-for="(err,idx) in errors"
60
60
  :key="idx"
61
61
  >
@@ -65,7 +65,7 @@ export default defineComponent({
65
65
  :closable="true"
66
66
  @close="closeError(idx)"
67
67
  />
68
- </div> -->
68
+ </div>
69
69
  <div class="buttons">
70
70
  <div class="left">
71
71
  <slot name="left" />
@@ -97,10 +97,9 @@ export default defineComponent({
97
97
 
98
98
  <style lang='scss'>
99
99
  .buttons {
100
- /* display: grid;
100
+ display: grid;
101
101
  grid-template-areas: "left right";
102
- grid-template-columns: "min-content auto"; */
103
- display: flex;
102
+ grid-template-columns: "min-content auto";
104
103
 
105
104
  .left {
106
105
  grid-area: left;
@@ -112,13 +111,11 @@ export default defineComponent({
112
111
  }
113
112
 
114
113
  .right {
115
- /* grid-area: right;
116
- text-align: right; */
117
- display: flex;
118
- justify-content: flex-end;
114
+ grid-area: right;
115
+ text-align: right;
116
+
119
117
  .btn, button {
120
- /* margin: 0 0 0 $column-gutter; */
121
- margin: 0 10px 0 0px;
118
+ margin: 0 0 0 $column-gutter;
122
119
  }
123
120
  }
124
121
  }
@@ -217,7 +217,6 @@ export default {
217
217
 
218
218
  &.labeled-select {
219
219
  .selected {
220
- background-color: var(--input-bg);
221
220
  color: var(--input-text);
222
221
  text-align: center;
223
222
  margin-right: 1em;
@@ -270,19 +269,19 @@ export default {
270
269
  margin-right: 0;
271
270
 
272
271
  &:hover:not(.focused):not(.disabled):not(.view) {
273
- border: 0px solid var(--input-hover-border) !important;
272
+ border: 1px solid var(--input-hover-border) !important;
274
273
  }
275
274
 
276
275
  &.focused {
277
- border: 0px solid var(--outline) !important;
276
+ border: 1px solid var(--outline) !important;
278
277
  }
279
278
 
280
279
  &:hover:not(.focused):not(.disabled) {
281
- border: 0px solid var(--input-hover-border) !important;
280
+ border: 1px solid var(--input-hover-border) !important;
282
281
  }
283
282
 
284
283
  &.focused {
285
- border: 0px solid var(--outline) !important;
284
+ border: 1px solid var(--outline) !important;
286
285
  }
287
286
 
288
287
  &.labeled-select.focused :deep(),
@@ -292,8 +291,7 @@ export default {
292
291
 
293
292
  &.labeled-select:not(.disabled):not(.view) :deep(),
294
293
  &.unlabeled-select:not(.disabled):not(.view) :deep() {
295
- /* border: solid 1px var(--input-border); */
296
- height: 32px;
294
+ border: solid 1px var(--input-border);
297
295
  }
298
296
 
299
297
  &.labeled-select :deep(),
@@ -304,7 +302,6 @@ export default {
304
302
  // position: relative;
305
303
 
306
304
  .vs__selected {
307
- background-color: var(--input-bg);
308
305
  color: var(--input-text);
309
306
  }
310
307
 
@@ -283,7 +283,7 @@ export default {
283
283
  const gap = this.canRemove ? ' 50px' : '';
284
284
  const size = 2 + this.extraColumns.length;
285
285
 
286
- return `grid-template-columns: repeat(${ size }, 400px)${ gap };`;
286
+ return `grid-template-columns: repeat(${ size }, 1fr)${ gap };`;
287
287
  },
288
288
  usedKeyOptions() {
289
289
  return this.rows.map((row) => row[this.keyName]);
@@ -330,7 +330,7 @@ export default {
330
330
  },
331
331
 
332
332
  getRows(value) {
333
- let rows = [];
333
+ const rows = [];
334
334
 
335
335
  if ( this.asMap ) {
336
336
  const input = value || {};
@@ -403,18 +403,6 @@ export default {
403
403
  obj.binary = false;
404
404
  obj.canEncode = this.handleBase64;
405
405
  obj.supported = true;
406
-
407
- // 上传镜像问题
408
- const s = this.rows.filter(item => {
409
- // 如果 item.key 或 obj.key 为空,直接保留
410
- if (!item.key || !obj.key) {
411
- return true;
412
- }
413
- // 两者都有值时才比较
414
- return item.key !== obj.key;
415
- });
416
- this.rows = s;
417
-
418
406
  this.rows.push(obj);
419
407
  this.queueUpdate();
420
408
  this.$nextTick(() => {
@@ -478,11 +466,8 @@ export default {
478
466
  const valueName = this.valueName;
479
467
 
480
468
  for ( const row of this.rows ) {
481
- // let value = (row[valueName] || '');
482
- // const key = (row[keyName] || '').trim();
483
-
469
+ let value = (row[valueName] || '');
484
470
  const key = (row[keyName] || '').trim();
485
- let value = (row[valueName] || '').trim();
486
471
 
487
472
  if (value && typeOf(value) === 'object') {
488
473
  out[key] = JSON.parse(JSON.stringify(value));
@@ -603,7 +588,6 @@ export default {
603
588
  </script>
604
589
  <template>
605
590
  <div class="key-value">
606
- <!-- 标题部分:如果传了 title 或者插槽 title 才显示 -->
607
591
  <div
608
592
  v-if="title || $slots.title"
609
593
  class="clearfix"
@@ -611,7 +595,6 @@ export default {
611
595
  <slot name="title">
612
596
  <h3>
613
597
  {{ title }}
614
- <!-- 标题右侧提示信息 -->
615
598
  <i
616
599
  v-if="titleProtip"
617
600
  v-clean-tooltip="titleProtip"
@@ -620,8 +603,6 @@ export default {
620
603
  </h3>
621
604
  </slot>
622
605
  </div>
623
-
624
- <!-- 整个 Key-Value 表格容器 -->
625
606
  <div
626
607
  class="kv-container"
627
608
  role="grid"
@@ -630,8 +611,6 @@ export default {
630
611
  :aria-colcount="extraColumns.length + 2"
631
612
  :style="containerStyle"
632
613
  >
633
-
634
- <!-- 表头:有数据或者处于 view 模式才显示 -->
635
614
  <template v-if="rows.length || isView">
636
615
  <div class="rowgroup">
637
616
  <div class="row">
@@ -681,8 +660,6 @@ export default {
681
660
  </div>
682
661
  </div>
683
662
  </template>
684
-
685
- <!-- 如果是 view 模式但没有数据,显示占位符 -->
686
663
  <template v-if="!rows.length && isView">
687
664
  <div class="rowgroup">
688
665
  <div class="row">
@@ -701,8 +678,6 @@ export default {
701
678
  </div>
702
679
  </div>
703
680
  </template>
704
-
705
- <!-- 遍历 rows 渲染每一行 -->
706
681
  <template
707
682
  v-for="(row,i) in rows"
708
683
  v-else
@@ -811,7 +786,7 @@ export default {
811
786
  :disabled="disabled"
812
787
  :mode="mode"
813
788
  :placeholder="_valuePlaceholder"
814
- :min-height="32"
789
+ :min-height="40"
815
790
  :spellcheck="false"
816
791
  :aria-label="t('generic.ariaLabel.value', {index: i+1})"
817
792
  @update:value="queueUpdate"
@@ -890,8 +865,6 @@ export default {
890
865
  </div>
891
866
  </template>
892
867
  </div>
893
-
894
- <!-- 底部新增/从文件导入 -->
895
868
  <div
896
869
  v-if="(addAllowed || readAllowed) && !isView"
897
870
  class="footer mt-10"
@@ -900,8 +873,6 @@ export default {
900
873
  name="add"
901
874
  :add="add"
902
875
  >
903
-
904
- <!-- 添加按钮 -->
905
876
  <button
906
877
  v-if="addAllowed"
907
878
  type="button"
@@ -918,8 +889,6 @@ export default {
918
889
  :class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
919
890
  /> {{ _addLabel }}
920
891
  </button>
921
-
922
- <!-- 从文件读取 -->
923
892
  <FileSelector
924
893
  v-if="readAllowed"
925
894
  :aria-label="t('generic.ariaLabel.readKeyValue')"
@@ -944,8 +913,8 @@ export default {
944
913
  }
945
914
  .kv-container {
946
915
  display: grid;
947
- /* align-items: center; */
948
- column-gap: 10px;
916
+ align-items: center;
917
+ column-gap: 20px;
949
918
 
950
919
  .key-value-label {
951
920
  margin-bottom: 0;
@@ -970,9 +939,6 @@ export default {
970
939
  }
971
940
  &.value textarea {
972
941
  padding: 10px 10px 10px 10px;
973
- min-height:32px;
974
- line-height: 12px;
975
- border: solid var(--border-width) var(--input-border);
976
942
  }
977
943
 
978
944
  .text-monospace:not(.conceal) {
@@ -1011,14 +977,8 @@ export default {
1011
977
  }
1012
978
  }
1013
979
  input {
1014
- height: 32px;
980
+ height: 40px;
1015
981
  line-height: 1;
1016
- border: solid var(--border-width) var(--input-border);
1017
- padding: 4px 11px;
1018
- &:hover{
1019
- border: solid var(--border-width) var(--input-border);
1020
- box-shadow: 0 4px 6px 0 var(--input-border-box-shadow);
1021
- }
1022
982
  }
1023
983
  .footer {
1024
984
  .protip {