@muxima-ui/core 1.2.0 → 1.4.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 +11 -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-tour.mjs +536 -0
- package/fesm2022/muxima-ui-core-tour.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 -2
- package/styles/base.css +6 -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/tour.css +155 -0
- package/styles/muxima.css +5 -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-tour.d.ts +163 -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.4.0",
|
|
4
4
|
"description": "Componentes Angular acessíveis e sóbrios para aplicações empresariais.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -24,7 +24,26 @@
|
|
|
24
24
|
"@angular/cdk": ">=21.0.0 <23.0.0",
|
|
25
25
|
"@angular/common": ">=21.0.0 <23.0.0",
|
|
26
26
|
"@angular/core": ">=21.0.0 <23.0.0",
|
|
27
|
-
"@angular/forms": ">=21.0.0 <23.0.0"
|
|
27
|
+
"@angular/forms": ">=21.0.0 <23.0.0",
|
|
28
|
+
"@angular/platform-browser": ">=21.0.0 <23.0.0",
|
|
29
|
+
"@tiptap/core": "^3.0.0",
|
|
30
|
+
"@tiptap/pm": "^3.0.0",
|
|
31
|
+
"@tiptap/starter-kit": "^3.0.0",
|
|
32
|
+
"@tiptap/extensions": "^3.0.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"@tiptap/core": {
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
"@tiptap/pm": {
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
"@tiptap/starter-kit": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"@tiptap/extensions": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
28
47
|
},
|
|
29
48
|
"dependencies": {
|
|
30
49
|
"tslib": "^2.3.0"
|
|
@@ -100,6 +119,10 @@
|
|
|
100
119
|
"types": "./types/muxima-ui-core-command.d.ts",
|
|
101
120
|
"default": "./fesm2022/muxima-ui-core-command.mjs"
|
|
102
121
|
},
|
|
122
|
+
"./data-grid": {
|
|
123
|
+
"types": "./types/muxima-ui-core-data-grid.d.ts",
|
|
124
|
+
"default": "./fesm2022/muxima-ui-core-data-grid.mjs"
|
|
125
|
+
},
|
|
103
126
|
"./date-picker": {
|
|
104
127
|
"types": "./types/muxima-ui-core-date-picker.d.ts",
|
|
105
128
|
"default": "./fesm2022/muxima-ui-core-date-picker.mjs"
|
|
@@ -112,6 +135,10 @@
|
|
|
112
135
|
"types": "./types/muxima-ui-core-drawer.d.ts",
|
|
113
136
|
"default": "./fesm2022/muxima-ui-core-drawer.mjs"
|
|
114
137
|
},
|
|
138
|
+
"./editor": {
|
|
139
|
+
"types": "./types/muxima-ui-core-editor.d.ts",
|
|
140
|
+
"default": "./fesm2022/muxima-ui-core-editor.mjs"
|
|
141
|
+
},
|
|
115
142
|
"./file-upload": {
|
|
116
143
|
"types": "./types/muxima-ui-core-file-upload.d.ts",
|
|
117
144
|
"default": "./fesm2022/muxima-ui-core-file-upload.mjs"
|
|
@@ -120,6 +147,14 @@
|
|
|
120
147
|
"types": "./types/muxima-ui-core-form-field.d.ts",
|
|
121
148
|
"default": "./fesm2022/muxima-ui-core-form-field.mjs"
|
|
122
149
|
},
|
|
150
|
+
"./image-cropper": {
|
|
151
|
+
"types": "./types/muxima-ui-core-image-cropper.d.ts",
|
|
152
|
+
"default": "./fesm2022/muxima-ui-core-image-cropper.mjs"
|
|
153
|
+
},
|
|
154
|
+
"./kanban": {
|
|
155
|
+
"types": "./types/muxima-ui-core-kanban.d.ts",
|
|
156
|
+
"default": "./fesm2022/muxima-ui-core-kanban.mjs"
|
|
157
|
+
},
|
|
123
158
|
"./menu": {
|
|
124
159
|
"types": "./types/muxima-ui-core-menu.d.ts",
|
|
125
160
|
"default": "./fesm2022/muxima-ui-core-menu.mjs"
|
|
@@ -203,6 +238,10 @@
|
|
|
203
238
|
"./tooltip": {
|
|
204
239
|
"types": "./types/muxima-ui-core-tooltip.d.ts",
|
|
205
240
|
"default": "./fesm2022/muxima-ui-core-tooltip.mjs"
|
|
241
|
+
},
|
|
242
|
+
"./tour": {
|
|
243
|
+
"types": "./types/muxima-ui-core-tour.d.ts",
|
|
244
|
+
"default": "./fesm2022/muxima-ui-core-tour.mjs"
|
|
206
245
|
}
|
|
207
246
|
},
|
|
208
247
|
"sideEffects": [
|
package/styles/base.css
CHANGED
|
@@ -109,6 +109,12 @@ button.mx-input-addon:is(:focus-visible, [data-mx-state='focus']),
|
|
|
109
109
|
.mx-calendar-day:is(:focus-visible, [data-mx-state='focus']),
|
|
110
110
|
.mx-date-range-input:focus-visible,
|
|
111
111
|
.mx-chip-remove:focus-visible,
|
|
112
|
+
.mx-tour-close:focus-visible,
|
|
113
|
+
.mx-editor-tool:focus-visible,
|
|
114
|
+
.mx-editor-text-button:focus-visible,
|
|
115
|
+
.mx-cropper-button:focus-visible,
|
|
116
|
+
.mx-grid-sort:focus-visible,
|
|
117
|
+
.mx-grid-columns-button:focus-visible,
|
|
112
118
|
.mx-color-swatch:focus-visible,
|
|
113
119
|
.mx-color-tool:focus-visible,
|
|
114
120
|
.mx-color-picker-toggle:focus-visible,
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/* ---------- Data grid ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-grid {
|
|
4
|
+
--_row-h: 40px;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
border: var(--mx-border);
|
|
10
|
+
border-radius: var(--mx-radius-surface);
|
|
11
|
+
background: var(--mx-surface);
|
|
12
|
+
color: var(--mx-ink);
|
|
13
|
+
font-family: var(--mx-font-sans);
|
|
14
|
+
font-size: var(--mx-text-md);
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
.mx-grid-toolbar {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 8px;
|
|
22
|
+
padding: 10px 12px;
|
|
23
|
+
border-bottom: var(--mx-border);
|
|
24
|
+
}
|
|
25
|
+
.mx-grid-toolbar-slot {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex: 1;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 8px;
|
|
31
|
+
}
|
|
32
|
+
.mx-grid-columns-button {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 6px;
|
|
36
|
+
height: 32px;
|
|
37
|
+
margin-left: auto;
|
|
38
|
+
padding: 0 10px;
|
|
39
|
+
border: 1px solid var(--mx-control-border);
|
|
40
|
+
border-radius: var(--mx-radius);
|
|
41
|
+
background: var(--mx-surface);
|
|
42
|
+
color: var(--mx-ink);
|
|
43
|
+
font: inherit;
|
|
44
|
+
font-size: var(--mx-text-sm);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
.mx-grid-columns-button svg {
|
|
48
|
+
width: 16px;
|
|
49
|
+
height: 16px;
|
|
50
|
+
}
|
|
51
|
+
.mx-grid-columns-button:hover {
|
|
52
|
+
background: var(--mx-subtle);
|
|
53
|
+
}
|
|
54
|
+
.mx-grid-scroller {
|
|
55
|
+
position: relative;
|
|
56
|
+
overflow: auto;
|
|
57
|
+
min-height: 0;
|
|
58
|
+
}
|
|
59
|
+
.mx-grid-table {
|
|
60
|
+
min-width: 100%;
|
|
61
|
+
border-collapse: separate;
|
|
62
|
+
border-spacing: 0;
|
|
63
|
+
table-layout: fixed;
|
|
64
|
+
font-variant-numeric: tabular-nums;
|
|
65
|
+
}
|
|
66
|
+
.mx-grid-table :is(th, td) {
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
height: 40px;
|
|
69
|
+
padding: 0 12px;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
border-bottom: var(--mx-border);
|
|
72
|
+
background: var(--mx-surface);
|
|
73
|
+
text-align: left;
|
|
74
|
+
text-overflow: ellipsis;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
vertical-align: middle;
|
|
77
|
+
}
|
|
78
|
+
.mx-grid[data-density='compact'] .mx-grid-table :is(th, td) {
|
|
79
|
+
height: 32px;
|
|
80
|
+
padding: 0 10px;
|
|
81
|
+
font-size: var(--mx-text-sm);
|
|
82
|
+
}
|
|
83
|
+
.mx-grid-table [data-align='end'] {
|
|
84
|
+
text-align: right;
|
|
85
|
+
}
|
|
86
|
+
.mx-grid-table [data-align='center'] {
|
|
87
|
+
text-align: center;
|
|
88
|
+
}
|
|
89
|
+
.mx-grid-table thead :is(th, td) {
|
|
90
|
+
position: sticky;
|
|
91
|
+
top: 0;
|
|
92
|
+
z-index: 2;
|
|
93
|
+
background: var(--mx-subtle);
|
|
94
|
+
color: var(--mx-muted);
|
|
95
|
+
font-size: var(--mx-text-sm);
|
|
96
|
+
font-weight: 500;
|
|
97
|
+
}
|
|
98
|
+
.mx-grid-filter-row td {
|
|
99
|
+
top: 40px !important;
|
|
100
|
+
height: 40px;
|
|
101
|
+
padding: 4px 8px !important;
|
|
102
|
+
}
|
|
103
|
+
.mx-grid[data-density='compact'] .mx-grid-filter-row td {
|
|
104
|
+
top: 32px !important;
|
|
105
|
+
}
|
|
106
|
+
.mx-grid-table th {
|
|
107
|
+
position: sticky;
|
|
108
|
+
}
|
|
109
|
+
.mx-grid-sort {
|
|
110
|
+
display: inline-flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 6px;
|
|
113
|
+
max-width: 100%;
|
|
114
|
+
margin: 0 -6px;
|
|
115
|
+
padding: 4px 6px;
|
|
116
|
+
border: 0;
|
|
117
|
+
border-radius: calc(var(--mx-radius) - 2px);
|
|
118
|
+
background: transparent;
|
|
119
|
+
color: inherit;
|
|
120
|
+
font: inherit;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
}
|
|
123
|
+
.mx-grid-sort:hover,
|
|
124
|
+
[aria-sort='ascending'] > .mx-grid-sort,
|
|
125
|
+
[aria-sort='descending'] > .mx-grid-sort {
|
|
126
|
+
color: var(--mx-ink);
|
|
127
|
+
}
|
|
128
|
+
[aria-sort='ascending'] > .mx-grid-sort .mx-sort-icon,
|
|
129
|
+
[aria-sort='descending'] > .mx-grid-sort .mx-sort-icon {
|
|
130
|
+
opacity: 1;
|
|
131
|
+
color: var(--mx-accent);
|
|
132
|
+
}
|
|
133
|
+
[data-align='end'] > .mx-grid-sort {
|
|
134
|
+
flex-direction: row-reverse;
|
|
135
|
+
}
|
|
136
|
+
.mx-grid-resize {
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 6px;
|
|
139
|
+
right: 0;
|
|
140
|
+
bottom: 6px;
|
|
141
|
+
width: 8px;
|
|
142
|
+
cursor: col-resize;
|
|
143
|
+
touch-action: none;
|
|
144
|
+
}
|
|
145
|
+
.mx-grid-resize::after {
|
|
146
|
+
content: '';
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: 0;
|
|
149
|
+
bottom: 0;
|
|
150
|
+
right: 3px;
|
|
151
|
+
width: 2px;
|
|
152
|
+
border-radius: 1px;
|
|
153
|
+
background: var(--mx-stone);
|
|
154
|
+
}
|
|
155
|
+
th:hover > .mx-grid-resize::after,
|
|
156
|
+
.mx-grid-resize:hover::after {
|
|
157
|
+
background: var(--mx-accent);
|
|
158
|
+
}
|
|
159
|
+
.mx-grid-filter {
|
|
160
|
+
box-sizing: border-box;
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: 30px;
|
|
163
|
+
padding: 0 8px;
|
|
164
|
+
border: 1px solid var(--mx-control-border);
|
|
165
|
+
border-radius: calc(var(--mx-radius) - 2px);
|
|
166
|
+
background: var(--mx-surface);
|
|
167
|
+
color: var(--mx-ink);
|
|
168
|
+
font: inherit;
|
|
169
|
+
font-size: var(--mx-text-sm);
|
|
170
|
+
font-weight: 400;
|
|
171
|
+
}
|
|
172
|
+
.mx-grid-filter::placeholder {
|
|
173
|
+
color: var(--mx-muted);
|
|
174
|
+
}
|
|
175
|
+
.mx-grid-filter:focus-visible {
|
|
176
|
+
border-color: var(--mx-accent);
|
|
177
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
178
|
+
outline-offset: 0;
|
|
179
|
+
}
|
|
180
|
+
.mx-grid-table tbody tr:hover > td {
|
|
181
|
+
background: color-mix(in oklab, var(--mx-subtle) 60%, var(--mx-surface));
|
|
182
|
+
}
|
|
183
|
+
.mx-grid-table tbody tr[aria-selected='true'] > td {
|
|
184
|
+
background: var(--mx-accent-soft);
|
|
185
|
+
}
|
|
186
|
+
.mx-grid-table tbody tr[aria-selected='true'] > td:first-child {
|
|
187
|
+
box-shadow: inset 2px 0 0 var(--mx-accent);
|
|
188
|
+
}
|
|
189
|
+
.mx-grid-table [data-cell]:focus-visible {
|
|
190
|
+
outline: 2px solid var(--mx-accent);
|
|
191
|
+
outline-offset: -2px;
|
|
192
|
+
}
|
|
193
|
+
.mx-grid-check {
|
|
194
|
+
width: 44px;
|
|
195
|
+
padding: 0 0 0 14px !important;
|
|
196
|
+
}
|
|
197
|
+
.mx-grid-pinned-start,
|
|
198
|
+
.mx-grid-pinned-end {
|
|
199
|
+
position: sticky;
|
|
200
|
+
z-index: 1;
|
|
201
|
+
}
|
|
202
|
+
.mx-grid-table thead .mx-grid-pinned-start,
|
|
203
|
+
.mx-grid-table thead .mx-grid-pinned-end {
|
|
204
|
+
z-index: 3;
|
|
205
|
+
}
|
|
206
|
+
.mx-grid-pinned-start:not(:has(+ .mx-grid-pinned-start)) {
|
|
207
|
+
box-shadow: 4px 0 6px -4px rgb(0 0 0 / 0.12), inset -1px 0 0 var(--mx-stone);
|
|
208
|
+
}
|
|
209
|
+
.mx-grid-pinned-end {
|
|
210
|
+
box-shadow: -4px 0 6px -4px rgb(0 0 0 / 0.12), inset 1px 0 0 var(--mx-stone);
|
|
211
|
+
}
|
|
212
|
+
.mx-grid-spacer td {
|
|
213
|
+
padding: 0 !important;
|
|
214
|
+
border: 0 !important;
|
|
215
|
+
}
|
|
216
|
+
.mx-grid-empty {
|
|
217
|
+
height: 120px !important;
|
|
218
|
+
color: var(--mx-muted);
|
|
219
|
+
text-align: center !important;
|
|
220
|
+
}
|
|
221
|
+
.mx-grid-table[aria-busy='true'] tbody {
|
|
222
|
+
opacity: 0.55;
|
|
223
|
+
}
|
|
224
|
+
.mx-grid-footer {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-wrap: wrap;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: space-between;
|
|
229
|
+
gap: 8px;
|
|
230
|
+
min-height: 40px;
|
|
231
|
+
padding: 6px 12px;
|
|
232
|
+
border-top: var(--mx-border);
|
|
233
|
+
color: var(--mx-muted);
|
|
234
|
+
font-size: var(--mx-text-sm);
|
|
235
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/* ---------- Editor (Tiptap) ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-editor {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
width: 100%;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
border: 1px solid var(--mx-control-border);
|
|
9
|
+
border-radius: var(--mx-radius);
|
|
10
|
+
background: var(--mx-surface);
|
|
11
|
+
color: var(--mx-ink);
|
|
12
|
+
font-family: var(--mx-font-sans);
|
|
13
|
+
transition: border-color var(--mx-duration) var(--mx-ease);
|
|
14
|
+
}
|
|
15
|
+
.mx-editor:hover:not([data-disabled]):not([data-readonly]) {
|
|
16
|
+
border-color: var(--mx-muted);
|
|
17
|
+
}
|
|
18
|
+
.mx-editor:has(.mx-editor-prose:focus-visible),
|
|
19
|
+
.mx-editor:has(.mx-editor-prose:focus) {
|
|
20
|
+
border-color: var(--mx-accent);
|
|
21
|
+
outline: var(--mx-focus-width) solid var(--mx-accent);
|
|
22
|
+
outline-offset: var(--mx-focus-offset);
|
|
23
|
+
}
|
|
24
|
+
.mx-editor[data-invalid] {
|
|
25
|
+
border-color: var(--mx-danger);
|
|
26
|
+
}
|
|
27
|
+
.mx-editor[data-disabled] {
|
|
28
|
+
background: var(--mx-subtle);
|
|
29
|
+
color: var(--mx-muted);
|
|
30
|
+
}
|
|
31
|
+
.mx-editor[data-readonly] {
|
|
32
|
+
border-color: var(--mx-stone);
|
|
33
|
+
}
|
|
34
|
+
.mx-editor-toolbar {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 2px;
|
|
39
|
+
padding: 4px;
|
|
40
|
+
border-bottom: var(--mx-border);
|
|
41
|
+
}
|
|
42
|
+
.mx-editor-tool {
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
width: 30px;
|
|
47
|
+
height: 30px;
|
|
48
|
+
padding: 0;
|
|
49
|
+
border: 0;
|
|
50
|
+
border-radius: calc(var(--mx-radius) - 2px);
|
|
51
|
+
background: transparent;
|
|
52
|
+
color: var(--mx-muted);
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
.mx-editor-icon,
|
|
56
|
+
.mx-editor-icon svg {
|
|
57
|
+
display: block;
|
|
58
|
+
width: 16px;
|
|
59
|
+
height: 16px;
|
|
60
|
+
}
|
|
61
|
+
.mx-editor-tool:hover:not(:disabled) {
|
|
62
|
+
background: var(--mx-subtle);
|
|
63
|
+
color: var(--mx-ink);
|
|
64
|
+
}
|
|
65
|
+
.mx-editor-tool[aria-pressed='true'] {
|
|
66
|
+
background: var(--mx-accent-soft);
|
|
67
|
+
color: var(--mx-accent);
|
|
68
|
+
}
|
|
69
|
+
.mx-editor-tool:disabled {
|
|
70
|
+
color: var(--mx-stone-strong);
|
|
71
|
+
cursor: not-allowed;
|
|
72
|
+
}
|
|
73
|
+
.mx-editor-sep {
|
|
74
|
+
width: 1px;
|
|
75
|
+
height: 18px;
|
|
76
|
+
margin: 0 4px;
|
|
77
|
+
background: var(--mx-stone);
|
|
78
|
+
}
|
|
79
|
+
.mx-editor-linkbar {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-wrap: wrap;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 6px;
|
|
84
|
+
padding: 6px 8px;
|
|
85
|
+
border-bottom: var(--mx-border);
|
|
86
|
+
background: var(--mx-paper);
|
|
87
|
+
}
|
|
88
|
+
.mx-editor-linkbar .mx-input {
|
|
89
|
+
flex: 1 1 200px;
|
|
90
|
+
width: auto;
|
|
91
|
+
}
|
|
92
|
+
.mx-editor-text-button {
|
|
93
|
+
height: 28px;
|
|
94
|
+
padding: 0 10px;
|
|
95
|
+
border: 1px solid var(--mx-control-border);
|
|
96
|
+
border-radius: calc(var(--mx-radius) - 2px);
|
|
97
|
+
background: var(--mx-surface);
|
|
98
|
+
color: var(--mx-ink);
|
|
99
|
+
font: inherit;
|
|
100
|
+
font-size: var(--mx-text-sm);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
}
|
|
103
|
+
.mx-editor-text-button:hover {
|
|
104
|
+
background: var(--mx-subtle);
|
|
105
|
+
}
|
|
106
|
+
.mx-editor-content {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
overflow-y: auto;
|
|
110
|
+
}
|
|
111
|
+
.mx-editor-prose {
|
|
112
|
+
flex: 1;
|
|
113
|
+
padding: 10px 14px;
|
|
114
|
+
font-size: var(--mx-text-md);
|
|
115
|
+
line-height: 1.6;
|
|
116
|
+
outline: none;
|
|
117
|
+
white-space: pre-wrap;
|
|
118
|
+
overflow-wrap: anywhere;
|
|
119
|
+
}
|
|
120
|
+
.mx-editor-prose > * + * {
|
|
121
|
+
margin-top: 0.6em;
|
|
122
|
+
}
|
|
123
|
+
.mx-editor-prose p,
|
|
124
|
+
.mx-editor-prose ul,
|
|
125
|
+
.mx-editor-prose ol,
|
|
126
|
+
.mx-editor-prose blockquote {
|
|
127
|
+
margin-bottom: 0;
|
|
128
|
+
}
|
|
129
|
+
.mx-editor-prose p:first-child {
|
|
130
|
+
margin-top: 0;
|
|
131
|
+
}
|
|
132
|
+
.mx-editor-prose h2,
|
|
133
|
+
.mx-editor-prose h3,
|
|
134
|
+
.mx-editor-prose h4 {
|
|
135
|
+
margin-bottom: 0;
|
|
136
|
+
line-height: 1.3;
|
|
137
|
+
}
|
|
138
|
+
.mx-editor-prose h2 {
|
|
139
|
+
font-size: 1.35em;
|
|
140
|
+
}
|
|
141
|
+
.mx-editor-prose h3 {
|
|
142
|
+
font-size: 1.15em;
|
|
143
|
+
}
|
|
144
|
+
.mx-editor-prose ul,
|
|
145
|
+
.mx-editor-prose ol {
|
|
146
|
+
padding-left: 1.4em;
|
|
147
|
+
}
|
|
148
|
+
.mx-editor-prose blockquote {
|
|
149
|
+
margin-left: 0;
|
|
150
|
+
padding-left: 12px;
|
|
151
|
+
border-left: 3px solid var(--mx-stone-strong);
|
|
152
|
+
color: var(--mx-muted);
|
|
153
|
+
}
|
|
154
|
+
.mx-editor-prose code {
|
|
155
|
+
padding: 1px 5px;
|
|
156
|
+
border-radius: 4px;
|
|
157
|
+
background: var(--mx-subtle);
|
|
158
|
+
font-family: var(--mx-font-mono);
|
|
159
|
+
font-size: 0.9em;
|
|
160
|
+
}
|
|
161
|
+
.mx-editor-prose a {
|
|
162
|
+
color: var(--mx-accent);
|
|
163
|
+
text-decoration: underline;
|
|
164
|
+
text-underline-offset: 2px;
|
|
165
|
+
}
|
|
166
|
+
.mx-editor-prose p.is-editor-empty:first-child::before {
|
|
167
|
+
content: attr(data-placeholder);
|
|
168
|
+
float: left;
|
|
169
|
+
height: 0;
|
|
170
|
+
color: var(--mx-muted);
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
}
|
|
173
|
+
.mx-editor-footer {
|
|
174
|
+
display: flex;
|
|
175
|
+
justify-content: flex-end;
|
|
176
|
+
padding: 4px 10px;
|
|
177
|
+
border-top: var(--mx-border);
|
|
178
|
+
}
|
|
179
|
+
.mx-editor-count {
|
|
180
|
+
color: var(--mx-muted);
|
|
181
|
+
font-size: var(--mx-text-xs);
|
|
182
|
+
font-variant-numeric: tabular-nums;
|
|
183
|
+
}
|
|
184
|
+
.mx-editor-count[data-over] {
|
|
185
|
+
color: var(--mx-danger);
|
|
186
|
+
font-weight: 600;
|
|
187
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* ---------- Image cropper ---------- */
|
|
2
|
+
|
|
3
|
+
.mx-image-cropper {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 10px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
font-family: var(--mx-font-sans);
|
|
9
|
+
}
|
|
10
|
+
.mx-cropper-stage {
|
|
11
|
+
position: relative;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
border-radius: var(--mx-radius-surface);
|
|
14
|
+
background: repeating-conic-gradient(var(--mx-subtle) 0% 25%, var(--mx-surface) 0% 50%) 50% / 16px 16px;
|
|
15
|
+
touch-action: none;
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
.mx-cropper-image {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 50%;
|
|
21
|
+
left: 50%;
|
|
22
|
+
max-width: none;
|
|
23
|
+
transform-origin: center;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
.mx-cropper-box {
|
|
27
|
+
position: absolute;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
border: 2px solid #fff;
|
|
30
|
+
box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.55);
|
|
31
|
+
cursor: move;
|
|
32
|
+
outline: none;
|
|
33
|
+
}
|
|
34
|
+
.mx-image-cropper[data-round] .mx-cropper-box {
|
|
35
|
+
border-radius: 50%;
|
|
36
|
+
}
|
|
37
|
+
.mx-cropper-box:focus-visible {
|
|
38
|
+
border-color: var(--mx-accent);
|
|
39
|
+
outline: 2px solid #fff;
|
|
40
|
+
outline-offset: 2px;
|
|
41
|
+
}
|
|
42
|
+
.mx-cropper-grid {
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: 0;
|
|
45
|
+
background:
|
|
46
|
+
linear-gradient(to right, transparent calc(33.33% - 0.5px), rgb(255 255 255 / 0.45) calc(33.33% - 0.5px), rgb(255 255 255 / 0.45) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgb(255 255 255 / 0.45) calc(66.66% - 0.5px), rgb(255 255 255 / 0.45) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)),
|
|
47
|
+
linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgb(255 255 255 / 0.45) calc(33.33% - 0.5px), rgb(255 255 255 / 0.45) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgb(255 255 255 / 0.45) calc(66.66% - 0.5px), rgb(255 255 255 / 0.45) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px));
|
|
48
|
+
border-radius: inherit;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
}
|
|
51
|
+
.mx-cropper-handle {
|
|
52
|
+
position: absolute;
|
|
53
|
+
width: 14px;
|
|
54
|
+
height: 14px;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
border: 2px solid var(--mx-accent);
|
|
57
|
+
border-radius: 3px;
|
|
58
|
+
background: #fff;
|
|
59
|
+
}
|
|
60
|
+
.mx-cropper-handle[data-handle='nw'] { top: -8px; left: -8px; cursor: nwse-resize; }
|
|
61
|
+
.mx-cropper-handle[data-handle='ne'] { top: -8px; right: -8px; cursor: nesw-resize; }
|
|
62
|
+
.mx-cropper-handle[data-handle='sw'] { bottom: -8px; left: -8px; cursor: nesw-resize; }
|
|
63
|
+
.mx-cropper-handle[data-handle='se'] { bottom: -8px; right: -8px; cursor: nwse-resize; }
|
|
64
|
+
.mx-cropper-handle[data-handle='n'] { top: -8px; left: calc(50% - 7px); cursor: ns-resize; }
|
|
65
|
+
.mx-cropper-handle[data-handle='s'] { bottom: -8px; left: calc(50% - 7px); cursor: ns-resize; }
|
|
66
|
+
.mx-cropper-handle[data-handle='e'] { top: calc(50% - 7px); right: -8px; cursor: ew-resize; }
|
|
67
|
+
.mx-cropper-handle[data-handle='w'] { top: calc(50% - 7px); left: -8px; cursor: ew-resize; }
|
|
68
|
+
.mx-image-cropper[data-round] .mx-cropper-handle:is([data-handle='nw'], [data-handle='ne'], [data-handle='sw'], [data-handle='se']) {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
.mx-cropper-controls {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 8px;
|
|
76
|
+
}
|
|
77
|
+
.mx-cropper-zoom {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex: 1 1 180px;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: 10px;
|
|
82
|
+
color: var(--mx-muted);
|
|
83
|
+
font-size: var(--mx-text-sm);
|
|
84
|
+
}
|
|
85
|
+
.mx-cropper-zoom .mx-slider {
|
|
86
|
+
flex: 1;
|
|
87
|
+
}
|
|
88
|
+
.mx-cropper-button {
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
min-width: 32px;
|
|
93
|
+
height: 32px;
|
|
94
|
+
padding: 0 8px;
|
|
95
|
+
border: 1px solid var(--mx-control-border);
|
|
96
|
+
border-radius: var(--mx-radius);
|
|
97
|
+
background: var(--mx-surface);
|
|
98
|
+
color: var(--mx-ink);
|
|
99
|
+
font: inherit;
|
|
100
|
+
font-size: var(--mx-text-sm);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
}
|
|
103
|
+
.mx-cropper-button svg {
|
|
104
|
+
width: 16px;
|
|
105
|
+
height: 16px;
|
|
106
|
+
}
|
|
107
|
+
.mx-cropper-button:hover:not(:disabled) {
|
|
108
|
+
background: var(--mx-subtle);
|
|
109
|
+
}
|
|
110
|
+
.mx-cropper-button:disabled {
|
|
111
|
+
color: var(--mx-muted);
|
|
112
|
+
cursor: not-allowed;
|
|
113
|
+
}
|