@joniguerini/lume 0.0.0-stage → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,207 @@
|
|
|
1
|
+
/* Painel dos seletores de data e de horário — mesma superfície dos menus */
|
|
2
|
+
|
|
3
|
+
.ds-picker {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: var(--ds-z-popover);
|
|
8
|
+
padding: var(--ds-space-150);
|
|
9
|
+
border-radius: var(--ds-radius-lg);
|
|
10
|
+
background: var(--ds-color-bg-raised);
|
|
11
|
+
border: 1px solid var(--ds-color-border-strong);
|
|
12
|
+
box-shadow: var(--ds-shadow-xl);
|
|
13
|
+
color: var(--ds-color-fg-default);
|
|
14
|
+
animation: ds-picker-in var(--ds-duration-fast) var(--ds-easing-standard);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@keyframes ds-picker-in {
|
|
18
|
+
from { opacity: 0; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ds-picker__nav {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: var(--ds-space-150);
|
|
24
|
+
z-index: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ds-picker__nav--prev { left: var(--ds-space-150); }
|
|
28
|
+
.ds-picker__nav--next { right: var(--ds-space-150); }
|
|
29
|
+
|
|
30
|
+
.ds-picker__months {
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: var(--ds-space-300);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ds-picker__title {
|
|
36
|
+
display: grid;
|
|
37
|
+
place-items: center;
|
|
38
|
+
height: var(--ds-size-control-sm);
|
|
39
|
+
margin-bottom: var(--ds-space-100);
|
|
40
|
+
padding-inline: 36px;
|
|
41
|
+
font: var(--ds-text-label-md);
|
|
42
|
+
letter-spacing: var(--ds-text-label-md-tracking);
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ds-picker__grid {
|
|
47
|
+
border-collapse: collapse;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ds-picker__grid th {
|
|
51
|
+
width: 36px;
|
|
52
|
+
height: 28px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
color: var(--ds-color-fg-subtle);
|
|
55
|
+
font: var(--ds-text-caption);
|
|
56
|
+
text-align: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ds-picker__grid td {
|
|
60
|
+
width: 36px;
|
|
61
|
+
height: 36px;
|
|
62
|
+
padding: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ds-picker__day {
|
|
66
|
+
position: relative;
|
|
67
|
+
display: grid;
|
|
68
|
+
place-items: center;
|
|
69
|
+
width: var(--ds-size-control-compact);
|
|
70
|
+
height: var(--ds-size-control-compact);
|
|
71
|
+
border-radius: var(--ds-radius-sm);
|
|
72
|
+
color: var(--ds-color-fg-default);
|
|
73
|
+
font: var(--ds-text-body-sm);
|
|
74
|
+
font-variant-numeric: tabular-nums;
|
|
75
|
+
transition: background-color var(--ds-duration-fast) var(--ds-easing-standard);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ds-picker__day:hover,
|
|
79
|
+
.ds-picker__day[data-state="hover"] {
|
|
80
|
+
background: var(--ds-color-bg-hover);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ds-picker__day:focus-visible,
|
|
84
|
+
.ds-picker__day[data-state="focus"] {
|
|
85
|
+
outline-offset: -2px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* hoje: um ponto, sem competir com a seleção */
|
|
89
|
+
.ds-picker__day[aria-current="date"] {
|
|
90
|
+
font-weight: var(--ds-font-weight-semibold);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ds-picker__day[aria-current="date"]::after {
|
|
94
|
+
content: "";
|
|
95
|
+
position: absolute;
|
|
96
|
+
bottom: 4px;
|
|
97
|
+
width: 4px;
|
|
98
|
+
height: 4px;
|
|
99
|
+
border-radius: var(--ds-radius-full);
|
|
100
|
+
background: currentColor;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ds-picker__day[aria-disabled="true"] {
|
|
104
|
+
background: none;
|
|
105
|
+
color: var(--ds-color-fg-disabled);
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Período: o meio é uma faixa contínua; início e fim são os dias cheios */
|
|
110
|
+
.ds-picker__grid td[data-range] {
|
|
111
|
+
background: var(--ds-color-brand-subtle);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ds-picker__grid td[data-range="start"] {
|
|
115
|
+
border-start-start-radius: var(--ds-radius-sm);
|
|
116
|
+
border-end-start-radius: var(--ds-radius-sm);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ds-picker__grid td[data-range="end"] {
|
|
120
|
+
border-start-end-radius: var(--ds-radius-sm);
|
|
121
|
+
border-end-end-radius: var(--ds-radius-sm);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.ds-picker__grid td[data-range="single"] {
|
|
125
|
+
border-radius: var(--ds-radius-sm);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ds-picker__grid td[data-range="middle"] .ds-picker__day:hover,
|
|
129
|
+
.ds-picker__grid td[data-range="middle"] .ds-picker__day[data-state="hover"] {
|
|
130
|
+
background: var(--ds-color-brand-subtle-hover);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ds-picker__grid td[aria-selected="true"] .ds-picker__day,
|
|
134
|
+
.ds-picker__grid td[data-range="start"] .ds-picker__day,
|
|
135
|
+
.ds-picker__grid td[data-range="end"] .ds-picker__day,
|
|
136
|
+
.ds-picker__grid td[data-range="single"] .ds-picker__day {
|
|
137
|
+
background: var(--ds-color-brand-solid);
|
|
138
|
+
color: var(--ds-color-brand-on-solid);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ds-picker__footer {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: var(--ds-space-100);
|
|
145
|
+
margin-top: var(--ds-space-100);
|
|
146
|
+
padding-top: var(--ds-space-100);
|
|
147
|
+
border-top: 1px solid var(--ds-color-border-subtle);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ds-picker__hint {
|
|
151
|
+
color: var(--ds-color-fg-subtle);
|
|
152
|
+
font: var(--ds-text-body-sm);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.ds-picker__clear {
|
|
156
|
+
margin-inline-start: auto;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Lista de horários */
|
|
160
|
+
.ds-picker--list {
|
|
161
|
+
max-height: 264px;
|
|
162
|
+
padding: 6px;
|
|
163
|
+
overflow-y: auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ds-picker__option {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: space-between;
|
|
170
|
+
gap: var(--ds-space-200);
|
|
171
|
+
height: var(--ds-size-control-compact);
|
|
172
|
+
padding-inline: var(--ds-space-150);
|
|
173
|
+
border-radius: var(--ds-radius-sm);
|
|
174
|
+
font: var(--ds-text-body-sm);
|
|
175
|
+
font-variant-numeric: tabular-nums;
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.ds-picker__option[data-active] {
|
|
181
|
+
background: var(--ds-color-bg-hover);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.ds-picker__check {
|
|
185
|
+
visibility: hidden;
|
|
186
|
+
color: var(--ds-color-fg-brand);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ds-picker__option[aria-selected="true"] {
|
|
190
|
+
font-weight: var(--ds-font-weight-semibold);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ds-picker__option[aria-selected="true"] .ds-picker__check {
|
|
194
|
+
visibility: visible;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media (prefers-reduced-motion: reduce) {
|
|
198
|
+
.ds-picker {
|
|
199
|
+
animation: none;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@media (max-width: 639.98px) {
|
|
204
|
+
.ds-picker__months {
|
|
205
|
+
flex-direction: column;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Avaliação — estrelas para dar nota ou só mostrar a média.
|
|
3
|
+
*
|
|
4
|
+
* Para dar nota (createRating põe as estrelas, que são rádios nativos: o formulário envia o valor):
|
|
5
|
+
* <div class="ds-rating" data-name="nota" aria-label="Sua nota"></div>
|
|
6
|
+
*
|
|
7
|
+
* Só para mostrar (ratingHtml devolve a marcação; aceita meia estrela e qualquer decimal):
|
|
8
|
+
* <span class="ds-rating ds-rating--readonly" role="img" aria-label="Nota 4,5 de 5">…</span>
|
|
9
|
+
*
|
|
10
|
+
* .ds-rating--sm (16 px) · padrão (20 px) · .ds-rating--lg (28 px)
|
|
11
|
+
*/
|
|
12
|
+
.ds-rating {
|
|
13
|
+
--_size: var(--ds-size-icon-md);
|
|
14
|
+
--_on: var(--ds-color-brand-indicator);
|
|
15
|
+
--_off: var(--ds-color-border-default);
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: var(--ds-space-025);
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ds-rating--sm {
|
|
23
|
+
--_size: var(--ds-size-icon-sm);
|
|
24
|
+
gap: 1px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ds-rating--lg {
|
|
28
|
+
--_size: 1.75rem;
|
|
29
|
+
gap: var(--ds-space-050);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ds-rating__star {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: inline-grid;
|
|
35
|
+
flex: none;
|
|
36
|
+
/* área de toque maior que o desenho; o espaço entre as estrelas também clica */
|
|
37
|
+
padding: 2px;
|
|
38
|
+
border-radius: var(--ds-radius-sm);
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
-webkit-tap-highlight-color: transparent;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ds-rating--readonly .ds-rating__star {
|
|
44
|
+
padding: 0;
|
|
45
|
+
cursor: default;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* o rádio fica por baixo da estrela: invisível, mas é ele que recebe o foco e as setas */
|
|
49
|
+
.ds-rating__input {
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: 0;
|
|
52
|
+
margin: 0;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
cursor: inherit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ds-rating__icon {
|
|
58
|
+
position: relative;
|
|
59
|
+
display: block;
|
|
60
|
+
width: var(--_size);
|
|
61
|
+
height: var(--_size);
|
|
62
|
+
color: var(--_off);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ds-rating__icon svg {
|
|
66
|
+
display: block;
|
|
67
|
+
width: var(--_size);
|
|
68
|
+
height: var(--_size);
|
|
69
|
+
max-width: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* o preenchimento é a mesma estrela, cortada na largura: 50% é meia estrela */
|
|
73
|
+
.ds-rating__fill {
|
|
74
|
+
position: absolute;
|
|
75
|
+
inset-block: 0;
|
|
76
|
+
inset-inline-start: 0;
|
|
77
|
+
width: var(--_fill, 0%);
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
color: var(--_on);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ds-rating__star[data-on] .ds-rating__fill {
|
|
83
|
+
--_fill: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* com o mouse em cima, as estrelas até a do mouse acendem (mostra a nota antes de clicar) */
|
|
87
|
+
.ds-rating[data-preview] .ds-rating__star:not([data-preview-on]) .ds-rating__fill {
|
|
88
|
+
--_fill: 0%;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ds-rating[data-preview] .ds-rating__star[data-preview-on] .ds-rating__fill {
|
|
92
|
+
--_fill: 100%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ds-rating__star:hover .ds-rating__icon,
|
|
96
|
+
.ds-rating__star[data-state="hover"] .ds-rating__icon {
|
|
97
|
+
color: var(--ds-color-border-strong);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ds-rating--readonly .ds-rating__star:hover .ds-rating__icon {
|
|
101
|
+
color: var(--_off);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ds-rating__star:has(.ds-rating__input:focus-visible),
|
|
105
|
+
.ds-rating__star[data-state="focus"] {
|
|
106
|
+
outline: var(--ds-focus-ring-width) solid var(--ds-color-border-focus);
|
|
107
|
+
outline-offset: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.ds-rating__star:active .ds-rating__icon,
|
|
111
|
+
.ds-rating__star[data-state="pressed"] .ds-rating__icon {
|
|
112
|
+
scale: 0.9;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.ds-rating[aria-disabled="true"] {
|
|
116
|
+
opacity: var(--ds-opacity-disabled);
|
|
117
|
+
pointer-events: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* número ao lado: “4,5” e, se quiser, “(128)” */
|
|
121
|
+
.ds-rating__text {
|
|
122
|
+
margin-inline-start: var(--ds-space-075);
|
|
123
|
+
color: var(--ds-color-fg-default);
|
|
124
|
+
font: var(--ds-text-label-md);
|
|
125
|
+
letter-spacing: var(--ds-text-label-md-tracking);
|
|
126
|
+
font-variant-numeric: tabular-nums;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ds-rating__count {
|
|
130
|
+
color: var(--ds-color-fg-muted);
|
|
131
|
+
font-weight: var(--ds-font-weight-regular);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ds-rating--sm .ds-rating__text {
|
|
135
|
+
font: var(--ds-text-label-sm);
|
|
136
|
+
letter-spacing: var(--ds-text-label-sm-tracking);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
140
|
+
.ds-rating__icon {
|
|
141
|
+
transition: scale var(--ds-duration-fast) var(--ds-easing-standard), color var(--ds-duration-fast) var(--ds-easing-standard);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Painéis redimensionáveis — dividir uma área em partes que a pessoa ajusta arrastando a divisória.
|
|
3
|
+
*
|
|
4
|
+
* <div class="ds-resizable" aria-label="Editor">
|
|
5
|
+
* <div class="ds-resizable__panel" data-size="30" data-min="20">…</div>
|
|
6
|
+
* <div class="ds-resizable__panel">…</div>
|
|
7
|
+
* </div>
|
|
8
|
+
*
|
|
9
|
+
* createResizable (ds/js/resizable.js) põe as divisórias entre os painéis, o arrastar, o teclado e o tamanho salvo.
|
|
10
|
+
* data-direction="vertical" no .ds-resizable: um embaixo do outro (padrão: lado a lado)
|
|
11
|
+
* data-size, data-min, data-max: em % (30) ou em px (240px); data-collapsible: pode fechar até zero
|
|
12
|
+
* .ds-resizable--grip: a divisória ganha uma alça à vista, para quando arrastar não é óbvio
|
|
13
|
+
* Um painel pode ter outro .ds-resizable dentro (por exemplo, lista à esquerda e, à direita, prévia sobre código).
|
|
14
|
+
*/
|
|
15
|
+
.ds-resizable {
|
|
16
|
+
--_handle: 9px; /* área de pegar: a linha tem 1 px, o resto é folga para o mouse e o dedo */
|
|
17
|
+
display: flex;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
min-height: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ds-resizable[data-direction="vertical"] {
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ds-resizable__panel {
|
|
27
|
+
flex: 1 1 0px;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
min-height: 0;
|
|
30
|
+
overflow: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* painéis dentro de painel: o de dentro ocupa o painel inteiro */
|
|
34
|
+
.ds-resizable__panel > .ds-resizable {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* fechado: some sem deixar o conteúdo espremido à vista */
|
|
40
|
+
.ds-resizable__panel[data-collapsed] {
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
visibility: hidden;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* ───────── Divisória ───────── */
|
|
46
|
+
|
|
47
|
+
.ds-resizable__handle {
|
|
48
|
+
position: relative;
|
|
49
|
+
flex: 0 0 var(--_handle);
|
|
50
|
+
display: grid;
|
|
51
|
+
place-items: center;
|
|
52
|
+
cursor: col-resize;
|
|
53
|
+
touch-action: none;
|
|
54
|
+
user-select: none;
|
|
55
|
+
-webkit-user-select: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ds-resizable[data-direction="vertical"] > .ds-resizable__handle {
|
|
59
|
+
cursor: row-resize;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* a linha: 1 px no meio da área de pegar */
|
|
63
|
+
.ds-resizable__handle::before {
|
|
64
|
+
content: '';
|
|
65
|
+
position: absolute;
|
|
66
|
+
inset-block: 0;
|
|
67
|
+
inset-inline-start: calc(50% - 0.5px);
|
|
68
|
+
width: 1px;
|
|
69
|
+
background: var(--ds-color-border-default);
|
|
70
|
+
transition:
|
|
71
|
+
background-color var(--ds-duration-fast) var(--ds-easing-standard),
|
|
72
|
+
width var(--ds-duration-fast) var(--ds-easing-standard),
|
|
73
|
+
inset-inline-start var(--ds-duration-fast) var(--ds-easing-standard);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ds-resizable[data-direction="vertical"] > .ds-resizable__handle::before {
|
|
77
|
+
inset-inline: 0;
|
|
78
|
+
inset-block: calc(50% - 0.5px) auto;
|
|
79
|
+
width: auto;
|
|
80
|
+
height: 1px;
|
|
81
|
+
transition:
|
|
82
|
+
background-color var(--ds-duration-fast) var(--ds-easing-standard),
|
|
83
|
+
height var(--ds-duration-fast) var(--ds-easing-standard),
|
|
84
|
+
inset-block-start var(--ds-duration-fast) var(--ds-easing-standard);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* com o mouse, a linha engrossa um pouco; arrastando, fica na cor do indicador */
|
|
88
|
+
.ds-resizable__handle:hover::before,
|
|
89
|
+
.ds-resizable__handle[data-state="hover"]::before {
|
|
90
|
+
inset-inline-start: calc(50% - 1px);
|
|
91
|
+
width: 2px;
|
|
92
|
+
background: var(--ds-color-border-strong);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ds-resizable__handle[data-dragging]::before,
|
|
96
|
+
.ds-resizable__handle[data-state="pressed"]::before {
|
|
97
|
+
inset-inline-start: calc(50% - 1px);
|
|
98
|
+
width: 2px;
|
|
99
|
+
background: var(--ds-color-brand-indicator);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ds-resizable[data-direction="vertical"] > .ds-resizable__handle:hover::before,
|
|
103
|
+
.ds-resizable[data-direction="vertical"] > .ds-resizable__handle[data-state="hover"]::before,
|
|
104
|
+
.ds-resizable[data-direction="vertical"] > .ds-resizable__handle[data-dragging]::before,
|
|
105
|
+
.ds-resizable[data-direction="vertical"] > .ds-resizable__handle[data-state="pressed"]::before {
|
|
106
|
+
inset-inline-start: 0;
|
|
107
|
+
inset-block-start: calc(50% - 1px);
|
|
108
|
+
width: auto;
|
|
109
|
+
height: 2px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* foco do teclado: o anel global, por dentro da área de pegar (por fora ele cairia sobre o conteúdo) */
|
|
113
|
+
.ds-resizable__handle:focus-visible,
|
|
114
|
+
.ds-resizable__handle[data-state="focus"] {
|
|
115
|
+
border-radius: var(--ds-radius-sm);
|
|
116
|
+
outline-offset: calc(var(--ds-focus-ring-width) * -1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ds-resizable__handle:focus-visible::before,
|
|
120
|
+
.ds-resizable__handle[data-state="focus"]::before {
|
|
121
|
+
background: var(--ds-color-border-strong);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* ───────── Alça à vista (.ds-resizable--grip) ───────── */
|
|
125
|
+
|
|
126
|
+
.ds-resizable__grip {
|
|
127
|
+
position: relative;
|
|
128
|
+
display: none;
|
|
129
|
+
width: 6px;
|
|
130
|
+
height: 24px;
|
|
131
|
+
border-radius: var(--ds-radius-full);
|
|
132
|
+
background: var(--ds-color-bg-raised);
|
|
133
|
+
box-shadow: 0 0 0 1px var(--ds-color-border-default);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ds-resizable--grip > .ds-resizable__handle > .ds-resizable__grip {
|
|
137
|
+
display: block;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ds-resizable[data-direction="vertical"] > .ds-resizable__handle > .ds-resizable__grip {
|
|
141
|
+
width: 24px;
|
|
142
|
+
height: 6px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ds-resizable__handle:hover > .ds-resizable__grip,
|
|
146
|
+
.ds-resizable__handle[data-state="hover"] > .ds-resizable__grip {
|
|
147
|
+
box-shadow: 0 0 0 1px var(--ds-color-border-strong);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ds-resizable__handle[data-dragging] > .ds-resizable__grip,
|
|
151
|
+
.ds-resizable__handle[data-state="pressed"] > .ds-resizable__grip {
|
|
152
|
+
box-shadow: 0 0 0 1px var(--ds-color-brand-indicator);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* enquanto arrasta, o cursor vale para a página toda e o texto não fica selecionado */
|
|
156
|
+
:root[data-ds-resizing] {
|
|
157
|
+
user-select: none;
|
|
158
|
+
-webkit-user-select: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:root[data-ds-resizing="horizontal"] * {
|
|
162
|
+
cursor: col-resize !important;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:root[data-ds-resizing="vertical"] * {
|
|
166
|
+
cursor: row-resize !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@media (prefers-reduced-motion: reduce) {
|
|
170
|
+
.ds-resizable__handle::before {
|
|
171
|
+
transition: none;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* Barra de rolagem sobreposta — comportamento em ds/js/scrollbar.js
|
|
2
|
+
*
|
|
3
|
+
* Com [data-ds-scrollbars] em <html>, a barra nativa some em todo o app e, por cima de qualquer
|
|
4
|
+
* área que rola, aparece só a barra: sem trilho, sem setas. Ela surge enquanto a pessoa rola e
|
|
5
|
+
* some um instante depois de parar. Sem o JS, fica a barra nativa fina de base.css.
|
|
6
|
+
*
|
|
7
|
+
* Ajuste por área (variáveis CSS na própria área que rola):
|
|
8
|
+
* --ds-scrollbar-start / --ds-scrollbar-end recuo nas pontas do trilho (ex.: a altura de uma topbar fixa)
|
|
9
|
+
* --ds-scrollbar: none não mostra a barra ali (listas horizontais de abas, por exemplo)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* não herdam: o recuo do painel principal não passa para as áreas que rolam dentro dele */
|
|
13
|
+
@property --ds-scrollbar-start {
|
|
14
|
+
syntax: '<length>';
|
|
15
|
+
inherits: false;
|
|
16
|
+
initial-value: 0px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@property --ds-scrollbar-end {
|
|
20
|
+
syntax: '<length>';
|
|
21
|
+
inherits: false;
|
|
22
|
+
initial-value: 0px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@property --ds-scrollbar {
|
|
26
|
+
syntax: '*';
|
|
27
|
+
inherits: false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[data-ds-scrollbars],
|
|
31
|
+
[data-ds-scrollbars] * {
|
|
32
|
+
scrollbar-width: none !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[data-ds-scrollbars]::-webkit-scrollbar,
|
|
36
|
+
[data-ds-scrollbars] ::-webkit-scrollbar {
|
|
37
|
+
display: none !important;
|
|
38
|
+
width: 0;
|
|
39
|
+
height: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* A área de pegar (12 px) é transparente; a barra visível é o ::before, mais fina. */
|
|
43
|
+
.ds-scrollbar {
|
|
44
|
+
position: fixed;
|
|
45
|
+
top: 0;
|
|
46
|
+
left: 0;
|
|
47
|
+
z-index: var(--ds-z-popover);
|
|
48
|
+
width: 12px;
|
|
49
|
+
height: 12px;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
touch-action: none;
|
|
53
|
+
user-select: none;
|
|
54
|
+
transition: opacity var(--ds-duration-slow) var(--ds-easing-standard);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ds-scrollbar::before {
|
|
58
|
+
content: '';
|
|
59
|
+
position: absolute;
|
|
60
|
+
border-radius: var(--ds-radius-full);
|
|
61
|
+
background: var(--ds-color-border-field);
|
|
62
|
+
transition:
|
|
63
|
+
background-color var(--ds-duration-fast) var(--ds-easing-standard),
|
|
64
|
+
width var(--ds-duration-fast) var(--ds-easing-standard),
|
|
65
|
+
height var(--ds-duration-fast) var(--ds-easing-standard);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ds-scrollbar--y::before {
|
|
69
|
+
top: 0;
|
|
70
|
+
right: 3px;
|
|
71
|
+
bottom: 0;
|
|
72
|
+
width: 6px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ds-scrollbar--x::before {
|
|
76
|
+
right: 0;
|
|
77
|
+
bottom: 3px;
|
|
78
|
+
left: 0;
|
|
79
|
+
height: 6px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ds-scrollbar[data-visible] {
|
|
83
|
+
opacity: 1;
|
|
84
|
+
pointer-events: auto;
|
|
85
|
+
transition-duration: var(--ds-duration-fast);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ds-scrollbar:hover::before,
|
|
89
|
+
.ds-scrollbar[data-state="hover"]::before,
|
|
90
|
+
.ds-scrollbar[data-active]::before {
|
|
91
|
+
background: var(--ds-color-fg-subtle);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ds-scrollbar--y:hover::before,
|
|
95
|
+
.ds-scrollbar--y[data-state="hover"]::before,
|
|
96
|
+
.ds-scrollbar--y[data-active]::before {
|
|
97
|
+
width: 8px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ds-scrollbar--x:hover::before,
|
|
101
|
+
.ds-scrollbar--x[data-state="hover"]::before,
|
|
102
|
+
.ds-scrollbar--x[data-active]::before {
|
|
103
|
+
height: 8px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@media print {
|
|
107
|
+
.ds-scrollbar {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
}
|