@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muxima-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Componentes Angular acessíveis e sóbrios para aplicações empresariais.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -72,10 +72,26 @@
|
|
|
72
72
|
"types": "./types/muxima-ui-core-card.d.ts",
|
|
73
73
|
"default": "./fesm2022/muxima-ui-core-card.mjs"
|
|
74
74
|
},
|
|
75
|
+
"./carousel": {
|
|
76
|
+
"types": "./types/muxima-ui-core-carousel.d.ts",
|
|
77
|
+
"default": "./fesm2022/muxima-ui-core-carousel.mjs"
|
|
78
|
+
},
|
|
75
79
|
"./checkbox": {
|
|
76
80
|
"types": "./types/muxima-ui-core-checkbox.d.ts",
|
|
77
81
|
"default": "./fesm2022/muxima-ui-core-checkbox.mjs"
|
|
78
82
|
},
|
|
83
|
+
"./chips": {
|
|
84
|
+
"types": "./types/muxima-ui-core-chips.d.ts",
|
|
85
|
+
"default": "./fesm2022/muxima-ui-core-chips.mjs"
|
|
86
|
+
},
|
|
87
|
+
"./clipboard": {
|
|
88
|
+
"types": "./types/muxima-ui-core-clipboard.d.ts",
|
|
89
|
+
"default": "./fesm2022/muxima-ui-core-clipboard.mjs"
|
|
90
|
+
},
|
|
91
|
+
"./color-picker": {
|
|
92
|
+
"types": "./types/muxima-ui-core-color-picker.d.ts",
|
|
93
|
+
"default": "./fesm2022/muxima-ui-core-color-picker.mjs"
|
|
94
|
+
},
|
|
79
95
|
"./combobox": {
|
|
80
96
|
"types": "./types/muxima-ui-core-combobox.d.ts",
|
|
81
97
|
"default": "./fesm2022/muxima-ui-core-combobox.mjs"
|
|
@@ -96,6 +112,10 @@
|
|
|
96
112
|
"types": "./types/muxima-ui-core-drawer.d.ts",
|
|
97
113
|
"default": "./fesm2022/muxima-ui-core-drawer.mjs"
|
|
98
114
|
},
|
|
115
|
+
"./file-upload": {
|
|
116
|
+
"types": "./types/muxima-ui-core-file-upload.d.ts",
|
|
117
|
+
"default": "./fesm2022/muxima-ui-core-file-upload.mjs"
|
|
118
|
+
},
|
|
99
119
|
"./form-field": {
|
|
100
120
|
"types": "./types/muxima-ui-core-form-field.d.ts",
|
|
101
121
|
"default": "./fesm2022/muxima-ui-core-form-field.mjs"
|
|
@@ -104,6 +124,10 @@
|
|
|
104
124
|
"types": "./types/muxima-ui-core-menu.d.ts",
|
|
105
125
|
"default": "./fesm2022/muxima-ui-core-menu.mjs"
|
|
106
126
|
},
|
|
127
|
+
"./notification-center": {
|
|
128
|
+
"types": "./types/muxima-ui-core-notification-center.d.ts",
|
|
129
|
+
"default": "./fesm2022/muxima-ui-core-notification-center.mjs"
|
|
130
|
+
},
|
|
107
131
|
"./otp": {
|
|
108
132
|
"types": "./types/muxima-ui-core-otp.d.ts",
|
|
109
133
|
"default": "./fesm2022/muxima-ui-core-otp.mjs"
|
|
@@ -124,6 +148,10 @@
|
|
|
124
148
|
"types": "./types/muxima-ui-core-radio.d.ts",
|
|
125
149
|
"default": "./fesm2022/muxima-ui-core-radio.mjs"
|
|
126
150
|
},
|
|
151
|
+
"./rating": {
|
|
152
|
+
"types": "./types/muxima-ui-core-rating.d.ts",
|
|
153
|
+
"default": "./fesm2022/muxima-ui-core-rating.mjs"
|
|
154
|
+
},
|
|
127
155
|
"./select": {
|
|
128
156
|
"types": "./types/muxima-ui-core-select.d.ts",
|
|
129
157
|
"default": "./fesm2022/muxima-ui-core-select.mjs"
|
|
@@ -132,6 +160,10 @@
|
|
|
132
160
|
"types": "./types/muxima-ui-core-separator.d.ts",
|
|
133
161
|
"default": "./fesm2022/muxima-ui-core-separator.mjs"
|
|
134
162
|
},
|
|
163
|
+
"./sidebar": {
|
|
164
|
+
"types": "./types/muxima-ui-core-sidebar.d.ts",
|
|
165
|
+
"default": "./fesm2022/muxima-ui-core-sidebar.mjs"
|
|
166
|
+
},
|
|
135
167
|
"./skeleton": {
|
|
136
168
|
"types": "./types/muxima-ui-core-skeleton.d.ts",
|
|
137
169
|
"default": "./fesm2022/muxima-ui-core-skeleton.mjs"
|
|
@@ -156,6 +188,14 @@
|
|
|
156
188
|
"types": "./types/muxima-ui-core-tabs.d.ts",
|
|
157
189
|
"default": "./fesm2022/muxima-ui-core-tabs.mjs"
|
|
158
190
|
},
|
|
191
|
+
"./time-picker": {
|
|
192
|
+
"types": "./types/muxima-ui-core-time-picker.d.ts",
|
|
193
|
+
"default": "./fesm2022/muxima-ui-core-time-picker.mjs"
|
|
194
|
+
},
|
|
195
|
+
"./timeline": {
|
|
196
|
+
"types": "./types/muxima-ui-core-timeline.d.ts",
|
|
197
|
+
"default": "./fesm2022/muxima-ui-core-timeline.mjs"
|
|
198
|
+
},
|
|
159
199
|
"./toast": {
|
|
160
200
|
"types": "./types/muxima-ui-core-toast.d.ts",
|
|
161
201
|
"default": "./fesm2022/muxima-ui-core-toast.mjs"
|
package/styles/base.css
CHANGED
|
@@ -106,7 +106,27 @@ button.mx-card:is(:focus-visible, [data-mx-state='focus']),
|
|
|
106
106
|
button.mx-input-addon:is(:focus-visible, [data-mx-state='focus']),
|
|
107
107
|
.mx-date-picker-toggle:is(:focus-visible, [data-mx-state='focus']),
|
|
108
108
|
.mx-calendar-nav:is(:focus-visible, [data-mx-state='focus']),
|
|
109
|
-
.mx-calendar-day:is(:focus-visible, [data-mx-state='focus'])
|
|
109
|
+
.mx-calendar-day:is(:focus-visible, [data-mx-state='focus']),
|
|
110
|
+
.mx-date-range-input:focus-visible,
|
|
111
|
+
.mx-chip-remove:focus-visible,
|
|
112
|
+
.mx-color-swatch:focus-visible,
|
|
113
|
+
.mx-color-tool:focus-visible,
|
|
114
|
+
.mx-color-picker-toggle:focus-visible,
|
|
115
|
+
.mx-carousel-button:focus-visible,
|
|
116
|
+
.mx-carousel-play:focus-visible,
|
|
117
|
+
.mx-carousel-dot:focus-visible,
|
|
118
|
+
.mx-notification-main:focus-visible,
|
|
119
|
+
.mx-notification-action:focus-visible,
|
|
120
|
+
.mx-notification-link:focus-visible,
|
|
121
|
+
.mx-notification-bell:focus-visible,
|
|
122
|
+
.mx-sidebar-item:is(:focus-visible, [data-mx-state='focus']),
|
|
123
|
+
.mx-sidebar-toggle:focus-visible,
|
|
124
|
+
.mx-copy-button:is(:focus-visible, [data-mx-state='focus']),
|
|
125
|
+
.mx-file-upload-button:focus-visible,
|
|
126
|
+
.mx-file-upload-remove:focus-visible,
|
|
127
|
+
.mx-chip-toggle:is(:focus-visible, [data-mx-state='focus']),
|
|
128
|
+
.mx-tag-input-field:focus-visible,
|
|
129
|
+
.mx-date-range-preset:focus-visible {
|
|
110
130
|
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
111
131
|
outline-offset: var(--mx-focus-offset);
|
|
112
132
|
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* ---------- Carousel ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-carousel {
|
|
4
|
+
--mx-carousel-per-view: 1;
|
|
5
|
+
--mx-carousel-gap: 16px;
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 12px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
font-family: var(--mx-font-sans);
|
|
12
|
+
}
|
|
13
|
+
.mx-carousel-viewport {
|
|
14
|
+
position: relative;
|
|
15
|
+
/* com rato e teclado mudam os botões; em ecrãs tácteis desliza-se */
|
|
16
|
+
overflow-x: hidden;
|
|
17
|
+
overscroll-behavior-x: contain;
|
|
18
|
+
scroll-snap-type: x mandatory;
|
|
19
|
+
scrollbar-width: none;
|
|
20
|
+
border-radius: var(--mx-radius-surface);
|
|
21
|
+
}
|
|
22
|
+
@media (hover: none) {
|
|
23
|
+
.mx-carousel-viewport {
|
|
24
|
+
overflow-x: auto;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
.mx-carousel-viewport::-webkit-scrollbar {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
.mx-carousel-track {
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: var(--mx-carousel-gap);
|
|
33
|
+
}
|
|
34
|
+
.mx-carousel-slide {
|
|
35
|
+
flex: 0 0 calc((100% - (var(--mx-carousel-per-view) - 1) * var(--mx-carousel-gap)) / var(--mx-carousel-per-view));
|
|
36
|
+
min-width: 0;
|
|
37
|
+
scroll-snap-align: start;
|
|
38
|
+
}
|
|
39
|
+
.mx-carousel-nav {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
gap: 12px;
|
|
44
|
+
}
|
|
45
|
+
.mx-carousel-button,
|
|
46
|
+
.mx-carousel-play {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
width: 32px;
|
|
52
|
+
height: 32px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
border: 1px solid var(--mx-control-border);
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background: var(--mx-surface);
|
|
57
|
+
color: var(--mx-ink);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
transition: background var(--mx-duration) var(--mx-ease);
|
|
60
|
+
}
|
|
61
|
+
.mx-carousel-button svg,
|
|
62
|
+
.mx-carousel-play svg {
|
|
63
|
+
width: 16px;
|
|
64
|
+
height: 16px;
|
|
65
|
+
}
|
|
66
|
+
.mx-carousel-button:hover:not(:disabled),
|
|
67
|
+
.mx-carousel-play:hover {
|
|
68
|
+
background: var(--mx-subtle);
|
|
69
|
+
}
|
|
70
|
+
.mx-carousel-button:disabled {
|
|
71
|
+
border-color: var(--mx-stone);
|
|
72
|
+
color: var(--mx-stone-strong);
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
}
|
|
75
|
+
.mx-carousel-play {
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 10px;
|
|
78
|
+
right: 10px;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
box-shadow: var(--mx-shadow-overlay);
|
|
81
|
+
}
|
|
82
|
+
.mx-carousel-dots {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-wrap: wrap;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
gap: 2px;
|
|
87
|
+
}
|
|
88
|
+
.mx-carousel-dot {
|
|
89
|
+
position: relative;
|
|
90
|
+
width: 24px;
|
|
91
|
+
height: 24px;
|
|
92
|
+
padding: 0;
|
|
93
|
+
border: 0;
|
|
94
|
+
border-radius: 50%;
|
|
95
|
+
background: transparent;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
}
|
|
98
|
+
.mx-carousel-dot::after {
|
|
99
|
+
content: '';
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 50%;
|
|
102
|
+
left: 50%;
|
|
103
|
+
width: 8px;
|
|
104
|
+
height: 8px;
|
|
105
|
+
border-radius: 999px;
|
|
106
|
+
background: var(--mx-stone-strong);
|
|
107
|
+
transform: translate(-50%, -50%);
|
|
108
|
+
transition: width var(--mx-duration) var(--mx-ease), background var(--mx-duration) var(--mx-ease);
|
|
109
|
+
}
|
|
110
|
+
.mx-carousel-dot[aria-current='true']::after {
|
|
111
|
+
width: 18px;
|
|
112
|
+
background: var(--mx-accent);
|
|
113
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* ---------- Chips ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-chip {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 4px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
height: 28px;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
padding: 0 10px;
|
|
11
|
+
border: 1px solid var(--mx-stone);
|
|
12
|
+
border-radius: 999px;
|
|
13
|
+
background: var(--mx-subtle);
|
|
14
|
+
color: var(--mx-ink);
|
|
15
|
+
font-family: var(--mx-font-sans);
|
|
16
|
+
font-size: var(--mx-text-sm);
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
}
|
|
22
|
+
.mx-chip[data-size='sm'] {
|
|
23
|
+
height: 24px;
|
|
24
|
+
padding: 0 8px;
|
|
25
|
+
font-size: var(--mx-text-xs);
|
|
26
|
+
}
|
|
27
|
+
.mx-chip[data-variant='outline'] {
|
|
28
|
+
background: transparent;
|
|
29
|
+
border-color: var(--mx-stone-strong);
|
|
30
|
+
}
|
|
31
|
+
.mx-chip[data-variant='accent'] {
|
|
32
|
+
background: var(--mx-accent-soft);
|
|
33
|
+
border-color: color-mix(in oklab, var(--mx-accent) 30%, var(--mx-surface));
|
|
34
|
+
color: var(--mx-accent);
|
|
35
|
+
}
|
|
36
|
+
.mx-chip[data-disabled] {
|
|
37
|
+
color: var(--mx-muted);
|
|
38
|
+
}
|
|
39
|
+
.mx-chip-label {
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
}
|
|
43
|
+
.mx-chip:has(.mx-chip-remove) {
|
|
44
|
+
padding-right: 3px;
|
|
45
|
+
}
|
|
46
|
+
.mx-chip-remove {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
width: 20px;
|
|
52
|
+
height: 20px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
border: 0;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background: transparent;
|
|
57
|
+
color: var(--mx-muted);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
.mx-chip[data-size='sm'] .mx-chip-remove {
|
|
61
|
+
width: 18px;
|
|
62
|
+
height: 18px;
|
|
63
|
+
}
|
|
64
|
+
.mx-chip-remove svg {
|
|
65
|
+
width: 12px;
|
|
66
|
+
height: 12px;
|
|
67
|
+
}
|
|
68
|
+
.mx-chip-remove:hover:not(:disabled) {
|
|
69
|
+
background: var(--mx-stone);
|
|
70
|
+
color: var(--mx-ink);
|
|
71
|
+
}
|
|
72
|
+
.mx-chip-remove:disabled {
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Chip que liga e desliga */
|
|
77
|
+
.mx-chip-toggle {
|
|
78
|
+
background: var(--mx-surface);
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
transition: background var(--mx-duration) var(--mx-ease), border-color var(--mx-duration) var(--mx-ease);
|
|
81
|
+
}
|
|
82
|
+
.mx-chip-toggle:is(:hover, [data-mx-state='hover']):not(:disabled) {
|
|
83
|
+
background: var(--mx-subtle);
|
|
84
|
+
}
|
|
85
|
+
.mx-chip-toggle[aria-pressed='true'] {
|
|
86
|
+
border-color: var(--mx-accent);
|
|
87
|
+
background: var(--mx-accent-soft);
|
|
88
|
+
color: var(--mx-accent);
|
|
89
|
+
}
|
|
90
|
+
.mx-chip-toggle[aria-pressed='true']::before {
|
|
91
|
+
content: '';
|
|
92
|
+
width: 12px;
|
|
93
|
+
height: 12px;
|
|
94
|
+
margin-left: -2px;
|
|
95
|
+
background: currentColor;
|
|
96
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
97
|
+
}
|
|
98
|
+
.mx-chip-toggle:disabled {
|
|
99
|
+
color: var(--mx-muted);
|
|
100
|
+
cursor: not-allowed;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Campo de etiquetas */
|
|
104
|
+
.mx-tag-input {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-wrap: wrap;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 4px;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
width: 100%;
|
|
111
|
+
min-height: var(--mx-control-height);
|
|
112
|
+
padding: 4px 6px;
|
|
113
|
+
border: 1px solid var(--mx-control-border);
|
|
114
|
+
border-radius: var(--mx-radius);
|
|
115
|
+
background: var(--mx-surface);
|
|
116
|
+
font-family: var(--mx-font-sans);
|
|
117
|
+
cursor: text;
|
|
118
|
+
transition: border-color var(--mx-duration) var(--mx-ease);
|
|
119
|
+
}
|
|
120
|
+
.mx-tag-input:hover:not([data-disabled]) {
|
|
121
|
+
border-color: var(--mx-muted);
|
|
122
|
+
}
|
|
123
|
+
.mx-tag-input:focus-within {
|
|
124
|
+
border-color: var(--mx-accent);
|
|
125
|
+
}
|
|
126
|
+
.mx-tag-input[data-invalid] {
|
|
127
|
+
border-color: var(--mx-danger);
|
|
128
|
+
}
|
|
129
|
+
.mx-tag-input[data-disabled] {
|
|
130
|
+
background: var(--mx-subtle);
|
|
131
|
+
cursor: not-allowed;
|
|
132
|
+
}
|
|
133
|
+
.mx-tag-input[data-size='lg'] {
|
|
134
|
+
min-height: var(--mx-control-height-lg);
|
|
135
|
+
}
|
|
136
|
+
.mx-tag-input[data-size='sm'] {
|
|
137
|
+
min-height: var(--mx-control-height-sm);
|
|
138
|
+
}
|
|
139
|
+
.mx-tag-input-list {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-wrap: wrap;
|
|
142
|
+
gap: 4px;
|
|
143
|
+
max-width: 100%;
|
|
144
|
+
margin: 0;
|
|
145
|
+
padding: 0;
|
|
146
|
+
list-style: none;
|
|
147
|
+
}
|
|
148
|
+
.mx-tag-input-list > li {
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
max-width: 100%;
|
|
151
|
+
}
|
|
152
|
+
.mx-tag-input-field {
|
|
153
|
+
flex: 1;
|
|
154
|
+
min-width: 120px;
|
|
155
|
+
height: 26px;
|
|
156
|
+
padding: 0 6px;
|
|
157
|
+
border: 0;
|
|
158
|
+
border-radius: calc(var(--mx-radius) - 2px);
|
|
159
|
+
background: transparent;
|
|
160
|
+
color: var(--mx-ink);
|
|
161
|
+
font: inherit;
|
|
162
|
+
font-size: var(--mx-text-md);
|
|
163
|
+
}
|
|
164
|
+
.mx-tag-input-field::placeholder {
|
|
165
|
+
color: var(--mx-muted);
|
|
166
|
+
opacity: 1;
|
|
167
|
+
}
|
|
168
|
+
.mx-tag-input-field:disabled {
|
|
169
|
+
cursor: not-allowed;
|
|
170
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* ---------- Copy to clipboard ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-copy-button {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: 6px;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
min-width: 32px;
|
|
10
|
+
height: 32px;
|
|
11
|
+
padding: 0 8px;
|
|
12
|
+
border: 1px solid var(--mx-stone);
|
|
13
|
+
border-radius: var(--mx-radius);
|
|
14
|
+
background: var(--mx-surface);
|
|
15
|
+
color: var(--mx-muted);
|
|
16
|
+
font-family: var(--mx-font-sans);
|
|
17
|
+
font-size: var(--mx-text-sm);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
transition: background var(--mx-duration) var(--mx-ease), color var(--mx-duration) var(--mx-ease);
|
|
20
|
+
}
|
|
21
|
+
.mx-copy-button[data-size='sm'] {
|
|
22
|
+
min-width: 26px;
|
|
23
|
+
height: 26px;
|
|
24
|
+
padding: 0 5px;
|
|
25
|
+
}
|
|
26
|
+
.mx-copy-button svg {
|
|
27
|
+
width: 16px;
|
|
28
|
+
height: 16px;
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
}
|
|
31
|
+
.mx-copy-button[data-size='sm'] svg {
|
|
32
|
+
width: 14px;
|
|
33
|
+
height: 14px;
|
|
34
|
+
}
|
|
35
|
+
.mx-copy-button:is(:hover, [data-mx-state='hover']) {
|
|
36
|
+
background: var(--mx-subtle);
|
|
37
|
+
color: var(--mx-ink);
|
|
38
|
+
}
|
|
39
|
+
.mx-copy-button[data-copied] {
|
|
40
|
+
border-color: color-mix(in oklab, var(--mx-success) 40%, var(--mx-surface));
|
|
41
|
+
color: var(--mx-success);
|
|
42
|
+
}
|
|
43
|
+
.mx-input-group > .mx-copy-button {
|
|
44
|
+
height: auto;
|
|
45
|
+
border-radius: 0;
|
|
46
|
+
border-color: var(--mx-control-border);
|
|
47
|
+
margin-left: -1px;
|
|
48
|
+
}
|
|
49
|
+
.mx-input-group > .mx-copy-button:last-child {
|
|
50
|
+
border-top-right-radius: var(--mx-radius);
|
|
51
|
+
border-bottom-right-radius: var(--mx-radius);
|
|
52
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/* ---------- Color picker ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-color-panel {
|
|
4
|
+
--mx-color-hue: 190;
|
|
5
|
+
--_checker: repeating-conic-gradient(var(--mx-stone) 0% 25%, var(--mx-surface) 0% 50%) 50% / 10px 10px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 12px;
|
|
9
|
+
width: 248px;
|
|
10
|
+
font-family: var(--mx-font-sans);
|
|
11
|
+
}
|
|
12
|
+
.mx-color-panel[data-swatches-only] {
|
|
13
|
+
width: auto;
|
|
14
|
+
}
|
|
15
|
+
.mx-color-panel[data-swatches-only] .mx-color-swatches {
|
|
16
|
+
grid-template-columns: repeat(auto-fill, 32px);
|
|
17
|
+
min-width: 220px;
|
|
18
|
+
}
|
|
19
|
+
.mx-color-panel[data-disabled] {
|
|
20
|
+
opacity: 0.6;
|
|
21
|
+
}
|
|
22
|
+
.mx-color-area {
|
|
23
|
+
position: relative;
|
|
24
|
+
height: 156px;
|
|
25
|
+
border-radius: var(--mx-radius);
|
|
26
|
+
background:
|
|
27
|
+
linear-gradient(to top, #000, transparent),
|
|
28
|
+
linear-gradient(to right, #fff, hsl(var(--mx-color-hue) 100% 50%));
|
|
29
|
+
cursor: crosshair;
|
|
30
|
+
touch-action: none;
|
|
31
|
+
}
|
|
32
|
+
.mx-color-area-thumb {
|
|
33
|
+
position: absolute;
|
|
34
|
+
width: 16px;
|
|
35
|
+
height: 16px;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
border: 2px solid #fff;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
background: var(--mx-color-opaque);
|
|
40
|
+
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35), 0 1px 3px rgb(0 0 0 / 0.3);
|
|
41
|
+
transform: translate(-50%, -50%);
|
|
42
|
+
}
|
|
43
|
+
.mx-color-area-thumb:focus-visible {
|
|
44
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
45
|
+
outline-offset: 2px;
|
|
46
|
+
}
|
|
47
|
+
.mx-color-sliders {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 10px;
|
|
51
|
+
}
|
|
52
|
+
.mx-color-preview {
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
width: 28px;
|
|
55
|
+
height: 28px;
|
|
56
|
+
border-radius: 50%;
|
|
57
|
+
background: var(--_checker);
|
|
58
|
+
box-shadow: inset 0 0 0 1px var(--mx-stone);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
.mx-color-preview span {
|
|
62
|
+
display: block;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
background: var(--mx-color-current);
|
|
66
|
+
}
|
|
67
|
+
.mx-color-ranges {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex: 1;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: 10px;
|
|
72
|
+
}
|
|
73
|
+
.mx-color-range {
|
|
74
|
+
appearance: none;
|
|
75
|
+
-webkit-appearance: none;
|
|
76
|
+
display: block;
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 12px;
|
|
79
|
+
margin: 0;
|
|
80
|
+
border-radius: 999px;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
.mx-color-hue {
|
|
84
|
+
background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00);
|
|
85
|
+
}
|
|
86
|
+
.mx-color-alpha {
|
|
87
|
+
background: linear-gradient(to right, transparent, var(--mx-color-opaque)), var(--_checker);
|
|
88
|
+
}
|
|
89
|
+
.mx-color-range::-webkit-slider-thumb {
|
|
90
|
+
-webkit-appearance: none;
|
|
91
|
+
width: 16px;
|
|
92
|
+
height: 16px;
|
|
93
|
+
border: 2px solid #fff;
|
|
94
|
+
border-radius: 50%;
|
|
95
|
+
background: transparent;
|
|
96
|
+
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35), 0 1px 3px rgb(0 0 0 / 0.3);
|
|
97
|
+
}
|
|
98
|
+
.mx-color-range::-moz-range-thumb {
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
width: 16px;
|
|
101
|
+
height: 16px;
|
|
102
|
+
border: 2px solid #fff;
|
|
103
|
+
border-radius: 50%;
|
|
104
|
+
background: transparent;
|
|
105
|
+
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);
|
|
106
|
+
}
|
|
107
|
+
.mx-color-range:focus-visible {
|
|
108
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
109
|
+
outline-offset: 3px;
|
|
110
|
+
}
|
|
111
|
+
.mx-color-tool {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
width: 30px;
|
|
117
|
+
height: 30px;
|
|
118
|
+
padding: 0;
|
|
119
|
+
border: 1px solid var(--mx-control-border);
|
|
120
|
+
border-radius: var(--mx-radius);
|
|
121
|
+
background: var(--mx-surface);
|
|
122
|
+
color: var(--mx-ink);
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
.mx-color-tool svg {
|
|
126
|
+
width: 16px;
|
|
127
|
+
height: 16px;
|
|
128
|
+
}
|
|
129
|
+
.mx-color-tool:hover {
|
|
130
|
+
background: var(--mx-subtle);
|
|
131
|
+
}
|
|
132
|
+
.mx-color-input-row {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 8px;
|
|
136
|
+
}
|
|
137
|
+
.mx-color-input-label {
|
|
138
|
+
color: var(--mx-muted);
|
|
139
|
+
font-size: var(--mx-text-sm);
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
}
|
|
142
|
+
.mx-color-hex.mx-input {
|
|
143
|
+
font-family: var(--mx-font-mono);
|
|
144
|
+
text-transform: uppercase;
|
|
145
|
+
}
|
|
146
|
+
.mx-color-swatches {
|
|
147
|
+
display: grid;
|
|
148
|
+
grid-template-columns: repeat(8, 1fr);
|
|
149
|
+
gap: 6px;
|
|
150
|
+
}
|
|
151
|
+
.mx-color-swatch {
|
|
152
|
+
aspect-ratio: 1;
|
|
153
|
+
width: 100%;
|
|
154
|
+
padding: 0;
|
|
155
|
+
border: 0;
|
|
156
|
+
border-radius: calc(var(--mx-radius) - 2px);
|
|
157
|
+
background: var(--mx-swatch);
|
|
158
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
}
|
|
161
|
+
.mx-color-swatch[aria-pressed='true'] {
|
|
162
|
+
outline: 2px solid var(--mx-ink);
|
|
163
|
+
outline-offset: 2px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Campo */
|
|
167
|
+
.mx-color-picker {
|
|
168
|
+
display: block;
|
|
169
|
+
width: 100%;
|
|
170
|
+
font-family: var(--mx-font-sans);
|
|
171
|
+
}
|
|
172
|
+
.mx-color-picker-field {
|
|
173
|
+
position: relative;
|
|
174
|
+
}
|
|
175
|
+
.mx-color-picker-input.mx-input {
|
|
176
|
+
padding-left: 42px;
|
|
177
|
+
font-family: var(--mx-font-mono);
|
|
178
|
+
text-transform: uppercase;
|
|
179
|
+
}
|
|
180
|
+
.mx-color-picker-toggle {
|
|
181
|
+
position: absolute;
|
|
182
|
+
top: 50%;
|
|
183
|
+
left: 6px;
|
|
184
|
+
width: 26px;
|
|
185
|
+
height: 26px;
|
|
186
|
+
padding: 0;
|
|
187
|
+
border: 0;
|
|
188
|
+
border-radius: calc(var(--mx-radius) - 2px);
|
|
189
|
+
background: linear-gradient(var(--mx-swatch), var(--mx-swatch)), repeating-conic-gradient(var(--mx-stone) 0% 25%, var(--mx-surface) 0% 50%) 50% / 8px 8px;
|
|
190
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15);
|
|
191
|
+
transform: translateY(-50%);
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
}
|
|
194
|
+
.mx-color-picker-toggle[data-empty] {
|
|
195
|
+
background: linear-gradient(to top right, transparent calc(50% - 1px), var(--mx-danger) 50%, transparent calc(50% + 1px)), var(--mx-surface);
|
|
196
|
+
}
|
|
197
|
+
.mx-color-picker-toggle:disabled {
|
|
198
|
+
cursor: not-allowed;
|
|
199
|
+
}
|
|
200
|
+
.mx-color-picker-panel {
|
|
201
|
+
padding: 12px;
|
|
202
|
+
border: var(--mx-border);
|
|
203
|
+
border-radius: var(--mx-radius-surface);
|
|
204
|
+
background: var(--mx-surface);
|
|
205
|
+
box-shadow: var(--mx-shadow-overlay);
|
|
206
|
+
animation: mx-fade-in var(--mx-duration) var(--mx-ease);
|
|
207
|
+
}
|