@mmlogic/components 0.4.2 → 0.5.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/dist/cjs/client-layout-RZ3Ix-4a.js +87 -0
- package/dist/cjs/{index-CAzwGt9u.js → index-DzRfoAPz.js} +36 -9
- package/dist/cjs/index.cjs.js +56 -81
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mosterdcomponents.cjs.js +3 -3
- package/dist/cjs/{mrd-boolean-field_24.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +175 -287
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/documents/mrd-document-container/mrd-document-container.css +0 -17
- package/dist/collection/components/documents/mrd-document-container/mrd-document-container.js +20 -5
- package/dist/collection/components/documents/mrd-document-list/mrd-document-list.css +9 -43
- package/dist/collection/components/documents/mrd-document-list/mrd-document-list.js +36 -11
- package/dist/collection/components/documents/mrd-document-list/tree-view.js +1 -1
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.css +3 -44
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.js +37 -85
- package/dist/collection/components/fields/mrd-boolean-field/mrd-boolean-field.css +0 -10
- package/dist/collection/components/fields/mrd-currency-field/mrd-currency-field.css +0 -7
- package/dist/collection/components/fields/mrd-file-field/mrd-file-field.css +0 -11
- package/dist/collection/components/fields/mrd-hyperlink-field/mrd-hyperlink-field.css +0 -3
- package/dist/collection/components/fields/mrd-image-field/mrd-image-field.css +6 -20
- package/dist/collection/components/fields/mrd-list-field/mrd-list-field.css +0 -4
- package/dist/collection/components/fields/mrd-longtext-field/mrd-longtext-field.css +0 -1
- package/dist/collection/components/fields/mrd-relation-field/mrd-relation-field.css +9 -35
- package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.css +0 -9
- package/dist/collection/components/form/mrd-field/mrd-field.css +0 -13
- package/dist/collection/components/form/mrd-form/mrd-form.css +0 -19
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.css +3 -58
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +33 -67
- package/dist/collection/components/table/mrd-table/mrd-table.css +38 -185
- package/dist/collection/components/table/mrd-table/mrd-table.js +20 -6
- package/dist/collection/dev/app.js +80 -43
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/document-attachments.js +20 -0
- package/dist/collection/{components/documents/mrd-file-preview → utils}/file-preview-kind.js +4 -4
- package/dist/collection/utils/i18n.js +0 -32
- package/dist/collection/utils/query-params.js +0 -4
- package/dist/components/document-attachments.js +1 -0
- package/dist/components/field-helpers.js +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/mrd-document-container2.js +1 -1
- package/dist/components/mrd-document-list2.js +1 -1
- package/dist/components/mrd-document-view2.js +1 -1
- package/dist/components/mrd-email-field2.js +1 -1
- package/dist/components/mrd-form.js +1 -1
- package/dist/components/mrd-hyperlink-field2.js +1 -1
- package/dist/components/mrd-image-field2.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-number-field2.js +1 -1
- package/dist/components/mrd-relation-field2.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/client-layout-DCOAAH92.js +84 -0
- package/dist/esm/{index-DiSEJMA8.js → index-DiSe6vjv.js} +36 -9
- package/dist/esm/index.js +30 -80
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mosterdcomponents.js +4 -4
- package/dist/esm/{mrd-boolean-field_24.entry.js → mrd-boolean-field_23.entry.js} +85 -196
- package/dist/mosterdcomponents/index.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.css +7 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/p-DCOAAH92.js +1 -0
- package/dist/mosterdcomponents/p-DiSe6vjv.js +2 -0
- package/dist/mosterdcomponents/p-b56f9802.entry.js +1 -0
- package/dist/types/components/documents/mrd-document-container/mrd-document-container.d.ts +6 -2
- package/dist/types/components/documents/mrd-document-list/mrd-document-list.d.ts +13 -2
- package/dist/types/components/documents/mrd-document-list/tree-view.d.ts +1 -1
- package/dist/types/components/documents/mrd-document-view/mrd-document-view.d.ts +21 -27
- package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +14 -15
- package/dist/types/components/table/mrd-table/mrd-table.d.ts +8 -2
- package/dist/types/components.d.ts +54 -190
- package/dist/types/index.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/types/client-layout.d.ts +8 -0
- package/dist/types/utils/document-attachments.d.ts +8 -0
- package/dist/types/utils/file-preview-kind.d.ts +9 -0
- package/dist/types/utils/query-params.d.ts +14 -0
- package/package.json +10 -12
- package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.css +0 -59
- package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.js +0 -212
- package/dist/components/mrd-file-preview.d.ts +0 -11
- package/dist/components/mrd-file-preview.js +0 -1
- package/dist/components/mrd-file-preview2.js +0 -1
- package/dist/mosterdcomponents/cell-renderer-PbcEU4ph.js.map +0 -1
- package/dist/mosterdcomponents/client-layout-DCOAAH92.js.map +0 -1
- package/dist/mosterdcomponents/field-helpers-CASS3akr.js.map +0 -1
- package/dist/mosterdcomponents/file-upload-common-D1ndi6cN.js.map +0 -1
- package/dist/mosterdcomponents/format-BAfsQfy1.js.map +0 -1
- package/dist/mosterdcomponents/i18n-B1IIkRF9.js.map +0 -1
- package/dist/mosterdcomponents/index-AokUFVX0.js.map +0 -1
- package/dist/mosterdcomponents/index-CprJSlzK.js.map +0 -1
- package/dist/mosterdcomponents/index.esm.js.map +0 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +0 -1
- package/dist/mosterdcomponents/p-DiSEJMA8.js +0 -2
- package/dist/mosterdcomponents/p-aae8a9dc.entry.js +0 -1
- package/dist/mosterdcomponents/query-params-B1HfnMOl.js.map +0 -1
- package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +0 -1
- package/dist/mosterdcomponents/validation-DbEViuiw.js.map +0 -1
- package/dist/types/components/documents/mrd-file-preview/file-preview-kind.d.ts +0 -9
- package/dist/types/components/documents/mrd-file-preview/mrd-file-preview.d.ts +0 -41
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { t } from "../../../utils/i18n";
|
|
3
3
|
import { formatDate } from "../../../utils/format";
|
|
4
|
+
import { attachmentsFromRecord } from "../../../utils/document-attachments";
|
|
4
5
|
/**
|
|
5
6
|
* Archetype-driven single-document view. Given a `commons.document` binding and a
|
|
6
|
-
* data record, renders the document recognisably — title,
|
|
7
|
+
* data record, renders the document recognisably — title, filename/download,
|
|
7
8
|
* summary and date — plus a navigation link to the container (the dossier),
|
|
8
9
|
* instead of a generic field form.
|
|
9
10
|
*
|
|
10
11
|
* The component keys on the slot→field map (`archetype.slots`) to locate values:
|
|
11
12
|
* value slots read `data[field]`; the `container` relation slot reads
|
|
12
13
|
* `data._links[field]` (`{ href, name }`). Empty slots are omitted.
|
|
14
|
+
*
|
|
15
|
+
* This component never renders the file itself (no iframe/image preview) — it
|
|
16
|
+
* only ever exposes the file reference via `mrdAttachments`. The host resolves
|
|
17
|
+
* the href and decides how (or whether) to show it inline, so the preview can
|
|
18
|
+
* live anywhere in the host's own layout instead of being boxed into this
|
|
19
|
+
* component's DOM (see TASK-0165 / FINDING-0111).
|
|
13
20
|
*/
|
|
14
21
|
export class MrdDocumentView {
|
|
15
22
|
constructor() {
|
|
16
23
|
/** The data record from the /data endpoint. Fields keyed by name; relations under `_links`. */
|
|
17
24
|
this.data = {};
|
|
18
25
|
this.locale = navigator.language;
|
|
19
|
-
/**
|
|
20
|
-
* the
|
|
21
|
-
|
|
22
|
-
this.previewUrl = '';
|
|
23
|
-
/** Minimum height (px) of the inline preview area — it stretches to fill the
|
|
24
|
-
* available row height in the wide side-by-side layout (see mrd-document-view.scss),
|
|
25
|
-
* and falls back to this height when stacked. Overlay hosts typically pass a
|
|
26
|
-
* smaller value than the full-page default to fit available chrome. */
|
|
27
|
-
this.previewHeight = 640;
|
|
28
|
-
/** Tracks the href a preview was last requested for, so componentDidLoad and
|
|
29
|
-
* the data watcher don't emit duplicate requests for the same file. */
|
|
30
|
-
this.lastPreviewHref = null;
|
|
26
|
+
/** Tracks the href attachments were last emitted for, so componentDidLoad and
|
|
27
|
+
* the data watcher don't emit duplicate events for the same file. */
|
|
28
|
+
this.lastAttachmentHref = null;
|
|
31
29
|
}
|
|
32
30
|
componentDidLoad() {
|
|
33
|
-
this.
|
|
31
|
+
this.emitAttachmentsIfNeeded();
|
|
34
32
|
}
|
|
35
33
|
dataChanged() {
|
|
36
|
-
this.
|
|
34
|
+
this.emitAttachmentsIfNeeded();
|
|
37
35
|
}
|
|
38
|
-
|
|
36
|
+
emitAttachmentsIfNeeded() {
|
|
39
37
|
var _a, _b;
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
const attachments = attachmentsFromRecord(this.archetype, this.data);
|
|
39
|
+
const href = (_b = (_a = attachments[0]) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : null;
|
|
40
|
+
if (href === this.lastAttachmentHref)
|
|
41
|
+
return;
|
|
42
|
+
this.lastAttachmentHref = href;
|
|
43
|
+
this.mrdAttachments.emit({ attachments });
|
|
45
44
|
}
|
|
46
45
|
/** Value of a value-slot: reads data[field] via the slot→field map. */
|
|
47
46
|
slotValue(slot) {
|
|
@@ -66,26 +65,13 @@ export class MrdDocumentView {
|
|
|
66
65
|
return null;
|
|
67
66
|
return (h("button", { class: "mrd-document-view__crumb", onClick: () => this.mrdNavigate.emit({ href: link.href, label: link.name }) }, h("svg", { class: "mrd-document-view__crumb-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M19 12H5M12 19l-7-7 7-7" })), link.name));
|
|
68
67
|
}
|
|
69
|
-
/** Filename + download button —
|
|
70
|
-
*
|
|
68
|
+
/** Filename + download button — the only file-related UI this component owns;
|
|
69
|
+
* inline preview rendering is entirely the host's responsibility. */
|
|
71
70
|
renderFileMeta(fileName, href) {
|
|
72
71
|
return (h("div", { class: "mrd-document-view__file-meta" }, h("span", { class: "mrd-document-view__file-name" }, fileName), href && (h("button", { type: "button", class: "mrd-document-view__download", onClick: () => this.mrdDownload.emit({ href, fileName }) }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M12 3v12m0 0l-4-4m4 4l4-4M4 21h16" })), t('download', this.locale)))));
|
|
73
72
|
}
|
|
74
|
-
/** The preview panel itself (iframe/image/loading state) — its own grid
|
|
75
|
-
* column in the wide layout, so it can take the full available height. */
|
|
76
|
-
renderPreviewPanel(fileName, href, mimeType) {
|
|
77
|
-
if (!href)
|
|
78
|
-
return null;
|
|
79
|
-
return (h("div", { class: "mrd-document-view__preview", style: { minHeight: `${this.previewHeight}px` } }, this.previewUrl ? (h("mrd-file-preview", { src: this.previewUrl, mimeType: mimeType, fileName: fileName, href: href, locale: this.locale, onMrdDownload: (e) => {
|
|
80
|
-
e.stopPropagation();
|
|
81
|
-
this.mrdDownload.emit(e.detail);
|
|
82
|
-
}, onMrdPreviewReload: (e) => {
|
|
83
|
-
e.stopPropagation();
|
|
84
|
-
this.mrdLoadPreview.emit({ href });
|
|
85
|
-
} })) : (h("div", { class: "mrd-document-view__preview-loading" }, t('loading', this.locale)))));
|
|
86
|
-
}
|
|
87
73
|
render() {
|
|
88
|
-
var _a, _b
|
|
74
|
+
var _a, _b;
|
|
89
75
|
const titleRaw = this.slotValue('title');
|
|
90
76
|
const title = titleRaw != null && titleRaw !== '' ? String(titleRaw) : null;
|
|
91
77
|
const dateRaw = this.slotValue('date');
|
|
@@ -95,8 +81,7 @@ export class MrdDocumentView {
|
|
|
95
81
|
const fileRaw = this.slotValue('file');
|
|
96
82
|
const fileHref = (_a = fileRaw === null || fileRaw === void 0 ? void 0 : fileRaw.href) !== null && _a !== void 0 ? _a : '';
|
|
97
83
|
const fileName = (_b = fileRaw === null || fileRaw === void 0 ? void 0 : fileRaw.fileName) !== null && _b !== void 0 ? _b : (fileRaw ? String(fileRaw) : '');
|
|
98
|
-
|
|
99
|
-
return (h(Host, { key: '6023c8c6ca3d780fd4a9cca41189cb05a151221e' }, h("div", { key: 'd7d39d62964583da0ca6c1494e75321e6bab9ac8', class: "mrd-document-view" }, h("div", { key: '9aa14569c9ffc785ffb4f2b3d5930cf3e822e246', class: "mrd-document-view__body" }, h("div", { key: 'e00f3b55551429d8522fb97e7ccb43d56e98042d', class: "mrd-document-view__meta" }, this.renderContainer(), title && h("h1", { key: '9860273878b245fc757eb690c6cd7006b13045c4', class: "mrd-document-view__title" }, title), date && h("p", { key: '84c60b0b6feb6678d661000c26050e42eaaa8399', class: "mrd-document-view__date" }, date), fileRaw && this.renderFileMeta(fileName, fileHref), summary && (h("div", { key: 'd1cff0cc1b9376409c8e04a785deba93c986ba47', class: "mrd-document-view__summary" }, h("div", { key: 'fc9c4b986afc8c4f50486caf85bf58860d641a2b', class: "mrd-document-view__summary-body", innerHTML: summary })))), fileRaw && this.renderPreviewPanel(fileName, fileHref, mimeType)))));
|
|
84
|
+
return (h(Host, { key: 'e25995d61813ad0d285497c0abe74de0c1624cea' }, h("div", { key: '1d8e6c12c5db53bffd28b4bcff84a950c22cc8d8', class: "mrd-document-view" }, h("div", { key: 'b583648e524acd8156f92989b685b6343164738c', class: "mrd-document-view__body" }, h("div", { key: '8992b15a52edd64e2f0fd3269213302ab3989a20', class: "mrd-document-view__meta" }, this.renderContainer(), title && h("h1", { key: '0742816ed6ac927fa12410d723c9b0b8470800c7', class: "mrd-document-view__title" }, title), date && h("p", { key: '4803d2773ef904e3788a865db8e4653e5cb9d8df', class: "mrd-document-view__date" }, date), fileRaw && this.renderFileMeta(fileName, fileHref), summary && (h("div", { key: '502e9e844d474b692246e36c96245ba5321d2a9e', class: "mrd-document-view__summary" }, h("div", { key: 'b37d4c9cb9bc65c5abb0a4e1809e285032868e2c', class: "mrd-document-view__summary-body", innerHTML: summary }))))))));
|
|
100
85
|
}
|
|
101
86
|
static get is() { return "mrd-document-view"; }
|
|
102
87
|
static get encapsulation() { return "scoped"; }
|
|
@@ -178,46 +163,6 @@ export class MrdDocumentView {
|
|
|
178
163
|
"reflect": false,
|
|
179
164
|
"attribute": "locale",
|
|
180
165
|
"defaultValue": "navigator.language"
|
|
181
|
-
},
|
|
182
|
-
"previewUrl": {
|
|
183
|
-
"type": "string",
|
|
184
|
-
"mutable": false,
|
|
185
|
-
"complexType": {
|
|
186
|
-
"original": "string",
|
|
187
|
-
"resolved": "string",
|
|
188
|
-
"references": {}
|
|
189
|
-
},
|
|
190
|
-
"required": false,
|
|
191
|
-
"optional": false,
|
|
192
|
-
"docs": {
|
|
193
|
-
"tags": [],
|
|
194
|
-
"text": "Signed URL for the file's inline preview (mrd-file-preview), resolved by\nthe host in response to mrdLoadPreview. Empty while unresolved \u2014 the\npreview area shows a loading state until the host injects a value."
|
|
195
|
-
},
|
|
196
|
-
"getter": false,
|
|
197
|
-
"setter": false,
|
|
198
|
-
"reflect": false,
|
|
199
|
-
"attribute": "preview-url",
|
|
200
|
-
"defaultValue": "''"
|
|
201
|
-
},
|
|
202
|
-
"previewHeight": {
|
|
203
|
-
"type": "number",
|
|
204
|
-
"mutable": false,
|
|
205
|
-
"complexType": {
|
|
206
|
-
"original": "number",
|
|
207
|
-
"resolved": "number",
|
|
208
|
-
"references": {}
|
|
209
|
-
},
|
|
210
|
-
"required": false,
|
|
211
|
-
"optional": false,
|
|
212
|
-
"docs": {
|
|
213
|
-
"tags": [],
|
|
214
|
-
"text": "Minimum height (px) of the inline preview area \u2014 it stretches to fill the\navailable row height in the wide side-by-side layout (see mrd-document-view.scss),\nand falls back to this height when stacked. Overlay hosts typically pass a\nsmaller value than the full-page default to fit available chrome."
|
|
215
|
-
},
|
|
216
|
-
"getter": false,
|
|
217
|
-
"setter": false,
|
|
218
|
-
"reflect": false,
|
|
219
|
-
"attribute": "preview-height",
|
|
220
|
-
"defaultValue": "640"
|
|
221
166
|
}
|
|
222
167
|
};
|
|
223
168
|
}
|
|
@@ -253,19 +198,26 @@ export class MrdDocumentView {
|
|
|
253
198
|
"references": {}
|
|
254
199
|
}
|
|
255
200
|
}, {
|
|
256
|
-
"method": "
|
|
257
|
-
"name": "
|
|
201
|
+
"method": "mrdAttachments",
|
|
202
|
+
"name": "mrdAttachments",
|
|
258
203
|
"bubbles": true,
|
|
259
204
|
"cancelable": true,
|
|
260
205
|
"composed": true,
|
|
261
206
|
"docs": {
|
|
262
207
|
"tags": [],
|
|
263
|
-
"text": "The file
|
|
208
|
+
"text": "The file(s) belonging to this document, fired once on load and again\nwhenever the file slot's value changes (e.g. the overlay is reused for a\ndifferent document via prev/next). The host resolves the href(s) itself\nand decides whether/how to render them (e.g. pdf.js next to the layout) \u2014\nthis component does not fetch or preview the file."
|
|
264
209
|
},
|
|
265
210
|
"complexType": {
|
|
266
|
-
"original": "{
|
|
267
|
-
"resolved": "{
|
|
268
|
-
"references": {
|
|
211
|
+
"original": "{ attachments: DocumentAttachment[] }",
|
|
212
|
+
"resolved": "{ attachments: DocumentAttachment[]; }",
|
|
213
|
+
"references": {
|
|
214
|
+
"DocumentAttachment": {
|
|
215
|
+
"location": "import",
|
|
216
|
+
"path": "../../../types/client-layout",
|
|
217
|
+
"id": "src/types/client-layout.ts::DocumentAttachment",
|
|
218
|
+
"referenceLocation": "DocumentAttachment"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
269
221
|
}
|
|
270
222
|
}];
|
|
271
223
|
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
width: 100%;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
10
|
.mrd-boolean-field__toggle-label {
|
|
12
11
|
display: flex;
|
|
13
12
|
align-items: center;
|
|
@@ -15,7 +14,6 @@
|
|
|
15
14
|
cursor: pointer;
|
|
16
15
|
user-select: none;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
.mrd-boolean-field__checkbox {
|
|
20
18
|
position: absolute;
|
|
21
19
|
opacity: 0;
|
|
@@ -23,24 +21,19 @@
|
|
|
23
21
|
height: 0;
|
|
24
22
|
pointer-events: none;
|
|
25
23
|
}
|
|
26
|
-
|
|
27
24
|
.mrd-boolean-field__checkbox:checked + .mrd-boolean-field__toggle {
|
|
28
25
|
background-color: var(--mrd-color-primary);
|
|
29
26
|
}
|
|
30
|
-
|
|
31
27
|
.mrd-boolean-field__checkbox:checked + .mrd-boolean-field__toggle::after {
|
|
32
28
|
transform: translateX(20px);
|
|
33
29
|
}
|
|
34
|
-
|
|
35
30
|
.mrd-boolean-field__checkbox:focus + .mrd-boolean-field__toggle {
|
|
36
31
|
box-shadow: var(--mrd-shadow-focus);
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
.mrd-boolean-field__checkbox:disabled + .mrd-boolean-field__toggle {
|
|
40
34
|
opacity: 0.5;
|
|
41
35
|
cursor: not-allowed;
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
.mrd-boolean-field__toggle {
|
|
45
38
|
position: relative;
|
|
46
39
|
display: inline-block;
|
|
@@ -51,7 +44,6 @@
|
|
|
51
44
|
transition: background-color var(--mrd-transition);
|
|
52
45
|
flex-shrink: 0;
|
|
53
46
|
}
|
|
54
|
-
|
|
55
47
|
.mrd-boolean-field__toggle::after {
|
|
56
48
|
content: "";
|
|
57
49
|
position: absolute;
|
|
@@ -64,13 +56,11 @@
|
|
|
64
56
|
transition: transform var(--mrd-transition);
|
|
65
57
|
box-shadow: var(--mrd-shadow-sm);
|
|
66
58
|
}
|
|
67
|
-
|
|
68
59
|
.mrd-boolean-field__text {
|
|
69
60
|
font-family: var(--mrd-font-family);
|
|
70
61
|
font-size: var(--mrd-font-size-base);
|
|
71
62
|
color: var(--mrd-color-neutral-800);
|
|
72
63
|
}
|
|
73
|
-
|
|
74
64
|
.mrd-boolean-field__text--required::after {
|
|
75
65
|
content: " *";
|
|
76
66
|
color: var(--mrd-color-danger);
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
gap: var(--mrd-space-1);
|
|
9
9
|
width: 100%;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
.mrd-currency-field__label {
|
|
13
12
|
display: block;
|
|
14
13
|
font-family: var(--mrd-font-family);
|
|
@@ -20,13 +19,11 @@
|
|
|
20
19
|
content: " *";
|
|
21
20
|
color: var(--mrd-color-danger);
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
.mrd-currency-field__row {
|
|
25
23
|
display: flex;
|
|
26
24
|
gap: var(--mrd-space-2);
|
|
27
25
|
align-items: stretch;
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
.mrd-currency-field__amount {
|
|
31
28
|
display: block;
|
|
32
29
|
width: 100%;
|
|
@@ -65,7 +62,6 @@
|
|
|
65
62
|
flex: 1;
|
|
66
63
|
text-align: right;
|
|
67
64
|
}
|
|
68
|
-
|
|
69
65
|
.mrd-currency-field__currency {
|
|
70
66
|
width: 90px;
|
|
71
67
|
height: var(--mrd-input-height);
|
|
@@ -83,18 +79,15 @@
|
|
|
83
79
|
appearance: none;
|
|
84
80
|
text-align: center;
|
|
85
81
|
}
|
|
86
|
-
|
|
87
82
|
.mrd-currency-field__currency:focus {
|
|
88
83
|
border-color: var(--mrd-border-color-focus);
|
|
89
84
|
box-shadow: var(--mrd-shadow-focus);
|
|
90
85
|
}
|
|
91
|
-
|
|
92
86
|
.mrd-currency-field__currency:disabled {
|
|
93
87
|
background-color: var(--mrd-input-bg-disabled);
|
|
94
88
|
cursor: not-allowed;
|
|
95
89
|
opacity: 0.7;
|
|
96
90
|
}
|
|
97
|
-
|
|
98
91
|
.mrd-currency-field__error {
|
|
99
92
|
font-family: var(--mrd-font-family);
|
|
100
93
|
font-size: var(--mrd-error-font-size);
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
.mrd-file-field__zone {
|
|
56
56
|
padding: var(--mrd-space-6);
|
|
57
57
|
}
|
|
58
|
-
|
|
59
58
|
.mrd-file-field__input {
|
|
60
59
|
position: absolute;
|
|
61
60
|
inset: 0;
|
|
@@ -65,7 +64,6 @@
|
|
|
65
64
|
pointer-events: none;
|
|
66
65
|
cursor: pointer;
|
|
67
66
|
}
|
|
68
|
-
|
|
69
67
|
.mrd-file-field__prompt {
|
|
70
68
|
display: flex;
|
|
71
69
|
flex-direction: column;
|
|
@@ -76,20 +74,16 @@
|
|
|
76
74
|
color: var(--mrd-color-neutral-500);
|
|
77
75
|
text-align: center;
|
|
78
76
|
}
|
|
79
|
-
|
|
80
77
|
.mrd-file-field__upload-icon {
|
|
81
78
|
width: 32px;
|
|
82
79
|
height: 32px;
|
|
83
80
|
color: var(--mrd-color-neutral-400);
|
|
84
81
|
}
|
|
85
|
-
|
|
86
82
|
.mrd-file-field__browse {
|
|
87
83
|
color: var(--mrd-color-primary);
|
|
88
84
|
font-weight: var(--mrd-font-weight-medium);
|
|
89
85
|
text-decoration: underline;
|
|
90
86
|
}
|
|
91
|
-
|
|
92
|
-
/* Selected file row */
|
|
93
87
|
.mrd-file-field__selected {
|
|
94
88
|
display: flex;
|
|
95
89
|
align-items: center;
|
|
@@ -98,14 +92,12 @@
|
|
|
98
92
|
font-size: var(--mrd-font-size-sm);
|
|
99
93
|
color: var(--mrd-color-neutral-700);
|
|
100
94
|
}
|
|
101
|
-
|
|
102
95
|
.mrd-file-field__icon {
|
|
103
96
|
width: 20px;
|
|
104
97
|
height: 20px;
|
|
105
98
|
color: var(--mrd-color-primary);
|
|
106
99
|
flex-shrink: 0;
|
|
107
100
|
}
|
|
108
|
-
|
|
109
101
|
.mrd-file-field__filename {
|
|
110
102
|
flex: 1;
|
|
111
103
|
overflow: hidden;
|
|
@@ -113,7 +105,6 @@
|
|
|
113
105
|
white-space: nowrap;
|
|
114
106
|
max-width: 200px;
|
|
115
107
|
}
|
|
116
|
-
|
|
117
108
|
.mrd-file-field__clear {
|
|
118
109
|
background: none;
|
|
119
110
|
border: none;
|
|
@@ -124,12 +115,10 @@
|
|
|
124
115
|
border-radius: var(--mrd-border-radius-sm);
|
|
125
116
|
line-height: 1;
|
|
126
117
|
}
|
|
127
|
-
|
|
128
118
|
.mrd-file-field__clear:hover {
|
|
129
119
|
color: var(--mrd-color-danger);
|
|
130
120
|
background-color: var(--mrd-color-danger-light);
|
|
131
121
|
}
|
|
132
|
-
|
|
133
122
|
.mrd-file-field__spinner {
|
|
134
123
|
display: inline-block;
|
|
135
124
|
width: 18px;
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
.mrd-hyperlink-field__input--name {
|
|
63
63
|
margin-top: var(--mrd-space-1);
|
|
64
64
|
}
|
|
65
|
-
|
|
66
65
|
.mrd-hyperlink-field__link {
|
|
67
66
|
font-family: var(--mrd-font-family);
|
|
68
67
|
font-size: var(--mrd-font-size-base);
|
|
@@ -70,11 +69,9 @@
|
|
|
70
69
|
text-decoration: underline;
|
|
71
70
|
word-break: break-all;
|
|
72
71
|
}
|
|
73
|
-
|
|
74
72
|
.mrd-hyperlink-field__link:hover {
|
|
75
73
|
opacity: 0.8;
|
|
76
74
|
}
|
|
77
|
-
|
|
78
75
|
.mrd-hyperlink-field__empty {
|
|
79
76
|
font-family: var(--mrd-font-family);
|
|
80
77
|
font-size: var(--mrd-font-size-base);
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
border-color: var(--mrd-border-color);
|
|
53
53
|
background-color: var(--mrd-color-neutral-50);
|
|
54
54
|
}
|
|
55
|
-
|
|
56
55
|
.mrd-image-field__input {
|
|
57
56
|
position: absolute;
|
|
58
57
|
inset: 0;
|
|
@@ -61,7 +60,6 @@
|
|
|
61
60
|
height: 100%;
|
|
62
61
|
pointer-events: none;
|
|
63
62
|
}
|
|
64
|
-
|
|
65
63
|
.mrd-image-field__prompt {
|
|
66
64
|
display: flex;
|
|
67
65
|
flex-direction: column;
|
|
@@ -73,20 +71,16 @@
|
|
|
73
71
|
color: var(--mrd-color-neutral-500);
|
|
74
72
|
text-align: center;
|
|
75
73
|
}
|
|
76
|
-
|
|
77
74
|
.mrd-image-field__upload-icon {
|
|
78
75
|
width: 40px;
|
|
79
76
|
height: 40px;
|
|
80
77
|
color: var(--mrd-color-neutral-400);
|
|
81
78
|
}
|
|
82
|
-
|
|
83
79
|
.mrd-image-field__browse {
|
|
84
80
|
color: var(--mrd-color-primary);
|
|
85
81
|
font-weight: var(--mrd-font-weight-medium);
|
|
86
82
|
text-decoration: underline;
|
|
87
83
|
}
|
|
88
|
-
|
|
89
|
-
/* Preview: thumbnail + bestandsnaam + verwijder knop */
|
|
90
84
|
.mrd-image-field__preview-container {
|
|
91
85
|
display: flex;
|
|
92
86
|
align-items: center;
|
|
@@ -94,7 +88,6 @@
|
|
|
94
88
|
padding: var(--mrd-space-4);
|
|
95
89
|
width: 100%;
|
|
96
90
|
}
|
|
97
|
-
|
|
98
91
|
.mrd-image-field__preview-thumb {
|
|
99
92
|
flex-shrink: 0;
|
|
100
93
|
width: 80px;
|
|
@@ -104,14 +97,12 @@
|
|
|
104
97
|
border: var(--mrd-border-width) solid var(--mrd-border-color);
|
|
105
98
|
background-color: var(--mrd-color-neutral-100);
|
|
106
99
|
}
|
|
107
|
-
|
|
108
100
|
.mrd-image-field__preview {
|
|
109
101
|
width: 100%;
|
|
110
102
|
height: 100%;
|
|
111
103
|
object-fit: cover;
|
|
112
104
|
display: block;
|
|
113
105
|
}
|
|
114
|
-
|
|
115
106
|
.mrd-image-field__preview-info {
|
|
116
107
|
flex: 1;
|
|
117
108
|
min-width: 0;
|
|
@@ -119,7 +110,6 @@
|
|
|
119
110
|
flex-direction: column;
|
|
120
111
|
gap: var(--mrd-space-1);
|
|
121
112
|
}
|
|
122
|
-
|
|
123
113
|
.mrd-image-field__preview-name {
|
|
124
114
|
font-family: var(--mrd-font-family);
|
|
125
115
|
font-size: var(--mrd-font-size-sm);
|
|
@@ -129,7 +119,6 @@
|
|
|
129
119
|
text-overflow: ellipsis;
|
|
130
120
|
white-space: nowrap;
|
|
131
121
|
}
|
|
132
|
-
|
|
133
122
|
.mrd-image-field__preview-overlay {
|
|
134
123
|
position: absolute;
|
|
135
124
|
inset: 0;
|
|
@@ -139,7 +128,6 @@
|
|
|
139
128
|
justify-content: center;
|
|
140
129
|
border-radius: var(--mrd-border-radius);
|
|
141
130
|
}
|
|
142
|
-
|
|
143
131
|
.mrd-image-field__spinner {
|
|
144
132
|
display: inline-block;
|
|
145
133
|
width: 24px;
|
|
@@ -149,18 +137,11 @@
|
|
|
149
137
|
border-radius: 50%;
|
|
150
138
|
animation: mrd-spin 0.6s linear infinite;
|
|
151
139
|
}
|
|
152
|
-
|
|
153
|
-
@keyframes mrd-spin {
|
|
154
|
-
to {
|
|
155
|
-
transform: rotate(360deg);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
140
|
.mrd-image-field__upload-status {
|
|
159
141
|
font-family: var(--mrd-font-family);
|
|
160
142
|
font-size: var(--mrd-font-size-xs);
|
|
161
143
|
color: var(--mrd-color-neutral-500);
|
|
162
144
|
}
|
|
163
|
-
|
|
164
145
|
.mrd-image-field__clear {
|
|
165
146
|
flex-shrink: 0;
|
|
166
147
|
background-color: var(--mrd-color-white);
|
|
@@ -174,8 +155,13 @@
|
|
|
174
155
|
cursor: pointer;
|
|
175
156
|
transition: background-color var(--mrd-transition), color var(--mrd-transition);
|
|
176
157
|
}
|
|
177
|
-
|
|
178
158
|
.mrd-image-field__clear:hover {
|
|
179
159
|
background-color: var(--mrd-color-danger);
|
|
180
160
|
color: var(--mrd-color-white);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@keyframes mrd-spin {
|
|
164
|
+
to {
|
|
165
|
+
transform: rotate(360deg);
|
|
166
|
+
}
|
|
181
167
|
}
|
|
@@ -75,11 +75,9 @@
|
|
|
75
75
|
border-radius: var(--mrd-border-radius);
|
|
76
76
|
background-color: var(--mrd-input-bg);
|
|
77
77
|
}
|
|
78
|
-
|
|
79
78
|
.mrd-list-field__checkbox-list--error {
|
|
80
79
|
border-color: var(--mrd-border-color-error);
|
|
81
80
|
}
|
|
82
|
-
|
|
83
81
|
.mrd-list-field__checkbox-item {
|
|
84
82
|
display: flex;
|
|
85
83
|
align-items: center;
|
|
@@ -89,14 +87,12 @@
|
|
|
89
87
|
color: var(--mrd-input-color);
|
|
90
88
|
cursor: pointer;
|
|
91
89
|
}
|
|
92
|
-
|
|
93
90
|
.mrd-list-field__checkbox-item input[type=checkbox] {
|
|
94
91
|
width: 1rem;
|
|
95
92
|
height: 1rem;
|
|
96
93
|
cursor: pointer;
|
|
97
94
|
accent-color: var(--mrd-color-primary);
|
|
98
95
|
}
|
|
99
|
-
|
|
100
96
|
.mrd-list-field__color-dot {
|
|
101
97
|
display: inline-block;
|
|
102
98
|
width: 12px;
|