@muxima-ui/core 1.1.0 → 1.3.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 +15 -0
- package/fesm2022/muxima-ui-core-carousel.mjs +377 -0
- package/fesm2022/muxima-ui-core-carousel.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-data-grid.mjs +1187 -0
- package/fesm2022/muxima-ui-core-data-grid.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-editor.mjs +575 -0
- package/fesm2022/muxima-ui-core-editor.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-image-cropper.mjs +568 -0
- package/fesm2022/muxima-ui-core-image-cropper.mjs.map +1 -0
- package/fesm2022/muxima-ui-core-kanban.mjs +369 -0
- package/fesm2022/muxima-ui-core-kanban.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-sidebar.mjs +333 -0
- package/fesm2022/muxima-ui-core-sidebar.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 +57 -2
- package/styles/base.css +17 -0
- package/styles/components/carousel.css +113 -0
- package/styles/components/color-picker.css +207 -0
- package/styles/components/data-grid.css +235 -0
- package/styles/components/editor.css +187 -0
- package/styles/components/image-cropper.css +113 -0
- package/styles/components/kanban.css +115 -0
- package/styles/components/notification-center.css +220 -0
- package/styles/components/sidebar.css +211 -0
- package/styles/components/timeline.css +180 -0
- package/styles/muxima.css +9 -0
- package/types/muxima-ui-core-carousel.d.ts +72 -0
- package/types/muxima-ui-core-color-picker.d.ts +153 -0
- package/types/muxima-ui-core-data-grid.d.ts +175 -0
- package/types/muxima-ui-core-editor.d.ts +104 -0
- package/types/muxima-ui-core-image-cropper.d.ts +105 -0
- package/types/muxima-ui-core-kanban.d.ts +83 -0
- package/types/muxima-ui-core-notification-center.d.ts +91 -0
- package/types/muxima-ui-core-sidebar.d.ts +115 -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
|
+
}
|
|
@@ -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,12 +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';
|
|
28
|
+
@import './components/data-grid.css';
|
|
29
|
+
@import './components/kanban.css';
|
|
27
30
|
@import './components/badge.css';
|
|
28
31
|
@import './components/chips.css';
|
|
29
32
|
@import './components/card.css';
|
|
30
33
|
@import './components/alert.css';
|
|
31
34
|
@import './components/separator.css';
|
|
35
|
+
@import './components/timeline.css';
|
|
36
|
+
@import './components/carousel.css';
|
|
32
37
|
@import './components/rating.css';
|
|
33
38
|
@import './components/clipboard.css';
|
|
34
39
|
@import './components/avatar.css';
|
|
@@ -39,14 +44,18 @@
|
|
|
39
44
|
@import './components/menu.css';
|
|
40
45
|
@import './components/drawer.css';
|
|
41
46
|
@import './components/toast.css';
|
|
47
|
+
@import './components/notification-center.css';
|
|
42
48
|
@import './components/accordion.css';
|
|
43
49
|
@import './components/breadcrumb.css';
|
|
44
50
|
@import './components/pagination.css';
|
|
45
51
|
@import './components/combobox.css';
|
|
46
52
|
@import './components/date-picker.css';
|
|
47
53
|
@import './components/time-picker.css';
|
|
54
|
+
@import './components/color-picker.css';
|
|
55
|
+
@import './components/editor.css';
|
|
48
56
|
@import './components/otp.css';
|
|
49
57
|
@import './components/file-upload.css';
|
|
58
|
+
@import './components/image-cropper.css';
|
|
50
59
|
@import './components/stepper.css';
|
|
51
60
|
@import './components/command.css';
|
|
52
61
|
@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 };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import { MxFormFieldControl, MxFormField } from '@muxima-ui/core/form-field';
|
|
5
|
+
|
|
6
|
+
/** Cor em HSV (h 0–360, s e v 0–1) com opacidade a 0–1. */
|
|
7
|
+
interface MxHsva {
|
|
8
|
+
h: number;
|
|
9
|
+
s: number;
|
|
10
|
+
v: number;
|
|
11
|
+
a: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Lê uma cor escrita: "#1f6f78", "1f6f78", "#1f6", "#1f6f7880" ou "rgb(31, 111, 120)" / "rgba(...)".
|
|
15
|
+
* Devolve o hex normalizado ("#1F6F78" ou "#1F6F7880" com opacidade) ou null.
|
|
16
|
+
*/
|
|
17
|
+
declare function mxParseColor(text: string): string | null;
|
|
18
|
+
declare function mxHexToRgba(hex: string): {
|
|
19
|
+
r: number;
|
|
20
|
+
g: number;
|
|
21
|
+
b: number;
|
|
22
|
+
a: number;
|
|
23
|
+
};
|
|
24
|
+
declare function mxHexToHsva(hex: string): MxHsva;
|
|
25
|
+
declare function mxHsvaToHex({ h, s, v, a }: MxHsva): string;
|
|
26
|
+
/** Contraste WCAG entre duas cores (1 a 21). */
|
|
27
|
+
declare function mxContrast(a: string, b: string): number;
|
|
28
|
+
/** Nome aproximado da cor em português, para o leitor de ecrã: "azul escuro", "cinzento claro". */
|
|
29
|
+
declare function mxColorName(hex: string): string;
|
|
30
|
+
|
|
31
|
+
/** Amostra pronta: só a cor, ou cor e nome. */
|
|
32
|
+
type MxColorSwatch = string | {
|
|
33
|
+
color: string;
|
|
34
|
+
label: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Editor de cor: área de saturação e brilho, matiz, opacidade opcional, campo hex,
|
|
38
|
+
* amostras e conta-gotas (quando o navegador o tem). O valor é um hex ("#1F6F78",
|
|
39
|
+
* ou "#1F6F7880" com opacidade).
|
|
40
|
+
*
|
|
41
|
+
* ```html
|
|
42
|
+
* <mx-color-panel [(value)]="cor" [swatches]="marca" />
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* Teclado na área: ← → mudam a saturação, ↑ ↓ o brilho (Shift para passos de 10).
|
|
46
|
+
* A matiz e a opacidade são input range nativos.
|
|
47
|
+
*/
|
|
48
|
+
declare class MxColorPanel {
|
|
49
|
+
readonly value: _angular_core.ModelSignal<string | null>;
|
|
50
|
+
/** Mostra o controlo de opacidade e devolve hex de 8 dígitos quando < 100%. */
|
|
51
|
+
readonly alpha: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
52
|
+
readonly swatches: _angular_core.InputSignal<MxColorSwatch[]>;
|
|
53
|
+
readonly showInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
54
|
+
/** Só as amostras: uma paleta fechada, sem área nem matiz. */
|
|
55
|
+
readonly swatchesOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
56
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
57
|
+
readonly areaLabel: _angular_core.InputSignal<string>;
|
|
58
|
+
readonly hueLabel: _angular_core.InputSignal<string>;
|
|
59
|
+
readonly alphaLabel: _angular_core.InputSignal<string>;
|
|
60
|
+
readonly swatchesLabel: _angular_core.InputSignal<string>;
|
|
61
|
+
/** Emite ao largar o rato, escolher amostra ou terminar de escrever (para guardar). */
|
|
62
|
+
readonly committed: _angular_core.OutputEmitterRef<string>;
|
|
63
|
+
private readonly area;
|
|
64
|
+
protected readonly inputId: string;
|
|
65
|
+
protected readonly eyeDropper: boolean;
|
|
66
|
+
/** HSVA interno: guarda a matiz quando a cor é cinzenta (o hex não a tem). */
|
|
67
|
+
protected readonly hsva: _angular_core.WritableSignal<MxHsva>;
|
|
68
|
+
protected readonly hex: _angular_core.Signal<string>;
|
|
69
|
+
protected readonly opaque: _angular_core.Signal<string>;
|
|
70
|
+
protected readonly draft: _angular_core.WritableSignal<string | null>;
|
|
71
|
+
protected readonly draftInvalid: _angular_core.Signal<boolean>;
|
|
72
|
+
protected readonly hueName: _angular_core.Signal<string>;
|
|
73
|
+
protected readonly areaText: _angular_core.Signal<string>;
|
|
74
|
+
protected readonly swatchList: _angular_core.Signal<{
|
|
75
|
+
color: string;
|
|
76
|
+
label: string;
|
|
77
|
+
}[]>;
|
|
78
|
+
constructor();
|
|
79
|
+
protected round(n: number): number;
|
|
80
|
+
protected pct(n: number): number;
|
|
81
|
+
private update;
|
|
82
|
+
setHex(hex: string): void;
|
|
83
|
+
protected setHue(e: Event): void;
|
|
84
|
+
protected setAlpha(e: Event): void;
|
|
85
|
+
protected onHexInput(e: Event): void;
|
|
86
|
+
protected onAreaKey(e: KeyboardEvent): void;
|
|
87
|
+
protected onAreaDown(e: PointerEvent): void;
|
|
88
|
+
protected pickFromScreen(): Promise<void>;
|
|
89
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MxColorPanel, never>;
|
|
90
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MxColorPanel, "mx-color-panel", ["mxColorPanel"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "alpha": { "alias": "alpha"; "required": false; "isSignal": true; }; "swatches": { "alias": "swatches"; "required": false; "isSignal": true; }; "showInput": { "alias": "showInput"; "required": false; "isSignal": true; }; "swatchesOnly": { "alias": "swatchesOnly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "areaLabel": { "alias": "areaLabel"; "required": false; "isSignal": true; }; "hueLabel": { "alias": "hueLabel"; "required": false; "isSignal": true; }; "alphaLabel": { "alias": "alphaLabel"; "required": false; "isSignal": true; }; "swatchesLabel": { "alias": "swatchesLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "committed": "committed"; }, never, never, true, never>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Campo de cor: escreve-se o hex (ou rgb()) ou escolhe-se no painel que abre no botão
|
|
95
|
+
* da amostra. Funciona com ngModel e Reactive Forms; o valor é um hex ou null.
|
|
96
|
+
*
|
|
97
|
+
* ```html
|
|
98
|
+
* <mx-form-field>
|
|
99
|
+
* <label mxLabel>Cor da marca</label>
|
|
100
|
+
* <mx-color-picker formControlName="cor" [swatches]="sugestoes" />
|
|
101
|
+
* </mx-form-field>
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
declare class MxColorPicker implements ControlValueAccessor, MxFormFieldControl {
|
|
105
|
+
readonly value: _angular_core.ModelSignal<string | null>;
|
|
106
|
+
readonly alpha: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
107
|
+
readonly swatches: _angular_core.InputSignal<MxColorSwatch[]>;
|
|
108
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
109
|
+
readonly dialogLabel: _angular_core.InputSignal<string>;
|
|
110
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
111
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
112
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
113
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | "lg">;
|
|
114
|
+
readonly id: _angular_core.InputSignal<string | undefined>;
|
|
115
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
116
|
+
protected readonly field: MxFormField | null;
|
|
117
|
+
private readonly ngControl;
|
|
118
|
+
private readonly host;
|
|
119
|
+
private readonly toggleButton;
|
|
120
|
+
private readonly panel;
|
|
121
|
+
protected readonly positions: ConnectedPosition[];
|
|
122
|
+
private readonly generatedId;
|
|
123
|
+
readonly controlId: _angular_core.Signal<string>;
|
|
124
|
+
protected readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
125
|
+
protected readonly draft: _angular_core.WritableSignal<string | null>;
|
|
126
|
+
private readonly formDisabled;
|
|
127
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
128
|
+
readonly badFormat: _angular_core.Signal<boolean>;
|
|
129
|
+
protected readonly toggleLabel: _angular_core.Signal<string>;
|
|
130
|
+
private onChange;
|
|
131
|
+
private onTouched;
|
|
132
|
+
constructor();
|
|
133
|
+
open(): void;
|
|
134
|
+
toggle(): void;
|
|
135
|
+
close(restoreFocus?: boolean): void;
|
|
136
|
+
protected onAttach(): void;
|
|
137
|
+
protected onOverlayKey(e: KeyboardEvent): void;
|
|
138
|
+
protected onOutside(e: MouseEvent): void;
|
|
139
|
+
protected setValue(v: string | null): void;
|
|
140
|
+
protected onInput(e: Event): void;
|
|
141
|
+
protected onBlur(): void;
|
|
142
|
+
errorState(): boolean;
|
|
143
|
+
isRequired(): boolean;
|
|
144
|
+
writeValue(value: string | null): void;
|
|
145
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
146
|
+
registerOnTouched(fn: () => void): void;
|
|
147
|
+
setDisabledState(isDisabled: boolean): void;
|
|
148
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MxColorPicker, never>;
|
|
149
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MxColorPicker, "mx-color-picker", ["mxColorPicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "alpha": { "alias": "alpha"; "required": false; "isSignal": true; }; "swatches": { "alias": "swatches"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "dialogLabel": { "alias": "dialogLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export { MxColorPanel, MxColorPicker, mxColorName, mxContrast, mxHexToHsva, mxHexToRgba, mxHsvaToHex, mxParseColor };
|
|
153
|
+
export type { MxColorSwatch, MxHsva };
|