@mmlogic/components 0.4.3 → 0.5.1
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} +159 -286
- 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 +12 -4
- 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 +14 -6
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.css +30 -68
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.js +49 -90
- 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 +25 -66
- package/dist/collection/components/table/mrd-table/mrd-table.css +38 -185
- package/dist/collection/components/table/mrd-table/mrd-table.js +3 -5
- package/dist/collection/components/table/mrd-table/table-parts.js +2 -5
- package/dist/collection/dev/app.js +76 -40
- package/dist/collection/dev/example-data.js +2 -1
- 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/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} +69 -195
- 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-cdecc698.entry.js +1 -0
- package/dist/types/components/documents/mrd-document-container/mrd-document-container.d.ts +4 -2
- package/dist/types/components/documents/mrd-document-list/mrd-document-list.d.ts +6 -2
- package/dist/types/components/documents/mrd-document-view/mrd-document-view.d.ts +27 -29
- package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +12 -15
- package/dist/types/components.d.ts +61 -195
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/types/client-layout.d.ts +10 -3
- package/dist/types/utils/document-attachments.d.ts +8 -0
- package/dist/types/utils/file-preview-kind.d.ts +9 -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/p-DiSEJMA8.js +0 -2
- package/dist/mosterdcomponents/p-e816d459.entry.js +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,47 @@
|
|
|
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
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* data record, renders the document recognisably — title, date, a navigation
|
|
8
|
+
* link to the container (the dossier) presented like any other data-object link
|
|
9
|
+
* (primary-coloured text link), an optional muted folder path, a download button
|
|
10
|
+
* and summary — instead of a generic field form.
|
|
9
11
|
*
|
|
10
12
|
* The component keys on the slot→field map (`archetype.slots`) to locate values:
|
|
11
13
|
* value slots read `data[field]`; the `container` relation slot reads
|
|
12
14
|
* `data._links[field]` (`{ href, name }`). Empty slots are omitted.
|
|
15
|
+
*
|
|
16
|
+
* This component never renders the file itself (no iframe/image preview) — it
|
|
17
|
+
* only ever exposes the file reference via `mrdAttachments`. The host resolves
|
|
18
|
+
* the href and decides how (or whether) to show it inline, so the preview can
|
|
19
|
+
* live anywhere in the host's own layout instead of being boxed into this
|
|
20
|
+
* component's DOM (see TASK-0165 / FINDING-0111).
|
|
13
21
|
*/
|
|
14
22
|
export class MrdDocumentView {
|
|
15
23
|
constructor() {
|
|
16
24
|
/** The data record from the /data endpoint. Fields keyed by name; relations under `_links`. */
|
|
17
25
|
this.data = {};
|
|
18
26
|
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;
|
|
27
|
+
/** Tracks the href attachments were last emitted for, so componentDidLoad and
|
|
28
|
+
* the data watcher don't emit duplicate events for the same file. */
|
|
29
|
+
this.lastAttachmentHref = null;
|
|
31
30
|
}
|
|
32
31
|
componentDidLoad() {
|
|
33
|
-
this.
|
|
32
|
+
this.emitAttachmentsIfNeeded();
|
|
34
33
|
}
|
|
35
34
|
dataChanged() {
|
|
36
|
-
this.
|
|
35
|
+
this.emitAttachmentsIfNeeded();
|
|
37
36
|
}
|
|
38
|
-
|
|
37
|
+
emitAttachmentsIfNeeded() {
|
|
39
38
|
var _a, _b;
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
const attachments = attachmentsFromRecord(this.archetype, this.data);
|
|
40
|
+
const href = (_b = (_a = attachments[0]) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : null;
|
|
41
|
+
if (href === this.lastAttachmentHref)
|
|
42
|
+
return;
|
|
43
|
+
this.lastAttachmentHref = href;
|
|
44
|
+
this.mrdAttachments.emit({ attachments });
|
|
45
45
|
}
|
|
46
46
|
/** Value of a value-slot: reads data[field] via the slot→field map. */
|
|
47
47
|
slotValue(slot) {
|
|
@@ -60,32 +60,25 @@ export class MrdDocumentView {
|
|
|
60
60
|
const links = ((_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c._links) !== null && _d !== void 0 ? _d : {});
|
|
61
61
|
return links[field];
|
|
62
62
|
}
|
|
63
|
+
/** Container link (styled like relation links in layout sections: primary text
|
|
64
|
+
* link) plus a muted, non-interactive folder path when present. */
|
|
63
65
|
renderContainer() {
|
|
64
66
|
const link = this.slotLink('container');
|
|
65
|
-
|
|
67
|
+
const hasLink = !!((link === null || link === void 0 ? void 0 : link.href) && link.name);
|
|
68
|
+
const folderRaw = this.slotValue('folder');
|
|
69
|
+
const folder = folderRaw != null && folderRaw !== '' ? String(folderRaw) : null;
|
|
70
|
+
if (!hasLink && !folder)
|
|
66
71
|
return null;
|
|
67
|
-
return (h("button", { class: "mrd-document-
|
|
72
|
+
return (h("div", { class: "mrd-document-view__container" }, hasLink && (h("button", { type: "button", class: "mrd-document-view__container-link", onClick: () => this.mrdNavigate.emit({ href: link.href, label: link.name }) }, link.name)), folder && (h("span", { class: "mrd-document-view__folder" }, h("svg", { class: "mrd-document-view__folder-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: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" })), folder))));
|
|
68
73
|
}
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
74
|
+
/** Download button — the only file-related UI this component owns; the filename
|
|
75
|
+
* is deliberately not shown (rarely relevant, the title identifies the document)
|
|
76
|
+
* and inline preview rendering is entirely the host's responsibility. */
|
|
71
77
|
renderFileMeta(fileName, href) {
|
|
72
|
-
return (h("div", { class: "mrd-document-view__file-meta" },
|
|
73
|
-
}
|
|
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)))));
|
|
78
|
+
return (h("div", { class: "mrd-document-view__file-meta" }, 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)))));
|
|
86
79
|
}
|
|
87
80
|
render() {
|
|
88
|
-
var _a, _b
|
|
81
|
+
var _a, _b;
|
|
89
82
|
const titleRaw = this.slotValue('title');
|
|
90
83
|
const title = titleRaw != null && titleRaw !== '' ? String(titleRaw) : null;
|
|
91
84
|
const dateRaw = this.slotValue('date');
|
|
@@ -95,8 +88,7 @@ export class MrdDocumentView {
|
|
|
95
88
|
const fileRaw = this.slotValue('file');
|
|
96
89
|
const fileHref = (_a = fileRaw === null || fileRaw === void 0 ? void 0 : fileRaw.href) !== null && _a !== void 0 ? _a : '';
|
|
97
90
|
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)))));
|
|
91
|
+
return (h(Host, { key: 'd4e8d4a6c5c66677df3d4e80943fc4538d9a2be7' }, h("div", { key: 'c67bb1742590dc3ab3cec959f20dfa9030268411', class: "mrd-document-view" }, h("div", { key: '5da6e15d1f67990a9ee06bc07b717e5fa17a2ee7', class: "mrd-document-view__body" }, h("div", { key: '0fc38933add3fff48096c48d2fb6cd06fb5d1eac', class: "mrd-document-view__meta" }, title && h("h1", { key: 'e9ac8d99f9afae6b64dd7e6bd461c54b92a6ea39', class: "mrd-document-view__title" }, title), date && h("p", { key: '8591d77b300ed3c021cfa64b8e9564dee98199cd', class: "mrd-document-view__date" }, date), this.renderContainer(), fileRaw && this.renderFileMeta(fileName, fileHref), summary && (h("div", { key: '8a6d630afcf187fa86c9bab77d06d93695fd5c9f', class: "mrd-document-view__summary" }, h("div", { key: 'bd98e2cf740d08837accd8d260973d4e51cd24f7', class: "mrd-document-view__summary-body", innerHTML: summary }))))))));
|
|
100
92
|
}
|
|
101
93
|
static get is() { return "mrd-document-view"; }
|
|
102
94
|
static get encapsulation() { return "scoped"; }
|
|
@@ -178,46 +170,6 @@ export class MrdDocumentView {
|
|
|
178
170
|
"reflect": false,
|
|
179
171
|
"attribute": "locale",
|
|
180
172
|
"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
173
|
}
|
|
222
174
|
};
|
|
223
175
|
}
|
|
@@ -253,19 +205,26 @@ export class MrdDocumentView {
|
|
|
253
205
|
"references": {}
|
|
254
206
|
}
|
|
255
207
|
}, {
|
|
256
|
-
"method": "
|
|
257
|
-
"name": "
|
|
208
|
+
"method": "mrdAttachments",
|
|
209
|
+
"name": "mrdAttachments",
|
|
258
210
|
"bubbles": true,
|
|
259
211
|
"cancelable": true,
|
|
260
212
|
"composed": true,
|
|
261
213
|
"docs": {
|
|
262
214
|
"tags": [],
|
|
263
|
-
"text": "The file
|
|
215
|
+
"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
216
|
},
|
|
265
217
|
"complexType": {
|
|
266
|
-
"original": "{
|
|
267
|
-
"resolved": "{
|
|
268
|
-
"references": {
|
|
218
|
+
"original": "{ attachments: DocumentAttachment[] }",
|
|
219
|
+
"resolved": "{ attachments: DocumentAttachment[]; }",
|
|
220
|
+
"references": {
|
|
221
|
+
"DocumentAttachment": {
|
|
222
|
+
"location": "import",
|
|
223
|
+
"path": "../../../types/client-layout",
|
|
224
|
+
"id": "src/types/client-layout.ts::DocumentAttachment",
|
|
225
|
+
"referenceLocation": "DocumentAttachment"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
269
228
|
}
|
|
270
229
|
}];
|
|
271
230
|
}
|
|
@@ -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;
|