@joniguerini/lume 0.0.0-stage → 1.9.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 +25 -0
- package/README.md +62 -2
- package/base.css +165 -0
- package/bin/lumeui.mjs +163 -0
- package/components/alert.css +156 -0
- package/components/banner.css +98 -0
- package/components/button.css +291 -0
- package/components/calendar.css +532 -0
- package/components/carousel.css +175 -0
- package/components/chart.css +813 -0
- package/components/chat.css +670 -0
- package/components/checkbox.css +212 -0
- package/components/chip.css +224 -0
- package/components/code.css +36 -0
- package/components/color-picker.css +192 -0
- package/components/command.css +148 -0
- package/components/content.css +211 -0
- package/components/editor.css +174 -0
- package/components/feedback.css +320 -0
- package/components/filters.css +103 -0
- package/components/form.css +455 -0
- package/components/image-viewer.css +237 -0
- package/components/layers.css +138 -0
- package/components/link.css +87 -0
- package/components/loading.css +260 -0
- package/components/menu.css +180 -0
- package/components/modal.css +209 -0
- package/components/navigation.css +507 -0
- package/components/notifications.css +186 -0
- package/components/number-field.css +52 -0
- package/components/otp.css +119 -0
- package/components/panel.css +208 -0
- package/components/picker.css +207 -0
- package/components/rating.css +143 -0
- package/components/resizable.css +173 -0
- package/components/scrollbar.css +110 -0
- package/components/select.css +477 -0
- package/components/shell.css +837 -0
- package/components/slider.css +189 -0
- package/components/sortable.css +287 -0
- package/components/surfaces.css +182 -0
- package/components/switch.css +115 -0
- package/components/table.css +228 -0
- package/components/tabs.css +190 -0
- package/components/tags.css +83 -0
- package/components/toast.css +164 -0
- package/components/toolbar.css +80 -0
- package/components/upload.css +181 -0
- package/ds.css +48 -0
- package/fonts/Geist-LICENSE.txt +92 -0
- package/fonts/Geist-Variable.woff2 +0 -0
- package/fonts/GeistSerif-Regular.woff2 +0 -0
- package/fonts/JetBrainsMono-LICENSE.txt +93 -0
- package/fonts/JetBrainsMono-Variable.woff2 +0 -0
- package/fonts.css +29 -0
- package/icons/icons.d.ts +5 -0
- package/icons/icons.js +266 -0
- package/js/back-to-top.d.ts +2 -0
- package/js/back-to-top.js +62 -0
- package/js/banner.js +87 -0
- package/js/calendar.d.ts +3 -0
- package/js/calendar.js +472 -0
- package/js/carousel.d.ts +2 -0
- package/js/carousel.js +258 -0
- package/js/charts/bar.js +361 -0
- package/js/charts/core.js +604 -0
- package/js/charts/donut.js +206 -0
- package/js/charts/figures.js +97 -0
- package/js/charts/heatmap.js +410 -0
- package/js/charts/line.js +268 -0
- package/js/charts/scatter.js +211 -0
- package/js/charts.d.ts +12 -0
- package/js/charts.js +27 -0
- package/js/code-block.d.ts +3 -0
- package/js/code-block.js +32 -0
- package/js/color-picker.d.ts +4 -0
- package/js/color-picker.js +448 -0
- package/js/command-palette.js +233 -0
- package/js/composer.js +573 -0
- package/js/context-menu.d.ts +2 -0
- package/js/context-menu.js +154 -0
- package/js/date-picker.d.ts +2 -0
- package/js/date-picker.js +430 -0
- package/js/drawer.js +48 -0
- package/js/editor.d.ts +5 -0
- package/js/editor.js +615 -0
- package/js/field-support.js +77 -0
- package/js/file-upload.d.ts +2 -0
- package/js/file-upload.js +230 -0
- package/js/filters.js +266 -0
- package/js/form.d.ts +2 -0
- package/js/form.js +409 -0
- package/js/i18n.d.ts +14 -0
- package/js/i18n.js +83 -0
- package/js/image-viewer.d.ts +4 -0
- package/js/image-viewer.js +275 -0
- package/js/menu.d.ts +4 -0
- package/js/menu.js +237 -0
- package/js/messages.js +908 -0
- package/js/modal.d.ts +7 -0
- package/js/modal.js +183 -0
- package/js/notifications.d.ts +4 -0
- package/js/notifications.js +204 -0
- package/js/number-field.d.ts +2 -0
- package/js/number-field.js +175 -0
- package/js/otp-field.d.ts +2 -0
- package/js/otp-field.js +107 -0
- package/js/pagination.d.ts +3 -0
- package/js/pagination.js +143 -0
- package/js/popover.d.ts +2 -0
- package/js/popover.js +155 -0
- package/js/progress-ring.js +48 -0
- package/js/rating.d.ts +3 -0
- package/js/rating.js +130 -0
- package/js/resizable.d.ts +2 -0
- package/js/resizable.js +311 -0
- package/js/scrollbar.d.ts +2 -0
- package/js/scrollbar.js +273 -0
- package/js/segmented.js +60 -0
- package/js/select.d.ts +3 -0
- package/js/select.js +784 -0
- package/js/shell.d.ts +6 -0
- package/js/shell.js +373 -0
- package/js/slider.d.ts +2 -0
- package/js/slider.js +89 -0
- package/js/sortable.d.ts +5 -0
- package/js/sortable.js +463 -0
- package/js/stepper.d.ts +2 -0
- package/js/stepper.js +72 -0
- package/js/tabs.js +99 -0
- package/js/tag-field.d.ts +2 -0
- package/js/tag-field.js +177 -0
- package/js/theme.d.ts +9 -0
- package/js/theme.js +114 -0
- package/js/time-picker.d.ts +2 -0
- package/js/time-picker.js +279 -0
- package/js/toast.d.ts +17 -0
- package/js/toast.js +171 -0
- package/js/toolbar.d.ts +2 -0
- package/js/toolbar.js +107 -0
- package/js/tooltip.d.ts +2 -0
- package/js/tooltip.js +208 -0
- package/js/tree.d.ts +2 -0
- package/js/tree.js +168 -0
- package/lume.css +11574 -0
- package/lume.d.ts +104 -0
- package/lume.js +67 -0
- package/package.json +66 -4
- package/react/Alert.d.ts +24 -0
- package/react/Alert.js +21 -0
- package/react/AppShell.d.ts +67 -0
- package/react/AppShell.js +94 -0
- package/react/Avatar.d.ts +39 -0
- package/react/Avatar.js +40 -0
- package/react/Badge.d.ts +17 -0
- package/react/Badge.js +10 -0
- package/react/Button.d.ts +32 -0
- package/react/Button.js +17 -0
- package/react/Calendar.d.ts +48 -0
- package/react/Calendar.js +67 -0
- package/react/Carousel.d.ts +30 -0
- package/react/Carousel.js +38 -0
- package/react/Charts.d.ts +186 -0
- package/react/Charts.js +58 -0
- package/react/Chip.d.ts +34 -0
- package/react/Chip.js +26 -0
- package/react/Choice.d.ts +72 -0
- package/react/Choice.js +51 -0
- package/react/ColorPicker.d.ts +43 -0
- package/react/ColorPicker.js +73 -0
- package/react/Content.d.ts +58 -0
- package/react/Content.js +42 -0
- package/react/Controls.d.ts +97 -0
- package/react/Controls.js +118 -0
- package/react/Editor.d.ts +28 -0
- package/react/Editor.js +57 -0
- package/react/Field.d.ts +90 -0
- package/react/Field.js +65 -0
- package/react/Form.d.ts +36 -0
- package/react/Form.js +45 -0
- package/react/Icon.d.ts +13 -0
- package/react/Icon.js +8 -0
- package/react/IconButton.d.ts +19 -0
- package/react/IconButton.js +12 -0
- package/react/ImageViewer.d.ts +20 -0
- package/react/ImageViewer.js +22 -0
- package/react/InlineAction.d.ts +15 -0
- package/react/InlineAction.js +12 -0
- package/react/Layers.d.ts +118 -0
- package/react/Layers.js +115 -0
- package/react/Link.d.ts +32 -0
- package/react/Link.js +26 -0
- package/react/Loading.d.ts +67 -0
- package/react/Loading.js +49 -0
- package/react/Navigation.d.ts +181 -0
- package/react/Navigation.js +197 -0
- package/react/Notices.d.ts +43 -0
- package/react/Notices.js +89 -0
- package/react/Panel.d.ts +57 -0
- package/react/Panel.js +33 -0
- package/react/Pickers.d.ts +83 -0
- package/react/Pickers.js +70 -0
- package/react/Rating.d.ts +39 -0
- package/react/Rating.js +41 -0
- package/react/Resizable.d.ts +44 -0
- package/react/Resizable.js +30 -0
- package/react/Select.d.ts +53 -0
- package/react/Select.js +79 -0
- package/react/Sortable.d.ts +52 -0
- package/react/Sortable.js +113 -0
- package/react/Table.d.ts +60 -0
- package/react/Table.js +34 -0
- package/react/Toolbar.d.ts +45 -0
- package/react/Toolbar.js +45 -0
- package/react/cx.d.ts +2 -0
- package/react/cx.js +5 -0
- package/react/icon-names.d.ts +1 -0
- package/react/icon-names.js +2 -0
- package/react/index.d.ts +42 -0
- package/react/index.js +52 -0
- package/react/useController.d.ts +8 -0
- package/react/useController.js +16 -0
- package/react/useLocale.d.ts +5 -0
- package/react/useLocale.js +15 -0
- package/tokens.css +739 -0
- package/tokens.js +4911 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* Popover, gaveta lateral e menu de contexto */
|
|
2
|
+
|
|
3
|
+
/* ───────── Popover ───────── */
|
|
4
|
+
|
|
5
|
+
.ds-popover {
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
z-index: var(--ds-z-popover);
|
|
10
|
+
width: max-content;
|
|
11
|
+
max-width: min(340px, calc(100vw - 16px));
|
|
12
|
+
padding: var(--ds-space-200);
|
|
13
|
+
border-radius: var(--ds-radius-lg);
|
|
14
|
+
background: var(--ds-color-bg-raised);
|
|
15
|
+
border: 1px solid var(--ds-color-border-strong);
|
|
16
|
+
box-shadow: var(--ds-shadow-xl);
|
|
17
|
+
color: var(--ds-color-fg-default);
|
|
18
|
+
outline: none;
|
|
19
|
+
animation: ds-popover-in var(--ds-duration-fast) var(--ds-easing-standard);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@keyframes ds-popover-in {
|
|
23
|
+
from { opacity: 0; }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ds-popover__header {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
gap: var(--ds-space-200);
|
|
31
|
+
margin: -2px -4px var(--ds-space-100) 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ds-popover__title {
|
|
35
|
+
font: var(--ds-text-label-md);
|
|
36
|
+
letter-spacing: var(--ds-text-label-md-tracking);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ds-popover__body {
|
|
40
|
+
color: var(--ds-color-fg-muted);
|
|
41
|
+
font: var(--ds-text-body-sm);
|
|
42
|
+
letter-spacing: var(--ds-text-body-sm-tracking);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ds-popover__body > * + * {
|
|
46
|
+
margin-top: var(--ds-space-150);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ───────── Gaveta lateral ─────────
|
|
50
|
+
* Um .ds-modal que entra pela borda: flutua como os painéis do shell, com o mesmo respiro em volta.
|
|
51
|
+
*/
|
|
52
|
+
.ds-drawer {
|
|
53
|
+
--_w: 480px;
|
|
54
|
+
--_gap: var(--ds-layout-frame-gap, 10px);
|
|
55
|
+
position: fixed;
|
|
56
|
+
width: min(var(--_w), calc(100vw - 2 * var(--_gap)));
|
|
57
|
+
height: calc(100dvh - 2 * var(--_gap));
|
|
58
|
+
max-width: none;
|
|
59
|
+
max-height: none;
|
|
60
|
+
margin: var(--_gap);
|
|
61
|
+
border-radius: var(--ds-radius-xl);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ds-drawer--sm { --_w: 360px; }
|
|
65
|
+
.ds-drawer--lg { --_w: 640px; }
|
|
66
|
+
|
|
67
|
+
.ds-drawer--right {
|
|
68
|
+
inset: 0 0 0 auto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ds-drawer--left {
|
|
72
|
+
inset: 0 auto 0 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ds-drawer--bottom {
|
|
76
|
+
inset: auto 0 0;
|
|
77
|
+
width: calc(100vw - 2 * var(--_gap));
|
|
78
|
+
height: auto;
|
|
79
|
+
max-height: min(70dvh, 560px);
|
|
80
|
+
margin-inline: auto;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ds-drawer .ds-modal__body {
|
|
84
|
+
padding-bottom: var(--ds-space-300);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ds-drawer .ds-modal__footer {
|
|
88
|
+
border-top: 1px solid var(--ds-color-border-subtle);
|
|
89
|
+
padding-block: var(--ds-space-250);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ds-drawer--right[open] { animation-name: ds-drawer-in-right; }
|
|
93
|
+
.ds-drawer--left[open] { animation-name: ds-drawer-in-left; }
|
|
94
|
+
.ds-drawer--bottom[open] { animation-name: ds-drawer-in-bottom; }
|
|
95
|
+
.ds-drawer--right[data-closing] { animation-name: ds-drawer-out-right; }
|
|
96
|
+
.ds-drawer--left[data-closing] { animation-name: ds-drawer-out-left; }
|
|
97
|
+
.ds-drawer--bottom[data-closing] { animation-name: ds-drawer-out-bottom; }
|
|
98
|
+
|
|
99
|
+
@keyframes ds-drawer-in-right { from { transform: translateX(32px); opacity: 0; } }
|
|
100
|
+
@keyframes ds-drawer-in-left { from { transform: translateX(-32px); opacity: 0; } }
|
|
101
|
+
@keyframes ds-drawer-in-bottom { from { transform: translateY(32px); opacity: 0; } }
|
|
102
|
+
@keyframes ds-drawer-out-right { to { transform: translateX(24px); opacity: 0; } }
|
|
103
|
+
@keyframes ds-drawer-out-left { to { transform: translateX(-24px); opacity: 0; } }
|
|
104
|
+
@keyframes ds-drawer-out-bottom { to { transform: translateY(24px); opacity: 0; } }
|
|
105
|
+
|
|
106
|
+
@media (max-width: 767.98px) {
|
|
107
|
+
.ds-drawer:not(.ds-drawer--bottom) {
|
|
108
|
+
width: calc(100vw - 2 * var(--_gap));
|
|
109
|
+
max-height: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ds-drawer .ds-modal__footer {
|
|
113
|
+
flex-direction: row;
|
|
114
|
+
justify-content: flex-end;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ds-drawer .ds-modal__footer > .ds-btn {
|
|
118
|
+
width: auto;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media (prefers-reduced-motion: reduce) {
|
|
123
|
+
.ds-popover,
|
|
124
|
+
.ds-drawer[open],
|
|
125
|
+
.ds-drawer[data-closing] {
|
|
126
|
+
animation: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ───────── Menu de contexto ───────── */
|
|
131
|
+
|
|
132
|
+
.ds-context-menu {
|
|
133
|
+
transition: opacity var(--ds-duration-fast) var(--ds-easing-standard);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ds-context-menu[data-open] {
|
|
137
|
+
transform: none;
|
|
138
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Link
|
|
3
|
+
* no texto: <a class="ds-link" href="…">Tokens</a>
|
|
4
|
+
* solto (fim de card, “ver tudo”): <a class="ds-link ds-link--standalone" href="…">Ver todos <svg class="ds-link__icon">…</svg></a>
|
|
5
|
+
* externo: <a class="ds-link" href="https://…" target="_blank" rel="noopener">GitHub<svg class="ds-link__icon">…external-link…</svg>
|
|
6
|
+
* <span class="ds-visually-hidden">(abre em nova aba)</span></a>
|
|
7
|
+
* tons: --muted (apagado, para rodapés e metadados) · desativado: aria-disabled="true" sem href
|
|
8
|
+
*/
|
|
9
|
+
.ds-link {
|
|
10
|
+
border-radius: var(--ds-radius-xs);
|
|
11
|
+
color: var(--ds-color-fg-link);
|
|
12
|
+
text-decoration: underline;
|
|
13
|
+
text-decoration-thickness: 1px;
|
|
14
|
+
text-underline-offset: 0.2em;
|
|
15
|
+
text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
|
|
16
|
+
transition: color var(--ds-duration-fast) var(--ds-easing-standard), text-decoration-color var(--ds-duration-fast) var(--ds-easing-standard);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ds-link:hover,
|
|
20
|
+
.ds-link[data-state="hover"] {
|
|
21
|
+
color: var(--ds-color-fg-link-hover);
|
|
22
|
+
text-decoration-color: currentColor;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ds-link--muted {
|
|
26
|
+
color: var(--ds-color-fg-muted);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ds-link--muted:hover,
|
|
30
|
+
.ds-link--muted[data-state="hover"] {
|
|
31
|
+
color: var(--ds-color-fg-default);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ícone depois do texto, do tamanho da letra; não quebra a linha sozinho */
|
|
35
|
+
.ds-link__icon {
|
|
36
|
+
display: inline-block;
|
|
37
|
+
width: 0.875em;
|
|
38
|
+
height: 0.875em;
|
|
39
|
+
margin-inline-start: 0.25em;
|
|
40
|
+
vertical-align: -0.1em;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ds-link__icon > svg {
|
|
44
|
+
display: block;
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ds-link--standalone {
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: var(--ds-space-050);
|
|
53
|
+
font: var(--ds-text-label-md);
|
|
54
|
+
letter-spacing: var(--ds-text-label-md-tracking);
|
|
55
|
+
text-decoration-line: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ds-link--standalone:hover,
|
|
59
|
+
.ds-link--standalone[data-state="hover"] {
|
|
60
|
+
text-decoration-line: underline;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ds-link--standalone .ds-link__icon {
|
|
64
|
+
flex: none;
|
|
65
|
+
width: 16px;
|
|
66
|
+
height: 16px;
|
|
67
|
+
margin: 0;
|
|
68
|
+
transition: transform var(--ds-duration-fast) var(--ds-easing-standard);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* a seta anda um pouco para o lado do destino */
|
|
72
|
+
.ds-link--standalone:hover .ds-link__icon[data-arrow],
|
|
73
|
+
.ds-link--standalone[data-state="hover"] .ds-link__icon[data-arrow] {
|
|
74
|
+
transform: translateX(2px);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ds-link[aria-disabled="true"] {
|
|
78
|
+
color: var(--ds-color-fg-disabled);
|
|
79
|
+
text-decoration-line: none;
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (prefers-reduced-motion: reduce) {
|
|
84
|
+
.ds-link--standalone .ds-link__icon {
|
|
85
|
+
transition: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/* Barra de progresso, progresso circular, spinner e skeleton */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Barra de progresso — sobre o <progress> nativo
|
|
5
|
+
* <div class="ds-progress-field">
|
|
6
|
+
* <div class="ds-progress-field__head"><span id="envio">Enviando</span><span>62%</span></div>
|
|
7
|
+
* <progress class="ds-progress" aria-labelledby="envio" value="62" max="100"></progress>
|
|
8
|
+
* </div>
|
|
9
|
+
* Sem value: indeterminada. Tons: --success · --warning · --danger. Altura: --lg.
|
|
10
|
+
*/
|
|
11
|
+
.ds-progress {
|
|
12
|
+
--_fill: var(--ds-color-brand-solid);
|
|
13
|
+
--_h: 4px;
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: var(--_h);
|
|
17
|
+
border: 0;
|
|
18
|
+
border-radius: var(--ds-radius-full);
|
|
19
|
+
background-color: var(--ds-color-border-field);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
appearance: none;
|
|
22
|
+
-webkit-appearance: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ds-progress::-webkit-progress-bar {
|
|
26
|
+
background: transparent;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ds-progress::-webkit-progress-value {
|
|
30
|
+
border-radius: var(--ds-radius-full);
|
|
31
|
+
background: var(--_fill);
|
|
32
|
+
transition: inline-size var(--ds-duration-base) var(--ds-easing-standard);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ds-progress::-moz-progress-bar {
|
|
36
|
+
border-radius: var(--ds-radius-full);
|
|
37
|
+
background: var(--_fill);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ds-progress--lg { --_h: 8px; }
|
|
41
|
+
.ds-progress--success { --_fill: var(--ds-color-success-solid); }
|
|
42
|
+
.ds-progress--warning { --_fill: var(--ds-color-warning-solid); }
|
|
43
|
+
.ds-progress--danger { --_fill: var(--ds-color-danger-solid); }
|
|
44
|
+
|
|
45
|
+
/* indeterminada: uma faixa lisa que atravessa o trilho */
|
|
46
|
+
.ds-progress:indeterminate {
|
|
47
|
+
background-image: linear-gradient(var(--_fill), var(--_fill));
|
|
48
|
+
background-repeat: no-repeat;
|
|
49
|
+
background-size: 35% 100%;
|
|
50
|
+
animation: ds-progress-slide 1.4s var(--ds-easing-standard) infinite;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ds-progress:indeterminate::-moz-progress-bar {
|
|
54
|
+
background: transparent;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@keyframes ds-progress-slide {
|
|
58
|
+
from { background-position: -60% 0; }
|
|
59
|
+
to { background-position: 160% 0; }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ds-progress-field {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: var(--ds-space-100);
|
|
66
|
+
min-width: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ds-progress-field__head {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: baseline;
|
|
72
|
+
justify-content: space-between;
|
|
73
|
+
gap: var(--ds-space-200);
|
|
74
|
+
color: var(--ds-color-fg-default);
|
|
75
|
+
font: var(--ds-text-label-md);
|
|
76
|
+
letter-spacing: var(--ds-text-label-md-tracking);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ds-progress-field__value {
|
|
80
|
+
color: var(--ds-color-fg-muted);
|
|
81
|
+
font: var(--ds-text-body-sm);
|
|
82
|
+
font-variant-numeric: tabular-nums;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/*
|
|
86
|
+
* Progresso circular — o mesmo progresso da barra, num anel, para quando a barra não cabe.
|
|
87
|
+
* Monte com progressRingHtml(62, { label: 'Enviando' }) e mude com setProgressRing(el, 80).
|
|
88
|
+
* <div class="ds-progress-ring" role="progressbar" aria-label="Enviando" aria-valuemin="0" aria-valuemax="100" aria-valuenow="62" style="--ds-progress-value: 62">
|
|
89
|
+
* <svg viewBox="0 0 40 40" aria-hidden="true"><circle class="ds-progress-ring__track" cx="20" cy="20" r="18"/><circle class="ds-progress-ring__bar" cx="20" cy="20" r="18" pathLength="100"/></svg>
|
|
90
|
+
* <span class="ds-progress-ring__value">62%</span>
|
|
91
|
+
* </div>
|
|
92
|
+
* Sem aria-valuenow: indeterminado (o arco gira). Tamanhos: --sm (20, sem número) · md (56) · --lg (80). Tons como os da barra.
|
|
93
|
+
*/
|
|
94
|
+
.ds-progress-ring {
|
|
95
|
+
--_fill: var(--ds-color-brand-solid);
|
|
96
|
+
--_size: 56px;
|
|
97
|
+
--_stroke: 4px;
|
|
98
|
+
position: relative;
|
|
99
|
+
flex: none;
|
|
100
|
+
display: inline-grid;
|
|
101
|
+
place-items: center;
|
|
102
|
+
width: var(--_size);
|
|
103
|
+
height: var(--_size);
|
|
104
|
+
vertical-align: middle;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ds-progress-ring svg {
|
|
108
|
+
grid-area: 1 / 1;
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 100%;
|
|
111
|
+
overflow: visible;
|
|
112
|
+
transform: rotate(-90deg);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.ds-progress-ring circle {
|
|
116
|
+
fill: none;
|
|
117
|
+
/* o traço em pixels de verdade, seja qual for o tamanho */
|
|
118
|
+
stroke-width: calc(var(--_stroke) * 40 / var(--_size-n, 56));
|
|
119
|
+
r: calc(20px - var(--_stroke) * 20 / var(--_size-n, 56));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ds-progress-ring__track {
|
|
123
|
+
stroke: var(--ds-color-border-field);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.ds-progress-ring__bar {
|
|
127
|
+
stroke: var(--_fill);
|
|
128
|
+
stroke-linecap: round;
|
|
129
|
+
stroke-dasharray: var(--ds-progress-value, 0) 100;
|
|
130
|
+
transition: stroke-dasharray var(--ds-duration-base) var(--ds-easing-standard);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* em zero, a ponta redonda desenharia um pontinho */
|
|
134
|
+
.ds-progress-ring[aria-valuenow="0"] .ds-progress-ring__bar {
|
|
135
|
+
opacity: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ds-progress-ring__value {
|
|
139
|
+
grid-area: 1 / 1;
|
|
140
|
+
color: var(--ds-color-fg-default);
|
|
141
|
+
font: var(--ds-text-label-sm);
|
|
142
|
+
letter-spacing: var(--ds-text-label-sm-tracking);
|
|
143
|
+
font-variant-numeric: tabular-nums;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ds-progress-ring--sm { --_size: 20px; --_size-n: 20; --_stroke: 2.5px; }
|
|
147
|
+
.ds-progress-ring--sm .ds-progress-ring__value { display: none; }
|
|
148
|
+
.ds-progress-ring--lg { --_size: 80px; --_size-n: 80; --_stroke: 6px; }
|
|
149
|
+
.ds-progress-ring--lg .ds-progress-ring__value { font: var(--ds-text-label-lg); letter-spacing: var(--ds-text-label-lg-tracking); }
|
|
150
|
+
.ds-progress-ring--success { --_fill: var(--ds-color-success-solid); }
|
|
151
|
+
.ds-progress-ring--warning { --_fill: var(--ds-color-warning-solid); }
|
|
152
|
+
.ds-progress-ring--danger { --_fill: var(--ds-color-danger-solid); }
|
|
153
|
+
|
|
154
|
+
/* indeterminado: um arco de um quarto que gira */
|
|
155
|
+
.ds-progress-ring:not([aria-valuenow]) .ds-progress-ring__bar {
|
|
156
|
+
stroke-dasharray: 25 100;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.ds-progress-ring:not([aria-valuenow]) svg {
|
|
160
|
+
animation: ds-progress-ring-turn 1s linear infinite;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@keyframes ds-progress-ring-turn {
|
|
164
|
+
from { transform: rotate(-90deg); }
|
|
165
|
+
to { transform: rotate(270deg); }
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/*
|
|
169
|
+
* Spinner
|
|
170
|
+
* <span class="ds-spinner" role="status" aria-label="Carregando"></span>
|
|
171
|
+
* Tamanhos: --sm (16) md (20, padrão) --lg (32). Herda a cor do texto, então funciona dentro de botões.
|
|
172
|
+
*/
|
|
173
|
+
.ds-spinner {
|
|
174
|
+
--_s: 20px;
|
|
175
|
+
flex: none;
|
|
176
|
+
display: inline-block;
|
|
177
|
+
width: var(--_s);
|
|
178
|
+
height: var(--_s);
|
|
179
|
+
border: 2px solid color-mix(in srgb, currentColor 22%, transparent);
|
|
180
|
+
border-top-color: currentColor;
|
|
181
|
+
border-radius: var(--ds-radius-full);
|
|
182
|
+
vertical-align: middle;
|
|
183
|
+
animation: ds-spinner-turn 0.8s linear infinite;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ds-spinner--sm { --_s: 16px; }
|
|
187
|
+
.ds-spinner--lg { --_s: 32px; border-width: 3px; }
|
|
188
|
+
|
|
189
|
+
@keyframes ds-spinner-turn {
|
|
190
|
+
to { transform: rotate(1turn); }
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Botão ocupado: <button class="ds-btn" aria-busy="true"><span class="ds-spinner ds-spinner--sm"></span>Salvando</button> */
|
|
194
|
+
.ds-btn[aria-busy="true"] {
|
|
195
|
+
cursor: progress;
|
|
196
|
+
pointer-events: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/*
|
|
200
|
+
* Skeleton — a forma do conteúdo antes de ele chegar: formas lisas que pulsam devagar, sem brilho.
|
|
201
|
+
* <div aria-busy="true" aria-label="Carregando"><div class="ds-skeleton ds-skeleton--text" style="--w:60%"></div></div>
|
|
202
|
+
* Formas: --text (linha) · --circle (avatar) · padrão: bloco, com o tamanho que você der.
|
|
203
|
+
*/
|
|
204
|
+
.ds-skeleton {
|
|
205
|
+
display: block;
|
|
206
|
+
width: var(--w, 100%);
|
|
207
|
+
height: var(--h, 64px);
|
|
208
|
+
border-radius: var(--ds-radius-md);
|
|
209
|
+
background: var(--ds-color-bg-muted);
|
|
210
|
+
animation: ds-skeleton-pulse 1.4s var(--ds-easing-standard) infinite;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.ds-skeleton--text {
|
|
214
|
+
--h: 10px;
|
|
215
|
+
border-radius: var(--ds-radius-xs);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.ds-skeleton--circle {
|
|
219
|
+
flex: none;
|
|
220
|
+
width: var(--s, 40px);
|
|
221
|
+
height: var(--s, 40px);
|
|
222
|
+
border-radius: var(--ds-radius-full);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@keyframes ds-skeleton-pulse {
|
|
226
|
+
50% { opacity: 0.5; }
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media (prefers-reduced-motion: reduce) {
|
|
230
|
+
.ds-progress:indeterminate {
|
|
231
|
+
background-position: 0 0;
|
|
232
|
+
background-size: 100% 100%;
|
|
233
|
+
opacity: 0.6;
|
|
234
|
+
animation: none;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.ds-progress::-webkit-progress-value,
|
|
238
|
+
.ds-progress-ring__bar {
|
|
239
|
+
transition: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.ds-progress-ring:not([aria-valuenow]) svg {
|
|
243
|
+
animation: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.ds-progress-ring:not([aria-valuenow]) .ds-progress-ring__bar {
|
|
247
|
+
stroke-dasharray: 100 0;
|
|
248
|
+
opacity: 0.5;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.ds-spinner {
|
|
252
|
+
border-top-color: color-mix(in srgb, currentColor 22%, transparent);
|
|
253
|
+
animation: none;
|
|
254
|
+
opacity: 0.8;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.ds-skeleton {
|
|
258
|
+
animation: none;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/* Menu (dropdown) — posicionado por ds/js/menu.js, abre a partir de um .ds-chip ou botão */
|
|
2
|
+
|
|
3
|
+
.ds-menu {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: var(--ds-z-popover);
|
|
8
|
+
min-width: 208px;
|
|
9
|
+
max-width: 320px;
|
|
10
|
+
padding: 6px;
|
|
11
|
+
border-radius: var(--ds-radius-lg);
|
|
12
|
+
background: var(--ds-color-bg-raised);
|
|
13
|
+
border: 1px solid var(--ds-color-border-strong);
|
|
14
|
+
box-shadow: var(--ds-shadow-xl);
|
|
15
|
+
opacity: 0;
|
|
16
|
+
visibility: hidden;
|
|
17
|
+
transform: translateY(-4px);
|
|
18
|
+
transition:
|
|
19
|
+
opacity var(--ds-duration-fast) var(--ds-easing-standard),
|
|
20
|
+
transform var(--ds-duration-base) var(--ds-easing-emphasized),
|
|
21
|
+
visibility 0s var(--ds-duration-fast);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ds-menu[data-open] {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
visibility: visible;
|
|
27
|
+
transform: none;
|
|
28
|
+
transition:
|
|
29
|
+
opacity var(--ds-duration-fast) var(--ds-easing-standard),
|
|
30
|
+
transform var(--ds-duration-base) var(--ds-easing-emphasized);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Colunas: lista longa vira grade (até --_rows itens por coluna), sem rolagem */
|
|
34
|
+
.ds-menu--columns {
|
|
35
|
+
max-width: calc(100vw - 16px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ds-menu__grid {
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-auto-flow: column;
|
|
41
|
+
grid-template-rows: repeat(var(--_rows), auto);
|
|
42
|
+
grid-auto-columns: minmax(184px, 1fr);
|
|
43
|
+
column-gap: 2px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Uma coluna por seção (sectionColumns) */
|
|
47
|
+
.ds-menu__sections {
|
|
48
|
+
display: grid;
|
|
49
|
+
grid-auto-flow: column;
|
|
50
|
+
grid-auto-columns: max-content;
|
|
51
|
+
column-gap: var(--ds-space-050);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ds-menu__section > .ds-menu__group:first-child {
|
|
55
|
+
padding-top: var(--ds-space-050);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ds-menu__section {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
min-width: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ds-menu__label {
|
|
65
|
+
padding: var(--ds-space-100) var(--ds-space-150) var(--ds-space-075);
|
|
66
|
+
color: var(--ds-color-fg-subtle);
|
|
67
|
+
font: var(--ds-text-eyebrow);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ds-menu__item {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: var(--ds-space-150);
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: var(--ds-size-control-compact);
|
|
76
|
+
padding-inline: var(--ds-space-150);
|
|
77
|
+
border-radius: 10px;
|
|
78
|
+
color: var(--ds-color-fg-muted);
|
|
79
|
+
font: var(--ds-text-label-md);
|
|
80
|
+
letter-spacing: var(--ds-text-label-md-tracking);
|
|
81
|
+
text-align: start;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ds-menu__item:hover,
|
|
85
|
+
.ds-menu__item:focus-visible,
|
|
86
|
+
.ds-menu__item[data-state="hover"],
|
|
87
|
+
.ds-menu__item[data-state="focus"] {
|
|
88
|
+
outline: none;
|
|
89
|
+
background: var(--ds-color-bg-hover);
|
|
90
|
+
color: var(--ds-color-fg-default);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ds-menu__item[aria-checked="true"] {
|
|
94
|
+
color: var(--ds-color-fg-default);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ds-menu__item .ds-icon {
|
|
98
|
+
color: var(--ds-color-fg-subtle);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ds-menu__check {
|
|
102
|
+
margin-inline-start: auto;
|
|
103
|
+
opacity: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.ds-menu__item[aria-checked="true"] .ds-menu__check {
|
|
107
|
+
opacity: 1;
|
|
108
|
+
color: var(--ds-color-fg-brand);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ds-menu__swatch {
|
|
112
|
+
flex: none;
|
|
113
|
+
width: 12px;
|
|
114
|
+
height: 12px;
|
|
115
|
+
border-radius: var(--ds-radius-full);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ───────── Extensões: grupos, separadores, atalhos, perigo, desativado ───────── */
|
|
119
|
+
|
|
120
|
+
.ds-menu__text {
|
|
121
|
+
flex: 1;
|
|
122
|
+
min-width: 0;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
text-overflow: ellipsis;
|
|
125
|
+
white-space: nowrap;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ds-menu__group {
|
|
129
|
+
padding: var(--ds-space-150) var(--ds-space-150) var(--ds-space-050);
|
|
130
|
+
color: var(--ds-color-fg-subtle);
|
|
131
|
+
font: var(--ds-text-caption);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ds-menu__label + .ds-menu__group,
|
|
135
|
+
.ds-menu > .ds-menu__group:first-child {
|
|
136
|
+
padding-top: var(--ds-space-050);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.ds-menu__separator {
|
|
140
|
+
height: 1px;
|
|
141
|
+
margin: 6px -6px;
|
|
142
|
+
background: var(--ds-color-border-subtle);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ds-menu__shortcut {
|
|
146
|
+
margin-inline-start: auto;
|
|
147
|
+
padding-inline-start: var(--ds-space-200);
|
|
148
|
+
color: var(--ds-color-fg-subtle);
|
|
149
|
+
font: var(--ds-text-caption);
|
|
150
|
+
font-variant-numeric: tabular-nums;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* No modo ação, os itens já nascem com a cor do texto (não há "selecionado") */
|
|
154
|
+
.ds-menu[data-mode="action"] .ds-menu__item {
|
|
155
|
+
color: var(--ds-color-fg-default);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.ds-menu__item--danger,
|
|
159
|
+
.ds-menu[data-mode="action"] .ds-menu__item--danger,
|
|
160
|
+
.ds-menu__item--danger .ds-icon {
|
|
161
|
+
color: var(--ds-color-danger-fg);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.ds-menu__item--danger:hover,
|
|
165
|
+
.ds-menu__item--danger:focus-visible,
|
|
166
|
+
.ds-menu__item--danger[data-state="hover"],
|
|
167
|
+
.ds-menu__item--danger[data-state="focus"] {
|
|
168
|
+
background: var(--ds-color-danger-subtle);
|
|
169
|
+
color: var(--ds-color-danger-fg);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ds-menu__item[aria-disabled="true"] {
|
|
173
|
+
opacity: var(--ds-opacity-disabled);
|
|
174
|
+
cursor: not-allowed;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ds-menu__item[aria-disabled="true"]:hover,
|
|
178
|
+
.ds-menu__item[aria-disabled="true"][data-state="hover"] {
|
|
179
|
+
background: transparent;
|
|
180
|
+
}
|