@maliardic/ma-ui 0.2.0 → 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 +67 -1
- package/README.md +16 -0
- package/fesm2022/maliardic-ma-ui.mjs +4 -3
- package/fesm2022/maliardic-ma-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/components/_accordion.scss +1 -1
- package/styles/components/_badge.scss +1 -1
- package/styles/components/_button.scss +1 -1
- package/styles/components/_checkbox.scss +2 -2
- package/styles/components/_date-picker.scss +6 -6
- package/styles/components/_dialog.scss +9 -1
- package/styles/components/_drawer.scss +1 -1
- package/styles/components/_editor.scss +3 -3
- package/styles/components/_file-upload.scss +2 -2
- package/styles/components/_input.scss +3 -3
- package/styles/components/_listbox.scss +1 -1
- package/styles/components/_menu-search.scss +1 -1
- package/styles/components/_menu.scss +2 -2
- package/styles/components/_multi-select.scss +5 -5
- package/styles/components/_popover.scss +2 -2
- package/styles/components/_progress-bar.scss +1 -1
- package/styles/components/_radio.scss +4 -3
- package/styles/components/_select.scss +8 -8
- package/styles/components/_switch.scss +4 -4
- package/styles/components/_table.scss +8 -7
- package/styles/components/_tabs.scss +2 -2
- package/styles/components/_tiered-menu.scss +1 -1
- package/styles/components/_toast.scss +35 -11
- package/styles/ma-ui.css +1 -1
- package/styles/themes/classic.css +1 -0
- package/styles/themes/classic.scss +163 -0
- package/styles/tokens.scss +156 -129
- package/types/maliardic-ma-ui.d.ts +52 -47
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as _maliardic_ma_icon from '@maliardic/ma-icon';
|
|
2
|
-
import { MaiconName, MaiconGlyph } from '@maliardic/ma-icon';
|
|
3
1
|
import * as _angular_core from '@angular/core';
|
|
4
2
|
import { TemplateRef, Type, Provider, OnDestroy, OnInit, PipeTransform, AfterViewInit, AfterViewChecked, WritableSignal, InputSignal } from '@angular/core';
|
|
3
|
+
import * as _maliardic_ma_icon from '@maliardic/ma-icon';
|
|
4
|
+
import { MaiconName, MaiconGlyph } from '@maliardic/ma-icon';
|
|
5
5
|
import { ControlValueAccessor } from '@angular/forms';
|
|
6
6
|
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
7
7
|
import * as _maliardic_ma_ui from '@maliardic/ma-ui';
|
|
@@ -61,6 +61,44 @@ interface MaFields {
|
|
|
61
61
|
reorderable?: boolean;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
/** Name of an icon in the maicon set (`@maliardic/ma-icon`). */
|
|
65
|
+
type MIconName = MaiconName;
|
|
66
|
+
/**
|
|
67
|
+
* Value accepted by `icon` inputs: a maicon name, or any other string (for example one
|
|
68
|
+
* coming from data). Known names still autocomplete; unknown names render nothing.
|
|
69
|
+
*/
|
|
70
|
+
type MIconInput = MIconName | (string & {});
|
|
71
|
+
/** Every icon name in the maicon set (`@maliardic/ma-icon`), alphabetical. */
|
|
72
|
+
declare const M_ICON_NAMES: readonly MIconName[];
|
|
73
|
+
/** Returns the glyph for a name, or `null` for unknown / empty names. */
|
|
74
|
+
declare function mIconGlyph(name: string | null | undefined): MaiconGlyph | null;
|
|
75
|
+
/** True when `name` is an icon in the maicon set (`@maliardic/ma-icon`). */
|
|
76
|
+
declare function isMIconName(name: unknown): name is MIconName;
|
|
77
|
+
/**
|
|
78
|
+
* Builds the `<svg>` that `<m-icon>` renders (with the `m-icon` class on the svg itself), for places that
|
|
79
|
+
* create DOM imperatively (e.g. directives). Returns `null` for unknown names.
|
|
80
|
+
*/
|
|
81
|
+
declare function createMIconSvg(document: Document, name: string | null | undefined): SVGSVGElement | null;
|
|
82
|
+
/**
|
|
83
|
+
* Inline SVG icon from the maicon set (`@maliardic/ma-icon`). Size follows `font-size`, colour follows `color`.
|
|
84
|
+
*
|
|
85
|
+
* ```html
|
|
86
|
+
* <m-icon name="search" />
|
|
87
|
+
* <button mButton aria-label="Ara"><m-icon name="search" /></button>
|
|
88
|
+
* <m-icon name="alert-triangle" label="Uyarı" />
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
declare class MIcon {
|
|
92
|
+
/** Icon name. Unknown names render nothing. */
|
|
93
|
+
readonly name: _angular_core.InputSignal<MIconInput | null | undefined>;
|
|
94
|
+
/** Accessible name. Empty means decorative (`aria-hidden`). */
|
|
95
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
96
|
+
protected readonly strokeWidth = 1.5;
|
|
97
|
+
protected readonly glyph: _angular_core.Signal<MaiconGlyph | null>;
|
|
98
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MIcon, never>;
|
|
99
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MIcon, "m-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
100
|
+
}
|
|
101
|
+
|
|
64
102
|
interface MAccordionHeaderTemplateContext {
|
|
65
103
|
expanded: boolean;
|
|
66
104
|
disabled: boolean;
|
|
@@ -70,7 +108,7 @@ interface MAccordionHeaderTemplateContext {
|
|
|
70
108
|
declare class MAccordionPanel {
|
|
71
109
|
readonly value: _angular_core.InputSignal<string>;
|
|
72
110
|
readonly header: _angular_core.InputSignal<string>;
|
|
73
|
-
readonly icon: _angular_core.InputSignal<
|
|
111
|
+
readonly icon: _angular_core.InputSignal<MIconInput>;
|
|
74
112
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
75
113
|
readonly headerTemplate: _angular_core.Signal<TemplateRef<MAccordionHeaderTemplateContext> | undefined>;
|
|
76
114
|
readonly panelId: string;
|
|
@@ -124,7 +162,7 @@ declare class MBadge {
|
|
|
124
162
|
|
|
125
163
|
type MButtonType = "button" | "submit" | "reset";
|
|
126
164
|
declare class MButton {
|
|
127
|
-
readonly icon: _angular_core.InputSignal<
|
|
165
|
+
readonly icon: _angular_core.InputSignal<MIconInput>;
|
|
128
166
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
129
167
|
readonly size: _angular_core.InputSignal<MControlSize>;
|
|
130
168
|
readonly type: _angular_core.InputSignal<MButtonType>;
|
|
@@ -431,43 +469,10 @@ declare class MFileList<T = unknown> {
|
|
|
431
469
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MFileList<any>, "m-file-list", never, { "files": { "alias": "files"; "required": false; "isSignal": true; }; "nameField": { "alias": "nameField"; "required": false; "isSignal": true; }; "sizeField": { "alias": "sizeField"; "required": false; "isSignal": true; }; "typeField": { "alias": "typeField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "downloadable": { "alias": "downloadable"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "unnamedLabel": { "alias": "unnamedLabel"; "required": false; "isSignal": true; }; "downloadLabel": { "alias": "downloadLabel"; "required": false; "isSignal": true; }; "removeLabel": { "alias": "removeLabel"; "required": false; "isSignal": true; }; }, { "download": "download"; "remove": "remove"; }, never, never, true, never>;
|
|
432
470
|
}
|
|
433
471
|
|
|
434
|
-
/** Name of an icon in the maicon set (`@maliardic/ma-icon`). */
|
|
435
|
-
type MIconName = MaiconName;
|
|
436
|
-
/** Every icon name in the maicon set (`@maliardic/ma-icon`), alphabetical. */
|
|
437
|
-
declare const M_ICON_NAMES: readonly MIconName[];
|
|
438
|
-
/** Returns the glyph for a name, or `null` for unknown / empty names. */
|
|
439
|
-
declare function mIconGlyph(name: string | null | undefined): MaiconGlyph | null;
|
|
440
|
-
/** True when `name` is an icon in the maicon set (`@maliardic/ma-icon`). */
|
|
441
|
-
declare function isMIconName(name: unknown): name is MIconName;
|
|
442
|
-
/**
|
|
443
|
-
* Builds the `<svg>` that `<m-icon>` renders (with the `m-icon` class on the svg itself), for places that
|
|
444
|
-
* create DOM imperatively (e.g. directives). Returns `null` for unknown names.
|
|
445
|
-
*/
|
|
446
|
-
declare function createMIconSvg(document: Document, name: string | null | undefined): SVGSVGElement | null;
|
|
447
|
-
/**
|
|
448
|
-
* Inline SVG icon from the maicon set (`@maliardic/ma-icon`). Size follows `font-size`, colour follows `color`.
|
|
449
|
-
*
|
|
450
|
-
* ```html
|
|
451
|
-
* <m-icon name="search" />
|
|
452
|
-
* <button mButton aria-label="Ara"><m-icon name="search" /></button>
|
|
453
|
-
* <m-icon name="alert-triangle" label="Uyarı" />
|
|
454
|
-
* ```
|
|
455
|
-
*/
|
|
456
|
-
declare class MIcon {
|
|
457
|
-
/** Icon name. Unknown names render nothing. */
|
|
458
|
-
readonly name: _angular_core.InputSignal<"" | MaiconName | null | undefined>;
|
|
459
|
-
/** Accessible name. Empty means decorative (`aria-hidden`). */
|
|
460
|
-
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
461
|
-
protected readonly strokeWidth = 1.5;
|
|
462
|
-
protected readonly glyph: _angular_core.Signal<MaiconGlyph | null>;
|
|
463
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MIcon, never>;
|
|
464
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MIcon, "m-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
472
|
declare class MInput implements ControlValueAccessor {
|
|
468
473
|
readonly inputId: _angular_core.InputSignal<string>;
|
|
469
474
|
readonly type: _angular_core.InputSignal<MInputType>;
|
|
470
|
-
readonly icon: _angular_core.InputSignal<
|
|
475
|
+
readonly icon: _angular_core.InputSignal<MIconInput>;
|
|
471
476
|
readonly mask: _angular_core.InputSignal<string>;
|
|
472
477
|
readonly rawValue: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
473
478
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
@@ -502,7 +507,7 @@ declare class MInput implements ControlValueAccessor {
|
|
|
502
507
|
|
|
503
508
|
declare class MInputNumber implements ControlValueAccessor {
|
|
504
509
|
readonly inputId: _angular_core.InputSignal<string>;
|
|
505
|
-
readonly icon: _angular_core.InputSignal<
|
|
510
|
+
readonly icon: _angular_core.InputSignal<MIconInput>;
|
|
506
511
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
507
512
|
readonly value: _angular_core.InputSignal<string | number | null>;
|
|
508
513
|
readonly name: _angular_core.InputSignal<string>;
|
|
@@ -606,7 +611,7 @@ interface MMenuItem {
|
|
|
606
611
|
id?: string;
|
|
607
612
|
label?: string;
|
|
608
613
|
value: string;
|
|
609
|
-
icon?:
|
|
614
|
+
icon?: MIconInput;
|
|
610
615
|
disabled?: boolean;
|
|
611
616
|
items?: readonly MMenuItem[];
|
|
612
617
|
routerLink?: string | readonly unknown[];
|
|
@@ -950,7 +955,7 @@ declare class MSelect implements ControlValueAccessor, OnDestroy {
|
|
|
950
955
|
private overlayRef;
|
|
951
956
|
private outsideSubscription;
|
|
952
957
|
readonly inputId: _angular_core.InputSignal<string>;
|
|
953
|
-
readonly icon: _angular_core.InputSignal<
|
|
958
|
+
readonly icon: _angular_core.InputSignal<MIconInput>;
|
|
954
959
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
955
960
|
readonly value: _angular_core.InputSignal<unknown>;
|
|
956
961
|
readonly name: _angular_core.InputSignal<string>;
|
|
@@ -1422,7 +1427,7 @@ interface MTabHeaderTemplateContext {
|
|
|
1422
1427
|
declare class MTab {
|
|
1423
1428
|
readonly value: _angular_core.InputSignal<string>;
|
|
1424
1429
|
readonly label: _angular_core.InputSignal<string>;
|
|
1425
|
-
readonly icon: _angular_core.InputSignal<
|
|
1430
|
+
readonly icon: _angular_core.InputSignal<MIconInput>;
|
|
1426
1431
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1427
1432
|
readonly lazy: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1428
1433
|
readonly headerTemplate: _angular_core.Signal<TemplateRef<MTabHeaderTemplateContext> | undefined>;
|
|
@@ -1498,7 +1503,7 @@ interface MToastOptions {
|
|
|
1498
1503
|
sticky?: boolean;
|
|
1499
1504
|
life?: number;
|
|
1500
1505
|
/** maicon name. Empty string hides the icon; omitted uses the type default. */
|
|
1501
|
-
icon?:
|
|
1506
|
+
icon?: MIconInput;
|
|
1502
1507
|
closable?: boolean;
|
|
1503
1508
|
styleClass?: string;
|
|
1504
1509
|
}
|
|
@@ -1509,7 +1514,7 @@ interface MToastMessage {
|
|
|
1509
1514
|
type: MToastType;
|
|
1510
1515
|
sticky: boolean;
|
|
1511
1516
|
life: number;
|
|
1512
|
-
icon:
|
|
1517
|
+
icon: MIconInput;
|
|
1513
1518
|
closable: boolean;
|
|
1514
1519
|
styleClass: string;
|
|
1515
1520
|
closing: boolean;
|
|
@@ -1594,7 +1599,7 @@ declare class MButtonDirective {
|
|
|
1594
1599
|
private iconElement;
|
|
1595
1600
|
readonly size: _angular_core.InputSignal<MControlSize>;
|
|
1596
1601
|
/** maicon name rendered before the content. */
|
|
1597
|
-
readonly icon: _angular_core.InputSignal<
|
|
1602
|
+
readonly icon: _angular_core.InputSignal<MIconInput>;
|
|
1598
1603
|
readonly block: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1599
1604
|
readonly iconOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1600
1605
|
constructor();
|
|
@@ -1692,7 +1697,7 @@ declare function syncMThemeToOverlay(hostEl: HTMLElement, overlayPaneEl: HTMLEle
|
|
|
1692
1697
|
interface MConfirmation {
|
|
1693
1698
|
header?: string;
|
|
1694
1699
|
message: string;
|
|
1695
|
-
icon?:
|
|
1700
|
+
icon?: MIconInput;
|
|
1696
1701
|
acceptLabel?: string;
|
|
1697
1702
|
rejectLabel?: string;
|
|
1698
1703
|
acceptVisible?: boolean;
|
|
@@ -1731,4 +1736,4 @@ declare class Confirmation {
|
|
|
1731
1736
|
}
|
|
1732
1737
|
|
|
1733
1738
|
export { Confirmation, MAccordion, MAccordionPanel, MBadge, MBadgeDirective, MButton, MButtonDirective, MCheckbox, MCommandMenu, MConfirmationService, MDatePicker, MDialog, MDrawer, MFieldValuePipe, MFileList, MFileUpload, MIcon, MInput, MInputDirective, MInputNumber, MInputNumberDirective, MListbox, MMenu, MMenuSearch, MMultiSelect, MPopover, MProgressBar, MProgressSpinner, MRadio, MRadioGroup, MSelect, MSwitch, MTab, MTable, MTableColumn, MTabs, MTextarea, MTieredMenu, MToast, MToastService, MTooltipDirective, M_ICON_NAMES, createMIconSvg, getFieldValue, isMIconName, mIconGlyph, noopTouched, provideValueAccessor, resolveFieldDisplayValue, resolveFieldRawValue, syncMThemeToOverlay };
|
|
1734
|
-
export type { MBadgePosition, MBadgeSeverity, MBadgeSize, MCheckboxChangeEvent, MChoiceOption, MChoiceOptionInput, MConfirmation, MControlChangeFn, MControlSize, MControlTouchedFn, MDrawerPosition, MFieldValueFormatter, MFieldValuePipeName, MFieldValueRow, MFieldValueSource, MIconName, MInputType, MListboxItemContext, MMenuItem, MMultiSelectChangeEvent, MPopoverPosition, MProgressBarMode, MProgressBarSeverity, MProgressBarSize, MProgressSpinnerMode, MProgressSpinnerSeverity, MProgressSpinnerSize, MSelectChangeEvent, MSelectOption, MSelectOptionInput, MSwitchChangeEvent, MTableColumnAlign, MTableColumnDef, MTableColumnState, MTableFilterMatchMode, MTableLazyLoadEvent, MTableRow, MTableSelectionMode, MTableSortDirection, MToastMessage, MToastOptions, MToastPosition, MToastType, MTooltipPosition, MaFieldData, MaFieldType, MaFieldValidations, MaFields };
|
|
1739
|
+
export type { MBadgePosition, MBadgeSeverity, MBadgeSize, MCheckboxChangeEvent, MChoiceOption, MChoiceOptionInput, MConfirmation, MControlChangeFn, MControlSize, MControlTouchedFn, MDrawerPosition, MFieldValueFormatter, MFieldValuePipeName, MFieldValueRow, MFieldValueSource, MIconInput, MIconName, MInputType, MListboxItemContext, MMenuItem, MMultiSelectChangeEvent, MPopoverPosition, MProgressBarMode, MProgressBarSeverity, MProgressBarSize, MProgressSpinnerMode, MProgressSpinnerSeverity, MProgressSpinnerSize, MSelectChangeEvent, MSelectOption, MSelectOptionInput, MSwitchChangeEvent, MTableColumnAlign, MTableColumnDef, MTableColumnState, MTableFilterMatchMode, MTableLazyLoadEvent, MTableRow, MTableSelectionMode, MTableSortDirection, MToastMessage, MToastOptions, MToastPosition, MToastType, MTooltipPosition, MaFieldData, MaFieldType, MaFieldValidations, MaFields };
|