Skip to content

Commit

Permalink
Merge branch 'main' into #182-fix-autocomplete-chip-input
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-prinz-mw committed Jul 11, 2023
2 parents 14d191f + c9b53d7 commit 2ee518d
Show file tree
Hide file tree
Showing 81 changed files with 5,557 additions and 4,689 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ export class MwAutocomplete {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ["mwAutocompleteValueChanged"]);
proxyOutputs(this, this.el, ["valueChanged"]);
}
}

export declare interface MwAutocomplete extends Components.MwAutocomplete {
/**
* Emits an event when its value changes
*/
mwAutocompleteValueChanged: EventEmitter<CustomEvent<string>>;
valueChanged: EventEmitter<CustomEvent<string>>;
}

@ProxyCmp({
Expand Down Expand Up @@ -287,14 +287,14 @@ export class MwCardHeader {
export declare interface MwCardHeader extends Components.MwCardHeader {}

@ProxyCmp({
inputs: ["alt", "src"],
inputs: ["alt", "height", "src"],
})
@Component({
selector: "mw-card-image",
changeDetection: ChangeDetectionStrategy.OnPush,
template: "<ng-content></ng-content>",
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ["alt", "src"],
inputs: ["alt", "height", "src"],
})
export class MwCardImage {
protected el: HTMLElement;
Expand Down Expand Up @@ -397,19 +397,19 @@ export class MwChipInput {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ["mwChipListValueChanged", "mwChipListInputChange"]);
proxyOutputs(this, this.el, ["valueChanged", "inputChange"]);
}
}

export declare interface MwChipInput extends Components.MwChipInput {
/**
* Emits an event when its value changes
*/
mwChipListValueChanged: EventEmitter<CustomEvent<string[]>>;
valueChanged: EventEmitter<CustomEvent<string[]>>;
/**
* Emits an event when value of input changes
*/
mwChipListInputChange: EventEmitter<CustomEvent<string>>;
inputChange: EventEmitter<CustomEvent<string>>;
}

@ProxyCmp({
Expand Down Expand Up @@ -905,6 +905,40 @@ export declare interface MwTabs extends Components.MwTabs {
tabsClickEmitter: EventEmitter<CustomEvent<{ selected: number }>>;
}

@ProxyCmp({
inputs: ["cols", "disabled", "form", "hasError", "helperText", "label", "maxlength", "name", "placeholder", "readonly", "required", "resize", "rows", "value"],
})
@Component({
selector: "mw-textarea",
changeDetection: ChangeDetectionStrategy.OnPush,
template: "<ng-content></ng-content>",
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ["cols", "disabled", "form", "hasError", "helperText", "label", "maxlength", "name", "placeholder", "readonly", "required", "resize", "rows", "value"],
})
export class MwTextarea {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ["inputEmitter", "changeEmitter", "blurEmitter"]);
}
}

export declare interface MwTextarea extends Components.MwTextarea {
/**
* emit input event
*/
inputEmitter: EventEmitter<CustomEvent<string>>;
/**
* emit change event
*/
changeEmitter: EventEmitter<CustomEvent<any>>;
/**
* emit blur event
*/
blurEmitter: EventEmitter<CustomEvent<any>>;
}

@ProxyCmp({
inputs: ["disabled", "hasError", "helperText", "inline", "label", "name", "placeholder", "readOnly", "required", "type", "value"],
})
Expand All @@ -920,13 +954,13 @@ export class MwTextfield {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ["mwTextfieldValueChanged"]);
proxyOutputs(this, this.el, ["valueChanged"]);
}
}

export declare interface MwTextfield extends Components.MwTextfield {
/**
* MwTextfield emits an event when textfield value changes
*/
mwTextfieldValueChanged: EventEmitter<CustomEvent<string>>;
valueChanged: EventEmitter<CustomEvent<string>>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ export const DIRECTIVES = [
d.MwSwitch,
d.MwTab,
d.MwTabs,
d.MwTextarea,
d.MwTextfield,
];
1 change: 1 addition & 0 deletions mwui-react/src/components/stencil-generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ export const MwSlider = /*@__PURE__*/ createReactComponent<JSX.MwSlider, HTMLMwS
export const MwSwitch = /*@__PURE__*/ createReactComponent<JSX.MwSwitch, HTMLMwSwitchElement>("mw-switch");
export const MwTab = /*@__PURE__*/ createReactComponent<JSX.MwTab, HTMLMwTabElement>("mw-tab");
export const MwTabs = /*@__PURE__*/ createReactComponent<JSX.MwTabs, HTMLMwTabsElement>("mw-tabs");
export const MwTextarea = /*@__PURE__*/ createReactComponent<JSX.MwTextarea, HTMLMwTextareaElement>("mw-textarea");
export const MwTextfield = /*@__PURE__*/ createReactComponent<JSX.MwTextfield, HTMLMwTextfieldElement>("mw-textfield");
3 changes: 0 additions & 3 deletions mwui-stencil/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ module.exports = {
features: {
buildStoriesJson: true,
},
docs: {
autodocs: true,
},
};
8 changes: 5 additions & 3 deletions mwui-stencil/.storybook/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { create } from "@storybook/theming";
// import "../src/global/global.css";
import "../src/global/sb-global.css";

import "../../mwui-token-farm/dist/css/MW_component.css";

import {
Expand All @@ -9,6 +10,7 @@ import {
mwCoreColorNeutral100,
borderRadiusStandardMd,
mwCoreColorNeutral50,
mwCoreColorBlue500,
} from "../../mwui-token-farm/dist/js/MW_core";

export default create({
Expand All @@ -19,8 +21,8 @@ export default create({
brandTarget: "_self",

// UI
colorPrimary: mwCoreColorPink500,
colorSecondary: mwCoreColorDarkblue900,
colorPrimary: mwCoreColorBlue500,
colorSecondary: mwCoreColorPink500,
appBg: mwCoreColorNeutral100,
appContentBg: mwCoreColorNeutral50,
appBorderColor: "grey",
Expand Down
Loading

0 comments on commit 2ee518d

Please sign in to comment.