@vadem/ui 0.0.0-stage → 0.0.1
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.
- package/LICENSE-lucide.txt +43 -0
- package/README.md +19 -2
- package/fesm2022/vadem-ui-accordion.mjs +139 -0
- package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
- package/fesm2022/vadem-ui-active-filters.mjs +355 -0
- package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert.mjs +266 -0
- package/fesm2022/vadem-ui-alert.mjs.map +1 -0
- package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
- package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/vadem-ui-avatar.mjs +219 -0
- package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
- package/fesm2022/vadem-ui-badge.mjs +86 -0
- package/fesm2022/vadem-ui-badge.mjs.map +1 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
- package/fesm2022/vadem-ui-button.mjs +220 -0
- package/fesm2022/vadem-ui-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-calendar.mjs +1314 -0
- package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
- package/fesm2022/vadem-ui-card.mjs +271 -0
- package/fesm2022/vadem-ui-card.mjs.map +1 -0
- package/fesm2022/vadem-ui-character-count.mjs +269 -0
- package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
- package/fesm2022/vadem-ui-chart.mjs +1984 -0
- package/fesm2022/vadem-ui-chart.mjs.map +1 -0
- package/fesm2022/vadem-ui-checkbox.mjs +67 -0
- package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
- package/fesm2022/vadem-ui-color-picker.mjs +815 -0
- package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-command.mjs +735 -0
- package/fesm2022/vadem-ui-command.mjs.map +1 -0
- package/fesm2022/vadem-ui-copy-button.mjs +375 -0
- package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-description-list.mjs +59 -0
- package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-dialog.mjs +587 -0
- package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-dropzone.mjs +176 -0
- package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
- package/fesm2022/vadem-ui-editable-text.mjs +641 -0
- package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-empty-state.mjs +175 -0
- package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
- package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
- package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-field.mjs +583 -0
- package/fesm2022/vadem-ui-field.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-preview.mjs +532 -0
- package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-size.mjs +83 -0
- package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
- package/fesm2022/vadem-ui-icon.mjs +303 -0
- package/fesm2022/vadem-ui-icon.mjs.map +1 -0
- package/fesm2022/vadem-ui-input.mjs +120 -0
- package/fesm2022/vadem-ui-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-kbd.mjs +286 -0
- package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
- package/fesm2022/vadem-ui-keyboard.mjs +105 -0
- package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
- package/fesm2022/vadem-ui-locale.mjs +443 -0
- package/fesm2022/vadem-ui-locale.mjs.map +1 -0
- package/fesm2022/vadem-ui-menu.mjs +637 -0
- package/fesm2022/vadem-ui-menu.mjs.map +1 -0
- package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
- package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-number-input.mjs +264 -0
- package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-otp-input.mjs +86 -0
- package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-pagination.mjs +353 -0
- package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
- package/fesm2022/vadem-ui-password-input.mjs +213 -0
- package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-popover.mjs +178 -0
- package/fesm2022/vadem-ui-popover.mjs.map +1 -0
- package/fesm2022/vadem-ui-progress.mjs +331 -0
- package/fesm2022/vadem-ui-progress.mjs.map +1 -0
- package/fesm2022/vadem-ui-radio.mjs +39 -0
- package/fesm2022/vadem-ui-radio.mjs.map +1 -0
- package/fesm2022/vadem-ui-range-slider.mjs +561 -0
- package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-rating.mjs +404 -0
- package/fesm2022/vadem-ui-rating.mjs.map +1 -0
- package/fesm2022/vadem-ui-relative-time.mjs +217 -0
- package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
- package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
- package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
- package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/vadem-ui-search-input.mjs +307 -0
- package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-segmented.mjs +297 -0
- package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
- package/fesm2022/vadem-ui-select.mjs +1462 -0
- package/fesm2022/vadem-ui-select.mjs.map +1 -0
- package/fesm2022/vadem-ui-sidebar.mjs +493 -0
- package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
- package/fesm2022/vadem-ui-skeleton.mjs +106 -0
- package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
- package/fesm2022/vadem-ui-slider.mjs +60 -0
- package/fesm2022/vadem-ui-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-splitter.mjs +438 -0
- package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
- package/fesm2022/vadem-ui-stat.mjs +369 -0
- package/fesm2022/vadem-ui-stat.mjs.map +1 -0
- package/fesm2022/vadem-ui-stepper.mjs +483 -0
- package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
- package/fesm2022/vadem-ui-switch.mjs +45 -0
- package/fesm2022/vadem-ui-switch.mjs.map +1 -0
- package/fesm2022/vadem-ui-table.mjs +593 -0
- package/fesm2022/vadem-ui-table.mjs.map +1 -0
- package/fesm2022/vadem-ui-tabs.mjs +405 -0
- package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
- package/fesm2022/vadem-ui-tag-input.mjs +685 -0
- package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
- package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
- package/fesm2022/vadem-ui-time-input.mjs +430 -0
- package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-timeline.mjs +313 -0
- package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
- package/fesm2022/vadem-ui-toast.mjs +397 -0
- package/fesm2022/vadem-ui-toast.mjs.map +1 -0
- package/fesm2022/vadem-ui-toolbar.mjs +396 -0
- package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
- package/fesm2022/vadem-ui-tooltip.mjs +218 -0
- package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
- package/fesm2022/vadem-ui-tree.mjs +551 -0
- package/fesm2022/vadem-ui-tree.mjs.map +1 -0
- package/fesm2022/vadem-ui-upload-list.mjs +408 -0
- package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
- package/fesm2022/vadem-ui.mjs +4 -0
- package/fesm2022/vadem-ui.mjs.map +1 -0
- package/fonts/jetbrains-mono/OFL.txt +93 -0
- package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
- package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
- package/fonts/manrope/OFL.txt +93 -0
- package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/package.json +306 -3
- package/styles/base.css +160 -0
- package/styles/components/accordion.css +130 -0
- package/styles/components/active-filters.css +42 -0
- package/styles/components/alert-dialog.css +34 -0
- package/styles/components/alert.css +159 -0
- package/styles/components/autocomplete.css +97 -0
- package/styles/components/avatar.css +90 -0
- package/styles/components/badge.css +91 -0
- package/styles/components/breadcrumbs.css +94 -0
- package/styles/components/button.css +174 -0
- package/styles/components/calendar.css +186 -0
- package/styles/components/card.css +206 -0
- package/styles/components/character-count.css +41 -0
- package/styles/components/chart.css +308 -0
- package/styles/components/checkbox.css +115 -0
- package/styles/components/color-picker.css +158 -0
- package/styles/components/command.css +175 -0
- package/styles/components/copy-button.css +58 -0
- package/styles/components/date-range-picker.css +153 -0
- package/styles/components/description-list.css +69 -0
- package/styles/components/dialog.css +334 -0
- package/styles/components/dropzone.css +89 -0
- package/styles/components/editable-text.css +58 -0
- package/styles/components/empty-state.css +72 -0
- package/styles/components/expandable-text.css +24 -0
- package/styles/components/field.css +148 -0
- package/styles/components/file-preview.css +65 -0
- package/styles/components/form-error-summary.css +71 -0
- package/styles/components/icon.css +38 -0
- package/styles/components/index.css +80 -0
- package/styles/components/input.css +171 -0
- package/styles/components/kbd.css +42 -0
- package/styles/components/menu.css +168 -0
- package/styles/components/multi-select.css +156 -0
- package/styles/components/navigation-list.css +147 -0
- package/styles/components/number-input.css +33 -0
- package/styles/components/otp-input.css +26 -0
- package/styles/components/pagination.css +127 -0
- package/styles/components/password-input.css +20 -0
- package/styles/components/popover.css +93 -0
- package/styles/components/progress-ring.css +112 -0
- package/styles/components/progress.css +162 -0
- package/styles/components/radio.css +117 -0
- package/styles/components/range-slider.css +158 -0
- package/styles/components/rating.css +100 -0
- package/styles/components/reorder-list.css +143 -0
- package/styles/components/scroll-area.css +39 -0
- package/styles/components/search-input.css +25 -0
- package/styles/components/segmented.css +136 -0
- package/styles/components/select.css +257 -0
- package/styles/components/sidebar.css +105 -0
- package/styles/components/skeleton.css +83 -0
- package/styles/components/slider.css +132 -0
- package/styles/components/splitter.css +83 -0
- package/styles/components/stat.css +62 -0
- package/styles/components/stepper.css +236 -0
- package/styles/components/switch.css +107 -0
- package/styles/components/table.css +195 -0
- package/styles/components/tabs.css +198 -0
- package/styles/components/tag-input.css +138 -0
- package/styles/components/text-highlight.css +22 -0
- package/styles/components/time-input.css +96 -0
- package/styles/components/timeline.css +182 -0
- package/styles/components/toast.css +146 -0
- package/styles/components/toolbar.css +72 -0
- package/styles/components/tooltip.css +93 -0
- package/styles/components/tree.css +88 -0
- package/styles/components/upload-list.css +113 -0
- package/styles/fonts.css +67 -0
- package/styles/index.css +14 -0
- package/styles/reset.css +57 -0
- package/styles/tokens/primitives.css +364 -0
- package/styles/tokens/semantic.css +233 -0
- package/types/vadem-ui-accordion.d.ts +43 -0
- package/types/vadem-ui-active-filters.d.ts +73 -0
- package/types/vadem-ui-alert-dialog.d.ts +87 -0
- package/types/vadem-ui-alert.d.ts +64 -0
- package/types/vadem-ui-autocomplete.d.ts +156 -0
- package/types/vadem-ui-avatar.d.ts +59 -0
- package/types/vadem-ui-badge.d.ts +25 -0
- package/types/vadem-ui-breadcrumbs.d.ts +22 -0
- package/types/vadem-ui-button.d.ts +52 -0
- package/types/vadem-ui-calendar.d.ts +327 -0
- package/types/vadem-ui-card.d.ts +58 -0
- package/types/vadem-ui-character-count.d.ts +71 -0
- package/types/vadem-ui-chart.d.ts +452 -0
- package/types/vadem-ui-checkbox.d.ts +20 -0
- package/types/vadem-ui-color-picker.d.ts +171 -0
- package/types/vadem-ui-command.d.ts +145 -0
- package/types/vadem-ui-copy-button.d.ts +90 -0
- package/types/vadem-ui-date-range-picker.d.ts +216 -0
- package/types/vadem-ui-description-list.d.ts +15 -0
- package/types/vadem-ui-dialog.d.ts +174 -0
- package/types/vadem-ui-dropzone.d.ts +73 -0
- package/types/vadem-ui-editable-text.d.ts +141 -0
- package/types/vadem-ui-empty-state.d.ts +34 -0
- package/types/vadem-ui-expandable-text.d.ts +52 -0
- package/types/vadem-ui-field.d.ts +180 -0
- package/types/vadem-ui-file-preview.d.ts +108 -0
- package/types/vadem-ui-file-size.d.ts +18 -0
- package/types/vadem-ui-form-error-summary.d.ts +46 -0
- package/types/vadem-ui-icon.d.ts +152 -0
- package/types/vadem-ui-input.d.ts +31 -0
- package/types/vadem-ui-kbd.d.ts +66 -0
- package/types/vadem-ui-keyboard.d.ts +61 -0
- package/types/vadem-ui-locale.d.ts +241 -0
- package/types/vadem-ui-menu.d.ts +132 -0
- package/types/vadem-ui-navigation-list.d.ts +28 -0
- package/types/vadem-ui-number-input.d.ts +39 -0
- package/types/vadem-ui-otp-input.d.ts +15 -0
- package/types/vadem-ui-pagination.d.ts +96 -0
- package/types/vadem-ui-password-input.d.ts +36 -0
- package/types/vadem-ui-popover.d.ts +48 -0
- package/types/vadem-ui-progress.d.ts +95 -0
- package/types/vadem-ui-radio.d.ts +11 -0
- package/types/vadem-ui-range-slider.d.ts +136 -0
- package/types/vadem-ui-rating.d.ts +95 -0
- package/types/vadem-ui-relative-time.d.ts +58 -0
- package/types/vadem-ui-reorder-list.d.ts +120 -0
- package/types/vadem-ui-scroll-area.d.ts +13 -0
- package/types/vadem-ui-search-input.d.ts +58 -0
- package/types/vadem-ui-segmented.d.ts +76 -0
- package/types/vadem-ui-select.d.ts +303 -0
- package/types/vadem-ui-sidebar.d.ts +70 -0
- package/types/vadem-ui-skeleton.d.ts +28 -0
- package/types/vadem-ui-slider.d.ts +17 -0
- package/types/vadem-ui-splitter.d.ts +99 -0
- package/types/vadem-ui-stat.d.ts +101 -0
- package/types/vadem-ui-stepper.d.ts +108 -0
- package/types/vadem-ui-switch.d.ts +10 -0
- package/types/vadem-ui-table.d.ts +172 -0
- package/types/vadem-ui-tabs.d.ts +101 -0
- package/types/vadem-ui-tag-input.d.ts +170 -0
- package/types/vadem-ui-text-highlight.d.ts +27 -0
- package/types/vadem-ui-time-input.d.ts +47 -0
- package/types/vadem-ui-timeline.d.ts +54 -0
- package/types/vadem-ui-toast.d.ts +104 -0
- package/types/vadem-ui-toolbar.d.ts +80 -0
- package/types/vadem-ui-tooltip.d.ts +71 -0
- package/types/vadem-ui-tree.d.ts +123 -0
- package/types/vadem-ui-upload-list.d.ts +70 -0
- package/types/vadem-ui.d.ts +1 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* Whole-star Rating: specs/rating.md. */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-rating {
|
|
4
|
+
--vd-rating-hit-size: var(--vd-control-height-md);
|
|
5
|
+
--vd-rating-icon-size: var(--vd-space-6);
|
|
6
|
+
--vd-rating-gap: var(--vd-space-1);
|
|
7
|
+
--vd-rating-color: var(--vd-color-border-control);
|
|
8
|
+
--vd-rating-selected: var(--vd-color-action-text);
|
|
9
|
+
--vd-rating-hover: var(--vd-color-fill-hover);
|
|
10
|
+
--vd-rating-radius: var(--vd-radius-control);
|
|
11
|
+
|
|
12
|
+
display: block;
|
|
13
|
+
min-inline-size: 0;
|
|
14
|
+
}
|
|
15
|
+
.vd-rating[data-size='sm'] {
|
|
16
|
+
--vd-rating-hit-size: var(--vd-control-height-sm);
|
|
17
|
+
--vd-rating-icon-size: var(--vd-space-5);
|
|
18
|
+
}
|
|
19
|
+
.vd-rating[data-size='lg'] {
|
|
20
|
+
--vd-rating-hit-size: var(--vd-control-height-lg);
|
|
21
|
+
--vd-rating-icon-size: var(--vd-space-8);
|
|
22
|
+
}
|
|
23
|
+
.vd-rating__group {
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
border: 0;
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
}
|
|
29
|
+
.vd-rating__label {
|
|
30
|
+
padding: 0;
|
|
31
|
+
margin-block-end: var(--vd-space-1-5);
|
|
32
|
+
max-inline-size: 100%;
|
|
33
|
+
overflow-wrap: anywhere;
|
|
34
|
+
}
|
|
35
|
+
.vd-rating__stars {
|
|
36
|
+
display: flex;
|
|
37
|
+
/* Under extreme text enlargement the stars reflow instead of overflowing (WCAG 1.4.10). */
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
gap: var(--vd-rating-gap);
|
|
40
|
+
inline-size: fit-content;
|
|
41
|
+
max-inline-size: 100%;
|
|
42
|
+
}
|
|
43
|
+
.vd-rating__star {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
flex: 0 1 var(--vd-rating-hit-size);
|
|
48
|
+
inline-size: var(--vd-rating-hit-size);
|
|
49
|
+
min-inline-size: 0;
|
|
50
|
+
min-block-size: var(--vd-rating-hit-size);
|
|
51
|
+
padding: var(--vd-space-1);
|
|
52
|
+
border: 0;
|
|
53
|
+
border-radius: var(--vd-rating-radius);
|
|
54
|
+
color: var(--vd-rating-color);
|
|
55
|
+
background: transparent;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
transition: var(--vd-transition-colors);
|
|
58
|
+
}
|
|
59
|
+
.vd-rating__star .vd-icon {
|
|
60
|
+
--vd-icon-size: var(--vd-rating-icon-size);
|
|
61
|
+
max-inline-size: 100%;
|
|
62
|
+
}
|
|
63
|
+
.vd-rating__star[data-filled] {
|
|
64
|
+
color: var(--vd-rating-selected);
|
|
65
|
+
}
|
|
66
|
+
.vd-rating__star[data-filled] .vd-icon__svg {
|
|
67
|
+
fill: currentColor;
|
|
68
|
+
}
|
|
69
|
+
.vd-rating__star:focus-visible {
|
|
70
|
+
outline: var(--vd-focus-ring-width) solid var(--vd-color-focus);
|
|
71
|
+
outline-offset: calc(-1 * var(--vd-focus-ring-width));
|
|
72
|
+
}
|
|
73
|
+
.vd-rating:not([data-disabled], [data-readonly]) .vd-rating__star:hover {
|
|
74
|
+
background: var(--vd-rating-hover);
|
|
75
|
+
}
|
|
76
|
+
.vd-rating[data-readonly] .vd-rating__star {
|
|
77
|
+
cursor: default;
|
|
78
|
+
}
|
|
79
|
+
.vd-rating[data-disabled] {
|
|
80
|
+
opacity: var(--vd-opacity-disabled);
|
|
81
|
+
}
|
|
82
|
+
.vd-rating__star:disabled {
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
}
|
|
85
|
+
.vd-rating[data-invalid] {
|
|
86
|
+
--vd-rating-color: var(--vd-color-danger-text);
|
|
87
|
+
}
|
|
88
|
+
@media (forced-colors: active) {
|
|
89
|
+
.vd-rating {
|
|
90
|
+
--vd-rating-color: CanvasText;
|
|
91
|
+
--vd-rating-selected: Highlight;
|
|
92
|
+
}
|
|
93
|
+
.vd-rating__star:focus-visible {
|
|
94
|
+
outline-color: Highlight;
|
|
95
|
+
}
|
|
96
|
+
.vd-rating__star[data-filled] .vd-icon__svg {
|
|
97
|
+
forced-color-adjust: none;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
@layer vd.components {
|
|
2
|
+
.vd-reorder-list {
|
|
3
|
+
--vd-reorder-list-gap: var(--vd-space-3);
|
|
4
|
+
--vd-reorder-list-padding: var(--vd-space-4);
|
|
5
|
+
--vd-reorder-list-border: var(--vd-color-border);
|
|
6
|
+
--vd-reorder-list-fg: var(--vd-color-text);
|
|
7
|
+
--vd-reorder-list-muted: var(--vd-color-text-muted);
|
|
8
|
+
--vd-reorder-list-active-bg: var(--vd-color-action-subtle);
|
|
9
|
+
--vd-reorder-list-marker: var(--vd-color-focus);
|
|
10
|
+
--vd-reorder-list-grip-size: var(--vd-control-height-lg);
|
|
11
|
+
--vd-reorder-list-compact-action-padding: var(--vd-space-1);
|
|
12
|
+
--vd-reorder-list-compact-grip-size: var(--vd-control-height-md);
|
|
13
|
+
display: block;
|
|
14
|
+
min-inline-size: 0;
|
|
15
|
+
color: var(--vd-reorder-list-fg);
|
|
16
|
+
container-type: inline-size;
|
|
17
|
+
}
|
|
18
|
+
.vd-reorder-list__list {
|
|
19
|
+
list-style: none;
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
}
|
|
23
|
+
.vd-reorder-list__item {
|
|
24
|
+
position: relative;
|
|
25
|
+
display: grid;
|
|
26
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
27
|
+
align-items: start;
|
|
28
|
+
gap: var(--vd-reorder-list-gap);
|
|
29
|
+
padding-block: var(--vd-reorder-list-padding);
|
|
30
|
+
border-block-end: var(--vd-border-width) solid var(--vd-reorder-list-border);
|
|
31
|
+
}
|
|
32
|
+
.vd-reorder-list__item:last-child {
|
|
33
|
+
border-block-end: 0;
|
|
34
|
+
}
|
|
35
|
+
.vd-reorder-list__grip {
|
|
36
|
+
display: grid;
|
|
37
|
+
place-items: center;
|
|
38
|
+
inline-size: var(--vd-reorder-list-grip-size);
|
|
39
|
+
min-block-size: var(--vd-reorder-list-grip-size);
|
|
40
|
+
touch-action: none;
|
|
41
|
+
cursor: grab;
|
|
42
|
+
user-select: none;
|
|
43
|
+
color: var(--vd-reorder-list-muted);
|
|
44
|
+
}
|
|
45
|
+
.vd-reorder-list__body {
|
|
46
|
+
min-inline-size: 0;
|
|
47
|
+
}
|
|
48
|
+
.vd-reorder-list__title {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: baseline;
|
|
51
|
+
gap: var(--vd-reorder-list-gap);
|
|
52
|
+
font-weight: var(--vd-weight-semibold);
|
|
53
|
+
}
|
|
54
|
+
.vd-reorder-list__title bdi {
|
|
55
|
+
min-inline-size: 0;
|
|
56
|
+
overflow-wrap: anywhere;
|
|
57
|
+
}
|
|
58
|
+
.vd-reorder-list__position {
|
|
59
|
+
color: var(--vd-reorder-list-muted);
|
|
60
|
+
font-size: var(--vd-text-sm);
|
|
61
|
+
font-variant-numeric: tabular-nums;
|
|
62
|
+
}
|
|
63
|
+
.vd-reorder-list__description {
|
|
64
|
+
margin: var(--vd-space-2) 0 0;
|
|
65
|
+
color: var(--vd-reorder-list-muted);
|
|
66
|
+
font-size: var(--vd-text-sm);
|
|
67
|
+
overflow-wrap: anywhere;
|
|
68
|
+
}
|
|
69
|
+
.vd-reorder-list__actions {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-wrap: wrap;
|
|
72
|
+
gap: var(--vd-space-1);
|
|
73
|
+
min-inline-size: 0;
|
|
74
|
+
}
|
|
75
|
+
.vd-reorder-list__actions .vd-button {
|
|
76
|
+
max-inline-size: 100%;
|
|
77
|
+
}
|
|
78
|
+
.vd-reorder-list__item[data-dragging] {
|
|
79
|
+
background: var(--vd-reorder-list-active-bg);
|
|
80
|
+
}
|
|
81
|
+
.vd-reorder-list__item[data-dragging] .vd-reorder-list__grip {
|
|
82
|
+
cursor: grabbing;
|
|
83
|
+
}
|
|
84
|
+
.vd-reorder-list__item[data-drop]::after {
|
|
85
|
+
content: '';
|
|
86
|
+
position: absolute;
|
|
87
|
+
inset-inline: 0;
|
|
88
|
+
block-size: var(--vd-focus-ring-width);
|
|
89
|
+
background: var(--vd-reorder-list-marker);
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
}
|
|
92
|
+
.vd-reorder-list__item[data-drop='before']::after {
|
|
93
|
+
inset-block-start: 0;
|
|
94
|
+
}
|
|
95
|
+
.vd-reorder-list__item[data-drop='after']::after {
|
|
96
|
+
inset-block-end: 0;
|
|
97
|
+
}
|
|
98
|
+
.vd-reorder-list__grip[data-disabled] {
|
|
99
|
+
touch-action: auto;
|
|
100
|
+
cursor: default;
|
|
101
|
+
}
|
|
102
|
+
.vd-reorder-list__empty {
|
|
103
|
+
padding-block: var(--vd-reorder-list-padding);
|
|
104
|
+
color: var(--vd-reorder-list-muted);
|
|
105
|
+
}
|
|
106
|
+
@container (width < 32rem) {
|
|
107
|
+
.vd-reorder-list__item {
|
|
108
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
109
|
+
}
|
|
110
|
+
.vd-reorder-list__body {
|
|
111
|
+
grid-column: 1 / -1;
|
|
112
|
+
grid-row: 1;
|
|
113
|
+
}
|
|
114
|
+
.vd-reorder-list__grip {
|
|
115
|
+
grid-column: 2;
|
|
116
|
+
grid-row: 2;
|
|
117
|
+
inline-size: var(--vd-reorder-list-compact-grip-size);
|
|
118
|
+
min-block-size: var(--vd-reorder-list-compact-grip-size);
|
|
119
|
+
}
|
|
120
|
+
.vd-reorder-list__actions {
|
|
121
|
+
grid-column: 1;
|
|
122
|
+
grid-row: 2;
|
|
123
|
+
}
|
|
124
|
+
.vd-reorder-list__actions .vd-icon {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
.vd-reorder-list__actions .vd-button {
|
|
128
|
+
--vd-button-padding-inline: var(--vd-reorder-list-compact-action-padding);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
@media (forced-colors: active) {
|
|
132
|
+
.vd-reorder-list__item {
|
|
133
|
+
border-color: CanvasText;
|
|
134
|
+
}
|
|
135
|
+
.vd-reorder-list__item[data-dragging] {
|
|
136
|
+
outline: var(--vd-border-width) solid Highlight;
|
|
137
|
+
outline-offset: calc(-1 * var(--vd-border-width));
|
|
138
|
+
}
|
|
139
|
+
.vd-reorder-list__item[data-drop]::after {
|
|
140
|
+
background: Highlight;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* Native scroll viewport: specs/scroll-area.md. */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-scroll-area {
|
|
4
|
+
--vd-scroll-area-bg: var(--vd-color-surface);
|
|
5
|
+
--vd-scroll-area-border: var(--vd-color-border-control);
|
|
6
|
+
--vd-scroll-area-radius: var(--vd-radius-md);
|
|
7
|
+
--vd-scroll-area-thumb: var(--vd-color-border-control);
|
|
8
|
+
--vd-scroll-area-track: var(--vd-scroll-area-bg);
|
|
9
|
+
--vd-scroll-area-ring: var(--vd-color-focus);
|
|
10
|
+
--vd-scroll-area-max-block-size: none;
|
|
11
|
+
|
|
12
|
+
min-inline-size: 0;
|
|
13
|
+
min-block-size: 0;
|
|
14
|
+
max-inline-size: 100%;
|
|
15
|
+
max-block-size: var(--vd-scroll-area-max-block-size);
|
|
16
|
+
overflow: auto;
|
|
17
|
+
border: var(--vd-border-width) solid var(--vd-scroll-area-border);
|
|
18
|
+
border-radius: var(--vd-scroll-area-radius);
|
|
19
|
+
background-color: var(--vd-scroll-area-bg);
|
|
20
|
+
scrollbar-color: var(--vd-scroll-area-thumb) var(--vd-scroll-area-track);
|
|
21
|
+
scrollbar-width: auto;
|
|
22
|
+
scrollbar-gutter: stable;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.vd-scroll-area:focus-visible {
|
|
26
|
+
outline: var(--vd-focus-ring-width) solid var(--vd-scroll-area-ring);
|
|
27
|
+
outline-offset: calc(var(--vd-focus-ring-width) * -1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (forced-colors: active) {
|
|
31
|
+
.vd-scroll-area {
|
|
32
|
+
border-color: CanvasText;
|
|
33
|
+
scrollbar-color: auto;
|
|
34
|
+
}
|
|
35
|
+
.vd-scroll-area:focus-visible {
|
|
36
|
+
outline-color: Highlight;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Search input - spec: specs/search-input.md */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-search-input {
|
|
4
|
+
--vd-search-input-button-size: calc(var(--vd-input-height) - var(--vd-space-2));
|
|
5
|
+
--vd-search-input-gap: var(--vd-space-2);
|
|
6
|
+
gap: var(--vd-search-input-gap);
|
|
7
|
+
}
|
|
8
|
+
.vd-search-input > .vd-search-input__clear {
|
|
9
|
+
inline-size: min(var(--vd-search-input-button-size), 25%);
|
|
10
|
+
padding-inline: 0;
|
|
11
|
+
}
|
|
12
|
+
.vd-search-input > .vd-progress-ring {
|
|
13
|
+
color: var(--vd-color-text-muted);
|
|
14
|
+
}
|
|
15
|
+
/* The group draws its own clear action; hide the engine's. */
|
|
16
|
+
.vd-search-input__input::-webkit-search-cancel-button,
|
|
17
|
+
.vd-search-input__input::-webkit-search-decoration {
|
|
18
|
+
appearance: none;
|
|
19
|
+
}
|
|
20
|
+
@media (forced-colors: active) {
|
|
21
|
+
.vd-search-input {
|
|
22
|
+
border-color: CanvasText;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* Segmented control - spec: specs/segmented.md */
|
|
2
|
+
/* Same look as the pill tabs: concentric radii, raised selected segment. */
|
|
3
|
+
@layer vd.components {
|
|
4
|
+
.vd-segmented {
|
|
5
|
+
--vd-segmented-padding: var(--vd-space-1);
|
|
6
|
+
--vd-segmented-radius: var(--vd-radius-lg);
|
|
7
|
+
--vd-segmented-bg: var(--vd-color-fill);
|
|
8
|
+
--vd-segmented-border: var(--vd-color-border);
|
|
9
|
+
--vd-segment-height: var(--vd-control-height-sm);
|
|
10
|
+
--vd-segment-padding-inline: var(--vd-space-3);
|
|
11
|
+
--vd-segment-font-size: var(--vd-text-sm);
|
|
12
|
+
--vd-segment-fg: var(--vd-color-text-muted);
|
|
13
|
+
--vd-segment-fg-hover: var(--vd-color-text);
|
|
14
|
+
--vd-segment-fg-checked: var(--vd-color-text);
|
|
15
|
+
--vd-segment-bg-checked: var(--vd-color-surface-raised);
|
|
16
|
+
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
min-inline-size: 0;
|
|
20
|
+
gap: var(--vd-space-0-5);
|
|
21
|
+
max-inline-size: 100%;
|
|
22
|
+
padding: var(--vd-segmented-padding);
|
|
23
|
+
border: var(--vd-border-width) solid var(--vd-segmented-border);
|
|
24
|
+
border-radius: var(--vd-segmented-radius);
|
|
25
|
+
background-color: var(--vd-segmented-bg);
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.vd-segmented[data-size='sm'] {
|
|
30
|
+
--vd-segmented-padding: var(--vd-space-0-5);
|
|
31
|
+
--vd-segmented-radius: var(--vd-radius-md);
|
|
32
|
+
--vd-segment-height: calc(var(--vd-control-height-sm) - var(--vd-space-2));
|
|
33
|
+
--vd-segment-padding-inline: var(--vd-space-2);
|
|
34
|
+
--vd-segment-font-size: var(--vd-text-xs);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.vd-segmented[data-disabled] {
|
|
38
|
+
opacity: var(--vd-opacity-disabled);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* --------------------------------------------------------------- segment */
|
|
42
|
+
|
|
43
|
+
.vd-segment {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
flex: 1 1 auto;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
gap: var(--vd-space-2);
|
|
50
|
+
min-inline-size: min(var(--vd-segment-height), 100%);
|
|
51
|
+
min-block-size: var(--vd-segment-height);
|
|
52
|
+
padding-inline: var(--vd-segment-padding-inline);
|
|
53
|
+
border-radius: calc(var(--vd-segmented-radius) - var(--vd-segmented-padding));
|
|
54
|
+
color: var(--vd-segment-fg);
|
|
55
|
+
font-size: var(--vd-segment-font-size);
|
|
56
|
+
font-weight: var(--vd-weight-semibold);
|
|
57
|
+
line-height: var(--vd-leading-snug);
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
transition:
|
|
60
|
+
var(--vd-transition-colors),
|
|
61
|
+
box-shadow var(--vd-duration-fast) var(--vd-ease-out);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* The radio covers the whole segment: it is the hit area and the focus target. */
|
|
65
|
+
.vd-segment__input {
|
|
66
|
+
appearance: none;
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: 0;
|
|
69
|
+
margin: 0;
|
|
70
|
+
border-radius: inherit;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.vd-segment__input:focus-visible {
|
|
75
|
+
outline: var(--vd-focus-ring-width) solid var(--vd-color-focus);
|
|
76
|
+
outline-offset: var(--vd-focus-ring-offset);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Too little room: segments shrink and long labels truncate instead of overflowing. */
|
|
80
|
+
.vd-segment__label {
|
|
81
|
+
display: block;
|
|
82
|
+
min-inline-size: 0;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Block label (ellipsis needs it): icons sit inline with the text. */
|
|
89
|
+
.vd-segment .vd-icon {
|
|
90
|
+
--vd-icon-size: var(--vd-space-4);
|
|
91
|
+
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
vertical-align: -0.2em;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.vd-segment:not([data-icon-only]) .vd-icon {
|
|
97
|
+
margin-inline-end: var(--vd-space-1-5);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (hover: hover) {
|
|
101
|
+
.vd-segment:not([data-checked], [data-disabled]):hover {
|
|
102
|
+
color: var(--vd-segment-fg-hover);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.vd-segment[data-checked] {
|
|
107
|
+
background-color: var(--vd-segment-bg-checked);
|
|
108
|
+
box-shadow: var(--vd-highlight-top), var(--vd-shadow-sm);
|
|
109
|
+
color: var(--vd-segment-fg-checked);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* A disabled group is already dimmed as a whole; only single segments get the disabled text. */
|
|
113
|
+
.vd-segmented:not([data-disabled]) .vd-segment[data-disabled] {
|
|
114
|
+
color: var(--vd-color-text-disabled);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.vd-segment[data-disabled] .vd-segment__input {
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
122
|
+
.vd-segment:active:not([data-disabled]) .vd-segment__label {
|
|
123
|
+
scale: var(--vd-press-scale);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.vd-segment__label {
|
|
127
|
+
transition: scale var(--vd-duration-fast) var(--vd-ease-out);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (forced-colors: active) {
|
|
132
|
+
.vd-segment[data-checked] {
|
|
133
|
+
outline: var(--vd-border-width) solid Highlight;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/* Select, combobox, listbox, option - spec: specs/select.md */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
/* ------------------------------------------------------------ the field */
|
|
4
|
+
/* Same box as vdInput: control height, field background, 3:1 border, ring on the border. */
|
|
5
|
+
|
|
6
|
+
.vd-select,
|
|
7
|
+
.vd-combobox,
|
|
8
|
+
.vd-multi-select {
|
|
9
|
+
--vd-select-height: var(--vd-control-height-md);
|
|
10
|
+
--vd-select-padding-inline: var(--vd-space-3);
|
|
11
|
+
--vd-select-font-size: var(--vd-text-md);
|
|
12
|
+
--vd-select-radius: var(--vd-radius-md);
|
|
13
|
+
--vd-select-bg: var(--vd-color-field);
|
|
14
|
+
--vd-select-border: var(--vd-color-border-control);
|
|
15
|
+
--vd-select-border-hover: var(--vd-color-border-control-hover);
|
|
16
|
+
--vd-select-ring: var(--vd-color-focus);
|
|
17
|
+
|
|
18
|
+
position: relative;
|
|
19
|
+
display: block;
|
|
20
|
+
inline-size: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:is(.vd-select, .vd-combobox, .vd-multi-select)[data-size='sm'] {
|
|
24
|
+
--vd-select-height: var(--vd-control-height-sm);
|
|
25
|
+
--vd-select-padding-inline: var(--vd-space-2);
|
|
26
|
+
--vd-select-font-size: var(--vd-text-sm);
|
|
27
|
+
--vd-select-radius: var(--vd-radius-sm);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:is(.vd-select, .vd-combobox, .vd-multi-select)[data-size='lg'] {
|
|
31
|
+
--vd-select-height: var(--vd-control-height-lg);
|
|
32
|
+
--vd-select-padding-inline: var(--vd-space-4);
|
|
33
|
+
--vd-select-radius: var(--vd-radius-lg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:is(.vd-select, .vd-combobox, .vd-multi-select)[data-invalid] {
|
|
37
|
+
--vd-select-border: var(--vd-color-danger);
|
|
38
|
+
--vd-select-border-hover: var(--vd-color-danger);
|
|
39
|
+
--vd-select-ring: var(--vd-color-danger);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.vd-select__trigger,
|
|
43
|
+
.vd-combobox__field {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: var(--vd-space-2);
|
|
47
|
+
inline-size: 100%;
|
|
48
|
+
min-block-size: var(--vd-select-height);
|
|
49
|
+
padding-block: var(--vd-space-1);
|
|
50
|
+
padding-inline: var(--vd-select-padding-inline);
|
|
51
|
+
border: var(--vd-border-width) solid var(--vd-select-border);
|
|
52
|
+
border-radius: var(--vd-select-radius);
|
|
53
|
+
background-color: var(--vd-select-bg);
|
|
54
|
+
color: var(--vd-color-text);
|
|
55
|
+
font-family: inherit;
|
|
56
|
+
font-size: var(--vd-select-font-size);
|
|
57
|
+
line-height: var(--vd-leading-snug);
|
|
58
|
+
text-align: start;
|
|
59
|
+
transition: var(--vd-transition-colors);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.vd-select__trigger {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.vd-combobox__field {
|
|
67
|
+
cursor: text;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (hover: hover) {
|
|
71
|
+
.vd-select:not([data-disabled]) .vd-select__trigger:hover,
|
|
72
|
+
.vd-combobox:not([data-disabled]) .vd-combobox__field:hover {
|
|
73
|
+
border-color: var(--vd-select-border-hover);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.vd-select__trigger:focus-visible,
|
|
78
|
+
.vd-select[data-open] .vd-select__trigger,
|
|
79
|
+
.vd-combobox__field:has(.vd-combobox__input:focus-visible) {
|
|
80
|
+
border-color: var(--vd-select-ring);
|
|
81
|
+
outline: var(--vd-focus-ring-width) solid var(--vd-select-ring);
|
|
82
|
+
outline-offset: calc(var(--vd-border-width) * -1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:is(.vd-select, .vd-combobox, .vd-multi-select)[data-disabled] {
|
|
86
|
+
opacity: var(--vd-opacity-disabled);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:is(.vd-select, .vd-combobox)[data-disabled] :is(.vd-select__trigger, .vd-combobox__field) {
|
|
90
|
+
cursor: not-allowed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.vd-select__value {
|
|
94
|
+
flex: 1;
|
|
95
|
+
/* Zero preferred width: the (nowrap) selected label never sets the select's min-content
|
|
96
|
+
size, so long values truncate instead of widening grid/flex parents. */
|
|
97
|
+
inline-size: 0;
|
|
98
|
+
min-inline-size: 0;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.vd-select__value[data-placeholder] {
|
|
105
|
+
color: var(--vd-color-text-subtle);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.vd-select__chevron {
|
|
109
|
+
color: var(--vd-color-text-subtle);
|
|
110
|
+
transition: rotate var(--vd-duration-base) var(--vd-ease-out);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:is(.vd-select, .vd-combobox, .vd-multi-select)[data-open] .vd-select__chevron {
|
|
114
|
+
rotate: 180deg;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.vd-combobox__icon {
|
|
118
|
+
color: var(--vd-color-text-subtle);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.vd-combobox__input {
|
|
122
|
+
flex: 1;
|
|
123
|
+
min-inline-size: 0;
|
|
124
|
+
padding: 0;
|
|
125
|
+
border: 0;
|
|
126
|
+
background: transparent;
|
|
127
|
+
color: inherit;
|
|
128
|
+
font: inherit;
|
|
129
|
+
outline: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.vd-combobox__input::placeholder {
|
|
133
|
+
color: var(--vd-color-text-subtle);
|
|
134
|
+
opacity: 1;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* --------------------------------------------------------------- listbox */
|
|
138
|
+
|
|
139
|
+
.vd-listbox {
|
|
140
|
+
--vd-listbox-padding: var(--vd-space-1);
|
|
141
|
+
--vd-listbox-radius: var(--vd-radius-lg);
|
|
142
|
+
--vd-listbox-max-height: 20rem;
|
|
143
|
+
|
|
144
|
+
/* Geometry on the base rule (D45). Anchored under the field, at least as wide as it. */
|
|
145
|
+
position: fixed;
|
|
146
|
+
inset: auto;
|
|
147
|
+
margin: 0;
|
|
148
|
+
margin-block-start: var(--vd-space-1);
|
|
149
|
+
position-area: block-end span-inline-end;
|
|
150
|
+
position-try-fallbacks: flip-block;
|
|
151
|
+
min-inline-size: anchor-size(inline);
|
|
152
|
+
max-inline-size: min(28rem, 100vw - var(--vd-space-4) * 2);
|
|
153
|
+
max-block-size: min(var(--vd-listbox-max-height), 50dvh);
|
|
154
|
+
padding: var(--vd-listbox-padding);
|
|
155
|
+
overflow-y: auto;
|
|
156
|
+
overscroll-behavior: contain;
|
|
157
|
+
border: var(--vd-border-width) solid var(--vd-color-border-strong);
|
|
158
|
+
border-radius: var(--vd-listbox-radius);
|
|
159
|
+
background-color: var(--vd-color-surface-overlay);
|
|
160
|
+
box-shadow: var(--vd-highlight-top), var(--vd-shadow-lg);
|
|
161
|
+
color: var(--vd-color-text);
|
|
162
|
+
scrollbar-width: thin;
|
|
163
|
+
|
|
164
|
+
opacity: 0;
|
|
165
|
+
translate: 0 calc(var(--vd-space-1) * -1);
|
|
166
|
+
transition:
|
|
167
|
+
opacity var(--vd-duration-fast) var(--vd-ease-out),
|
|
168
|
+
translate var(--vd-duration-base) var(--vd-ease-out),
|
|
169
|
+
display var(--vd-duration-fast) allow-discrete,
|
|
170
|
+
overlay var(--vd-duration-fast) allow-discrete;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.vd-listbox:popover-open {
|
|
174
|
+
opacity: 1;
|
|
175
|
+
translate: 0 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@starting-style {
|
|
179
|
+
.vd-listbox:popover-open {
|
|
180
|
+
opacity: 0;
|
|
181
|
+
translate: 0 calc(var(--vd-space-1) * -1);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.vd-listbox__empty {
|
|
186
|
+
padding: var(--vd-space-3);
|
|
187
|
+
color: var(--vd-color-text-muted);
|
|
188
|
+
font-size: var(--vd-text-sm);
|
|
189
|
+
text-align: center;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* ---------------------------------------------------------------- option */
|
|
193
|
+
|
|
194
|
+
.vd-option {
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
gap: var(--vd-space-2);
|
|
198
|
+
min-block-size: var(--vd-control-height-sm);
|
|
199
|
+
padding-block: var(--vd-space-1-5);
|
|
200
|
+
padding-inline: var(--vd-space-3) var(--vd-space-2);
|
|
201
|
+
border-radius: max(
|
|
202
|
+
var(--vd-radius-xs),
|
|
203
|
+
calc(var(--vd-listbox-radius) - var(--vd-listbox-padding))
|
|
204
|
+
);
|
|
205
|
+
font-size: var(--vd-text-sm);
|
|
206
|
+
line-height: var(--vd-leading-snug);
|
|
207
|
+
cursor: pointer;
|
|
208
|
+
user-select: none;
|
|
209
|
+
scroll-margin-block: var(--vd-listbox-padding);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.vd-option__label {
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
gap: var(--vd-space-2);
|
|
216
|
+
flex: 1;
|
|
217
|
+
min-inline-size: 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.vd-option__check {
|
|
221
|
+
--vd-icon-size: var(--vd-space-4);
|
|
222
|
+
|
|
223
|
+
color: var(--vd-color-text-accent);
|
|
224
|
+
opacity: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.vd-option[aria-selected='true'] {
|
|
228
|
+
font-weight: var(--vd-weight-semibold);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.vd-option[aria-selected='true'] .vd-option__check {
|
|
232
|
+
opacity: 1;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.vd-option[data-active] {
|
|
236
|
+
background-color: var(--vd-color-fill-hover);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.vd-option[aria-disabled='true'] {
|
|
240
|
+
color: var(--vd-color-text-disabled);
|
|
241
|
+
cursor: not-allowed;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.vd-option[aria-disabled='true'][data-active] {
|
|
245
|
+
background-color: transparent;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@media (forced-colors: active) {
|
|
249
|
+
.vd-option[data-active] {
|
|
250
|
+
outline: var(--vd-border-width) solid Highlight;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.vd-listbox {
|
|
254
|
+
border-color: CanvasText;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|