@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.
Files changed (55) hide show
  1. package/README.md +12 -4
  2. package/fesm2022/muxima-ui-core-carousel.mjs +377 -0
  3. package/fesm2022/muxima-ui-core-carousel.mjs.map +1 -0
  4. package/fesm2022/muxima-ui-core-chips.mjs +349 -0
  5. package/fesm2022/muxima-ui-core-chips.mjs.map +1 -0
  6. package/fesm2022/muxima-ui-core-clipboard.mjs +110 -0
  7. package/fesm2022/muxima-ui-core-clipboard.mjs.map +1 -0
  8. package/fesm2022/muxima-ui-core-color-picker.mjs +755 -0
  9. package/fesm2022/muxima-ui-core-color-picker.mjs.map +1 -0
  10. package/fesm2022/muxima-ui-core-date-picker.mjs +494 -12
  11. package/fesm2022/muxima-ui-core-date-picker.mjs.map +1 -1
  12. package/fesm2022/muxima-ui-core-file-upload.mjs +392 -0
  13. package/fesm2022/muxima-ui-core-file-upload.mjs.map +1 -0
  14. package/fesm2022/muxima-ui-core-notification-center.mjs +487 -0
  15. package/fesm2022/muxima-ui-core-notification-center.mjs.map +1 -0
  16. package/fesm2022/muxima-ui-core-rating.mjs +212 -0
  17. package/fesm2022/muxima-ui-core-rating.mjs.map +1 -0
  18. package/fesm2022/muxima-ui-core-sidebar.mjs +333 -0
  19. package/fesm2022/muxima-ui-core-sidebar.mjs.map +1 -0
  20. package/fesm2022/muxima-ui-core-slider.mjs +211 -3
  21. package/fesm2022/muxima-ui-core-slider.mjs.map +1 -1
  22. package/fesm2022/muxima-ui-core-time-picker.mjs +389 -0
  23. package/fesm2022/muxima-ui-core-time-picker.mjs.map +1 -0
  24. package/fesm2022/muxima-ui-core-timeline.mjs +117 -0
  25. package/fesm2022/muxima-ui-core-timeline.mjs.map +1 -0
  26. package/fesm2022/muxima-ui-core.mjs +1 -1
  27. package/fesm2022/muxima-ui-core.mjs.map +1 -1
  28. package/package.json +41 -1
  29. package/styles/base.css +21 -1
  30. package/styles/components/carousel.css +113 -0
  31. package/styles/components/chips.css +170 -0
  32. package/styles/components/clipboard.css +52 -0
  33. package/styles/components/color-picker.css +207 -0
  34. package/styles/components/date-picker.css +135 -0
  35. package/styles/components/file-upload.css +164 -0
  36. package/styles/components/notification-center.css +220 -0
  37. package/styles/components/rating.css +89 -0
  38. package/styles/components/sidebar.css +211 -0
  39. package/styles/components/slider.css +111 -0
  40. package/styles/components/time-picker.css +39 -0
  41. package/styles/components/timeline.css +180 -0
  42. package/styles/muxima.css +10 -0
  43. package/types/muxima-ui-core-carousel.d.ts +72 -0
  44. package/types/muxima-ui-core-chips.d.ts +120 -0
  45. package/types/muxima-ui-core-clipboard.d.ts +42 -0
  46. package/types/muxima-ui-core-color-picker.d.ts +153 -0
  47. package/types/muxima-ui-core-date-picker.d.ts +130 -2
  48. package/types/muxima-ui-core-file-upload.d.ts +96 -0
  49. package/types/muxima-ui-core-notification-center.d.ts +91 -0
  50. package/types/muxima-ui-core-rating.d.ts +64 -0
  51. package/types/muxima-ui-core-sidebar.d.ts +115 -0
  52. package/types/muxima-ui-core-slider.d.ts +68 -6
  53. package/types/muxima-ui-core-time-picker.d.ts +83 -0
  54. package/types/muxima-ui-core-timeline.d.ts +59 -0
  55. package/types/muxima-ui-core.d.ts +1 -1
@@ -142,3 +142,138 @@ td[aria-selected='true'] > .mx-calendar-day {
142
142
  cursor: not-allowed;
143
143
  background: transparent;
144
144
  }
145
+
146
+ /* ---------- Intervalo de datas ---------- */
147
+
148
+ .mx-date-range-picker {
149
+ display: block;
150
+ width: 100%;
151
+ font-family: var(--mx-font-sans);
152
+ }
153
+ .mx-date-range-field {
154
+ position: relative;
155
+ display: flex;
156
+ align-items: center;
157
+ box-sizing: border-box;
158
+ width: 100%;
159
+ height: var(--mx-control-height);
160
+ padding: 0 40px 0 4px;
161
+ border: 1px solid var(--mx-control-border);
162
+ border-radius: var(--mx-radius);
163
+ background: var(--mx-surface);
164
+ transition: border-color var(--mx-duration) var(--mx-ease);
165
+ }
166
+ .mx-date-range-field:hover:not([data-disabled]) {
167
+ border-color: var(--mx-muted);
168
+ }
169
+ .mx-date-range-field:focus-within {
170
+ border-color: var(--mx-accent);
171
+ }
172
+ .mx-date-range-field[data-invalid] {
173
+ border-color: var(--mx-danger);
174
+ }
175
+ .mx-date-range-field[data-disabled] {
176
+ background: var(--mx-subtle);
177
+ }
178
+ .mx-date-range-field[data-size='sm'] {
179
+ height: var(--mx-control-height-sm);
180
+ }
181
+ .mx-date-range-field[data-size='lg'] {
182
+ height: var(--mx-control-height-lg);
183
+ }
184
+ .mx-date-range-input {
185
+ flex: 1;
186
+ min-width: 0;
187
+ height: calc(100% - 8px);
188
+ padding: 0 8px;
189
+ border: 0;
190
+ border-radius: calc(var(--mx-radius) - 2px);
191
+ background: transparent;
192
+ color: var(--mx-ink);
193
+ font-family: inherit;
194
+ font-size: var(--mx-text-md);
195
+ font-variant-numeric: tabular-nums;
196
+ }
197
+ .mx-date-range-field[data-size='sm'] .mx-date-range-input {
198
+ font-size: var(--mx-text-sm);
199
+ }
200
+ .mx-date-range-input::placeholder {
201
+ color: var(--mx-muted);
202
+ opacity: 1;
203
+ }
204
+ .mx-date-range-input:disabled {
205
+ color: var(--mx-muted);
206
+ cursor: not-allowed;
207
+ }
208
+ .mx-date-range-sep {
209
+ color: var(--mx-muted);
210
+ }
211
+ .mx-date-range-panel {
212
+ display: flex;
213
+ gap: 12px;
214
+ }
215
+ .mx-date-range-presets {
216
+ display: flex;
217
+ flex-direction: column;
218
+ gap: 2px;
219
+ min-width: 132px;
220
+ margin: 0;
221
+ padding: 0 12px 0 0;
222
+ border-right: var(--mx-border);
223
+ list-style: none;
224
+ }
225
+ .mx-date-range-preset {
226
+ width: 100%;
227
+ padding: 6px 8px;
228
+ border: 0;
229
+ border-radius: var(--mx-radius);
230
+ background: transparent;
231
+ color: var(--mx-ink);
232
+ font: inherit;
233
+ font-size: var(--mx-text-sm);
234
+ text-align: start;
235
+ cursor: pointer;
236
+ }
237
+ .mx-date-range-preset:hover {
238
+ background: var(--mx-subtle);
239
+ }
240
+ @media (max-width: 560px) {
241
+ .mx-date-range-panel {
242
+ flex-direction: column;
243
+ }
244
+ .mx-date-range-presets {
245
+ flex-direction: row;
246
+ flex-wrap: wrap;
247
+ padding: 0 0 8px;
248
+ border-right: 0;
249
+ border-bottom: var(--mx-border);
250
+ }
251
+ .mx-date-range-preset {
252
+ width: auto;
253
+ }
254
+ }
255
+
256
+ /* Intervalo no calendário */
257
+ .mx-calendar {
258
+ --_range-bg: color-mix(in oklab, var(--mx-accent) 16%, var(--mx-surface));
259
+ }
260
+ td[data-in-range] > .mx-calendar-day {
261
+ border-radius: 0;
262
+ background: var(--_range-bg);
263
+ color: var(--mx-ink);
264
+ font-weight: 400;
265
+ }
266
+ td[data-in-range] {
267
+ background: var(--_range-bg);
268
+ }
269
+ td[data-range-start]:not([data-range-end]) {
270
+ background: linear-gradient(to right, transparent 50%, var(--_range-bg) 50%);
271
+ }
272
+ td[data-range-end]:not([data-range-start]) {
273
+ background: linear-gradient(to left, transparent 50%, var(--_range-bg) 50%);
274
+ }
275
+ td:is([data-range-start], [data-range-end]) > .mx-calendar-day {
276
+ background: var(--mx-accent);
277
+ color: var(--mx-on-accent);
278
+ font-weight: 600;
279
+ }
@@ -0,0 +1,164 @@
1
+ /* ---------- File upload ---------- */
2
+
3
+ .mx-file-upload {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 10px;
7
+ width: 100%;
8
+ font-family: var(--mx-font-sans);
9
+ }
10
+ .mx-file-upload-zone {
11
+ display: flex;
12
+ flex-direction: column;
13
+ align-items: center;
14
+ gap: 6px;
15
+ padding: 24px 16px;
16
+ border: 1.5px dashed var(--mx-control-border);
17
+ border-radius: var(--mx-radius-surface);
18
+ background: var(--mx-surface);
19
+ color: var(--mx-ink);
20
+ text-align: center;
21
+ transition: border-color var(--mx-duration) var(--mx-ease), background var(--mx-duration) var(--mx-ease);
22
+ }
23
+ .mx-file-upload-zone:hover {
24
+ border-color: var(--mx-muted);
25
+ }
26
+ .mx-file-upload-zone[data-dragging] {
27
+ border-color: var(--mx-accent);
28
+ background: var(--mx-accent-soft);
29
+ }
30
+ .mx-file-upload[data-invalid] .mx-file-upload-zone {
31
+ border-color: var(--mx-danger);
32
+ }
33
+ .mx-file-upload[data-disabled] .mx-file-upload-zone {
34
+ background: var(--mx-subtle);
35
+ color: var(--mx-muted);
36
+ }
37
+ .mx-file-upload-icon {
38
+ width: 28px;
39
+ height: 28px;
40
+ color: var(--mx-muted);
41
+ }
42
+ .mx-file-upload-text {
43
+ margin: 0;
44
+ font-size: var(--mx-text-md);
45
+ }
46
+ .mx-file-upload-button {
47
+ margin-inline-start: 0.3em;
48
+ padding: 0;
49
+ border: 0;
50
+ background: none;
51
+ color: var(--mx-accent);
52
+ font: inherit;
53
+ font-weight: 600;
54
+ text-decoration: underline;
55
+ text-underline-offset: 3px;
56
+ cursor: pointer;
57
+ }
58
+ .mx-file-upload-button:disabled {
59
+ color: var(--mx-muted);
60
+ cursor: not-allowed;
61
+ }
62
+ .mx-file-upload-desc {
63
+ margin: 0;
64
+ color: var(--mx-muted);
65
+ font-size: var(--mx-text-sm);
66
+ }
67
+ .mx-file-upload-rejections {
68
+ margin: 0;
69
+ padding: 0;
70
+ color: var(--mx-danger);
71
+ font-size: var(--mx-text-sm);
72
+ list-style: none;
73
+ }
74
+ .mx-file-upload-list {
75
+ display: flex;
76
+ flex-direction: column;
77
+ gap: 6px;
78
+ margin: 0;
79
+ padding: 0;
80
+ list-style: none;
81
+ }
82
+ .mx-file-upload-item {
83
+ display: flex;
84
+ align-items: center;
85
+ gap: 10px;
86
+ padding: 8px 8px 8px 12px;
87
+ border: var(--mx-border);
88
+ border-radius: var(--mx-radius);
89
+ background: var(--mx-surface);
90
+ }
91
+ .mx-file-upload-item[data-error] {
92
+ border-color: color-mix(in oklab, var(--mx-danger) 40%, var(--mx-surface));
93
+ }
94
+ .mx-file-upload-file-icon {
95
+ flex-shrink: 0;
96
+ width: 18px;
97
+ height: 18px;
98
+ color: var(--mx-muted);
99
+ }
100
+ .mx-file-upload-info {
101
+ display: flex;
102
+ flex: 1;
103
+ flex-direction: column;
104
+ gap: 2px;
105
+ min-width: 0;
106
+ }
107
+ .mx-file-upload-name {
108
+ overflow: hidden;
109
+ color: var(--mx-ink);
110
+ font-size: var(--mx-text-sm);
111
+ font-weight: 500;
112
+ text-overflow: ellipsis;
113
+ white-space: nowrap;
114
+ }
115
+ .mx-file-upload-meta {
116
+ color: var(--mx-muted);
117
+ font-size: var(--mx-text-xs);
118
+ font-variant-numeric: tabular-nums;
119
+ }
120
+ .mx-file-upload-error {
121
+ color: var(--mx-danger);
122
+ }
123
+ .mx-file-upload-progress {
124
+ display: block;
125
+ width: 100%;
126
+ height: 4px;
127
+ margin-top: 4px;
128
+ border: 0;
129
+ border-radius: 999px;
130
+ background: var(--mx-stone);
131
+ appearance: none;
132
+ overflow: hidden;
133
+ }
134
+ .mx-file-upload-progress::-webkit-progress-bar {
135
+ background: var(--mx-stone);
136
+ }
137
+ .mx-file-upload-progress::-webkit-progress-value {
138
+ background: var(--mx-accent);
139
+ }
140
+ .mx-file-upload-progress::-moz-progress-bar {
141
+ background: var(--mx-accent);
142
+ }
143
+ .mx-file-upload-remove {
144
+ display: inline-flex;
145
+ align-items: center;
146
+ justify-content: center;
147
+ flex-shrink: 0;
148
+ width: 28px;
149
+ height: 28px;
150
+ padding: 0;
151
+ border: 0;
152
+ border-radius: var(--mx-radius);
153
+ background: transparent;
154
+ color: var(--mx-muted);
155
+ cursor: pointer;
156
+ }
157
+ .mx-file-upload-remove svg {
158
+ width: 14px;
159
+ height: 14px;
160
+ }
161
+ .mx-file-upload-remove:hover:not(:disabled) {
162
+ background: var(--mx-subtle);
163
+ color: var(--mx-ink);
164
+ }
@@ -0,0 +1,220 @@
1
+ /* ---------- Notification center ---------- */
2
+
3
+ .mx-notification-center {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 10px;
7
+ width: 100%;
8
+ color: var(--mx-ink);
9
+ font-family: var(--mx-font-sans);
10
+ }
11
+ .mx-notification-head {
12
+ display: flex;
13
+ align-items: center;
14
+ gap: 8px;
15
+ }
16
+ .mx-notification-title {
17
+ margin: 0;
18
+ font-size: var(--mx-text-md);
19
+ font-weight: 600;
20
+ }
21
+ .mx-notification-count {
22
+ display: inline-flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ min-width: 20px;
26
+ height: 20px;
27
+ padding: 0 6px;
28
+ box-sizing: border-box;
29
+ border-radius: 999px;
30
+ background: var(--mx-accent);
31
+ color: var(--mx-on-accent);
32
+ font-size: var(--mx-text-xs);
33
+ font-weight: 600;
34
+ font-variant-numeric: tabular-nums;
35
+ }
36
+ .mx-notification-link {
37
+ margin-left: auto;
38
+ padding: 2px 4px;
39
+ border: 0;
40
+ border-radius: 4px;
41
+ background: none;
42
+ color: var(--mx-accent);
43
+ font: inherit;
44
+ font-size: var(--mx-text-sm);
45
+ font-weight: 500;
46
+ cursor: pointer;
47
+ }
48
+ .mx-notification-link:hover:not(:disabled) {
49
+ text-decoration: underline;
50
+ text-underline-offset: 3px;
51
+ }
52
+ .mx-notification-link:disabled {
53
+ color: var(--mx-muted);
54
+ cursor: default;
55
+ }
56
+ .mx-notification-filters {
57
+ display: flex;
58
+ flex-wrap: wrap;
59
+ gap: 6px;
60
+ }
61
+ .mx-notification-list {
62
+ display: flex;
63
+ flex-direction: column;
64
+ margin: 0;
65
+ padding: 0;
66
+ list-style: none;
67
+ }
68
+ .mx-notification {
69
+ --_tone: var(--mx-accent);
70
+ position: relative;
71
+ display: flex;
72
+ align-items: flex-start;
73
+ gap: 4px;
74
+ padding: 2px 0;
75
+ border-top: var(--mx-border);
76
+ }
77
+ .mx-notification:first-child {
78
+ border-top: 0;
79
+ }
80
+ .mx-notification[data-variant='success'] {
81
+ --_tone: var(--mx-success);
82
+ }
83
+ .mx-notification[data-variant='warning'] {
84
+ --_tone: var(--mx-warning);
85
+ }
86
+ .mx-notification[data-variant='danger'] {
87
+ --_tone: var(--mx-danger);
88
+ }
89
+ .mx-notification-dot {
90
+ flex-shrink: 0;
91
+ width: 8px;
92
+ height: 8px;
93
+ margin: 16px 2px 0 4px;
94
+ border-radius: 50%;
95
+ background: transparent;
96
+ }
97
+ .mx-notification[data-unread] .mx-notification-dot {
98
+ background: var(--_tone);
99
+ }
100
+ .mx-notification-main {
101
+ display: flex;
102
+ flex: 1;
103
+ flex-direction: column;
104
+ gap: 2px;
105
+ min-width: 0;
106
+ padding: 10px 8px;
107
+ border: 0;
108
+ border-radius: var(--mx-radius);
109
+ background: transparent;
110
+ color: inherit;
111
+ font: inherit;
112
+ text-align: start;
113
+ cursor: pointer;
114
+ }
115
+ .mx-notification-main:hover {
116
+ background: var(--mx-subtle);
117
+ }
118
+ .mx-notification-text {
119
+ font-size: var(--mx-text-sm);
120
+ line-height: 1.4;
121
+ }
122
+ .mx-notification[data-unread] .mx-notification-text {
123
+ font-weight: 600;
124
+ }
125
+ .mx-notification-desc {
126
+ color: var(--mx-muted);
127
+ font-size: var(--mx-text-sm);
128
+ line-height: 1.4;
129
+ }
130
+ .mx-notification-time {
131
+ color: var(--mx-muted);
132
+ font-size: var(--mx-text-xs);
133
+ }
134
+ .mx-notification-actions {
135
+ display: flex;
136
+ gap: 2px;
137
+ padding-top: 8px;
138
+ opacity: 0.85;
139
+ }
140
+ .mx-notification-action {
141
+ display: inline-flex;
142
+ align-items: center;
143
+ justify-content: center;
144
+ width: 28px;
145
+ height: 28px;
146
+ padding: 0;
147
+ border: 0;
148
+ border-radius: var(--mx-radius);
149
+ background: transparent;
150
+ color: var(--mx-muted);
151
+ cursor: pointer;
152
+ }
153
+ .mx-notification-action svg {
154
+ width: 14px;
155
+ height: 14px;
156
+ }
157
+ .mx-notification-action:hover {
158
+ background: var(--mx-subtle);
159
+ color: var(--mx-ink);
160
+ }
161
+ .mx-notification-empty {
162
+ display: flex;
163
+ flex-direction: column;
164
+ align-items: center;
165
+ gap: 8px;
166
+ padding: 28px 12px;
167
+ color: var(--mx-muted);
168
+ font-size: var(--mx-text-sm);
169
+ text-align: center;
170
+ }
171
+ .mx-notification-empty svg {
172
+ width: 28px;
173
+ height: 28px;
174
+ }
175
+ .mx-notification-empty p {
176
+ margin: 0;
177
+ }
178
+
179
+ /* Sino */
180
+ .mx-notification-bell {
181
+ position: relative;
182
+ display: inline-flex;
183
+ align-items: center;
184
+ justify-content: center;
185
+ width: 36px;
186
+ height: 36px;
187
+ padding: 0;
188
+ border: 0;
189
+ border-radius: var(--mx-radius);
190
+ background: transparent;
191
+ color: var(--mx-ink);
192
+ cursor: pointer;
193
+ }
194
+ .mx-notification-bell:hover {
195
+ background: var(--mx-subtle);
196
+ }
197
+ .mx-notification-bell svg {
198
+ width: 20px;
199
+ height: 20px;
200
+ }
201
+ .mx-notification-bell-count {
202
+ position: absolute;
203
+ top: 2px;
204
+ right: 1px;
205
+ display: inline-flex;
206
+ align-items: center;
207
+ justify-content: center;
208
+ min-width: 16px;
209
+ height: 16px;
210
+ padding: 0 4px;
211
+ box-sizing: border-box;
212
+ border: 2px solid var(--mx-surface);
213
+ border-radius: 999px;
214
+ background: var(--mx-danger);
215
+ color: var(--mx-on-danger);
216
+ font-family: var(--mx-font-sans);
217
+ font-size: 10px;
218
+ font-weight: 700;
219
+ line-height: 1;
220
+ }
@@ -0,0 +1,89 @@
1
+ /* ---------- Rating ---------- */
2
+
3
+ .mx-rating {
4
+ --_size: 24px;
5
+ --_on: var(--mx-warning);
6
+ display: inline-flex;
7
+ align-items: center;
8
+ gap: 8px;
9
+ font-family: var(--mx-font-sans);
10
+ }
11
+ .mx-rating[data-size='sm'] {
12
+ --_size: 18px;
13
+ }
14
+ .mx-rating[data-size='lg'] {
15
+ --_size: 32px;
16
+ }
17
+ .mx-rating-stars {
18
+ display: inline-flex;
19
+ gap: 2px;
20
+ }
21
+ .mx-rating-star {
22
+ position: relative;
23
+ display: inline-flex;
24
+ width: var(--_size);
25
+ height: var(--_size);
26
+ color: var(--mx-stone-strong);
27
+ }
28
+ label.mx-rating-star {
29
+ cursor: pointer;
30
+ }
31
+ .mx-rating-star svg {
32
+ width: 100%;
33
+ height: 100%;
34
+ fill: currentColor;
35
+ }
36
+ .mx-rating-star[data-on] {
37
+ color: var(--_on);
38
+ }
39
+ label.mx-rating-star:hover svg {
40
+ transform: scale(1.08);
41
+ }
42
+ .mx-rating-star svg {
43
+ transition: transform var(--mx-duration) var(--mx-ease), color var(--mx-duration) var(--mx-ease);
44
+ }
45
+ .mx-rating-star-fill {
46
+ position: absolute;
47
+ inset: 0 auto 0 0;
48
+ overflow: hidden;
49
+ color: var(--_on);
50
+ }
51
+ .mx-rating-star-fill svg {
52
+ width: var(--_size);
53
+ max-width: none;
54
+ }
55
+ .mx-rating-input {
56
+ position: absolute;
57
+ inset: 0;
58
+ width: 100%;
59
+ height: 100%;
60
+ margin: 0;
61
+ opacity: 0;
62
+ cursor: inherit;
63
+ }
64
+ .mx-rating-star:has(.mx-rating-input:focus-visible) {
65
+ border-radius: 4px;
66
+ outline: var(--mx-focus-width) solid var(--mx-accent);
67
+ outline-offset: 1px;
68
+ }
69
+ .mx-rating[data-disabled] .mx-rating-star {
70
+ cursor: not-allowed;
71
+ opacity: 0.55;
72
+ }
73
+ .mx-rating[data-invalid] .mx-rating-stars {
74
+ border-radius: 4px;
75
+ outline: 1px solid var(--mx-danger);
76
+ outline-offset: 2px;
77
+ }
78
+ .mx-rating-value {
79
+ color: var(--mx-ink);
80
+ font-size: var(--mx-text-sm);
81
+ font-weight: 600;
82
+ font-variant-numeric: tabular-nums;
83
+ }
84
+ .mx-rating-star svg {
85
+ pointer-events: none;
86
+ }
87
+ .mx-rating-input {
88
+ z-index: 1;
89
+ }