zdp-design-system 0.43.8

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 (110) hide show
  1. package/CHANGELOG.md +449 -0
  2. package/LICENSE +21 -0
  3. package/README.md +568 -0
  4. package/THIRD_PARTY_NOTICES.md +34 -0
  5. package/dist/code.ts +2 -0
  6. package/dist/combobox.ts +9 -0
  7. package/dist/command.ts +1 -0
  8. package/dist/components/Accordion.svelte +97 -0
  9. package/dist/components/Avatar.svelte +90 -0
  10. package/dist/components/Badge.svelte +61 -0
  11. package/dist/components/Breadcrumb.svelte +97 -0
  12. package/dist/components/Button.svelte +163 -0
  13. package/dist/components/Callout.svelte +81 -0
  14. package/dist/components/Card.svelte +151 -0
  15. package/dist/components/CardHeader.svelte +58 -0
  16. package/dist/components/Checkbox.svelte +135 -0
  17. package/dist/components/CodeBlock.svelte +247 -0
  18. package/dist/components/Combobox.svelte +552 -0
  19. package/dist/components/CommandField.svelte +230 -0
  20. package/dist/components/ConfirmAction.svelte +307 -0
  21. package/dist/components/Container.svelte +63 -0
  22. package/dist/components/Dialog.svelte +303 -0
  23. package/dist/components/Disclosure.svelte +176 -0
  24. package/dist/components/Divider.svelte +41 -0
  25. package/dist/components/EmptyState.svelte +79 -0
  26. package/dist/components/ErrorText.svelte +18 -0
  27. package/dist/components/Field.svelte +38 -0
  28. package/dist/components/Grid.svelte +76 -0
  29. package/dist/components/HelpText.svelte +17 -0
  30. package/dist/components/Icon.svelte +45 -0
  31. package/dist/components/IconButton.svelte +162 -0
  32. package/dist/components/IdentityChip.svelte +130 -0
  33. package/dist/components/Inline.svelte +85 -0
  34. package/dist/components/InlineCode.svelte +27 -0
  35. package/dist/components/Input.svelte +109 -0
  36. package/dist/components/Kbd.svelte +63 -0
  37. package/dist/components/KeyValue.svelte +73 -0
  38. package/dist/components/Label.svelte +43 -0
  39. package/dist/components/Link.svelte +70 -0
  40. package/dist/components/LocaleSwitcher.svelte +209 -0
  41. package/dist/components/Menu.svelte +491 -0
  42. package/dist/components/Page.svelte +36 -0
  43. package/dist/components/PageHeader.svelte +93 -0
  44. package/dist/components/Pagination.svelte +297 -0
  45. package/dist/components/Popover.svelte +208 -0
  46. package/dist/components/Progress.svelte +111 -0
  47. package/dist/components/Radio.svelte +132 -0
  48. package/dist/components/Section.svelte +52 -0
  49. package/dist/components/SegmentedControl.svelte +190 -0
  50. package/dist/components/Select.svelte +88 -0
  51. package/dist/components/ShareDock.svelte +304 -0
  52. package/dist/components/Sheet.svelte +332 -0
  53. package/dist/components/ShortcutHint.svelte +52 -0
  54. package/dist/components/Skeleton.svelte +82 -0
  55. package/dist/components/SkipLink.svelte +40 -0
  56. package/dist/components/SortHeader.svelte +138 -0
  57. package/dist/components/Spinner.svelte +82 -0
  58. package/dist/components/Stack.svelte +62 -0
  59. package/dist/components/StatusToast.svelte +133 -0
  60. package/dist/components/Surface.svelte +53 -0
  61. package/dist/components/Switch.svelte +152 -0
  62. package/dist/components/Table.svelte +94 -0
  63. package/dist/components/TableToolbar.svelte +195 -0
  64. package/dist/components/Tabs.svelte +205 -0
  65. package/dist/components/TermSheet.svelte +392 -0
  66. package/dist/components/TermTrigger.svelte +70 -0
  67. package/dist/components/TextScaleControl.svelte +219 -0
  68. package/dist/components/Textarea.svelte +106 -0
  69. package/dist/components/ThemeToggle.svelte +148 -0
  70. package/dist/components/Toast.svelte +180 -0
  71. package/dist/components/Toolbar.svelte +83 -0
  72. package/dist/components/Tooltip.svelte +199 -0
  73. package/dist/components/VisuallyHidden.svelte +18 -0
  74. package/dist/disclosure.ts +11 -0
  75. package/dist/focusable.ts +36 -0
  76. package/dist/identity.ts +5 -0
  77. package/dist/index.d.ts +106 -0
  78. package/dist/index.js +76 -0
  79. package/dist/index.ts +106 -0
  80. package/dist/menu.ts +12 -0
  81. package/dist/modal-layer.ts +108 -0
  82. package/dist/pagination.ts +10 -0
  83. package/dist/preferences.js +14 -0
  84. package/dist/preferences.ts +36 -0
  85. package/dist/progress.ts +4 -0
  86. package/dist/schemas/design-tokens.schema.json +119 -0
  87. package/dist/segmented.ts +8 -0
  88. package/dist/share.d.ts +48 -0
  89. package/dist/share.js +115 -0
  90. package/dist/share.ts +99 -0
  91. package/dist/sheet.ts +3 -0
  92. package/dist/shortcuts.js +125 -0
  93. package/dist/shortcuts.ts +153 -0
  94. package/dist/styles/brand-fonts.css +10 -0
  95. package/dist/styles/components.css +4686 -0
  96. package/dist/styles/expressive-fonts.css +2 -0
  97. package/dist/styles/index.css +2 -0
  98. package/dist/styles/locale-fonts.css +4 -0
  99. package/dist/styles/tokens.css +413 -0
  100. package/dist/table-tools.ts +10 -0
  101. package/dist/term.ts +16 -0
  102. package/dist/theme.ts +2 -0
  103. package/dist/toast.ts +14 -0
  104. package/dist/tokens/zdp.tokens.json +241 -0
  105. package/dist/tokens.js +122 -0
  106. package/dist/tokens.ts +123 -0
  107. package/docs/CONSUMER_CONTRACT.md +482 -0
  108. package/docs/EXTERNAL_UI_ADOPTION.md +141 -0
  109. package/docs/INTERACTIVE_PRIMITIVE_AUDIT.md +127 -0
  110. package/package.json +78 -0
@@ -0,0 +1,552 @@
1
+ <script lang="ts" context="module">
2
+ let nextComboboxInstanceId = 0;
3
+ </script>
4
+
5
+ <script lang="ts">
6
+ import type { HTMLInputAttributes } from 'svelte/elements';
7
+ import type { ZdpComboboxOption, ZdpComboboxSize } from '../combobox';
8
+
9
+ type DescribedBy = string | readonly string[] | null;
10
+
11
+ export let id: string | null = null;
12
+ export let name: string | null = null;
13
+ export let value = '';
14
+ export let query = '';
15
+ export let options: readonly ZdpComboboxOption[] = [];
16
+ export let label: string | null = 'Search';
17
+ export let labelVisible = false;
18
+ export let ariaLabel: string | null = null;
19
+ export let placeholder: string | null = 'Search query';
20
+ export let autocomplete: HTMLInputAttributes['autocomplete'] | null = 'off';
21
+ export let describedBy: DescribedBy = null;
22
+ export let errorMessageId: string | null = null;
23
+ export let invalid = false;
24
+ export let disabled = false;
25
+ export let readonly = false;
26
+ export let required = false;
27
+ export let size: ZdpComboboxSize = 'md';
28
+ export let noResultsText = 'No results';
29
+ export let onQueryChange: ((query: string) => void) | null = null;
30
+ export let onValueChange: ((value: string, option: ZdpComboboxOption | null) => void) | null = null;
31
+ export let onOpenChange: ((open: boolean) => void) | null = null;
32
+
33
+ const fallbackIdPrefix = `zdp-combobox-${++nextComboboxInstanceId}`;
34
+
35
+ let rootElement: HTMLElement | null = null;
36
+ let inputElement: HTMLInputElement | null = null;
37
+ let open = false;
38
+ let activeOptionId = '';
39
+ let lastSyncedValue = value;
40
+ let lastSelectedValue = '';
41
+ let lastSelectedLabel = '';
42
+
43
+ $: enabledOptions = options.filter((option) => !option.disabled);
44
+ $: selectedOption = options.find((option) => option.value === value) ?? null;
45
+ $: if (selectedOption) {
46
+ lastSelectedValue = selectedOption.value;
47
+ lastSelectedLabel = selectedOption.label;
48
+ }
49
+ $: selectedOptionLabel = selectedOption?.label ?? (value === lastSelectedValue ? lastSelectedLabel : '');
50
+ $: resolvedIdPrefix = toDomId(id ?? fallbackIdPrefix);
51
+ $: inputId = id ?? `${resolvedIdPrefix}-input`;
52
+ $: listboxId = `${resolvedIdPrefix}-listbox`;
53
+ $: ariaDescribedBy = normalizeIdRefs(describedBy);
54
+ $: resolvedErrorMessageId = invalid && errorMessageId ? errorMessageId : null;
55
+ $: hasOptions = options.length > 0;
56
+ $: activeOptionId = resolveActiveOptionId(activeOptionId, enabledOptions);
57
+ $: activeOptionDomId = open && activeOptionId ? optionDomId(activeOptionId) : null;
58
+ $: inputAriaLabel = label ? undefined : ariaLabel ?? 'Search';
59
+ $: listboxLabel = `${label ?? ariaLabel ?? 'Selection'} list`;
60
+
61
+ $: if (value !== lastSyncedValue) {
62
+ query = selectedOptionLabel;
63
+ lastSyncedValue = value;
64
+ }
65
+
66
+ function setOpen(nextOpen: boolean): void {
67
+ if (disabled || readonly || open === nextOpen) {
68
+ return;
69
+ }
70
+
71
+ open = nextOpen;
72
+ onOpenChange?.(nextOpen);
73
+
74
+ if (nextOpen) {
75
+ activeOptionId = selectedOption?.id ?? enabledOptions[0]?.id ?? '';
76
+ }
77
+ }
78
+
79
+ function handleInput(event: Event): void {
80
+ query = (event.currentTarget as HTMLInputElement).value;
81
+ onQueryChange?.(query);
82
+ setOpen(true);
83
+ activeOptionId = enabledOptions[0]?.id ?? '';
84
+ }
85
+
86
+ function handleInputFocus(): void {
87
+ if (hasOptions) {
88
+ setOpen(true);
89
+ }
90
+ }
91
+
92
+ function handleInputKeydown(event: KeyboardEvent): void {
93
+ if (event.key === 'ArrowDown') {
94
+ event.preventDefault();
95
+ setOpen(true);
96
+ moveActiveOption('ArrowDown');
97
+ return;
98
+ }
99
+
100
+ if (event.key === 'ArrowUp') {
101
+ event.preventDefault();
102
+ setOpen(true);
103
+ moveActiveOption('ArrowUp');
104
+ return;
105
+ }
106
+
107
+ if (event.key === 'Home' && open) {
108
+ event.preventDefault();
109
+ activeOptionId = enabledOptions[0]?.id ?? '';
110
+ return;
111
+ }
112
+
113
+ if (event.key === 'End' && open) {
114
+ event.preventDefault();
115
+ activeOptionId = enabledOptions[enabledOptions.length - 1]?.id ?? '';
116
+ return;
117
+ }
118
+
119
+ if (event.key === 'Enter' && open) {
120
+ const activeOption = enabledOptions.find((option) => option.id === activeOptionId) ?? null;
121
+
122
+ if (activeOption) {
123
+ event.preventDefault();
124
+ selectOption(activeOption);
125
+ }
126
+
127
+ return;
128
+ }
129
+
130
+ if (event.key === 'Escape' && open) {
131
+ event.preventDefault();
132
+ const nextQuery = selectedOptionLabel || query;
133
+ query = nextQuery;
134
+ onQueryChange?.(nextQuery);
135
+ setOpen(false);
136
+ }
137
+ }
138
+
139
+ function handleToggleClick(): void {
140
+ setOpen(!open);
141
+ inputElement?.focus();
142
+ }
143
+
144
+ function handleDocumentClick(event: MouseEvent): void {
145
+ if (!open || rootElement?.contains(event.target as Node)) {
146
+ return;
147
+ }
148
+
149
+ setOpen(false);
150
+ }
151
+
152
+ function handleOptionMouseenter(option: ZdpComboboxOption): void {
153
+ if (!option.disabled) {
154
+ activeOptionId = option.id;
155
+ }
156
+ }
157
+
158
+ function selectOption(option: ZdpComboboxOption): void {
159
+ if (option.disabled) {
160
+ return;
161
+ }
162
+
163
+ value = option.value;
164
+ query = option.label;
165
+ lastSyncedValue = value;
166
+ lastSelectedValue = option.value;
167
+ lastSelectedLabel = option.label;
168
+ onQueryChange?.(query);
169
+ onValueChange?.(value, option);
170
+ setOpen(false);
171
+ inputElement?.focus();
172
+ }
173
+
174
+ function moveActiveOption(key: 'ArrowDown' | 'ArrowUp'): void {
175
+ if (enabledOptions.length === 0) {
176
+ activeOptionId = '';
177
+ return;
178
+ }
179
+
180
+ const currentIndex = Math.max(
181
+ 0,
182
+ enabledOptions.findIndex((option) => option.id === activeOptionId)
183
+ );
184
+
185
+ const nextIndex =
186
+ key === 'ArrowUp'
187
+ ? (currentIndex - 1 + enabledOptions.length) % enabledOptions.length
188
+ : (currentIndex + 1) % enabledOptions.length;
189
+
190
+ activeOptionId = enabledOptions[nextIndex]?.id ?? activeOptionId;
191
+ }
192
+
193
+ function resolveActiveOptionId(currentId: string, availableOptions: readonly ZdpComboboxOption[]): string {
194
+ if (availableOptions.some((option) => option.id === currentId)) {
195
+ return currentId;
196
+ }
197
+
198
+ return availableOptions[0]?.id ?? '';
199
+ }
200
+
201
+ function optionDomId(optionId: string): string {
202
+ return `${resolvedIdPrefix}-option-${toDomId(optionId)}`;
203
+ }
204
+
205
+ function normalizeIdRefs(value: DescribedBy): string | null {
206
+ if (value === null) {
207
+ return null;
208
+ }
209
+
210
+ if (typeof value === 'string') {
211
+ const normalized = value.trim();
212
+ return normalized ? normalized : null;
213
+ }
214
+
215
+ const normalized = value.map((entry) => entry.trim()).filter(Boolean);
216
+ return normalized.length > 0 ? normalized.join(' ') : null;
217
+ }
218
+
219
+ function toDomId(id: string): string {
220
+ return id.trim().replace(/[^a-zA-Z0-9_-]+/g, '-') || 'combobox';
221
+ }
222
+ </script>
223
+
224
+ <svelte:document onclick={handleDocumentClick} />
225
+
226
+ <span
227
+ class={`zdp-combobox zdp-combobox--${size}`}
228
+ data-open={open ? 'true' : 'false'}
229
+ data-invalid={invalid ? 'true' : undefined}
230
+ data-disabled={disabled ? 'true' : undefined}
231
+ bind:this={rootElement}
232
+ >
233
+ {#if label}
234
+ <label class={`zdp-combobox__label ${labelVisible ? '' : 'zdp-combobox__label--hidden'}`} for={inputId}>
235
+ {label}
236
+ </label>
237
+ {/if}
238
+
239
+ <span class="zdp-combobox__control">
240
+ <input
241
+ class="zdp-combobox__input"
242
+ id={inputId}
243
+ role="combobox"
244
+ type="text"
245
+ value={query}
246
+ placeholder={placeholder ?? undefined}
247
+ autocomplete={autocomplete ?? undefined}
248
+ aria-label={inputAriaLabel}
249
+ aria-autocomplete="list"
250
+ aria-haspopup="listbox"
251
+ aria-expanded={open}
252
+ aria-controls={open && hasOptions ? listboxId : undefined}
253
+ aria-activedescendant={activeOptionDomId ?? undefined}
254
+ aria-describedby={ariaDescribedBy ?? undefined}
255
+ aria-errormessage={resolvedErrorMessageId ?? undefined}
256
+ aria-invalid={invalid ? 'true' : undefined}
257
+ aria-required={required ? 'true' : undefined}
258
+ {disabled}
259
+ readonly={readonly}
260
+ {required}
261
+ bind:this={inputElement}
262
+ oninput={handleInput}
263
+ onfocus={handleInputFocus}
264
+ onkeydown={handleInputKeydown}
265
+ />
266
+ {#if name}
267
+ <input type="hidden" {name} {value} />
268
+ {/if}
269
+ <button
270
+ class="zdp-combobox__toggle"
271
+ type="button"
272
+ aria-label={open ? 'Close selection' : 'Open selection'}
273
+ aria-controls={open && hasOptions ? listboxId : undefined}
274
+ aria-expanded={open}
275
+ disabled={disabled || readonly}
276
+ onclick={handleToggleClick}
277
+ >
278
+ <span class="zdp-combobox__mark" aria-hidden="true"></span>
279
+ </button>
280
+ </span>
281
+
282
+ {#if open}
283
+ <span class="zdp-combobox__panel">
284
+ {#if hasOptions}
285
+ <span class="zdp-combobox__listbox" id={listboxId} role="listbox" aria-label={listboxLabel}>
286
+ {#each options as option (option.id)}
287
+ <button
288
+ class="zdp-combobox__option"
289
+ type="button"
290
+ id={optionDomId(option.id)}
291
+ role="option"
292
+ aria-selected={option.value === value}
293
+ aria-disabled={option.disabled ? 'true' : undefined}
294
+ disabled={option.disabled}
295
+ tabindex="-1"
296
+ data-active={option.id === activeOptionId ? 'true' : undefined}
297
+ data-selected={option.value === value ? 'true' : undefined}
298
+ onmousedown={(event) => event.preventDefault()}
299
+ onmouseenter={() => handleOptionMouseenter(option)}
300
+ onclick={() => selectOption(option)}
301
+ >
302
+ <span class="zdp-combobox__option-label">{option.label}</span>
303
+ {#if option.description}
304
+ <span class="zdp-combobox__option-description">{option.description}</span>
305
+ {/if}
306
+ </button>
307
+ {/each}
308
+ </span>
309
+ {:else}
310
+ <span class="zdp-combobox__empty" role="status">{noResultsText}</span>
311
+ {/if}
312
+ </span>
313
+ {/if}
314
+ </span>
315
+
316
+ <style>
317
+ .zdp-combobox {
318
+ box-sizing: border-box;
319
+ display: grid;
320
+ gap: var(--zdp-space-2);
321
+ inline-size: 100%;
322
+ min-width: 0;
323
+ position: relative;
324
+ }
325
+
326
+ .zdp-combobox__label {
327
+ color: var(--zdp-color-ink-strong);
328
+ font-family: var(--zdp-font-family-sans);
329
+ font-size: var(--zdp-type-label-size);
330
+ font-weight: var(--zdp-font-weight-medium);
331
+ line-height: var(--zdp-type-label-line-height);
332
+ }
333
+
334
+ .zdp-combobox__label--hidden {
335
+ block-size: 1px;
336
+ clip: rect(0 0 0 0);
337
+ clip-path: inset(50%);
338
+ inline-size: 1px;
339
+ margin: -1px;
340
+ overflow: hidden;
341
+ padding: 0;
342
+ position: absolute;
343
+ white-space: nowrap;
344
+ }
345
+
346
+ .zdp-combobox__control {
347
+ align-items: center;
348
+ background: var(--zdp-color-surface-panel);
349
+ border: var(--zdp-control-border-width) solid var(--zdp-color-line-subtle);
350
+ border-radius: var(--zdp-control-radius);
351
+ box-sizing: border-box;
352
+ color: var(--zdp-color-ink-strong);
353
+ display: flex;
354
+ font-family: var(--zdp-font-family-sans);
355
+ font-size: var(--zdp-type-control-size);
356
+ gap: var(--zdp-space-1);
357
+ inline-size: 100%;
358
+ min-width: 0;
359
+ transition:
360
+ background-color var(--zdp-motion-fast) ease,
361
+ border-color var(--zdp-motion-fast) ease,
362
+ color var(--zdp-motion-fast) ease;
363
+ }
364
+
365
+ .zdp-combobox--sm .zdp-combobox__control {
366
+ min-height: var(--zdp-control-height-sm);
367
+ padding: 0 var(--zdp-space-1) 0 var(--zdp-space-2);
368
+ }
369
+
370
+ .zdp-combobox--md .zdp-combobox__control {
371
+ min-height: var(--zdp-control-height-md);
372
+ padding: 0 var(--zdp-space-1) 0 var(--zdp-space-3);
373
+ }
374
+
375
+ .zdp-combobox__control:hover {
376
+ background: var(--zdp-color-surface-raised);
377
+ border-color: var(--zdp-color-line-strong);
378
+ }
379
+
380
+ .zdp-combobox__control:focus-within {
381
+ border-color: var(--zdp-color-focus-line);
382
+ outline: var(--zdp-control-focus-outline-width) solid var(--zdp-color-focus-surface);
383
+ outline-offset: var(--zdp-control-focus-outline-offset);
384
+ }
385
+
386
+ .zdp-combobox[data-invalid="true"] .zdp-combobox__control {
387
+ border-color: var(--zdp-color-accent-danger);
388
+ }
389
+
390
+ .zdp-combobox[data-disabled="true"] .zdp-combobox__control {
391
+ cursor: not-allowed;
392
+ opacity: 0.56;
393
+ }
394
+
395
+ .zdp-combobox__input {
396
+ background: transparent;
397
+ border: 0;
398
+ color: inherit;
399
+ flex: 1 1 auto;
400
+ font: inherit;
401
+ min-height: calc(var(--zdp-control-height-md) - 2px);
402
+ min-width: 0;
403
+ padding: 0;
404
+ }
405
+
406
+ .zdp-combobox--sm .zdp-combobox__input {
407
+ min-height: calc(var(--zdp-control-height-sm) - 2px);
408
+ }
409
+
410
+ .zdp-combobox__input::placeholder {
411
+ color: var(--zdp-color-ink-muted);
412
+ }
413
+
414
+ .zdp-combobox__input:focus {
415
+ outline: 0;
416
+ }
417
+
418
+ .zdp-combobox__toggle {
419
+ align-items: center;
420
+ background: transparent;
421
+ border: var(--zdp-control-border-width) solid transparent;
422
+ border-radius: var(--zdp-control-radius);
423
+ color: var(--zdp-color-ink-muted);
424
+ cursor: pointer;
425
+ display: inline-flex;
426
+ flex: 0 0 auto;
427
+ justify-content: center;
428
+ min-height: calc(var(--zdp-control-height-sm) - 2px);
429
+ min-width: calc(var(--zdp-control-height-sm) - 2px);
430
+ padding: 0;
431
+ transition:
432
+ background-color var(--zdp-motion-fast) ease,
433
+ border-color var(--zdp-motion-fast) ease,
434
+ color var(--zdp-motion-fast) ease;
435
+ -webkit-user-select: none;
436
+ user-select: none;
437
+ }
438
+
439
+ .zdp-combobox__toggle:hover:not(:disabled),
440
+ .zdp-combobox__toggle:focus-visible {
441
+ background: var(--zdp-color-surface-raised);
442
+ border-color: var(--zdp-color-line-strong);
443
+ color: var(--zdp-color-ink-strong);
444
+ outline: 0;
445
+ }
446
+
447
+ .zdp-combobox__toggle:disabled {
448
+ cursor: not-allowed;
449
+ }
450
+
451
+ .zdp-combobox__mark {
452
+ align-items: center;
453
+ display: inline-flex;
454
+ justify-content: center;
455
+ line-height: 1;
456
+ -webkit-user-select: none;
457
+ user-select: none;
458
+ }
459
+
460
+ .zdp-combobox__mark::before {
461
+ border-left: 4px solid transparent;
462
+ border-right: 4px solid transparent;
463
+ border-top: 4px solid currentColor;
464
+ content: '';
465
+ display: inline-block;
466
+ height: 0;
467
+ width: 0;
468
+ }
469
+
470
+ .zdp-combobox__panel {
471
+ background: var(--zdp-color-surface-panel);
472
+ border: var(--zdp-control-border-width) solid var(--zdp-color-line-strong);
473
+ border-radius: var(--zdp-control-radius);
474
+ color: var(--zdp-color-ink-normal);
475
+ display: grid;
476
+ font-family: var(--zdp-font-family-sans);
477
+ inline-size: 100%;
478
+ left: 0;
479
+ max-block-size: min(18rem, calc(100vh - var(--zdp-space-8)));
480
+ min-width: 0;
481
+ overflow: auto;
482
+ padding: var(--zdp-space-1);
483
+ position: absolute;
484
+ top: calc(100% + var(--zdp-space-2));
485
+ z-index: 40;
486
+ }
487
+
488
+ .zdp-combobox__listbox {
489
+ display: grid;
490
+ gap: var(--zdp-space-1);
491
+ min-width: 0;
492
+ }
493
+
494
+ .zdp-combobox__option {
495
+ align-items: start;
496
+ background: transparent;
497
+ border: var(--zdp-control-border-width) solid transparent;
498
+ border-radius: var(--zdp-control-radius);
499
+ color: var(--zdp-color-ink-normal);
500
+ cursor: pointer;
501
+ display: grid;
502
+ font-family: var(--zdp-font-family-sans);
503
+ font-size: var(--zdp-type-control-size);
504
+ gap: var(--zdp-space-1);
505
+ line-height: var(--zdp-type-control-line-height);
506
+ min-height: var(--zdp-control-height-sm);
507
+ min-width: 0;
508
+ padding: var(--zdp-space-1) var(--zdp-space-2);
509
+ text-align: left;
510
+ transition:
511
+ background-color var(--zdp-motion-fast) ease,
512
+ border-color var(--zdp-motion-fast) ease,
513
+ color var(--zdp-motion-fast) ease;
514
+ -webkit-user-select: none;
515
+ user-select: none;
516
+ }
517
+
518
+ .zdp-combobox__option:hover:not(:disabled),
519
+ .zdp-combobox__option[data-active="true"] {
520
+ background: var(--zdp-color-surface-raised);
521
+ border-color: var(--zdp-color-line-strong);
522
+ color: var(--zdp-color-ink-strong);
523
+ }
524
+
525
+ .zdp-combobox__option[data-selected="true"] {
526
+ background: var(--zdp-color-focus-surface);
527
+ border-color: var(--zdp-color-focus-line);
528
+ color: var(--zdp-color-focus-text);
529
+ }
530
+
531
+ .zdp-combobox__option:disabled,
532
+ .zdp-combobox__option[aria-disabled="true"] {
533
+ cursor: not-allowed;
534
+ opacity: 0.56;
535
+ }
536
+
537
+ .zdp-combobox__option-label {
538
+ min-width: 0;
539
+ overflow-wrap: var(--zdp-i18n-overflow-wrap);
540
+ }
541
+
542
+ .zdp-combobox__option-description,
543
+ .zdp-combobox__empty {
544
+ color: var(--zdp-color-ink-muted);
545
+ font-size: var(--zdp-type-body-small-size);
546
+ line-height: var(--zdp-type-body-small-line-height);
547
+ }
548
+
549
+ .zdp-combobox__empty {
550
+ padding: var(--zdp-space-2);
551
+ }
552
+ </style>