@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,159 @@
|
|
|
1
|
+
/* Alert (inline callout) - spec: specs/alert.md */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-alert {
|
|
4
|
+
--vd-alert-bg: var(--vd-color-fill);
|
|
5
|
+
--vd-alert-border: var(--vd-color-border-strong);
|
|
6
|
+
--vd-alert-icon: var(--vd-color-text-muted);
|
|
7
|
+
--vd-alert-fg: var(--vd-color-text-muted);
|
|
8
|
+
--vd-alert-title: var(--vd-color-text);
|
|
9
|
+
--vd-alert-radius: var(--vd-radius-lg);
|
|
10
|
+
--vd-alert-padding: var(--vd-space-3) var(--vd-space-4);
|
|
11
|
+
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
gap: var(--vd-space-3);
|
|
16
|
+
padding: var(--vd-alert-padding);
|
|
17
|
+
border: var(--vd-border-width) solid var(--vd-alert-border);
|
|
18
|
+
border-radius: var(--vd-alert-radius);
|
|
19
|
+
background-color: var(--vd-alert-bg);
|
|
20
|
+
color: var(--vd-alert-fg);
|
|
21
|
+
font-size: var(--vd-text-sm);
|
|
22
|
+
line-height: var(--vd-leading-normal);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.vd-alert[data-variant='info'] {
|
|
26
|
+
--vd-alert-bg: var(--vd-color-info-subtle);
|
|
27
|
+
--vd-alert-border: var(--vd-color-info-border);
|
|
28
|
+
--vd-alert-icon: var(--vd-color-info-text);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.vd-alert[data-variant='success'] {
|
|
32
|
+
--vd-alert-bg: var(--vd-color-success-subtle);
|
|
33
|
+
--vd-alert-border: var(--vd-color-success-border);
|
|
34
|
+
--vd-alert-icon: var(--vd-color-success-text);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.vd-alert[data-variant='warning'] {
|
|
38
|
+
--vd-alert-bg: var(--vd-color-warning-subtle);
|
|
39
|
+
--vd-alert-border: var(--vd-color-warning-border);
|
|
40
|
+
--vd-alert-icon: var(--vd-color-warning-text);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.vd-alert[data-variant='danger'] {
|
|
44
|
+
--vd-alert-bg: var(--vd-color-danger-subtle);
|
|
45
|
+
--vd-alert-border: var(--vd-color-danger-border);
|
|
46
|
+
--vd-alert-icon: var(--vd-color-danger-text);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Optically centered on the first line of text. */
|
|
50
|
+
.vd-alert__icon {
|
|
51
|
+
flex: none;
|
|
52
|
+
block-size: calc(1em * var(--vd-leading-normal));
|
|
53
|
+
color: var(--vd-alert-icon);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.vd-alert__content {
|
|
57
|
+
display: grid;
|
|
58
|
+
grid-template-columns: minmax(0, 1fr);
|
|
59
|
+
flex: 1;
|
|
60
|
+
gap: var(--vd-space-1);
|
|
61
|
+
min-inline-size: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.vd-alert__content > * {
|
|
65
|
+
margin: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.vd-alert__title {
|
|
69
|
+
color: var(--vd-alert-title);
|
|
70
|
+
font-weight: var(--vd-weight-semibold);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Actions or a close button at the end; a ghost icon button sits flush with the corner. */
|
|
74
|
+
.vd-alert > [slot='end'] {
|
|
75
|
+
flex: none;
|
|
76
|
+
max-inline-size: 100%;
|
|
77
|
+
align-self: center;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.vd-alert > .vd-button[slot='end'][data-icon-only] {
|
|
81
|
+
align-self: flex-start;
|
|
82
|
+
margin-block: calc(var(--vd-space-1) * -1);
|
|
83
|
+
margin-inline-end: calc(var(--vd-space-2) * -1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Built-in dismiss sits flush with the end edge like a consumer close button. */
|
|
87
|
+
.vd-alert > .vd-alert__dismiss {
|
|
88
|
+
align-self: flex-start;
|
|
89
|
+
margin-block: calc(var(--vd-space-1) * -1);
|
|
90
|
+
margin-inline-end: calc(var(--vd-space-2) * -1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ------------------------------------------------------------- banner */
|
|
94
|
+
|
|
95
|
+
/* Full-width strip: edge to edge, separated from the page below by one rule. Title and text
|
|
96
|
+
share a line when there is room. */
|
|
97
|
+
.vd-alert[data-layout='banner'] {
|
|
98
|
+
--vd-alert-radius: 0;
|
|
99
|
+
--vd-alert-padding: var(--vd-space-2) clamp(var(--vd-space-4), 3vw, var(--vd-space-8));
|
|
100
|
+
|
|
101
|
+
align-items: center;
|
|
102
|
+
border-width: 0;
|
|
103
|
+
border-block-end-width: var(--vd-border-width);
|
|
104
|
+
}
|
|
105
|
+
.vd-alert[data-layout='banner'] > .vd-alert__content {
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-wrap: wrap;
|
|
108
|
+
align-items: baseline;
|
|
109
|
+
column-gap: var(--vd-space-2);
|
|
110
|
+
}
|
|
111
|
+
.vd-alert[data-layout='banner'] > .vd-alert__icon {
|
|
112
|
+
align-self: center;
|
|
113
|
+
}
|
|
114
|
+
.vd-alert[data-layout='banner'] > .vd-alert__dismiss {
|
|
115
|
+
align-self: center;
|
|
116
|
+
margin-block: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Narrow banners: text keeps the first row beside the close button; actions drop below the
|
|
120
|
+
text instead of squeezing it into a one-word column. */
|
|
121
|
+
.vd-alert[data-layout='banner'] {
|
|
122
|
+
container-type: inline-size;
|
|
123
|
+
}
|
|
124
|
+
@container (width < 36rem) {
|
|
125
|
+
.vd-alert[data-layout='banner'] {
|
|
126
|
+
display: grid;
|
|
127
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
128
|
+
align-items: start;
|
|
129
|
+
}
|
|
130
|
+
.vd-alert[data-layout='banner']:has(> .vd-alert__icon) {
|
|
131
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
132
|
+
}
|
|
133
|
+
.vd-alert[data-layout='banner'] > .vd-alert__icon {
|
|
134
|
+
grid-column: 1;
|
|
135
|
+
grid-row: 1;
|
|
136
|
+
align-self: start;
|
|
137
|
+
}
|
|
138
|
+
.vd-alert[data-layout='banner'] > .vd-alert__content {
|
|
139
|
+
grid-column: -3;
|
|
140
|
+
grid-row: 1;
|
|
141
|
+
}
|
|
142
|
+
.vd-alert[data-layout='banner'] > .vd-alert__dismiss {
|
|
143
|
+
grid-column: -2;
|
|
144
|
+
grid-row: 1;
|
|
145
|
+
align-self: start;
|
|
146
|
+
}
|
|
147
|
+
.vd-alert[data-layout='banner'] > [slot='end']:not(.vd-alert__dismiss) {
|
|
148
|
+
grid-column: -3 / -1;
|
|
149
|
+
grid-row: 2;
|
|
150
|
+
justify-self: start;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@media (forced-colors: active) {
|
|
155
|
+
.vd-alert {
|
|
156
|
+
border-color: CanvasText;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@layer vd.components {
|
|
2
|
+
.vd-autocomplete {
|
|
3
|
+
display: contents;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vd-autocomplete__popup {
|
|
7
|
+
--vd-autocomplete-padding: var(--vd-space-1);
|
|
8
|
+
--vd-autocomplete-option-padding: var(--vd-space-3);
|
|
9
|
+
--vd-autocomplete-gap: var(--vd-space-1);
|
|
10
|
+
--vd-autocomplete-radius: var(--vd-radius-overlay);
|
|
11
|
+
--vd-autocomplete-border: var(--vd-color-border-strong);
|
|
12
|
+
--vd-autocomplete-background: var(--vd-color-surface-overlay);
|
|
13
|
+
--vd-autocomplete-text: var(--vd-color-text);
|
|
14
|
+
--vd-autocomplete-muted: var(--vd-color-text-muted);
|
|
15
|
+
--vd-autocomplete-active: var(--vd-color-fill-hover);
|
|
16
|
+
--vd-autocomplete-ring: var(--vd-color-focus);
|
|
17
|
+
--vd-autocomplete-font-size: var(--vd-text-sm);
|
|
18
|
+
--vd-autocomplete-max-height: calc(var(--vd-space-20) * 4);
|
|
19
|
+
--vd-autocomplete-shadow: var(--vd-shadow-lg);
|
|
20
|
+
|
|
21
|
+
position: fixed;
|
|
22
|
+
inset: auto;
|
|
23
|
+
margin: 0;
|
|
24
|
+
min-inline-size: 0;
|
|
25
|
+
max-inline-size: calc(100dvw - var(--vd-autocomplete-padding) * 2);
|
|
26
|
+
max-block-size: min(
|
|
27
|
+
var(--vd-autocomplete-max-height),
|
|
28
|
+
50dvh,
|
|
29
|
+
var(--vd-autocomplete-available-block, 50dvh)
|
|
30
|
+
);
|
|
31
|
+
overflow-y: auto;
|
|
32
|
+
overscroll-behavior: contain;
|
|
33
|
+
padding: var(--vd-autocomplete-padding);
|
|
34
|
+
border: var(--vd-border-width) solid var(--vd-autocomplete-border);
|
|
35
|
+
border-radius: var(--vd-autocomplete-radius);
|
|
36
|
+
background: var(--vd-autocomplete-background);
|
|
37
|
+
color: var(--vd-autocomplete-text);
|
|
38
|
+
box-shadow: var(--vd-highlight-top), var(--vd-autocomplete-shadow);
|
|
39
|
+
font-size: var(--vd-autocomplete-font-size);
|
|
40
|
+
line-height: var(--vd-leading-normal);
|
|
41
|
+
scrollbar-width: thin;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.vd-autocomplete__popup:not([data-open]) {
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
.vd-autocomplete__popup[data-fallback][data-open] {
|
|
48
|
+
display: block;
|
|
49
|
+
z-index: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.vd-autocomplete__option {
|
|
53
|
+
display: grid;
|
|
54
|
+
gap: var(--vd-autocomplete-gap);
|
|
55
|
+
min-inline-size: 0;
|
|
56
|
+
padding: var(--vd-autocomplete-option-padding);
|
|
57
|
+
border-radius: max(
|
|
58
|
+
var(--vd-radius-xs),
|
|
59
|
+
calc(var(--vd-autocomplete-radius) - var(--vd-autocomplete-padding))
|
|
60
|
+
);
|
|
61
|
+
overflow-wrap: anywhere;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
scroll-margin-block: var(--vd-autocomplete-padding);
|
|
64
|
+
}
|
|
65
|
+
.vd-autocomplete__option[data-active] {
|
|
66
|
+
background: var(--vd-autocomplete-active);
|
|
67
|
+
outline: var(--vd-border-width) solid var(--vd-autocomplete-ring);
|
|
68
|
+
outline-offset: calc(var(--vd-border-width) * -1);
|
|
69
|
+
}
|
|
70
|
+
.vd-autocomplete__description {
|
|
71
|
+
color: var(--vd-autocomplete-muted);
|
|
72
|
+
}
|
|
73
|
+
.vd-autocomplete__option[aria-disabled='true'] .vd-text-highlight {
|
|
74
|
+
--vd-text-highlight-fg: currentColor;
|
|
75
|
+
}
|
|
76
|
+
.vd-autocomplete__option[aria-disabled='true'] {
|
|
77
|
+
color: var(--vd-autocomplete-muted);
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
}
|
|
80
|
+
.vd-autocomplete__message {
|
|
81
|
+
padding: var(--vd-autocomplete-option-padding);
|
|
82
|
+
overflow-wrap: anywhere;
|
|
83
|
+
color: var(--vd-autocomplete-muted);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (forced-colors: active) {
|
|
87
|
+
.vd-autocomplete__popup {
|
|
88
|
+
border-color: CanvasText;
|
|
89
|
+
}
|
|
90
|
+
.vd-autocomplete__option[data-active] {
|
|
91
|
+
outline-color: Highlight;
|
|
92
|
+
}
|
|
93
|
+
.vd-autocomplete__option[aria-disabled='true'] {
|
|
94
|
+
color: GrayText;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* Avatar - spec: specs/avatar.md */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-avatar {
|
|
4
|
+
--vd-avatar-size: var(--vd-space-8);
|
|
5
|
+
--vd-avatar-font-size: var(--vd-text-xs);
|
|
6
|
+
--vd-avatar-bg: var(--vd-color-action-subtle);
|
|
7
|
+
--vd-avatar-fg: var(--vd-color-action-text);
|
|
8
|
+
--vd-avatar-radius: var(--vd-radius-full);
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-grid;
|
|
12
|
+
flex: none;
|
|
13
|
+
place-items: center;
|
|
14
|
+
inline-size: var(--vd-avatar-size);
|
|
15
|
+
block-size: var(--vd-avatar-size);
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
border-radius: var(--vd-avatar-radius);
|
|
18
|
+
background-color: var(--vd-avatar-bg);
|
|
19
|
+
color: var(--vd-avatar-fg);
|
|
20
|
+
font-size: var(--vd-avatar-font-size);
|
|
21
|
+
font-weight: var(--vd-weight-bold);
|
|
22
|
+
line-height: 1;
|
|
23
|
+
letter-spacing: var(--vd-tracking-tight);
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
user-select: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.vd-avatar[data-size='sm'] {
|
|
29
|
+
--vd-avatar-size: var(--vd-space-6);
|
|
30
|
+
--vd-avatar-font-size: calc(var(--vd-text-xs) * 0.85);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.vd-avatar[data-size='lg'] {
|
|
34
|
+
--vd-avatar-size: var(--vd-space-10);
|
|
35
|
+
--vd-avatar-font-size: var(--vd-text-sm);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.vd-avatar[data-size='xl'] {
|
|
39
|
+
--vd-avatar-size: var(--vd-space-16);
|
|
40
|
+
--vd-avatar-font-size: var(--vd-text-xl);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* The image covers the initials once it loads; a broken one is removed. */
|
|
44
|
+
.vd-avatar__img {
|
|
45
|
+
position: absolute;
|
|
46
|
+
inset: 0;
|
|
47
|
+
inline-size: 100%;
|
|
48
|
+
block-size: 100%;
|
|
49
|
+
object-fit: cover;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Hairline inside the edge so photos don't bleed into same-colored backgrounds. */
|
|
53
|
+
.vd-avatar:has(.vd-avatar__img)::after {
|
|
54
|
+
content: '';
|
|
55
|
+
position: absolute;
|
|
56
|
+
inset: 0;
|
|
57
|
+
border-radius: inherit;
|
|
58
|
+
box-shadow: inset 0 0 0 var(--vd-border-width) var(--vd-color-border);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* --------------------------------------------------------------- group */
|
|
62
|
+
|
|
63
|
+
.vd-avatar-group {
|
|
64
|
+
--vd-avatar-group-ring: var(--vd-color-bg);
|
|
65
|
+
/* Fraction of each avatar hidden under the next one (scales with size). */
|
|
66
|
+
--vd-avatar-group-overlap: 0.15;
|
|
67
|
+
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.vd-avatar-group > .vd-avatar {
|
|
73
|
+
box-shadow: 0 0 0 calc(var(--vd-border-width) * 2) var(--vd-avatar-group-ring);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.vd-avatar-group > .vd-avatar + .vd-avatar {
|
|
77
|
+
margin-inline-start: calc(var(--vd-avatar-size) * var(--vd-avatar-group-overlap) * -1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Inside surfaces the ring matches the surface, so the cut-outs stay invisible. */
|
|
81
|
+
.vd-card .vd-avatar-group {
|
|
82
|
+
--vd-avatar-group-ring: var(--vd-card-bg, var(--vd-color-surface));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (forced-colors: active) {
|
|
86
|
+
.vd-avatar {
|
|
87
|
+
border: var(--vd-border-width) solid CanvasText;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* Badge - spec: specs/badge.md. Signature: mono eyebrow label. */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-badge {
|
|
4
|
+
--vd-badge-bg: var(--vd-color-fill);
|
|
5
|
+
--vd-badge-fg: var(--vd-color-text-muted);
|
|
6
|
+
--vd-badge-border: var(--vd-color-border);
|
|
7
|
+
--vd-badge-dot: var(--vd-color-text-subtle);
|
|
8
|
+
--vd-badge-radius: var(--vd-radius-sm);
|
|
9
|
+
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--vd-space-1-5);
|
|
13
|
+
max-inline-size: 100%;
|
|
14
|
+
min-block-size: var(--vd-space-6);
|
|
15
|
+
padding-block: var(--vd-space-0-5);
|
|
16
|
+
padding-inline: var(--vd-space-2);
|
|
17
|
+
border: var(--vd-border-width) solid var(--vd-badge-border);
|
|
18
|
+
border-radius: var(--vd-badge-radius);
|
|
19
|
+
background-color: var(--vd-badge-bg);
|
|
20
|
+
color: var(--vd-badge-fg);
|
|
21
|
+
font-family: var(--vd-font-mono);
|
|
22
|
+
font-size: var(--vd-text-xs);
|
|
23
|
+
font-weight: var(--vd-weight-medium);
|
|
24
|
+
font-variant-numeric: tabular-nums;
|
|
25
|
+
letter-spacing: var(--vd-tracking-caps);
|
|
26
|
+
line-height: var(--vd-leading-snug);
|
|
27
|
+
text-transform: uppercase;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
vertical-align: middle;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.vd-badge > .vd-icon {
|
|
33
|
+
--vd-icon-size: 1.15em;
|
|
34
|
+
|
|
35
|
+
margin-inline-start: calc(var(--vd-space-0-5) * -1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.vd-badge[data-dot]::before {
|
|
39
|
+
content: '';
|
|
40
|
+
flex: none;
|
|
41
|
+
inline-size: var(--vd-space-1-5);
|
|
42
|
+
block-size: var(--vd-space-1-5);
|
|
43
|
+
border-radius: var(--vd-radius-full);
|
|
44
|
+
background-color: var(--vd-badge-dot);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.vd-badge[data-variant='accent'] {
|
|
48
|
+
--vd-badge-bg: var(--vd-color-action-subtle);
|
|
49
|
+
--vd-badge-fg: var(--vd-color-action-text);
|
|
50
|
+
--vd-badge-border: color-mix(in oklch, var(--vd-color-action) 35%, transparent);
|
|
51
|
+
--vd-badge-dot: var(--vd-color-action);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.vd-badge[data-variant='success'] {
|
|
55
|
+
--vd-badge-bg: var(--vd-color-success-subtle);
|
|
56
|
+
--vd-badge-fg: var(--vd-color-success-text);
|
|
57
|
+
--vd-badge-border: var(--vd-color-success-border);
|
|
58
|
+
--vd-badge-dot: var(--vd-color-success);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.vd-badge[data-variant='warning'] {
|
|
62
|
+
--vd-badge-bg: var(--vd-color-warning-subtle);
|
|
63
|
+
--vd-badge-fg: var(--vd-color-warning-text);
|
|
64
|
+
--vd-badge-border: var(--vd-color-warning-border);
|
|
65
|
+
--vd-badge-dot: var(--vd-color-warning);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.vd-badge[data-variant='danger'] {
|
|
69
|
+
--vd-badge-bg: var(--vd-color-danger-subtle);
|
|
70
|
+
--vd-badge-fg: var(--vd-color-danger-text);
|
|
71
|
+
--vd-badge-border: var(--vd-color-danger-border);
|
|
72
|
+
--vd-badge-dot: var(--vd-color-danger);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.vd-badge[data-variant='info'] {
|
|
76
|
+
--vd-badge-bg: var(--vd-color-info-subtle);
|
|
77
|
+
--vd-badge-fg: var(--vd-color-info-text);
|
|
78
|
+
--vd-badge-border: var(--vd-color-info-border);
|
|
79
|
+
--vd-badge-dot: var(--vd-color-info);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (forced-colors: active) {
|
|
83
|
+
.vd-badge {
|
|
84
|
+
border-color: CanvasText;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.vd-badge[data-dot]::before {
|
|
88
|
+
background-color: CanvasText;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* Breadcrumbs - spec: specs/breadcrumbs.md */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-breadcrumbs {
|
|
4
|
+
--vd-breadcrumbs-gap: var(--vd-space-1-5);
|
|
5
|
+
--vd-breadcrumbs-fg: var(--vd-color-text-muted);
|
|
6
|
+
--vd-breadcrumbs-fg-current: var(--vd-color-text);
|
|
7
|
+
--vd-breadcrumbs-separator: var(--vd-color-text-subtle);
|
|
8
|
+
/* Lucide chevron-right. */
|
|
9
|
+
--vd-breadcrumbs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
|
|
10
|
+
|
|
11
|
+
font-size: var(--vd-text-sm);
|
|
12
|
+
min-inline-size: 0;
|
|
13
|
+
max-inline-size: 100%;
|
|
14
|
+
line-height: var(--vd-leading-snug);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.vd-breadcrumbs > ol {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: var(--vd-space-1) var(--vd-breadcrumbs-gap);
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
list-style: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.vd-breadcrumbs li {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: var(--vd-breadcrumbs-gap);
|
|
31
|
+
min-inline-size: 0;
|
|
32
|
+
max-inline-size: 100%;
|
|
33
|
+
color: var(--vd-breadcrumbs-fg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Separator before every item but the first; decorative (list semantics carry the order). */
|
|
37
|
+
.vd-breadcrumbs li + li::before {
|
|
38
|
+
content: '';
|
|
39
|
+
flex: none;
|
|
40
|
+
inline-size: 0.875em;
|
|
41
|
+
block-size: 0.875em;
|
|
42
|
+
background-color: var(--vd-breadcrumbs-separator);
|
|
43
|
+
mask: var(--vd-breadcrumbs-icon) center / contain no-repeat;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.vd-breadcrumbs:dir(rtl) li + li::before {
|
|
47
|
+
scale: -1 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.vd-breadcrumbs a {
|
|
51
|
+
border-radius: var(--vd-radius-xs);
|
|
52
|
+
color: inherit;
|
|
53
|
+
text-decoration: none;
|
|
54
|
+
transition: var(--vd-transition-colors);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (hover: hover) {
|
|
58
|
+
.vd-breadcrumbs a:hover {
|
|
59
|
+
color: var(--vd-breadcrumbs-fg-current);
|
|
60
|
+
text-decoration: underline;
|
|
61
|
+
text-underline-offset: 0.2em;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vd-breadcrumbs a:focus-visible {
|
|
66
|
+
outline: var(--vd-focus-ring-width) solid var(--vd-color-focus);
|
|
67
|
+
outline-offset: var(--vd-focus-ring-offset);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Long names truncate; the current page keeps more room than the ancestors. */
|
|
71
|
+
.vd-breadcrumbs li > :is(a, [aria-current]) {
|
|
72
|
+
min-inline-size: 0;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
max-inline-size: 16ch;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.vd-breadcrumbs [aria-current='page'] {
|
|
80
|
+
max-inline-size: 32ch;
|
|
81
|
+
color: var(--vd-breadcrumbs-fg-current);
|
|
82
|
+
font-weight: var(--vd-weight-semibold);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.vd-breadcrumbs li > .vd-icon:first-child {
|
|
86
|
+
--vd-icon-size: 1.1em;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (forced-colors: active) {
|
|
90
|
+
.vd-breadcrumbs li + li::before {
|
|
91
|
+
background-color: CanvasText;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* Button - spec: specs/button.md */
|
|
2
|
+
@layer vd.components {
|
|
3
|
+
.vd-button {
|
|
4
|
+
--vd-button-height: var(--vd-control-height-md);
|
|
5
|
+
--vd-button-padding-inline: var(--vd-space-4);
|
|
6
|
+
--vd-button-gap: var(--vd-space-2);
|
|
7
|
+
--vd-button-font-size: var(--vd-text-sm);
|
|
8
|
+
--vd-button-radius: var(--vd-radius-md);
|
|
9
|
+
--vd-button-bg: var(--vd-color-fill);
|
|
10
|
+
--vd-button-bg-hover: var(--vd-color-fill-hover);
|
|
11
|
+
--vd-button-bg-active: var(--vd-color-fill-active);
|
|
12
|
+
--vd-button-fg: var(--vd-color-text);
|
|
13
|
+
--vd-button-fg-hover: var(--vd-button-fg);
|
|
14
|
+
--vd-button-border: var(--vd-color-border-strong);
|
|
15
|
+
--vd-button-shadow: none;
|
|
16
|
+
--vd-button-shadow-hover: var(--vd-button-shadow);
|
|
17
|
+
--vd-button-sheen: none;
|
|
18
|
+
|
|
19
|
+
position: relative;
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
gap: var(--vd-button-gap);
|
|
24
|
+
min-block-size: var(--vd-button-height);
|
|
25
|
+
padding-block: var(--vd-space-1);
|
|
26
|
+
padding-inline: var(--vd-button-padding-inline);
|
|
27
|
+
border: var(--vd-border-width) solid var(--vd-button-border);
|
|
28
|
+
border-radius: var(--vd-button-radius);
|
|
29
|
+
background-color: var(--vd-button-bg);
|
|
30
|
+
background-image: var(--vd-button-sheen);
|
|
31
|
+
box-shadow: var(--vd-button-shadow);
|
|
32
|
+
color: var(--vd-button-fg);
|
|
33
|
+
font-family: inherit;
|
|
34
|
+
font-size: var(--vd-button-font-size);
|
|
35
|
+
font-weight: var(--vd-weight-semibold);
|
|
36
|
+
line-height: var(--vd-leading-snug);
|
|
37
|
+
text-align: center;
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
text-wrap: balance;
|
|
40
|
+
vertical-align: middle;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
user-select: none;
|
|
43
|
+
touch-action: manipulation;
|
|
44
|
+
-webkit-tap-highlight-color: transparent;
|
|
45
|
+
transition:
|
|
46
|
+
var(--vd-transition-colors),
|
|
47
|
+
scale var(--vd-duration-fast) var(--vd-ease-out);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.vd-button:focus-visible {
|
|
51
|
+
outline: var(--vd-focus-ring-width) solid var(--vd-color-focus);
|
|
52
|
+
outline-offset: var(--vd-focus-ring-offset);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.vd-button__label {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--vd-button-gap);
|
|
59
|
+
min-inline-size: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Empty label (icon-only with the icon in a slot) shouldn't add a gap. */
|
|
63
|
+
.vd-button__label:empty {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Optical alignment: icons carry visual padding of their own. */
|
|
68
|
+
.vd-button > [slot='start'] {
|
|
69
|
+
margin-inline-start: calc(var(--vd-space-1) * -1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.vd-button > [slot='end'] {
|
|
73
|
+
margin-inline-end: calc(var(--vd-space-1) * -1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ---------------------------------------------------------------- variants */
|
|
77
|
+
|
|
78
|
+
.vd-button[data-variant='primary'] {
|
|
79
|
+
--vd-button-bg: var(--vd-color-action);
|
|
80
|
+
--vd-button-bg-hover: var(--vd-color-action-hover);
|
|
81
|
+
--vd-button-bg-active: var(--vd-color-action-active);
|
|
82
|
+
--vd-button-fg: var(--vd-color-on-action);
|
|
83
|
+
--vd-button-border: transparent;
|
|
84
|
+
--vd-button-sheen: linear-gradient(to bottom, var(--vd-color-sheen), transparent);
|
|
85
|
+
--vd-button-shadow: var(--vd-highlight-top), var(--vd-shadow-sm);
|
|
86
|
+
--vd-button-shadow-hover: var(--vd-highlight-top), var(--vd-shadow-glow-action);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.vd-button[data-variant='ghost'] {
|
|
90
|
+
--vd-button-bg: transparent;
|
|
91
|
+
--vd-button-border: transparent;
|
|
92
|
+
--vd-button-fg: var(--vd-color-text-muted);
|
|
93
|
+
--vd-button-fg-hover: var(--vd-color-text);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.vd-button[data-variant='danger'] {
|
|
97
|
+
--vd-button-bg: var(--vd-color-danger);
|
|
98
|
+
--vd-button-bg-hover: var(--vd-color-danger-hover);
|
|
99
|
+
--vd-button-bg-active: var(--vd-color-danger);
|
|
100
|
+
--vd-button-fg: var(--vd-color-on-status);
|
|
101
|
+
--vd-button-border: transparent;
|
|
102
|
+
--vd-button-sheen: linear-gradient(to bottom, var(--vd-color-sheen), transparent);
|
|
103
|
+
--vd-button-shadow: var(--vd-highlight-top), var(--vd-shadow-sm);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* ------------------------------------------------------------------- sizes */
|
|
107
|
+
|
|
108
|
+
.vd-button[data-size='sm'] {
|
|
109
|
+
--vd-button-height: var(--vd-control-height-sm);
|
|
110
|
+
--vd-button-padding-inline: var(--vd-space-3);
|
|
111
|
+
--vd-button-gap: var(--vd-space-1-5);
|
|
112
|
+
--vd-button-radius: var(--vd-radius-sm);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.vd-button[data-size='lg'] {
|
|
116
|
+
--vd-button-height: var(--vd-control-height-lg);
|
|
117
|
+
--vd-button-padding-inline: var(--vd-space-5);
|
|
118
|
+
--vd-button-font-size: var(--vd-text-md);
|
|
119
|
+
--vd-button-radius: var(--vd-radius-lg);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.vd-button[data-icon-only] {
|
|
123
|
+
inline-size: var(--vd-button-height);
|
|
124
|
+
padding-inline: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* ------------------------------------------------------------------ states */
|
|
128
|
+
|
|
129
|
+
@media (hover: hover) {
|
|
130
|
+
.vd-button:not(:disabled, [aria-disabled='true']):hover {
|
|
131
|
+
background-color: var(--vd-button-bg-hover);
|
|
132
|
+
box-shadow: var(--vd-button-shadow-hover);
|
|
133
|
+
color: var(--vd-button-fg-hover);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.vd-button:not(:disabled, [aria-disabled='true']):active {
|
|
138
|
+
background-color: var(--vd-button-bg-active);
|
|
139
|
+
scale: var(--vd-press-scale);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.vd-button:is(:disabled, [aria-disabled='true']):not([data-loading]) {
|
|
143
|
+
opacity: var(--vd-opacity-disabled);
|
|
144
|
+
box-shadow: none;
|
|
145
|
+
cursor: not-allowed;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Loading keeps the width: content stays in flow (and in the a11y tree), just invisible. */
|
|
149
|
+
.vd-button[data-loading] {
|
|
150
|
+
cursor: progress;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.vd-button[data-loading] > :not(.vd-button__spinner) {
|
|
154
|
+
opacity: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.vd-button__spinner {
|
|
158
|
+
position: absolute;
|
|
159
|
+
inset: 0;
|
|
160
|
+
display: grid;
|
|
161
|
+
place-items: center;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (forced-colors: active) {
|
|
165
|
+
.vd-button {
|
|
166
|
+
border-color: ButtonText;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.vd-button:is(:disabled, [aria-disabled='true']) {
|
|
170
|
+
border-color: GrayText;
|
|
171
|
+
color: GrayText;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|