@meshmakers/octo-ui 3.5.100 → 3.5.130
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/fesm2022/meshmakers-octo-ui-entity-forms.mjs +7 -7
- package/fesm2022/meshmakers-octo-ui-entity-forms.mjs.map +1 -1
- package/fesm2022/meshmakers-octo-ui.mjs +89 -100
- package/fesm2022/meshmakers-octo-ui.mjs.map +1 -1
- package/lib/runtime-browser/styles/_button.scss +22 -0
- package/lib/runtime-browser/styles/_dialog-actions.scss +51 -0
- package/lib/runtime-browser/styles/_styles.scss +4 -0
- package/lib/runtime-browser/styles/_theme.scss +3 -0
- package/package.json +1 -1
- package/types/meshmakers-octo-ui.d.ts +15 -6
|
@@ -106,6 +106,28 @@
|
|
|
106
106
|
@include octo-button-primary-disabled;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
// Destructive SOLID button (`themeColor="error"` + default fill, AB#6464): error fill, so a delete
|
|
110
|
+
// confirm differs from Cancel without reading the label (action guideline §2.4). Only the solid fill
|
|
111
|
+
// class matches: a flat / outline error button (e.g. a danger text action in a toolbar) stays flat
|
|
112
|
+
// (guideline §2.2 / §9) - this mixin is also used by the list, grid and page toolbars.
|
|
113
|
+
&.k-button-solid-error {
|
|
114
|
+
background: var(--theme-status-error, var(--bubblegum));
|
|
115
|
+
border-color: var(--theme-status-error, var(--bubblegum));
|
|
116
|
+
color: var(--theme-text-on-accent, var(--deep-sea));
|
|
117
|
+
|
|
118
|
+
.k-svg-icon,
|
|
119
|
+
.k-icon,
|
|
120
|
+
svg {
|
|
121
|
+
fill: var(--theme-text-on-accent, var(--deep-sea));
|
|
122
|
+
color: var(--theme-text-on-accent, var(--deep-sea));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:hover:not(:disabled) {
|
|
126
|
+
background: color-mix(in srgb, var(--theme-status-error, var(--bubblegum)) 88%, var(--theme-text-primary, white));
|
|
127
|
+
border-color: color-mix(in srgb, var(--theme-status-error, var(--bubblegum)) 88%, var(--theme-text-primary, white));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
109
131
|
// Selected FLAT toggles (e.g. the list view's row-filter command, `themeColor="primary"
|
|
110
132
|
// fillMode="flat"`): the primary branch above has the same specificity as `.k-selected` and
|
|
111
133
|
// comes later, so it would paint selected and unselected alike. This rule is more specific and
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Dialog action rows - THE one definition (AB#6464, Studio action guideline §2.2 / §2.4).
|
|
2
|
+
//
|
|
3
|
+
// Every dialog footer carries the class `mm-dialog-actions`:
|
|
4
|
+
// * `<kendo-dialog-actions>` gets it from `MmDialogActionsDirective` (@meshmakers/shared-ui),
|
|
5
|
+
// which also switches Kendo's default `stretched` layout to `end`;
|
|
6
|
+
// * hand-made footers (`<div class="mm-dialog-actions">`, e.g. the MeshBoard config dialogs)
|
|
7
|
+
// write the class themselves and need no CSS of their own.
|
|
8
|
+
//
|
|
9
|
+
// The look: right-aligned, buttons keep their natural width at the control height (34 px), gap
|
|
10
|
+
// from the spacing token, a wrapped second row instead of clipping at 390 px, and a destructive
|
|
11
|
+
// confirm (`themeColor="error"`) that reads as danger without reading the label.
|
|
12
|
+
// Only tokens - no hard-coded colour or pixel values (fallbacks mirror `_theme.scss`).
|
|
13
|
+
@mixin dialog-actions {
|
|
14
|
+
.mm-dialog-actions {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
gap: var(--theme-space-2, 8px);
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
|
|
22
|
+
.k-button {
|
|
23
|
+
flex: 0 0 auto;
|
|
24
|
+
width: auto;
|
|
25
|
+
// Kendo's medium button is 39 px; the action rows use the 34 px control height.
|
|
26
|
+
height: var(--theme-control-height-md, 34px);
|
|
27
|
+
min-height: var(--theme-control-height-md, 34px);
|
|
28
|
+
padding-block: 0;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Outline / flat destructive confirms (e.g. the entity page's Delete): the generic action-row
|
|
33
|
+
// rules force a neutral border and text colour with !important, so restate the danger look.
|
|
34
|
+
.k-button:is(.k-button-outline-error, .k-button-flat-error) {
|
|
35
|
+
color: var(--theme-status-error, var(--bubblegum)) !important;
|
|
36
|
+
border-color: var(--theme-status-error, var(--bubblegum)) !important;
|
|
37
|
+
|
|
38
|
+
&:hover:not(:disabled) {
|
|
39
|
+
background: var(--theme-status-error-subtle, transparent) !important;
|
|
40
|
+
border-color: var(--theme-status-error, var(--bubblegum)) !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Hand-made footers have no Kendo chrome: give them the divider and the padding that
|
|
46
|
+
// `kendo-dialog-actions` brings along.
|
|
47
|
+
div.mm-dialog-actions {
|
|
48
|
+
padding: var(--theme-space-2, 8px) var(--theme-space-4, 16px);
|
|
49
|
+
border-top: 1px solid var(--theme-border-subtle, var(--octo-mint-20));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use "flat-button" as *;
|
|
4
4
|
@use "field-input" as *;
|
|
5
5
|
@use "button" as *;
|
|
6
|
+
@use "dialog-actions" as *;
|
|
6
7
|
|
|
7
8
|
@mixin styles {
|
|
8
9
|
// Direct dockview element overrides - needed because ViewEncapsulation blocks global styles
|
|
@@ -2261,6 +2262,9 @@
|
|
|
2261
2262
|
}
|
|
2262
2263
|
}
|
|
2263
2264
|
|
|
2265
|
+
// Dialog action rows: right-aligned 34 px buttons, token gap, danger confirm (AB#6464)
|
|
2266
|
+
@include dialog-actions;
|
|
2267
|
+
|
|
2264
2268
|
// Dialog Danger variant - for production/staging confirmation dialogs
|
|
2265
2269
|
.mm-dialog-danger .k-dialog {
|
|
2266
2270
|
border-color: var(--theme-status-error, var(--bubblegum-50));
|
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
--theme-space-7: 28px;
|
|
49
49
|
--theme-space-8: 32px;
|
|
50
50
|
|
|
51
|
+
// Control height (new, AB#6464): buttons in dialog action rows and other compact controls.
|
|
52
|
+
--theme-control-height-md: 34px;
|
|
53
|
+
|
|
51
54
|
// Radius — symmetric edges, no pills (new).
|
|
52
55
|
--theme-radius-xs: 2px; // chips
|
|
53
56
|
--theme-radius-sm: 4px; // buttons, inputs, tabs
|
package/package.json
CHANGED
|
@@ -1473,16 +1473,18 @@ declare enum DefaultPropertyCategory {
|
|
|
1473
1473
|
Metadata = "Metadata"
|
|
1474
1474
|
}
|
|
1475
1475
|
/**
|
|
1476
|
-
* Event data for binary download requests
|
|
1476
|
+
* Event data for binary download requests: the clicked `BINARY_LINKED` value itself.
|
|
1477
|
+
* Structurally a `BinaryReference` of `@meshmakers/octo-services`, so a host can pass it straight to
|
|
1478
|
+
* `FileDownloadService.downloadBinary()` — no owner-type lookup needed (AB#6179).
|
|
1477
1479
|
*/
|
|
1478
1480
|
interface BinaryDownloadEvent {
|
|
1479
|
-
/** The binary ID to download */
|
|
1480
|
-
binaryId
|
|
1481
|
+
/** The binary ID to download. Absent only when the value carries just a `downloadUri`. */
|
|
1482
|
+
binaryId?: string;
|
|
1481
1483
|
/** Optional filename for the download */
|
|
1482
1484
|
filename?: string;
|
|
1483
1485
|
/** Optional content type */
|
|
1484
1486
|
contentType?: string;
|
|
1485
|
-
/**
|
|
1487
|
+
/** Download URI if the value carries one (typed `LargeBinaryInfo` fields do, the generic attribute projection does not) */
|
|
1486
1488
|
downloadUri?: string;
|
|
1487
1489
|
}
|
|
1488
1490
|
|
|
@@ -1607,6 +1609,7 @@ declare class PropertyGridComponent implements OnInit, OnChanges {
|
|
|
1607
1609
|
propertyChange: EventEmitter<PropertyChangeEvent>;
|
|
1608
1610
|
saveRequested: EventEmitter<PropertyGridItem[]>;
|
|
1609
1611
|
binaryDownload: EventEmitter<BinaryDownloadEvent>;
|
|
1612
|
+
private readonly injector;
|
|
1610
1613
|
filteredData: PropertyGridItem[];
|
|
1611
1614
|
searchTerm: string;
|
|
1612
1615
|
hasChanges: boolean;
|
|
@@ -1649,7 +1652,8 @@ declare class PropertyGridComponent implements OnInit, OnChanges {
|
|
|
1649
1652
|
*/
|
|
1650
1653
|
onPropertyChange(property: PropertyGridItem, oldValue: unknown, newValue: unknown): void;
|
|
1651
1654
|
/**
|
|
1652
|
-
* Handle binary download request from property value display
|
|
1655
|
+
* Handle binary download request from property value display: forwarded to the host when it binds
|
|
1656
|
+
* `(binaryDownload)`, otherwise downloaded here with the user's bearer (AB#6179).
|
|
1653
1657
|
*/
|
|
1654
1658
|
onBinaryDownload(event: BinaryDownloadEvent): void;
|
|
1655
1659
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertyGridComponent, never>;
|
|
@@ -1673,6 +1677,7 @@ declare class PropertyValueDisplayComponent implements OnInit, OnChanges {
|
|
|
1673
1677
|
binaryDownload: EventEmitter<BinaryDownloadEvent>;
|
|
1674
1678
|
isExpanded: boolean;
|
|
1675
1679
|
private readonly windowService;
|
|
1680
|
+
private readonly injector;
|
|
1676
1681
|
private readonly locale;
|
|
1677
1682
|
/** Non-null when the value is a secret state (SECRET value type or record member marker). */
|
|
1678
1683
|
secretStatus: SecretStatus | null;
|
|
@@ -1776,7 +1781,11 @@ declare class PropertyValueDisplayComponent implements OnInit, OnChanges {
|
|
|
1776
1781
|
*/
|
|
1777
1782
|
private formatFileSize;
|
|
1778
1783
|
/**
|
|
1779
|
-
* Handle download button click
|
|
1784
|
+
* Handle download button click.
|
|
1785
|
+
*
|
|
1786
|
+
* Emits {@link binaryDownload} with the clicked value when a host listens. Without a listener the
|
|
1787
|
+
* component downloads the value itself through `FileDownloadService` — an authenticated blob
|
|
1788
|
+
* download with the user's bearer, never `window.open(rawUrl)`, which carries no token (AB#6179).
|
|
1780
1789
|
*/
|
|
1781
1790
|
onDownload(): void;
|
|
1782
1791
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertyValueDisplayComponent, never>;
|