@muxima-ui/core 1.0.0 → 1.2.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/README.md +12 -4
- package/fesm2022/muxima-ui-core-carousel.mjs +377 -0
- package/fesm2022/muxima-ui-core-carousel.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-chips.mjs +349 -0
- package/fesm2022/muxima-ui-core-chips.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-clipboard.mjs +110 -0
- package/fesm2022/muxima-ui-core-clipboard.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-color-picker.mjs +755 -0
- package/fesm2022/muxima-ui-core-color-picker.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-date-picker.mjs +494 -12
- package/fesm2022/muxima-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/muxima-ui-core-file-upload.mjs +392 -0
- package/fesm2022/muxima-ui-core-file-upload.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-notification-center.mjs +487 -0
- package/fesm2022/muxima-ui-core-notification-center.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-rating.mjs +212 -0
- package/fesm2022/muxima-ui-core-rating.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-sidebar.mjs +333 -0
- package/fesm2022/muxima-ui-core-sidebar.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-slider.mjs +211 -3
- package/fesm2022/muxima-ui-core-slider.mjs.map +1 -1
- package/fesm2022/muxima-ui-core-time-picker.mjs +389 -0
- package/fesm2022/muxima-ui-core-time-picker.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-timeline.mjs +117 -0
- package/fesm2022/muxima-ui-core-timeline.mjs.map +1 -0
- package/fesm2022/muxima-ui-core.mjs +1 -1
- package/fesm2022/muxima-ui-core.mjs.map +1 -1
- package/package.json +41 -1
- package/styles/base.css +21 -1
- package/styles/components/carousel.css +113 -0
- package/styles/components/chips.css +170 -0
- package/styles/components/clipboard.css +52 -0
- package/styles/components/color-picker.css +207 -0
- package/styles/components/date-picker.css +135 -0
- package/styles/components/file-upload.css +164 -0
- package/styles/components/notification-center.css +220 -0
- package/styles/components/rating.css +89 -0
- package/styles/components/sidebar.css +211 -0
- package/styles/components/slider.css +111 -0
- package/styles/components/time-picker.css +39 -0
- package/styles/components/timeline.css +180 -0
- package/styles/muxima.css +10 -0
- package/types/muxima-ui-core-carousel.d.ts +72 -0
- package/types/muxima-ui-core-chips.d.ts +120 -0
- package/types/muxima-ui-core-clipboard.d.ts +42 -0
- package/types/muxima-ui-core-color-picker.d.ts +153 -0
- package/types/muxima-ui-core-date-picker.d.ts +130 -2
- package/types/muxima-ui-core-file-upload.d.ts +96 -0
- package/types/muxima-ui-core-notification-center.d.ts +91 -0
- package/types/muxima-ui-core-rating.d.ts +64 -0
- package/types/muxima-ui-core-sidebar.d.ts +115 -0
- package/types/muxima-ui-core-slider.d.ts +68 -6
- package/types/muxima-ui-core-time-picker.d.ts +83 -0
- package/types/muxima-ui-core-timeline.d.ts +59 -0
- package/types/muxima-ui-core.d.ts +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/* ---------- Sidebar ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-sidebar {
|
|
4
|
+
--mx-sidebar-width: 248px;
|
|
5
|
+
--mx-sidebar-collapsed-width: 60px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 16px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
width: var(--mx-sidebar-width);
|
|
11
|
+
height: 100%;
|
|
12
|
+
padding: 16px 10px;
|
|
13
|
+
border-right: var(--mx-border);
|
|
14
|
+
background: var(--mx-surface);
|
|
15
|
+
color: var(--mx-ink);
|
|
16
|
+
font-family: var(--mx-font-sans);
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
transition: width var(--mx-duration) var(--mx-ease);
|
|
19
|
+
}
|
|
20
|
+
.mx-sidebar[data-variant='subtle'] {
|
|
21
|
+
background: var(--mx-paper);
|
|
22
|
+
}
|
|
23
|
+
.mx-sidebar[data-collapsed] {
|
|
24
|
+
width: var(--mx-sidebar-collapsed-width);
|
|
25
|
+
}
|
|
26
|
+
.mx-sidebar-header,
|
|
27
|
+
.mx-sidebar-footer {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 10px;
|
|
31
|
+
min-height: 32px;
|
|
32
|
+
padding: 0 6px;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
}
|
|
35
|
+
.mx-sidebar-footer {
|
|
36
|
+
margin-top: auto;
|
|
37
|
+
}
|
|
38
|
+
.mx-sidebar-nav {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex: 1;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: 16px;
|
|
43
|
+
min-height: 0;
|
|
44
|
+
overflow-x: hidden;
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
}
|
|
47
|
+
.mx-sidebar-group {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 4px;
|
|
51
|
+
}
|
|
52
|
+
.mx-sidebar-group-label {
|
|
53
|
+
margin: 0;
|
|
54
|
+
padding: 0 10px;
|
|
55
|
+
color: var(--mx-muted);
|
|
56
|
+
font-size: var(--mx-text-xs);
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
letter-spacing: 0.04em;
|
|
59
|
+
text-transform: uppercase;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
}
|
|
62
|
+
.mx-sidebar-list {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: 2px;
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
list-style: none;
|
|
69
|
+
}
|
|
70
|
+
.mx-sidebar-sublist {
|
|
71
|
+
padding-left: 22px;
|
|
72
|
+
}
|
|
73
|
+
.mx-sidebar-sublist[hidden] {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
.mx-sidebar-item {
|
|
77
|
+
position: relative;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
gap: 10px;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
width: 100%;
|
|
83
|
+
min-height: 36px;
|
|
84
|
+
padding: 0 10px;
|
|
85
|
+
border: 0;
|
|
86
|
+
border-radius: var(--mx-radius);
|
|
87
|
+
background: transparent;
|
|
88
|
+
color: var(--mx-muted);
|
|
89
|
+
font: inherit;
|
|
90
|
+
font-size: var(--mx-text-md);
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
text-align: start;
|
|
93
|
+
text-decoration: none;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition: background var(--mx-duration) var(--mx-ease), color var(--mx-duration) var(--mx-ease);
|
|
97
|
+
}
|
|
98
|
+
.mx-sidebar-item:is(:hover, [data-mx-state='hover']) {
|
|
99
|
+
background: var(--mx-subtle);
|
|
100
|
+
color: var(--mx-ink);
|
|
101
|
+
}
|
|
102
|
+
.mx-sidebar-item:is([aria-current='page'], [data-active]) {
|
|
103
|
+
background: var(--mx-accent-soft);
|
|
104
|
+
color: var(--mx-accent);
|
|
105
|
+
}
|
|
106
|
+
.mx-sidebar-item:is([aria-current='page'], [data-active])::before {
|
|
107
|
+
content: '';
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 8px;
|
|
110
|
+
bottom: 8px;
|
|
111
|
+
left: -10px;
|
|
112
|
+
width: 3px;
|
|
113
|
+
border-radius: 0 3px 3px 0;
|
|
114
|
+
background: var(--mx-accent);
|
|
115
|
+
}
|
|
116
|
+
.mx-sidebar-icon {
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
width: 18px;
|
|
119
|
+
height: 18px;
|
|
120
|
+
}
|
|
121
|
+
.mx-sidebar-label {
|
|
122
|
+
flex: 1;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
text-overflow: ellipsis;
|
|
125
|
+
}
|
|
126
|
+
.mx-sidebar-badge {
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
min-width: 20px;
|
|
131
|
+
height: 20px;
|
|
132
|
+
padding: 0 6px;
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
border-radius: 999px;
|
|
135
|
+
background: var(--mx-subtle);
|
|
136
|
+
color: var(--mx-ink);
|
|
137
|
+
font-size: var(--mx-text-xs);
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
font-variant-numeric: tabular-nums;
|
|
140
|
+
}
|
|
141
|
+
.mx-sidebar-item[aria-current='page'] .mx-sidebar-badge {
|
|
142
|
+
background: var(--mx-accent);
|
|
143
|
+
color: var(--mx-on-accent);
|
|
144
|
+
}
|
|
145
|
+
.mx-sidebar-chevron {
|
|
146
|
+
flex-shrink: 0;
|
|
147
|
+
width: 14px;
|
|
148
|
+
height: 14px;
|
|
149
|
+
transition: transform var(--mx-duration) var(--mx-ease);
|
|
150
|
+
}
|
|
151
|
+
.mx-sidebar-section-trigger[aria-expanded='true'] .mx-sidebar-chevron {
|
|
152
|
+
transform: rotate(90deg);
|
|
153
|
+
}
|
|
154
|
+
.mx-sidebar-toggle:not(.mx-button) {
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
justify-content: center;
|
|
158
|
+
width: 32px;
|
|
159
|
+
height: 32px;
|
|
160
|
+
padding: 0;
|
|
161
|
+
border: 0;
|
|
162
|
+
border-radius: var(--mx-radius);
|
|
163
|
+
background: transparent;
|
|
164
|
+
color: var(--mx-muted);
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
}
|
|
167
|
+
.mx-sidebar-toggle:not(.mx-button):hover {
|
|
168
|
+
background: var(--mx-subtle);
|
|
169
|
+
color: var(--mx-ink);
|
|
170
|
+
}
|
|
171
|
+
.mx-sidebar-toggle svg {
|
|
172
|
+
width: 18px;
|
|
173
|
+
height: 18px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* recolhida: os nomes ficam para o leitor de ecrã */
|
|
177
|
+
.mx-sidebar[data-collapsed] :is(.mx-sidebar-label, .mx-sidebar-group-label, .mx-sidebar-chevron) {
|
|
178
|
+
position: absolute;
|
|
179
|
+
width: 1px;
|
|
180
|
+
height: 1px;
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
clip-path: inset(50%);
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
}
|
|
185
|
+
.mx-sidebar[data-collapsed] .mx-sidebar-item {
|
|
186
|
+
justify-content: center;
|
|
187
|
+
padding: 0;
|
|
188
|
+
}
|
|
189
|
+
.mx-sidebar[data-collapsed] .mx-sidebar-badge {
|
|
190
|
+
position: absolute;
|
|
191
|
+
top: 5px;
|
|
192
|
+
right: 7px;
|
|
193
|
+
min-width: 8px;
|
|
194
|
+
width: 8px;
|
|
195
|
+
height: 8px;
|
|
196
|
+
padding: 0;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
background: var(--mx-danger);
|
|
199
|
+
color: transparent;
|
|
200
|
+
}
|
|
201
|
+
.mx-sidebar[data-collapsed] .mx-sidebar-header,
|
|
202
|
+
.mx-sidebar[data-collapsed] .mx-sidebar-footer {
|
|
203
|
+
justify-content: center;
|
|
204
|
+
}
|
|
205
|
+
.mx-sidebar-tip {
|
|
206
|
+
position: fixed;
|
|
207
|
+
z-index: 1000;
|
|
208
|
+
transform: translateY(-50%);
|
|
209
|
+
pointer-events: none;
|
|
210
|
+
white-space: nowrap;
|
|
211
|
+
}
|
|
@@ -78,3 +78,114 @@
|
|
|
78
78
|
--_fill-color: var(--mx-stone-strong);
|
|
79
79
|
cursor: not-allowed;
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
/* ---------- Range slider (dois cursores) ---------- */
|
|
83
|
+
|
|
84
|
+
.mx-range-slider {
|
|
85
|
+
--_track: 6px;
|
|
86
|
+
--_thumb: 16px;
|
|
87
|
+
--_fill-color: var(--mx-accent);
|
|
88
|
+
position: relative;
|
|
89
|
+
display: block;
|
|
90
|
+
width: 100%;
|
|
91
|
+
min-height: 20px;
|
|
92
|
+
font-family: var(--mx-font-sans);
|
|
93
|
+
}
|
|
94
|
+
.mx-range-slider[data-size='sm'] {
|
|
95
|
+
--_track: 4px;
|
|
96
|
+
--_thumb: 14px;
|
|
97
|
+
}
|
|
98
|
+
.mx-range-slider[data-size='lg'] {
|
|
99
|
+
--_track: 8px;
|
|
100
|
+
--_thumb: 20px;
|
|
101
|
+
}
|
|
102
|
+
.mx-range-slider[data-invalid] {
|
|
103
|
+
--_fill-color: var(--mx-danger);
|
|
104
|
+
}
|
|
105
|
+
.mx-range-slider[data-disabled] {
|
|
106
|
+
--_fill-color: var(--mx-stone-strong);
|
|
107
|
+
}
|
|
108
|
+
.mx-range-slider-track {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: calc(10px - var(--_track) / 2);
|
|
111
|
+
left: calc(var(--_thumb) / 2);
|
|
112
|
+
right: calc(var(--_thumb) / 2);
|
|
113
|
+
height: var(--_track);
|
|
114
|
+
border-radius: 999px;
|
|
115
|
+
background: var(--mx-stone);
|
|
116
|
+
}
|
|
117
|
+
.mx-range-slider-fill {
|
|
118
|
+
position: absolute;
|
|
119
|
+
top: 0;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
left: var(--mx-range-from, 0%);
|
|
122
|
+
right: calc(100% - var(--mx-range-to, 100%));
|
|
123
|
+
border-radius: inherit;
|
|
124
|
+
background: var(--_fill-color);
|
|
125
|
+
}
|
|
126
|
+
.mx-range-slider-input {
|
|
127
|
+
appearance: none;
|
|
128
|
+
-webkit-appearance: none;
|
|
129
|
+
position: absolute;
|
|
130
|
+
top: 0;
|
|
131
|
+
left: 0;
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 20px;
|
|
134
|
+
margin: 0;
|
|
135
|
+
background: transparent;
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
}
|
|
138
|
+
.mx-range-slider-input::-webkit-slider-runnable-track {
|
|
139
|
+
height: var(--_track);
|
|
140
|
+
background: transparent;
|
|
141
|
+
}
|
|
142
|
+
.mx-range-slider-input::-moz-range-track {
|
|
143
|
+
background: transparent;
|
|
144
|
+
}
|
|
145
|
+
.mx-range-slider-input::-webkit-slider-thumb {
|
|
146
|
+
-webkit-appearance: none;
|
|
147
|
+
width: var(--_thumb);
|
|
148
|
+
height: var(--_thumb);
|
|
149
|
+
margin-top: calc((var(--_track) - var(--_thumb)) / 2);
|
|
150
|
+
border: 2px solid var(--_fill-color);
|
|
151
|
+
border-radius: 50%;
|
|
152
|
+
background: var(--mx-surface);
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
pointer-events: auto;
|
|
155
|
+
transition: transform var(--mx-duration) var(--mx-ease);
|
|
156
|
+
}
|
|
157
|
+
.mx-range-slider-input::-moz-range-thumb {
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
width: var(--_thumb);
|
|
160
|
+
height: var(--_thumb);
|
|
161
|
+
border: 2px solid var(--_fill-color);
|
|
162
|
+
border-radius: 50%;
|
|
163
|
+
background: var(--mx-surface);
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
pointer-events: auto;
|
|
166
|
+
}
|
|
167
|
+
.mx-range-slider-input:hover:not(:disabled)::-webkit-slider-thumb {
|
|
168
|
+
transform: scale(1.1);
|
|
169
|
+
}
|
|
170
|
+
.mx-range-slider-input:focus-visible {
|
|
171
|
+
outline: none;
|
|
172
|
+
}
|
|
173
|
+
.mx-range-slider-input:focus-visible::-webkit-slider-thumb {
|
|
174
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
175
|
+
outline-offset: var(--mx-focus-offset);
|
|
176
|
+
}
|
|
177
|
+
.mx-range-slider-input:focus-visible::-moz-range-thumb {
|
|
178
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
179
|
+
outline-offset: var(--mx-focus-offset);
|
|
180
|
+
}
|
|
181
|
+
.mx-range-slider-input:disabled::-webkit-slider-thumb {
|
|
182
|
+
cursor: not-allowed;
|
|
183
|
+
}
|
|
184
|
+
.mx-range-slider-values {
|
|
185
|
+
display: flex;
|
|
186
|
+
justify-content: space-between;
|
|
187
|
+
padding-top: 26px;
|
|
188
|
+
color: var(--mx-muted);
|
|
189
|
+
font-size: var(--mx-text-sm);
|
|
190
|
+
font-variant-numeric: tabular-nums;
|
|
191
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* ---------- Time picker ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-time-picker {
|
|
4
|
+
display: block;
|
|
5
|
+
width: 100%;
|
|
6
|
+
font-family: var(--mx-font-sans);
|
|
7
|
+
}
|
|
8
|
+
.mx-time-picker-field {
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
.mx-time-picker-input.mx-input {
|
|
12
|
+
padding-right: 36px;
|
|
13
|
+
font-variant-numeric: tabular-nums;
|
|
14
|
+
}
|
|
15
|
+
.mx-time-picker-icon {
|
|
16
|
+
position: absolute;
|
|
17
|
+
right: 11px;
|
|
18
|
+
top: 50%;
|
|
19
|
+
width: 16px;
|
|
20
|
+
height: 16px;
|
|
21
|
+
color: var(--mx-muted);
|
|
22
|
+
transform: translateY(-50%);
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
.mx-time-picker-panel {
|
|
26
|
+
max-height: 240px;
|
|
27
|
+
font-variant-numeric: tabular-nums;
|
|
28
|
+
}
|
|
29
|
+
ul.mx-time-picker-panel {
|
|
30
|
+
list-style: none;
|
|
31
|
+
}
|
|
32
|
+
.mx-time-picker[data-mx-state='hover'] .mx-input:not(:disabled) {
|
|
33
|
+
border-color: var(--mx-muted);
|
|
34
|
+
}
|
|
35
|
+
.mx-time-picker[data-mx-state='focus'] .mx-input {
|
|
36
|
+
border-color: var(--mx-accent);
|
|
37
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
38
|
+
outline-offset: var(--mx-focus-offset);
|
|
39
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/* ---------- Timeline ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-timeline {
|
|
4
|
+
--_dot: 12px;
|
|
5
|
+
--_gap: 20px;
|
|
6
|
+
--_line: var(--mx-stone);
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
color: var(--mx-ink);
|
|
12
|
+
font-family: var(--mx-font-sans);
|
|
13
|
+
list-style: none;
|
|
14
|
+
}
|
|
15
|
+
.mx-timeline[data-size='sm'] {
|
|
16
|
+
--_dot: 10px;
|
|
17
|
+
--_gap: 14px;
|
|
18
|
+
}
|
|
19
|
+
.mx-timeline-item {
|
|
20
|
+
--_tone: var(--mx-stone-strong);
|
|
21
|
+
--_marker: var(--_dot);
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 2px;
|
|
26
|
+
min-height: 24px;
|
|
27
|
+
padding: 0 0 var(--_gap) calc(var(--_marker) + 16px);
|
|
28
|
+
}
|
|
29
|
+
.mx-timeline-item[data-has-icon] {
|
|
30
|
+
--_marker: 28px;
|
|
31
|
+
}
|
|
32
|
+
.mx-timeline-item:last-child {
|
|
33
|
+
padding-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
/* marcador */
|
|
36
|
+
.mx-timeline-item::before {
|
|
37
|
+
content: '';
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 4px;
|
|
40
|
+
left: 0;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
width: var(--_marker);
|
|
43
|
+
height: var(--_marker);
|
|
44
|
+
border: 2px solid var(--_tone);
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
background: var(--mx-surface);
|
|
47
|
+
}
|
|
48
|
+
.mx-timeline-item[data-has-icon]::before {
|
|
49
|
+
top: 0;
|
|
50
|
+
border-width: 1px;
|
|
51
|
+
background: color-mix(in oklab, var(--_tone) 12%, var(--mx-surface));
|
|
52
|
+
}
|
|
53
|
+
.mx-timeline-item:not([data-has-icon]):not([data-pending])::before {
|
|
54
|
+
background: var(--_tone);
|
|
55
|
+
}
|
|
56
|
+
/* linha até ao item seguinte */
|
|
57
|
+
.mx-timeline-item:not(:last-child)::after {
|
|
58
|
+
content: '';
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: calc(var(--_marker) + 8px);
|
|
61
|
+
bottom: 4px;
|
|
62
|
+
left: calc(var(--_marker) / 2 - 1px);
|
|
63
|
+
width: 2px;
|
|
64
|
+
border-radius: 1px;
|
|
65
|
+
background: var(--_line);
|
|
66
|
+
}
|
|
67
|
+
.mx-timeline-item[data-has-icon]:not(:last-child)::after {
|
|
68
|
+
top: calc(var(--_marker) + 4px);
|
|
69
|
+
}
|
|
70
|
+
.mx-timeline-item[data-variant='accent'] {
|
|
71
|
+
--_tone: var(--mx-accent);
|
|
72
|
+
}
|
|
73
|
+
.mx-timeline-item[data-variant='success'] {
|
|
74
|
+
--_tone: var(--mx-success);
|
|
75
|
+
}
|
|
76
|
+
.mx-timeline-item[data-variant='warning'] {
|
|
77
|
+
--_tone: var(--mx-warning);
|
|
78
|
+
}
|
|
79
|
+
.mx-timeline-item[data-variant='danger'] {
|
|
80
|
+
--_tone: var(--mx-danger);
|
|
81
|
+
}
|
|
82
|
+
.mx-timeline-item[data-pending]::before {
|
|
83
|
+
border-style: dashed;
|
|
84
|
+
border-color: var(--mx-stone-strong);
|
|
85
|
+
}
|
|
86
|
+
.mx-timeline-item[data-pending] .mx-timeline-title {
|
|
87
|
+
color: var(--mx-muted);
|
|
88
|
+
}
|
|
89
|
+
.mx-timeline-icon {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 6px;
|
|
92
|
+
left: 6px;
|
|
93
|
+
width: 16px;
|
|
94
|
+
height: 16px;
|
|
95
|
+
color: var(--_tone);
|
|
96
|
+
}
|
|
97
|
+
.mx-timeline-time {
|
|
98
|
+
order: -1;
|
|
99
|
+
color: var(--mx-muted);
|
|
100
|
+
font-size: var(--mx-text-xs);
|
|
101
|
+
font-variant-numeric: tabular-nums;
|
|
102
|
+
}
|
|
103
|
+
.mx-timeline-title {
|
|
104
|
+
margin: 0;
|
|
105
|
+
font-size: var(--mx-text-md);
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
line-height: 1.35;
|
|
108
|
+
}
|
|
109
|
+
.mx-timeline[data-size='sm'] .mx-timeline-title {
|
|
110
|
+
font-size: var(--mx-text-sm);
|
|
111
|
+
}
|
|
112
|
+
.mx-timeline-description {
|
|
113
|
+
margin: 0;
|
|
114
|
+
color: var(--mx-muted);
|
|
115
|
+
font-size: var(--mx-text-sm);
|
|
116
|
+
line-height: 1.45;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* horizontal */
|
|
120
|
+
.mx-timeline[data-orientation='horizontal'] {
|
|
121
|
+
flex-direction: row;
|
|
122
|
+
overflow-x: auto;
|
|
123
|
+
border-radius: var(--mx-radius);
|
|
124
|
+
}
|
|
125
|
+
.mx-timeline[data-orientation='horizontal']:focus-visible {
|
|
126
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
127
|
+
outline-offset: var(--mx-focus-offset);
|
|
128
|
+
}
|
|
129
|
+
.mx-timeline[data-orientation='horizontal'] .mx-timeline-item {
|
|
130
|
+
flex: 1 0 140px;
|
|
131
|
+
padding: calc(var(--_marker) + 14px) var(--_gap) 4px 0;
|
|
132
|
+
}
|
|
133
|
+
.mx-timeline[data-orientation='horizontal'] .mx-timeline-item::before {
|
|
134
|
+
top: 0;
|
|
135
|
+
}
|
|
136
|
+
.mx-timeline[data-orientation='horizontal'] .mx-timeline-item:not(:last-child)::after {
|
|
137
|
+
top: calc(var(--_marker) / 2 - 1px);
|
|
138
|
+
bottom: auto;
|
|
139
|
+
left: calc(var(--_marker) + 6px);
|
|
140
|
+
right: 6px;
|
|
141
|
+
width: auto;
|
|
142
|
+
height: 2px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* alternado (ecrãs largos) */
|
|
146
|
+
@media (min-width: 720px) {
|
|
147
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item {
|
|
148
|
+
width: 50%;
|
|
149
|
+
box-sizing: border-box;
|
|
150
|
+
margin-left: 50%;
|
|
151
|
+
padding-left: calc(var(--_marker) / 2 + 16px);
|
|
152
|
+
}
|
|
153
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item::before {
|
|
154
|
+
left: calc(var(--_marker) / -2);
|
|
155
|
+
}
|
|
156
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item::after {
|
|
157
|
+
left: -1px;
|
|
158
|
+
}
|
|
159
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item .mx-timeline-icon {
|
|
160
|
+
left: calc(var(--_marker) / -2 + 6px);
|
|
161
|
+
}
|
|
162
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item:nth-child(even) {
|
|
163
|
+
margin-left: 0;
|
|
164
|
+
padding-left: 0;
|
|
165
|
+
padding-right: calc(var(--_marker) / 2 + 16px);
|
|
166
|
+
text-align: end;
|
|
167
|
+
}
|
|
168
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item:nth-child(even)::before {
|
|
169
|
+
left: auto;
|
|
170
|
+
right: calc(var(--_marker) / -2);
|
|
171
|
+
}
|
|
172
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item:nth-child(even)::after {
|
|
173
|
+
left: auto;
|
|
174
|
+
right: -1px;
|
|
175
|
+
}
|
|
176
|
+
.mx-timeline[data-align='alternate']:not([data-orientation='horizontal']) .mx-timeline-item:nth-child(even) .mx-timeline-icon {
|
|
177
|
+
left: auto;
|
|
178
|
+
right: calc(var(--_marker) / -2 + 6px);
|
|
179
|
+
}
|
|
180
|
+
}
|
package/styles/muxima.css
CHANGED
|
@@ -23,11 +23,17 @@
|
|
|
23
23
|
@import './components/slider.css';
|
|
24
24
|
@import './components/dialog.css';
|
|
25
25
|
@import './components/tabs.css';
|
|
26
|
+
@import './components/sidebar.css';
|
|
26
27
|
@import './components/table.css';
|
|
27
28
|
@import './components/badge.css';
|
|
29
|
+
@import './components/chips.css';
|
|
28
30
|
@import './components/card.css';
|
|
29
31
|
@import './components/alert.css';
|
|
30
32
|
@import './components/separator.css';
|
|
33
|
+
@import './components/timeline.css';
|
|
34
|
+
@import './components/carousel.css';
|
|
35
|
+
@import './components/rating.css';
|
|
36
|
+
@import './components/clipboard.css';
|
|
31
37
|
@import './components/avatar.css';
|
|
32
38
|
@import './components/skeleton.css';
|
|
33
39
|
@import './components/progress.css';
|
|
@@ -36,12 +42,16 @@
|
|
|
36
42
|
@import './components/menu.css';
|
|
37
43
|
@import './components/drawer.css';
|
|
38
44
|
@import './components/toast.css';
|
|
45
|
+
@import './components/notification-center.css';
|
|
39
46
|
@import './components/accordion.css';
|
|
40
47
|
@import './components/breadcrumb.css';
|
|
41
48
|
@import './components/pagination.css';
|
|
42
49
|
@import './components/combobox.css';
|
|
43
50
|
@import './components/date-picker.css';
|
|
51
|
+
@import './components/time-picker.css';
|
|
52
|
+
@import './components/color-picker.css';
|
|
44
53
|
@import './components/otp.css';
|
|
54
|
+
@import './components/file-upload.css';
|
|
45
55
|
@import './components/stepper.css';
|
|
46
56
|
@import './components/command.css';
|
|
47
57
|
@import './motion.css';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/** Um diapositivo. O carrossel dá-lhe o nome "2 de 5" e tira do teclado os que não se vêem. */
|
|
4
|
+
declare class MxCarouselSlide {
|
|
5
|
+
/** Nome próprio do diapositivo; por omissão "2 de 5". */
|
|
6
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
7
|
+
protected readonly carousel: any;
|
|
8
|
+
readonly el: HTMLElement;
|
|
9
|
+
protected readonly index: _angular_core.Signal<any>;
|
|
10
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MxCarouselSlide, never>;
|
|
11
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MxCarouselSlide, "mx-carousel-slide", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Carrossel acessível (padrão WAI-ARIA Carousel): botões anterior e seguinte, indicadores,
|
|
15
|
+
* deslizar com o dedo (scroll nativo com snap) e, opcionalmente, rotação automática com
|
|
16
|
+
* botão de pausa. A rotação pára com o rato ou o foco dentro e não arranca com
|
|
17
|
+
* "reduzir movimento" activo.
|
|
18
|
+
*
|
|
19
|
+
* ```html
|
|
20
|
+
* <mx-carousel aria-label="Novidades" [perView]="1" [autoplay]="6000">
|
|
21
|
+
* <mx-carousel-slide>...</mx-carousel-slide>
|
|
22
|
+
* <mx-carousel-slide>...</mx-carousel-slide>
|
|
23
|
+
* </mx-carousel>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare class MxCarousel {
|
|
27
|
+
/** Índice do primeiro diapositivo visível. */
|
|
28
|
+
readonly index: _angular_core.ModelSignal<number>;
|
|
29
|
+
/** Diapositivos visíveis de cada vez. */
|
|
30
|
+
readonly perView: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
31
|
+
/** Espaço entre diapositivos, em px. */
|
|
32
|
+
readonly gap: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
33
|
+
/** Ms entre diapositivos; 0 = sem rotação automática. */
|
|
34
|
+
readonly autoplay: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
35
|
+
/** Depois do último volta ao primeiro. */
|
|
36
|
+
readonly loop: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
37
|
+
readonly indicators: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
38
|
+
/** Botões anterior e seguinte. Sem eles, dá à pessoa outra forma de mudar ([(index)]). */
|
|
39
|
+
readonly controls: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
40
|
+
readonly prevLabel: _angular_core.InputSignal<string>;
|
|
41
|
+
readonly nextLabel: _angular_core.InputSignal<string>;
|
|
42
|
+
readonly slides: _angular_core.Signal<readonly MxCarouselSlide[]>;
|
|
43
|
+
private readonly viewport;
|
|
44
|
+
private readonly reducedMotion;
|
|
45
|
+
protected readonly hovering: _angular_core.WritableSignal<boolean>;
|
|
46
|
+
protected readonly focused: _angular_core.WritableSignal<boolean>;
|
|
47
|
+
/** Rotação ligada pela pessoa (botão de pausa). */
|
|
48
|
+
readonly playing: _angular_core.WritableSignal<boolean>;
|
|
49
|
+
/** A rodar agora: ligada, sem rato nem foco dentro, e sem reduzir movimento. */
|
|
50
|
+
protected readonly running: _angular_core.Signal<boolean>;
|
|
51
|
+
protected readonly lastIndex: _angular_core.Signal<number>;
|
|
52
|
+
protected readonly pages: _angular_core.Signal<number[]>;
|
|
53
|
+
private scrollFrame;
|
|
54
|
+
private scrolling;
|
|
55
|
+
/** O índice mudou porque a pessoa deslizou: não volta a mexer no scroll. */
|
|
56
|
+
private fromScroll;
|
|
57
|
+
private readonly injector;
|
|
58
|
+
constructor();
|
|
59
|
+
slideLabel(i: number): string;
|
|
60
|
+
isVisible(i: number): boolean;
|
|
61
|
+
go(i: number): void;
|
|
62
|
+
next(auto?: boolean): void;
|
|
63
|
+
prev(): void;
|
|
64
|
+
togglePlay(): void;
|
|
65
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
66
|
+
private scrollTo;
|
|
67
|
+
protected onScroll(): void;
|
|
68
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MxCarousel, never>;
|
|
69
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MxCarousel, "mx-carousel", ["mxCarousel"], { "index": { "alias": "index"; "required": false; "isSignal": true; }; "perView": { "alias": "perView"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "autoplay": { "alias": "autoplay"; "required": false; "isSignal": true; }; "loop": { "alias": "loop"; "required": false; "isSignal": true; }; "indicators": { "alias": "indicators"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "prevLabel": { "alias": "prevLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; }, { "index": "indexChange"; }, ["slides"], ["*"], true, never>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { MxCarousel, MxCarouselSlide };
|