@zeyos/zx 4.3.4 → 4.4.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 (128) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/README.md +7 -0
  3. package/dist/types/components/activity-item/activity-item.d.ts +351 -0
  4. package/dist/types/components/activity-list/activity-list.d.ts +195 -0
  5. package/dist/types/components/app-sidebar/app-sidebar.d.ts +28 -0
  6. package/dist/types/components/button/button.d.ts +8 -0
  7. package/dist/types/components/calendar/calendar.d.ts +19 -0
  8. package/dist/types/components/card/card.d.ts +7 -0
  9. package/dist/types/components/card-view/card-view.d.ts +11 -3
  10. package/dist/types/components/card-view/record-card.d.ts +7 -1
  11. package/dist/types/components/code-editor/code-editor.d.ts +160 -0
  12. package/dist/types/components/code-editor/field-adapter.d.ts +5 -0
  13. package/dist/types/components/context-menu/context-menu.d.ts +18 -2
  14. package/dist/types/components/date-picker/date-picker.d.ts +8 -0
  15. package/dist/types/components/date-picker/time-picker.d.ts +7 -0
  16. package/dist/types/components/dialog/dialog.d.ts +29 -0
  17. package/dist/types/components/entity-ref/entity-ref.d.ts +331 -0
  18. package/dist/types/components/file-item/file-item.d.ts +234 -0
  19. package/dist/types/components/file-list/file-list.d.ts +171 -0
  20. package/dist/types/components/filter/filter.d.ts +91 -36
  21. package/dist/types/components/filter-panel/filter-panel.d.ts +449 -0
  22. package/dist/types/components/kanban-view/kanban-card.d.ts +138 -0
  23. package/dist/types/components/kanban-view/kanban-view.d.ts +170 -4
  24. package/dist/types/components/launcher/launcher.d.ts +19 -12
  25. package/dist/types/components/list-toolbar/list-toolbar.d.ts +599 -0
  26. package/dist/types/components/menu-button/menu-button.d.ts +4 -37
  27. package/dist/types/components/message/message.d.ts +7 -0
  28. package/dist/types/components/modal/modal.d.ts +48 -0
  29. package/dist/types/components/navigation-bar/navigation-bar.d.ts +105 -21
  30. package/dist/types/components/panel/panel.d.ts +7 -0
  31. package/dist/types/components/search/search.d.ts +7 -0
  32. package/dist/types/components/select/select.d.ts +4 -0
  33. package/dist/types/components/sort-control/sort-control.d.ts +105 -0
  34. package/dist/types/components/stat-tile/stat-tile.d.ts +277 -0
  35. package/dist/types/components/tabbox/tabbox.d.ts +7 -0
  36. package/dist/types/components/table/table.d.ts +144 -0
  37. package/dist/types/components/table-view/table-view.d.ts +11 -5
  38. package/dist/types/components/timebox/timebox.d.ts +7 -0
  39. package/dist/types/components/value-list/value-list.d.ts +8 -0
  40. package/dist/types/components/view/record-view.d.ts +96 -5
  41. package/dist/types/core/icons.d.ts +17 -0
  42. package/dist/types/index.d.ts +11 -0
  43. package/dist/types/internal/app-rail.d.ts +10 -0
  44. package/dist/types/internal/menu-items.d.ts +134 -0
  45. package/dist/zx-zeyos.esm.js +616 -77
  46. package/dist/zx-zeyos.esm.min.js +8 -1
  47. package/dist/zx.css +2085 -238
  48. package/dist/zx.esm.js +6704 -1542
  49. package/dist/zx.esm.min.js +10 -3
  50. package/dist/zx.global.js +6704 -1542
  51. package/dist/zx.global.min.js +10 -3
  52. package/dist/zx.min.css +1 -1
  53. package/docs/api.json +1479 -127
  54. package/docs/llms.md +315 -10
  55. package/docs/llms.txt +11 -5
  56. package/package.json +1 -1
  57. package/src/components/activity-item/activity-item.css +137 -0
  58. package/src/components/activity-item/activity-item.js +599 -0
  59. package/src/components/activity-list/activity-list.css +64 -0
  60. package/src/components/activity-list/activity-list.js +375 -0
  61. package/src/components/app-rail/app-rail.css +227 -19
  62. package/src/components/app-sidebar/app-sidebar.css +414 -24
  63. package/src/components/app-sidebar/app-sidebar.js +65 -5
  64. package/src/components/button/button.css +8 -0
  65. package/src/components/button/button.js +6 -1
  66. package/src/components/calendar/calendar.js +33 -3
  67. package/src/components/card/card.js +12 -1
  68. package/src/components/card-view/card-view.css +1 -0
  69. package/src/components/card-view/card-view.js +25 -9
  70. package/src/components/card-view/record-card.js +7 -3
  71. package/src/components/code-editor/code-editor.css +67 -0
  72. package/src/components/code-editor/code-editor.js +288 -0
  73. package/src/components/code-editor/field-adapter.js +34 -0
  74. package/src/components/context-menu/context-menu.css +80 -3
  75. package/src/components/context-menu/context-menu.js +22 -30
  76. package/src/components/date-picker/date-picker.js +22 -8
  77. package/src/components/date-picker/month-picker.js +3 -3
  78. package/src/components/date-picker/time-picker.js +20 -8
  79. package/src/components/dialog/dialog.js +88 -66
  80. package/src/components/dropdown/dropdown.js +2 -2
  81. package/src/components/entity-ref/entity-ref.css +182 -0
  82. package/src/components/entity-ref/entity-ref.js +496 -0
  83. package/src/components/file-item/file-item.css +88 -0
  84. package/src/components/file-item/file-item.js +371 -0
  85. package/src/components/file-list/file-list.css +51 -0
  86. package/src/components/file-list/file-list.js +320 -0
  87. package/src/components/filter/filter.css +27 -1
  88. package/src/components/filter/filter.js +199 -45
  89. package/src/components/filter-panel/filter-panel.css +104 -0
  90. package/src/components/filter-panel/filter-panel.js +964 -0
  91. package/src/components/kanban-view/kanban-card.js +239 -0
  92. package/src/components/kanban-view/kanban-view.css +194 -0
  93. package/src/components/kanban-view/kanban-view.js +251 -8
  94. package/src/components/launcher/launcher.js +59 -27
  95. package/src/components/list-toolbar/list-toolbar.css +189 -0
  96. package/src/components/list-toolbar/list-toolbar.js +851 -0
  97. package/src/components/menu-button/menu-button.css +80 -3
  98. package/src/components/menu-button/menu-button.js +21 -37
  99. package/src/components/message/message.css +5 -2
  100. package/src/components/message/message.js +13 -2
  101. package/src/components/modal/modal.css +15 -0
  102. package/src/components/modal/modal.js +141 -0
  103. package/src/components/navigation-bar/navigation-bar.css +77 -2
  104. package/src/components/navigation-bar/navigation-bar.js +171 -4
  105. package/src/components/panel/panel.js +13 -2
  106. package/src/components/search/search.js +17 -5
  107. package/src/components/select/field-adapter.js +4 -1
  108. package/src/components/select/select.js +3 -0
  109. package/src/components/sort-control/sort-control.css +17 -0
  110. package/src/components/sort-control/sort-control.js +140 -0
  111. package/src/components/stat-tile/stat-tile.css +213 -0
  112. package/src/components/stat-tile/stat-tile.js +590 -0
  113. package/src/components/tabbox/tabbox.js +12 -1
  114. package/src/components/table/table.css +51 -2
  115. package/src/components/table/table.js +298 -19
  116. package/src/components/table-view/table-view.css +8 -2
  117. package/src/components/table-view/table-view.js +21 -6
  118. package/src/components/tag-picker/tag-picker.css +3 -1
  119. package/src/components/timebox/timebox.js +18 -5
  120. package/src/components/value-list/value-list.js +22 -6
  121. package/src/components/view/record-view.css +5 -0
  122. package/src/components/view/record-view.js +100 -7
  123. package/src/core/icons.js +74 -5
  124. package/src/index.js +25 -0
  125. package/src/internal/app-rail.js +19 -1
  126. package/src/internal/menu-items.js +142 -0
  127. package/styles/print.css +192 -0
  128. package/styles/zx.css +11 -0
@@ -1,11 +1,7 @@
1
1
  import { h } from '../../core/dom.js';
2
2
  import { uid } from '../../core/util.js';
3
3
  import { Modal } from '../modal/modal.js';
4
-
5
- const FOCUSABLE_SELECTOR = [
6
- 'a[href]', 'button:not([disabled])', 'input:not([disabled])', 'select:not([disabled])',
7
- 'textarea:not([disabled])', '[contenteditable="true"]', '[tabindex]:not([tabindex="-1"])'
8
- ].join(',');
4
+ import { button } from '../button/button.js';
9
5
 
10
6
  /** @typedef {'default'|'primary'|'danger'|'ghost'} DialogButtonKind */
11
7
  /**
@@ -14,6 +10,8 @@ const FOCUSABLE_SELECTOR = [
14
10
  * @property {DialogButtonKind} [kind='default'] Visual button kind.
15
11
  * @property {'close'|'cancel'|((dialog: Dialog) => void)} [action='close'] Button action.
16
12
  * @property {boolean} [autofocus=false] Whether this button receives initial focus.
13
+ * @property {boolean} [disabled=false] Whether the footer button is disabled.
14
+ * @property {import('../button/button.js').ButtonShortcut} [shortcut] Visible shortcut hint; the host binds the action.
17
15
  */
18
16
  /**
19
17
  * @typedef {Object} DialogOptions
@@ -86,8 +84,6 @@ export class Dialog extends Modal {
86
84
  /** @type {DialogButton[]} */
87
85
  #baseButtons = [];
88
86
  #baseTitle = '';
89
- /** @type {Element|null} */
90
- #opener = null;
91
87
 
92
88
  /**
93
89
  * Creates a structured dialog in the configured theme scope, or at document level when unscoped.
@@ -99,7 +95,7 @@ export class Dialog extends Modal {
99
95
  this._applySize(this.options.size);
100
96
  this.#baseTitle = String(this.options.title ?? '');
101
97
  this.#applyTitle(this.#baseTitle);
102
- this.#baseButtons = copyButtons(this.options.buttons);
98
+ this.#baseButtons = normalizeDialogButtons(this.options.buttons);
103
99
  this.#renderButtons(this.#baseButtons);
104
100
  this.refs.close.hidden = !this.options.closable;
105
101
 
@@ -111,7 +107,6 @@ export class Dialog extends Modal {
111
107
  if (!definition) return;
112
108
  this.#runButton(definition);
113
109
  });
114
- this.on('close', () => this.#restoreFocus());
115
110
  }
116
111
 
117
112
  /** @type {DialogButton[]} */
@@ -123,6 +118,7 @@ export class Dialog extends Modal {
123
118
  */
124
119
  render() {
125
120
  const titleId = uid('zx-dialog-title');
121
+ const close = this._message('dialog.close', 'Close');
126
122
  const dialog = /** @type {HTMLDialogElement} */ (h('dialog', {
127
123
  class: 'zx-modal zx-dialog',
128
124
  ariaLabelledby: titleId
@@ -134,8 +130,8 @@ export class Dialog extends Modal {
134
130
  ref: 'close',
135
131
  type: 'button',
136
132
  'data-kind': 'ghost',
137
- ariaLabel: 'Close',
138
- title: 'Close'
133
+ ariaLabel: close,
134
+ title: close
139
135
  }, '×')
140
136
  ),
141
137
  h('div', { class: 'zx-modal__content zx-dialog__body', ref: 'content' }),
@@ -151,16 +147,13 @@ export class Dialog extends Modal {
151
147
  * @returns {this}
152
148
  */
153
149
  open() {
154
- if (this.isOpen()) return this;
155
- this.#opener = document.activeElement instanceof Element ? document.activeElement : null;
156
- super.open();
157
- queueMicrotask(() => {
158
- if (!this.isOpen()) return;
159
- const autofocus = this.el.querySelector('[autofocus]:not([disabled])');
160
- const first = autofocus ?? this.el.querySelector(FOCUSABLE_SELECTOR);
161
- if (first instanceof HTMLElement) first.focus();
162
- });
163
- return this;
150
+ /*
151
+ * Capturing the opener, placing initial focus and restoring it afterwards are `Modal`'s, so
152
+ * that every overlay built on it is accessible rather than only the structured one. The
153
+ * override stays because the promise is the dialog's: the header close button is the first
154
+ * focusable descendant, and a footer button declared `autofocus` outranks it.
155
+ */
156
+ return super.open();
164
157
  }
165
158
 
166
159
  /**
@@ -192,7 +185,7 @@ export class Dialog extends Modal {
192
185
  * @returns {this}
193
186
  */
194
187
  setButtons(list) {
195
- this.#baseButtons = copyButtons(list);
188
+ this.#baseButtons = normalizeDialogButtons(list);
196
189
  this.#renderButtons(this.#baseButtons);
197
190
  return this;
198
191
  }
@@ -216,7 +209,7 @@ export class Dialog extends Modal {
216
209
  const view = {
217
210
  key: normalizedKey,
218
211
  content,
219
- buttons: options && Object.hasOwn(options, 'buttons') ? copyButtons(options.buttons ?? []) : null,
212
+ buttons: options && Object.hasOwn(options, 'buttons') ? normalizeDialogButtons(options.buttons ?? []) : null,
220
213
  title: options && Object.hasOwn(options, 'title') ? String(options.title ?? '') : null
221
214
  };
222
215
  this.#views.set(normalizedKey, view);
@@ -260,7 +253,7 @@ export class Dialog extends Modal {
260
253
  * @param {AlertOptions} [options={}] Alert options.
261
254
  * @returns {Promise<void>}
262
255
  */
263
- static alert({ title = '', message = '', okLabel = 'OK' } = {}) {
256
+ static alert({ title = '', message = '', okLabel } = {}) {
264
257
  return new Promise((resolve) => {
265
258
  let settled = false;
266
259
  const finish = () => {
@@ -269,11 +262,13 @@ export class Dialog extends Modal {
269
262
  dialog.close();
270
263
  resolve();
271
264
  };
272
- const dialog = new Dialog(null, {
273
- title,
274
- content: message,
275
- buttons: [{ label: okLabel, kind: 'primary', action: finish, autofocus: true }]
276
- });
265
+ const dialog = new Dialog(null, { title, content: message });
266
+ dialog.setButtons([{
267
+ label: okLabel ?? dialog._message('dialog.ok', 'OK'),
268
+ kind: 'primary',
269
+ action: finish,
270
+ autofocus: true
271
+ }]);
277
272
  dialog.once('close', () => {
278
273
  if (!settled) {
279
274
  settled = true;
@@ -291,7 +286,7 @@ export class Dialog extends Modal {
291
286
  * @returns {Promise<boolean>}
292
287
  */
293
288
  static confirm({
294
- title = '', message = '', okLabel = 'OK', cancelLabel = 'Cancel', danger = false
289
+ title = '', message = '', okLabel, cancelLabel, danger = false
295
290
  } = {}) {
296
291
  return new Promise((resolve) => {
297
292
  let settled = false;
@@ -301,14 +296,16 @@ export class Dialog extends Modal {
301
296
  dialog.close(value);
302
297
  resolve(value);
303
298
  };
304
- const dialog = new Dialog(null, {
305
- title,
306
- content: message,
307
- buttons: [
308
- { label: cancelLabel, action: () => finish(false) },
309
- { label: okLabel, kind: danger ? 'danger' : 'primary', action: () => finish(true), autofocus: true }
310
- ]
311
- });
299
+ const dialog = new Dialog(null, { title, content: message });
300
+ dialog.setButtons([
301
+ { label: cancelLabel ?? dialog._message('dialog.cancel', 'Cancel'), action: () => finish(false) },
302
+ {
303
+ label: okLabel ?? dialog._message('dialog.ok', 'OK'),
304
+ kind: danger ? 'danger' : 'primary',
305
+ action: () => finish(true),
306
+ autofocus: true
307
+ }
308
+ ]);
312
309
  dialog.once('close', () => {
313
310
  if (!settled) {
314
311
  settled = true;
@@ -332,8 +329,7 @@ export class Dialog extends Modal {
332
329
  class: 'zx-dialog__prompt-input',
333
330
  value: String(value),
334
331
  placeholder: String(placeholder),
335
- autofocus: true,
336
- ariaLabel: String(title || 'Prompt value')
332
+ autofocus: true
337
333
  });
338
334
  const content = h('div', { class: 'zx-dialog__prompt' },
339
335
  h('div', { class: 'zx-dialog__prompt-message' }, message),
@@ -345,14 +341,12 @@ export class Dialog extends Modal {
345
341
  dialog.close(result);
346
342
  resolve(result);
347
343
  };
348
- const dialog = new Dialog(null, {
349
- title,
350
- content,
351
- buttons: [
352
- { label: 'Cancel', action: () => finish(null) },
353
- { label: 'OK', kind: 'primary', action: () => finish(input.value) }
354
- ]
355
- });
344
+ const dialog = new Dialog(null, { title, content });
345
+ input.setAttribute('aria-label', String(title || dialog._message('dialog.promptValue', 'Prompt value')));
346
+ dialog.setButtons([
347
+ { label: dialog._message('dialog.cancel', 'Cancel'), action: () => finish(null) },
348
+ { label: dialog._message('dialog.ok', 'OK'), kind: 'primary', action: () => finish(input.value) }
349
+ ]);
356
350
  dialog.listen(input, 'keydown', (event) => {
357
351
  if (event.key !== 'Enter') return;
358
352
  event.preventDefault();
@@ -383,6 +377,17 @@ export class Dialog extends Modal {
383
377
  this.el.style.inlineSize = `${Math.max(0, width)}px`;
384
378
  }
385
379
 
380
+ /**
381
+ * Resolves a component message, falling back to the built-in English text.
382
+ * @param {string} key Message key.
383
+ * @param {string} fallback English default.
384
+ * @returns {string}
385
+ */
386
+ _message(key, fallback) {
387
+ const message = this.msg(key);
388
+ return message === key ? fallback : message;
389
+ }
390
+
386
391
  /** @param {string} title @returns {void} */
387
392
  #applyTitle(title) {
388
393
  this.refs.title.textContent = title;
@@ -390,23 +395,27 @@ export class Dialog extends Modal {
390
395
 
391
396
  /** @param {DialogButton[]} list @returns {void} */
392
397
  #renderButtons(list) {
393
- this.#renderedButtons = copyButtons(list);
398
+ this.#renderedButtons = normalizeDialogButtons(list);
394
399
  this.refs.footer.replaceChildren();
395
400
  this.refs.footer.hidden = this.#renderedButtons.length === 0;
396
401
  this.#renderedButtons.forEach((definition, index) => {
397
- this.refs.footer.append(h('button', {
398
- class: 'zx-btn',
399
- type: 'button',
400
- 'data-kind': definition.kind ?? 'default',
401
- 'data-size': 'md',
402
- 'data-dialog-button': String(index),
403
- autofocus: Boolean(definition.autofocus)
404
- }, h('span', { class: 'zx-btn__label' }, definition.label)));
402
+ const control = button({
403
+ label: definition.label,
404
+ kind: definition.kind,
405
+ shortcut: definition.shortcut,
406
+ disabled: definition.disabled
407
+ });
408
+ control.dataset.dialogButton = String(index);
409
+ control.autofocus = definition.autofocus;
410
+ this.refs.footer.append(control);
405
411
  });
406
412
  }
407
413
 
408
414
  /** @param {DialogButton} definition @returns {void} */
409
415
  #runButton(definition) {
416
+ // A native disabled button swallows its own clicks, but the footer listener is delegated and
417
+ // a host may dispatch one at the row; the descriptor is the authority either way.
418
+ if (definition.disabled) return;
410
419
  const action = definition.action ?? 'close';
411
420
  if (action === 'close') {
412
421
  this.close();
@@ -417,17 +426,30 @@ export class Dialog extends Modal {
417
426
  action(this);
418
427
  }
419
428
  }
420
-
421
- /** @returns {void} */
422
- #restoreFocus() {
423
- if (this.#opener?.isConnected && typeof this.#opener.focus === 'function') this.#opener.focus();
424
- this.#opener = null;
425
- }
426
429
  }
427
430
 
428
- /** @param {DialogButton[]|null|undefined} list @returns {DialogButton[]} */
429
- function copyButtons(list) {
430
- return Array.isArray(list) ? list.map((button) => ({ ...button, label: String(button.label ?? '') })) : [];
431
+ /**
432
+ * Copies footer-button descriptors without mutating the caller's array or objects, and settles
433
+ * the two booleans the footer renders from.
434
+ *
435
+ * `autofocus` and `disabled` are resolved together because they contradict each other: a control
436
+ * that refuses activation must not be the one initial focus lands on, and a host that writes both
437
+ * has said what it wants twice. Deciding it here rather than at render time keeps `Sheet` — which
438
+ * takes the same descriptors through the same footer — on one answer.
439
+ * @param {DialogButton[]|null|undefined} list Button descriptors.
440
+ * @returns {DialogButton[]} Normalized copies.
441
+ */
442
+ export function normalizeDialogButtons(list) {
443
+ if (!Array.isArray(list)) return [];
444
+ return list.map((button) => {
445
+ const disabled = Boolean(button?.disabled);
446
+ return {
447
+ ...button,
448
+ label: String(button?.label ?? ''),
449
+ disabled,
450
+ autofocus: Boolean(button?.autofocus) && !disabled
451
+ };
452
+ });
431
453
  }
432
454
 
433
455
  /**
@@ -182,7 +182,7 @@ export class Dropdown extends Component {
182
182
 
183
183
  /** @param {KeyboardEvent} event @returns {void} */
184
184
  [HANDLE_ESCAPE_DISMISS](event) {
185
- if (event.key !== 'Escape' || !this.isOpen()) return;
185
+ if (event.defaultPrevented || event.key !== 'Escape' || !this.isOpen()) return;
186
186
  event.preventDefault();
187
187
  const restoreFocus = this.el.contains(document.activeElement);
188
188
  this.close();
@@ -205,7 +205,7 @@ class DropdownDismissManager extends Component {
205
205
  if (component instanceof Dropdown) component[HANDLE_POINTER_DISMISS](event);
206
206
  });
207
207
  this.listen(document, 'keydown', (event) => {
208
- if (event.key !== 'Escape') return;
208
+ if (event.defaultPrevented || event.key !== 'Escape') return;
209
209
  const component = topmostOverlayComponent();
210
210
  if (component instanceof Dropdown) component[HANDLE_ESCAPE_DISMISS](event);
211
211
  });
@@ -0,0 +1,182 @@
1
+ .zx-entity-ref {
2
+ --zx-entity-ref-visual-size: var(--zx-control-height);
3
+ display: grid;
4
+ grid-template-columns: auto minmax(0, 1fr) auto;
5
+ gap: var(--zx-space-2);
6
+ align-items: center;
7
+ min-inline-size: 0;
8
+ color: var(--zx-color-text);
9
+ }
10
+
11
+ .zx-entity-ref[data-size="sm"] {
12
+ --zx-entity-ref-visual-size: calc(var(--zx-control-height) * .75);
13
+ }
14
+
15
+ .zx-entity-ref[data-size="lg"] {
16
+ --zx-entity-ref-visual-size: calc(var(--zx-control-height) * 1.25);
17
+ }
18
+
19
+ .zx-entity-ref__icon {
20
+ display: inline-grid;
21
+ flex: none;
22
+ place-items: center;
23
+ inline-size: var(--zx-entity-ref-visual-size);
24
+ block-size: var(--zx-entity-ref-visual-size);
25
+ overflow: hidden;
26
+ border: 1px solid var(--zx-color-border);
27
+ border-radius: var(--zx-radius-md);
28
+ background: var(--zx-color-bg-muted);
29
+ color: var(--zx-color-text-muted);
30
+ }
31
+
32
+ .zx-entity-ref__icon[hidden],
33
+ .zx-entity-ref__title[hidden],
34
+ .zx-entity-ref__subtitle[hidden],
35
+ .zx-entity-ref__metadata[hidden],
36
+ .zx-entity-ref__actions[hidden] {
37
+ display: none;
38
+ }
39
+
40
+ .zx-entity-ref__body,
41
+ .zx-entity-ref__title,
42
+ .zx-entity-ref__subtitle,
43
+ .zx-entity-ref__primary,
44
+ .zx-entity-ref__name {
45
+ min-inline-size: 0;
46
+ }
47
+
48
+ .zx-entity-ref__body {
49
+ display: grid;
50
+ gap: var(--zx-space-1);
51
+ }
52
+
53
+ .zx-entity-ref__title {
54
+ color: var(--zx-color-text);
55
+ font-weight: 600;
56
+ line-height: 1.25;
57
+ }
58
+
59
+ .zx-entity-ref__primary,
60
+ .zx-entity-ref__name {
61
+ display: block;
62
+ color: inherit;
63
+ }
64
+
65
+ .zx-entity-ref__primary {
66
+ text-decoration-color: transparent;
67
+ text-underline-offset: .15em;
68
+ }
69
+
70
+ .zx-entity-ref__primary:hover {
71
+ color: var(--zx-color-accent-hover);
72
+ text-decoration-color: currentColor;
73
+ }
74
+
75
+ .zx-entity-ref__subtitle,
76
+ .zx-entity-ref__metadata {
77
+ color: var(--zx-color-text-muted);
78
+ font-size: var(--zx-text-sm);
79
+ line-height: 1.3;
80
+ }
81
+
82
+ .zx-entity-ref[data-wrap="false"] .zx-entity-ref__title,
83
+ .zx-entity-ref[data-wrap="false"] .zx-entity-ref__subtitle,
84
+ .zx-entity-ref[data-wrap="false"] .zx-entity-ref__primary,
85
+ .zx-entity-ref[data-wrap="false"] .zx-entity-ref__name {
86
+ overflow: hidden;
87
+ text-overflow: ellipsis;
88
+ white-space: nowrap;
89
+ }
90
+
91
+ .zx-entity-ref__metadata {
92
+ display: flex;
93
+ flex-wrap: wrap;
94
+ gap: var(--zx-space-1) var(--zx-space-3);
95
+ margin: 0;
96
+ }
97
+
98
+ .zx-entity-ref__field {
99
+ display: inline-flex;
100
+ gap: var(--zx-space-1);
101
+ align-items: center;
102
+ min-inline-size: 0;
103
+ }
104
+
105
+ .zx-entity-ref__label,
106
+ .zx-entity-ref__value {
107
+ margin: 0;
108
+ }
109
+
110
+ .zx-entity-ref__label::after {
111
+ content: ":";
112
+ }
113
+
114
+ .zx-entity-ref__field[data-label-visible="false"] .zx-entity-ref__label {
115
+ position: absolute;
116
+ inline-size: 1px;
117
+ block-size: 1px;
118
+ overflow: hidden;
119
+ clip-path: inset(50%);
120
+ }
121
+
122
+ .zx-entity-ref__value {
123
+ display: inline-flex;
124
+ gap: var(--zx-space-1);
125
+ align-items: center;
126
+ min-inline-size: 0;
127
+ }
128
+
129
+ .zx-entity-ref__actions {
130
+ display: inline-flex;
131
+ flex-wrap: wrap;
132
+ gap: var(--zx-space-1);
133
+ align-items: center;
134
+ justify-content: flex-end;
135
+ }
136
+
137
+ .zx-entity-ref__action {
138
+ display: inline-flex;
139
+ gap: var(--zx-space-1);
140
+ align-items: center;
141
+ justify-content: center;
142
+ min-block-size: calc(var(--zx-control-height) * .75);
143
+ padding: var(--zx-space-1) var(--zx-space-2);
144
+ border: 1px solid transparent;
145
+ border-radius: var(--zx-radius-md);
146
+ background: transparent;
147
+ color: var(--zx-color-text-muted);
148
+ font: inherit;
149
+ text-decoration: none;
150
+ cursor: pointer;
151
+ }
152
+
153
+ .zx-entity-ref__action:hover:not(:disabled) {
154
+ background: var(--zx-color-bg-hover);
155
+ color: var(--zx-color-text);
156
+ }
157
+
158
+ .zx-entity-ref__action[data-kind="primary"] {
159
+ color: var(--zx-color-accent);
160
+ }
161
+
162
+ .zx-entity-ref__action[data-kind="danger"] {
163
+ color: var(--zx-color-danger);
164
+ }
165
+
166
+ .zx-entity-ref__action[data-kind="default"] {
167
+ border-color: var(--zx-color-border-control);
168
+ background: var(--zx-color-bg-control);
169
+ color: var(--zx-color-text);
170
+ }
171
+
172
+ .zx-entity-ref__action:disabled {
173
+ opacity: .55;
174
+ cursor: default;
175
+ }
176
+
177
+ @media (forced-colors: active) {
178
+ .zx-entity-ref__icon,
179
+ .zx-entity-ref__action[data-kind="default"] {
180
+ border-color: CanvasText;
181
+ }
182
+ }