@maliardic/ma-ui 0.2.1 → 3.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0
4
+
5
+ A visual release. **No API changes:** every selector, input, output, method,
6
+ exported type and `--m-*` token name from 0.2.x is unchanged, so templates and
7
+ TypeScript need no edits. Only the default look changes. Guide:
8
+ https://malipixel.com/ma-ui/migration
9
+
10
+ ### Changed
11
+
12
+ - **New default look.** Deep blue primary (`#2c4a9a`, dark `#8da6e6`), warm
13
+ neutrals, near-black text (`#161616`). The info colour now follows the
14
+ primary colour.
15
+ - **Slightly denser.** Base size 13.5px (`--m-font-size: 0.8435rem`, was 14px),
16
+ control padding about 4% smaller, menu/listbox/table rows follow the font
17
+ size (`--m-row-height`).
18
+ - **Consistent corners and shadows.** 3px small, 5px controls, 8px panels
19
+ (dialog, drawer, popover, menu, toast), three shared shadow levels.
20
+ - Hard-coded focus rings, shadows, radii and disabled opacities inside
21
+ components now come from shared core tokens.
22
+ - **Toast** messages slide in from their side and fade out more slowly
23
+ (320ms), with a much softer shadow.
24
+ - `icon` inputs and `<m-icon name>` are typed as the new `MIconInput`
25
+ (`MIconName | (string & {})`): any string is accepted and maicon names
26
+ autocomplete again in editors.
27
+
28
+ ### Added
29
+
30
+ - Core tokens: `--m-gap`, `--m-radius-sm`, `--m-radius-container`,
31
+ `--m-radius-full`, `--m-border-width`, `--m-focus-ring-width`,
32
+ `--m-disabled-opacity`, `--m-shadow-sm`, `--m-shadow-panel`,
33
+ `--m-shadow-overlay`, `--m-row-height`, `--m-control-line-height`.
34
+ Component tokens point at them, so changing one core token updates every
35
+ component; setting a component token directly still wins.
36
+ - `--m-toast-shadow` and `--m-toast-easing`.
37
+ - `styles/themes/classic.css` — load it after the main stylesheet to keep the
38
+ 0.2.x look.
39
+ - `MIconInput` type export.
40
+ - `.m-confirmation__message` class on the confirmation dialog message (the old
41
+ class is kept).
42
+
43
+ ### Fixed
44
+
45
+ - Components no longer rely on a global CSS reset: table cells and the radio
46
+ circle use `box-sizing: border-box`, and table page buttons have no browser
47
+ border.
48
+
49
+ ### Upgrading
50
+
51
+ ```sh
52
+ npm install @maliardic/ma-ui@^3
53
+ ```
54
+
55
+ To keep the previous look:
56
+
57
+ ```css
58
+ @import "@maliardic/ma-ui/styles/ma-ui.css";
59
+ @import "@maliardic/ma-ui/styles/themes/classic.css";
60
+ ```
61
+
62
+ ## 0.2.1
63
+
64
+ ### Changed
65
+
66
+ - `icon` inputs and `<m-icon name>` accept any string (for example icon names
67
+ coming from data). Unknown names render nothing.
68
+
3
69
  ## 0.2.0
4
70
 
5
71
  ### Breaking changes
@@ -51,6 +117,6 @@ Common Font Awesome names and their maicon equivalents:
51
117
  | `rotate-left` / `rotate-right` | `undo` / `redo` |
52
118
  | `list-ul` / `list-ol` | `list` / `list-numbers` |
53
119
 
54
- The full list is in `M_ICON_NAMES` and in the showcase Icon catalog. An unknown
120
+ The full list is in `M_ICON_NAMES` and on the docs Icon page. An unknown
55
121
  name renders nothing, so check the TypeScript errors on `MIconName` after
56
122
  upgrading.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Standalone Angular UI components, directives and CSS variable themes.
4
4
 
5
+ **Docs, live examples and theme builder:** https://malipixel.com/ma-ui/
6
+
5
7
  ## Install
6
8
 
7
9
  Requires Angular 22.1.0+ and Angular CDK 22.1.1+ within major version 22.
@@ -83,6 +85,20 @@ Use `.m-light` or `.m-dark` on a container and override the `--m-*` CSS variable
83
85
  Overlay components inherit theme settings from their host. Keep custom theme
84
86
  overrides after the library stylesheet.
85
87
 
88
+ A handful of core tokens (`--m-color-primary`, `--m-font-size`,
89
+ `--m-radius-control`, `--m-radius-container`, …) drive every component.
90
+ See https://malipixel.com/ma-ui/theming.
91
+
92
+ To keep the 0.2.x look after upgrading to 3.x, load the classic theme after the
93
+ main stylesheet:
94
+
95
+ ```css
96
+ @import "@maliardic/ma-ui/styles/ma-ui.css";
97
+ @import "@maliardic/ma-ui/styles/themes/classic.css";
98
+ ```
99
+
100
+ Upgrading from 0.2.x: https://malipixel.com/ma-ui/migration
101
+
86
102
  ## License
87
103
 
88
104
  MIT. See [LICENSE](LICENSE).
@@ -6571,7 +6571,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
6571
6571
  }], ctorParameters: () => [], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
6572
6572
 
6573
6573
  const DEFAULT_LIFE = 3000;
6574
- const EXIT_DURATION = 140;
6574
+ /** Matches the default --m-toast-transition-duration so the exit animation can finish. */
6575
+ const EXIT_DURATION = 320;
6575
6576
  const DEFAULT_ICONS = {
6576
6577
  info: "info",
6577
6578
  success: "circle-check",
@@ -6857,11 +6858,11 @@ class Confirmation {
6857
6858
  this.item.set(null);
6858
6859
  }
6859
6860
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Confirmation, deps: [], target: i0.ɵɵFactoryTarget.Component });
6860
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Confirmation, isStandalone: true, selector: "m-confirmationDialog", inputs: { acceptLabel: { classPropertyName: "acceptLabel", publicName: "acceptLabel", isSignal: true, isRequired: false, transformFunction: null }, rejectLabel: { classPropertyName: "rejectLabel", publicName: "rejectLabel", isSignal: true, isRequired: false, transformFunction: null }, acceptButtonStyle: { classPropertyName: "acceptButtonStyle", publicName: "acceptButtonStyle", isSignal: true, isRequired: false, transformFunction: null }, rejectButtonStyle: { classPropertyName: "rejectButtonStyle", publicName: "rejectButtonStyle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<m-dialog data-demo-dialog=\"template\" size=\"lg\" [closeOnEscape]=\"closeOnEscape()\" [visible]=\"item()\"\n [closable]=\"closable()\" (visibleChange)=\"onClose()\">\n <ng-template #content>\n @if (item()?.header) {\n <ng-template #header>\n <span>{{item()?.header}}</span>\n </ng-template>\n }\n @if (item()?.message) {\n <p class=\"showcase-field__message\">\n {{item()?.message}}\n </p>\n }\n </ng-template>\n <ng-template #footer>\n @if (rejectVisible()) {\n <m-button [class]=\"rejectButtonStyle()\" (click)=\"onReject()\">{{_rejectLabel()}}</m-button>\n }\n @if (acceptVisible()) {\n <m-button [class]=\"acceptButtonStyle()\" (click)=\"onAccept()\">{{_acceptLabel()}}\n </m-button>\n }\n </ng-template>\n</m-dialog>\n", dependencies: [{ kind: "component", type: MDialog, selector: "m-dialog", inputs: ["visible", "header", "modal", "closable", "dismissibleMask", "closeOnEscape", "draggable", "maximizable", "maximized", "size", "width", "style", "styleClass", "dialogStyleClass", "class", "closeLabel", "maximizeLabel", "restoreLabel"], outputs: ["visibleChange", "maximizedChange"] }, { kind: "component", type: MButton, selector: "m-button", inputs: ["icon", "aria-label", "size", "type", "block", "iconOnly", "disabled", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
6861
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Confirmation, isStandalone: true, selector: "m-confirmationDialog", inputs: { acceptLabel: { classPropertyName: "acceptLabel", publicName: "acceptLabel", isSignal: true, isRequired: false, transformFunction: null }, rejectLabel: { classPropertyName: "rejectLabel", publicName: "rejectLabel", isSignal: true, isRequired: false, transformFunction: null }, acceptButtonStyle: { classPropertyName: "acceptButtonStyle", publicName: "acceptButtonStyle", isSignal: true, isRequired: false, transformFunction: null }, rejectButtonStyle: { classPropertyName: "rejectButtonStyle", publicName: "rejectButtonStyle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<m-dialog data-demo-dialog=\"template\" size=\"lg\" [closeOnEscape]=\"closeOnEscape()\" [visible]=\"item()\"\n [closable]=\"closable()\" (visibleChange)=\"onClose()\">\n <ng-template #content>\n @if (item()?.header) {\n <ng-template #header>\n <span>{{item()?.header}}</span>\n </ng-template>\n }\n @if (item()?.message) {\n <p class=\"m-confirmation__message showcase-field__message\">\n {{item()?.message}}\n </p>\n }\n </ng-template>\n <ng-template #footer>\n @if (rejectVisible()) {\n <m-button [class]=\"rejectButtonStyle()\" (click)=\"onReject()\">{{_rejectLabel()}}</m-button>\n }\n @if (acceptVisible()) {\n <m-button [class]=\"acceptButtonStyle()\" (click)=\"onAccept()\">{{_acceptLabel()}}\n </m-button>\n }\n </ng-template>\n</m-dialog>\n", dependencies: [{ kind: "component", type: MDialog, selector: "m-dialog", inputs: ["visible", "header", "modal", "closable", "dismissibleMask", "closeOnEscape", "draggable", "maximizable", "maximized", "size", "width", "style", "styleClass", "dialogStyleClass", "class", "closeLabel", "maximizeLabel", "restoreLabel"], outputs: ["visibleChange", "maximizedChange"] }, { kind: "component", type: MButton, selector: "m-button", inputs: ["icon", "aria-label", "size", "type", "block", "iconOnly", "disabled", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
6861
6862
  }
6862
6863
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Confirmation, decorators: [{
6863
6864
  type: Component,
6864
- args: [{ selector: "m-confirmationDialog", imports: [MDialog, MButton], changeDetection: ChangeDetectionStrategy.Eager, template: "<m-dialog data-demo-dialog=\"template\" size=\"lg\" [closeOnEscape]=\"closeOnEscape()\" [visible]=\"item()\"\n [closable]=\"closable()\" (visibleChange)=\"onClose()\">\n <ng-template #content>\n @if (item()?.header) {\n <ng-template #header>\n <span>{{item()?.header}}</span>\n </ng-template>\n }\n @if (item()?.message) {\n <p class=\"showcase-field__message\">\n {{item()?.message}}\n </p>\n }\n </ng-template>\n <ng-template #footer>\n @if (rejectVisible()) {\n <m-button [class]=\"rejectButtonStyle()\" (click)=\"onReject()\">{{_rejectLabel()}}</m-button>\n }\n @if (acceptVisible()) {\n <m-button [class]=\"acceptButtonStyle()\" (click)=\"onAccept()\">{{_acceptLabel()}}\n </m-button>\n }\n </ng-template>\n</m-dialog>\n" }]
6865
+ args: [{ selector: "m-confirmationDialog", imports: [MDialog, MButton], changeDetection: ChangeDetectionStrategy.Eager, template: "<m-dialog data-demo-dialog=\"template\" size=\"lg\" [closeOnEscape]=\"closeOnEscape()\" [visible]=\"item()\"\n [closable]=\"closable()\" (visibleChange)=\"onClose()\">\n <ng-template #content>\n @if (item()?.header) {\n <ng-template #header>\n <span>{{item()?.header}}</span>\n </ng-template>\n }\n @if (item()?.message) {\n <p class=\"m-confirmation__message showcase-field__message\">\n {{item()?.message}}\n </p>\n }\n </ng-template>\n <ng-template #footer>\n @if (rejectVisible()) {\n <m-button [class]=\"rejectButtonStyle()\" (click)=\"onReject()\">{{_rejectLabel()}}</m-button>\n }\n @if (acceptVisible()) {\n <m-button [class]=\"acceptButtonStyle()\" (click)=\"onAccept()\">{{_acceptLabel()}}\n </m-button>\n }\n </ng-template>\n</m-dialog>\n" }]
6865
6866
  }], propDecorators: { acceptLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptLabel", required: false }] }], rejectLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rejectLabel", required: false }] }], acceptButtonStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptButtonStyle", required: false }] }], rejectButtonStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "rejectButtonStyle", required: false }] }] } });
6866
6867
 
6867
6868
  /**