ud-components 0.1.1 → 0.1.3

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.
@@ -0,0 +1,39 @@
1
+ import * as i0 from "@angular/core";
2
+ export type UdButtonVariant = 'flat' | 'stroked' | 'icon-only';
3
+ export type UdButtonColor = 'primary' | 'secondary' | 'danger';
4
+ export type UdButtonSize = 'sm' | 'md' | 'lg';
5
+ export type UdButtonIconPosition = 'left' | 'right';
6
+ /**
7
+ * Styled button that wraps Angular Material with the library's design tokens.
8
+ *
9
+ * Usage:
10
+ * <ud-button>Save</ud-button>
11
+ * <ud-button variant="stroked" color="secondary">Cancel</ud-button>
12
+ * <ud-button [loading]="isSaving" icon="save">Save</ud-button>
13
+ * <ud-button color="danger" variant="stroked">Delete</ud-button>
14
+ */
15
+ export declare class UdButtonComponent {
16
+ /** Visual style of the button */
17
+ variant: UdButtonVariant;
18
+ /** Colour role */
19
+ color: UdButtonColor;
20
+ /** Size preset */
21
+ size: UdButtonSize;
22
+ /** Native button type */
23
+ type: 'button' | 'submit' | 'reset';
24
+ /** Material icon name. Shows a spinner when loading is true instead. */
25
+ icon?: string;
26
+ /** Which side the icon appears on */
27
+ iconPosition: UdButtonIconPosition;
28
+ /** Font set for the icon (default: material-icons-outlined) */
29
+ iconFontSet: string;
30
+ /** Shows a spinner and disables the button */
31
+ loading: boolean;
32
+ /** Explicitly disable the button */
33
+ disabled: boolean;
34
+ /** Stretch to fill the container width */
35
+ fullWidth: boolean;
36
+ get isDisabled(): boolean;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<UdButtonComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<UdButtonComponent, "ud-button", never, { "variant": { "alias": "variant"; "required": false; }; "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "iconFontSet": { "alias": "iconFontSet"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; }, {}, never, ["*"], true, never>;
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0"
package/public-api.d.ts CHANGED
@@ -16,6 +16,7 @@ export * from './lib/tel-input/tel-input.component';
16
16
  export * from './lib/form-fields/text-input/text-input.component';
17
17
  export * from './lib/form-fields/multi-select/multi-select.component';
18
18
  export * from './lib/form-fields/pill-toggle/pill-toggle.component';
19
+ export * from './lib/button/button.component';
19
20
  export * from './enums/application-status.enum';
20
21
  export * from './enums/custom-table.enum';
21
22
  export * from './enums/modal-input-type.enum';