mis-crystal-design-system 2.1.3 → 2.2.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.
Files changed (78) hide show
  1. package/async-search-dropdown/async-dropdown.component.d.ts +60 -0
  2. package/async-search-dropdown/async-dropdown.module.d.ts +2 -0
  3. package/async-search-dropdown/index.d.ts +1 -0
  4. package/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.d.ts +4 -0
  5. package/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.metadata.json +1 -0
  6. package/async-search-dropdown/package.json +11 -0
  7. package/async-search-dropdown/public_api.d.ts +2 -0
  8. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js +211 -0
  9. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js.map +1 -0
  10. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js +2 -0
  11. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js.map +1 -0
  12. package/bundles/mis-crystal-design-system-button.umd.js +60 -2
  13. package/bundles/mis-crystal-design-system-button.umd.js.map +1 -1
  14. package/bundles/mis-crystal-design-system-button.umd.min.js +1 -1
  15. package/bundles/mis-crystal-design-system-button.umd.min.js.map +1 -1
  16. package/bundles/mis-crystal-design-system-input.umd.js +111 -0
  17. package/bundles/mis-crystal-design-system-input.umd.js.map +1 -0
  18. package/bundles/mis-crystal-design-system-input.umd.min.js +2 -0
  19. package/bundles/mis-crystal-design-system-input.umd.min.js.map +1 -0
  20. package/bundles/mis-crystal-design-system-modal.umd.js +165 -0
  21. package/bundles/mis-crystal-design-system-modal.umd.js.map +1 -0
  22. package/bundles/mis-crystal-design-system-modal.umd.min.js +2 -0
  23. package/bundles/mis-crystal-design-system-modal.umd.min.js.map +1 -0
  24. package/button/button.directive.d.ts +12 -0
  25. package/button/mis-crystal-design-system-button.d.ts +1 -0
  26. package/button/mis-crystal-design-system-button.metadata.json +1 -1
  27. package/esm2015/async-search-dropdown/async-dropdown.component.js +176 -0
  28. package/esm2015/async-search-dropdown/async-dropdown.module.js +15 -0
  29. package/esm2015/async-search-dropdown/index.js +2 -0
  30. package/esm2015/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.js +5 -0
  31. package/esm2015/async-search-dropdown/public_api.js +3 -0
  32. package/esm2015/button/button.directive.js +57 -0
  33. package/esm2015/button/button.module.js +4 -3
  34. package/esm2015/button/mis-crystal-design-system-button.js +2 -1
  35. package/esm2015/input/directives/input/input.directive.js +38 -0
  36. package/esm2015/input/index.js +2 -0
  37. package/esm2015/input/mis-crystal-design-system-input.js +5 -0
  38. package/esm2015/input/mis-input.component.js +40 -0
  39. package/esm2015/input/mis-input.module.js +15 -0
  40. package/esm2015/input/public_api.js +4 -0
  41. package/esm2015/modal/index.js +2 -0
  42. package/esm2015/modal/mis-crystal-design-system-modal.js +6 -0
  43. package/esm2015/modal/modal-constants.js +4 -0
  44. package/esm2015/modal/modal-ref.js +16 -0
  45. package/esm2015/modal/modal.module.js +32 -0
  46. package/esm2015/modal/modal.service.js +72 -0
  47. package/esm2015/modal/module-wrapper/module-wrapper.component.js +33 -0
  48. package/esm2015/modal/public_api.js +5 -0
  49. package/fesm2015/mis-crystal-design-system-async-search-dropdown.js +194 -0
  50. package/fesm2015/mis-crystal-design-system-async-search-dropdown.js.map +1 -0
  51. package/fesm2015/mis-crystal-design-system-button.js +60 -4
  52. package/fesm2015/mis-crystal-design-system-button.js.map +1 -1
  53. package/fesm2015/mis-crystal-design-system-input.js +94 -0
  54. package/fesm2015/mis-crystal-design-system-input.js.map +1 -0
  55. package/fesm2015/mis-crystal-design-system-modal.js +151 -0
  56. package/fesm2015/mis-crystal-design-system-modal.js.map +1 -0
  57. package/input/directives/input/input.directive.d.ts +15 -0
  58. package/input/index.d.ts +1 -0
  59. package/input/mis-crystal-design-system-input.d.ts +4 -0
  60. package/input/mis-crystal-design-system-input.metadata.json +1 -0
  61. package/input/mis-input.component.d.ts +15 -0
  62. package/input/mis-input.module.d.ts +2 -0
  63. package/input/package.json +11 -0
  64. package/input/public_api.d.ts +3 -0
  65. package/modal/index.d.ts +1 -0
  66. package/modal/mis-crystal-design-system-modal.d.ts +5 -0
  67. package/modal/mis-crystal-design-system-modal.metadata.json +1 -0
  68. package/modal/modal-constants.d.ts +3 -0
  69. package/modal/modal-ref.d.ts +9 -0
  70. package/modal/modal.module.d.ts +5 -0
  71. package/modal/modal.service.d.ts +22 -0
  72. package/modal/module-wrapper/module-wrapper.component.d.ts +9 -0
  73. package/modal/package.json +11 -0
  74. package/modal/public_api.d.ts +4 -0
  75. package/package.json +1 -1
  76. package/projects/mis-components/button/button.directive.scss +69 -0
  77. package/{drawer → projects/mis-components/drawer}/drawer.scss +0 -0
  78. package/projects/mis-components/modal/modal.scss +9 -0
@@ -0,0 +1,151 @@
1
+ import { OverlayConfig, Overlay, OverlayModule } from '@angular/cdk/overlay';
2
+ import { ComponentPortal, PortalInjector, PortalModule } from '@angular/cdk/portal';
3
+ import { InjectionToken, Component, ViewChild, ViewContainerRef, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Injectable, Injector, NgModule } from '@angular/core';
4
+ import { Subject } from 'rxjs';
5
+ import { trigger, transition, style, animate } from '@angular/animations';
6
+ import { CommonModule } from '@angular/common';
7
+
8
+ /** @format */
9
+ const MODAL_DATA_VAR = new InjectionToken("MISModalDataInjectionToken");
10
+
11
+ /** @format */
12
+ class ModalRef {
13
+ constructor(overlay) {
14
+ this.overlay = overlay;
15
+ this.afterClosed$ = new Subject();
16
+ this.afterClosed = this.afterClosed$.asObservable();
17
+ }
18
+ close(data) {
19
+ this.overlay.detach();
20
+ this.overlay.dispose();
21
+ this.afterClosed$.next(data);
22
+ this.afterClosed$.complete();
23
+ }
24
+ }
25
+
26
+ class ModuleWrapperComponent {
27
+ constructor() { }
28
+ bindComponent(type, injector) {
29
+ this.initComponent(type, injector);
30
+ }
31
+ initComponent(type, injector) {
32
+ this.modalPortal = new ComponentPortal(type, this.place, injector);
33
+ }
34
+ }
35
+ ModuleWrapperComponent.decorators = [
36
+ { type: Component, args: [{
37
+ selector: "mis-module-wrapper",
38
+ template: "<div class=\"mis-modal-body\" #place @slideInOut>\n <ng-template [cdkPortalOutlet]=\"modalPortal\"></ng-template>\n</div>\n",
39
+ animations: [
40
+ trigger("slideInOut", [
41
+ transition(":enter", [
42
+ style({ transform: "translateY(-30%)", opacity: 0 }),
43
+ animate("200ms ease-out", style({ transform: "translatey(0%)", opacity: 1 })),
44
+ ]),
45
+ transition(":leave", [animate("200ms ease-out", style({ transform: "translatey(-30%)", opacity: 0 }))]),
46
+ ]),
47
+ ],
48
+ styles: [".mis-modal-body{display:block;width:100%;height:100%;background-color:transparent;border-radius:12px;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);overflow:hidden}"]
49
+ },] }
50
+ ];
51
+ ModuleWrapperComponent.ctorParameters = () => [];
52
+ ModuleWrapperComponent.propDecorators = {
53
+ place: [{ type: ViewChild, args: ["place", { static: false, read: ViewContainerRef },] }]
54
+ };
55
+
56
+ class ModalService {
57
+ constructor(overlay, injector) {
58
+ this.overlay = overlay;
59
+ this.injector = injector;
60
+ }
61
+ show(component, data, options) {
62
+ const positionStrategy = this.calculatePosition(options);
63
+ const { width, height } = options || {};
64
+ const config = new OverlayConfig({
65
+ hasBackdrop: true,
66
+ positionStrategy,
67
+ scrollStrategy: this.overlay.scrollStrategies.noop(),
68
+ width: width,
69
+ height,
70
+ panelClass: "mis-modal",
71
+ backdropClass: "mis-modal-overlay",
72
+ });
73
+ const overlayRef = this.overlay.create(config);
74
+ const modalRef = new ModalRef(overlayRef);
75
+ const injector = this.createInjector(modalRef, this.injector, data);
76
+ const portal = new ComponentPortal(ModuleWrapperComponent, null);
77
+ this.componentInstance = overlayRef.attach(portal);
78
+ if (options === null || options === void 0 ? void 0 : options.closeOnBackdropClick) {
79
+ overlayRef.backdropClick().subscribe(() => modalRef.close());
80
+ }
81
+ this.componentInstance.instance.bindComponent(component, injector);
82
+ return modalRef;
83
+ }
84
+ createInjector(ref, inj, data) {
85
+ const injectorTokens = new WeakMap();
86
+ injectorTokens.set(ModalRef, ref);
87
+ injectorTokens.set(MODAL_DATA_VAR, data);
88
+ return new PortalInjector(inj, injectorTokens);
89
+ }
90
+ calculatePosition(options) {
91
+ const position = this.overlay.position().global().centerHorizontally().centerVertically();
92
+ if (options && screen.width > 600) {
93
+ if (options.top) {
94
+ position.top(options.top);
95
+ }
96
+ if (options.left) {
97
+ position.left(options.left);
98
+ }
99
+ if (options.right) {
100
+ position.right(options.right);
101
+ }
102
+ if (options.bottom) {
103
+ position.bottom(options.bottom);
104
+ }
105
+ }
106
+ return position;
107
+ }
108
+ }
109
+ ModalService.ɵprov = ɵɵdefineInjectable({ factory: function ModalService_Factory() { return new ModalService(ɵɵinject(Overlay), ɵɵinject(INJECTOR)); }, token: ModalService, providedIn: "root" });
110
+ ModalService.decorators = [
111
+ { type: Injectable, args: [{
112
+ providedIn: "root",
113
+ },] }
114
+ ];
115
+ ModalService.ctorParameters = () => [
116
+ { type: Overlay },
117
+ { type: Injector }
118
+ ];
119
+
120
+ class ModalModule {
121
+ static forRoot() {
122
+ return {
123
+ ngModule: ModalModule,
124
+ providers: [ModalService],
125
+ };
126
+ }
127
+ static forChild() {
128
+ return {
129
+ ngModule: ModalModule,
130
+ providers: [ModalService],
131
+ };
132
+ }
133
+ }
134
+ ModalModule.decorators = [
135
+ { type: NgModule, args: [{
136
+ declarations: [ModuleWrapperComponent],
137
+ imports: [
138
+ CommonModule,
139
+ OverlayModule,
140
+ PortalModule
141
+ ],
142
+ entryComponents: [ModuleWrapperComponent]
143
+ },] }
144
+ ];
145
+
146
+ /**
147
+ * Generated bundle index. Do not edit.
148
+ */
149
+
150
+ export { MODAL_DATA_VAR, ModalModule, ModalRef, ModalService, ModuleWrapperComponent as ɵa };
151
+ //# sourceMappingURL=mis-crystal-design-system-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mis-crystal-design-system-modal.js","sources":["../../../projects/mis-components/modal/modal-constants.ts","../../../projects/mis-components/modal/modal-ref.ts","../../../projects/mis-components/modal/module-wrapper/module-wrapper.component.ts","../../../projects/mis-components/modal/modal.service.ts","../../../projects/mis-components/modal/modal.module.ts","../../../projects/mis-components/modal/mis-crystal-design-system-modal.ts"],"sourcesContent":["/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const MODAL_DATA_VAR = new InjectionToken<any>(\"MISModalDataInjectionToken\");\n","/** @format */\n\nimport { OverlayRef } from \"@angular/cdk/overlay\";\nimport { Injectable } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nexport class ModalRef {\n private afterClosed$ = new Subject<unknown>();\n afterClosed = this.afterClosed$.asObservable();\n\n constructor(public overlay: OverlayRef) {}\n\n close(data?: unknown): void {\n this.overlay.detach();\n this.overlay.dispose();\n this.afterClosed$.next(data);\n this.afterClosed$.complete();\n }\n}\n","import { trigger, transition, style, animate } from \"@angular/animations\";\nimport { ComponentPortal, PortalInjector } from \"@angular/cdk/portal\";\nimport { Component, Injector, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ModalRef } from \"../modal-ref\";\n\n@Component({\n selector: \"mis-module-wrapper\",\n templateUrl: \"./module-wrapper.component.html\",\n styleUrls: [\"./module-wrapper.component.scss\"],\n animations: [\n trigger(\"slideInOut\", [\n transition(\":enter\", [\n style({ transform: \"translateY(-30%)\", opacity: 0 }),\n animate(\"200ms ease-out\", style({ transform: \"translatey(0%)\", opacity: 1 })),\n ]),\n transition(\":leave\", [animate(\"200ms ease-out\", style({ transform: \"translatey(-30%)\", opacity: 0 }))]),\n ]),\n ],\n})\nexport class ModuleWrapperComponent {\n modalPortal: ComponentPortal<any>;\n constructor() {}\n\n @ViewChild(\"place\", { static: false, read: ViewContainerRef }) place: ViewContainerRef;\n\n bindComponent(type: any, injector: PortalInjector) {\n this.initComponent(type, injector);\n }\n\n private initComponent(type: any, injector: PortalInjector) {\n this.modalPortal = new ComponentPortal(type, this.place, injector);\n }\n}\n","import { ComponentType, Overlay, OverlayConfig } from \"@angular/cdk/overlay\";\nimport { ComponentPortal, PortalInjector } from \"@angular/cdk/portal\";\nimport { ComponentRef, Injectable, Injector } from \"@angular/core\";\nimport { MODAL_DATA_VAR } from \"./modal-constants\";\nimport { ModalRef } from \"./modal-ref\";\nimport { ModuleWrapperComponent } from \"./module-wrapper/module-wrapper.component\";\n\ninterface IModalOptions {\n width?: string;\n height?: string;\n top?: string;\n right?: string;\n bottom?: string;\n left?: string;\n closeOnBackdropClick?: boolean;\n}\n@Injectable({\n providedIn: \"root\",\n})\nexport class ModalService {\n private componentInstance: ComponentRef<ModuleWrapperComponent>;\n\n constructor(private overlay: Overlay, private injector: Injector) {}\n\n show<T, D>(component: ComponentType<T>, data?: D, options?: IModalOptions): ModalRef {\n const positionStrategy = this.calculatePosition(options);\n const { width, height } = options || {};\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n width: width,\n height,\n panelClass: \"mis-modal\",\n backdropClass: \"mis-modal-overlay\",\n });\n const overlayRef = this.overlay.create(config);\n const modalRef = new ModalRef(overlayRef);\n const injector = this.createInjector(modalRef, this.injector, data);\n const portal = new ComponentPortal(ModuleWrapperComponent, null);\n this.componentInstance = overlayRef.attach(portal);\n if (options?.closeOnBackdropClick) {\n overlayRef.backdropClick().subscribe(() => modalRef.close());\n }\n this.componentInstance.instance.bindComponent(component, injector);\n return modalRef;\n }\n private createInjector<D>(ref: ModalRef, inj: Injector, data?: D): PortalInjector {\n const injectorTokens = new WeakMap();\n injectorTokens.set(ModalRef, ref);\n injectorTokens.set(MODAL_DATA_VAR, data);\n return new PortalInjector(inj, injectorTokens);\n }\n\n private calculatePosition(options: IModalOptions) {\n const position = this.overlay.position().global().centerHorizontally().centerVertically();\n if (options && screen.width > 600) {\n if (options.top) {\n position.top(options.top);\n }\n if (options.left) {\n position.left(options.left);\n }\n if (options.right) {\n position.right(options.right);\n }\n if (options.bottom) {\n position.bottom(options.bottom);\n }\n }\n return position;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { ModuleWrapperComponent } from './module-wrapper/module-wrapper.component';\nimport { ModalService } from './modal.service';\n\n\n\n@NgModule({\n declarations: [ModuleWrapperComponent],\n imports: [\n CommonModule,\n OverlayModule, \n PortalModule\n ],\n entryComponents: [ModuleWrapperComponent]\n})\nexport class ModalModule { \n static forRoot(): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [ModalService],\n };\n }\n\n static forChild(): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [ModalService],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ModuleWrapperComponent as ɵa} from './module-wrapper/module-wrapper.component';"],"names":[],"mappings":";;;;;;;AAAA;MAIa,cAAc,GAAG,IAAI,cAAc,CAAM,4BAA4B;;ACJlF;MAMa,QAAQ;IAInB,YAAmB,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;QAH9B,iBAAY,GAAG,IAAI,OAAO,EAAW,CAAC;QAC9C,gBAAW,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;KAEL;IAE1C,KAAK,CAAC,IAAc;QAClB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;KAC9B;;;MCEU,sBAAsB;IAEjC,iBAAgB;IAIhB,aAAa,CAAC,IAAS,EAAE,QAAwB;QAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAA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B,EAAE,CAAC;QAC1F,IAAI,OAAO,IAAI,MAAM,CAAC,KAAK,GAAG,GAAG,EAAE;YACjC,IAAI,OAAO,CAAC,GAAG,EAAE;gBACf,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;aAC3B;YACD,IAAI,OAAO,CAAC,IAAI,EAAE;gBAChB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aAC7B;YACD,IAAI,OAAO,CAAC,KAAK,EAAE;gBACjB,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;aAC/B;YACD,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;aACjC;SACF;QACD,OAAO,QAAQ,CAAC;KACjB;;;;YAvDF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAlBuB,OAAO;YAEI,QAAQ;;;MCgB9B,WAAW;IACtB,OAAO,OAAO;QACZ,OAAO;YACL,QAAQ,EAAE,WAAW;YACrB,SAAS,EAAE,CAAC,YAAY,CAAC;SAC1B,CAAC;KACH;IAED,OAAO,QAAQ;QACb,OAAO;YACL,QAAQ,EAAE,WAAW;YACrB,SAAS,EAAE,CAAC,YAAY,CAAC;SAC1B,CAAC;KACH;;;YAtBF,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;gBACtC,OAAO,EAAE;oBACP,YAAY;oBACZ,aAAa;oBACb,YAAY;iBACb;gBACD,eAAe,EAAE,CAAC,sBAAsB,CAAC;aAC1C;;;ACjBD;;;;;;"}
@@ -0,0 +1,15 @@
1
+ import { ElementRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { NgControl } from '@angular/forms';
3
+ import { Subject } from 'rxjs';
4
+ export declare class MisInputDirective implements OnInit, OnDestroy {
5
+ el: ElementRef;
6
+ private control;
7
+ constructor(el: ElementRef, control: NgControl);
8
+ private validityChange;
9
+ validity: import("rxjs").Observable<boolean>;
10
+ endObs: Subject<void>;
11
+ focus: boolean;
12
+ hasValue: boolean;
13
+ ngOnInit(): void;
14
+ ngOnDestroy(): void;
15
+ }
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"MisInputDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":12,"character":1},"arguments":[{"selector":"input[misInput]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self","line":19,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":19,"character":13}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":18,"character":15},{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":19,"character":41}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"MisInputComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"mis-input","template":"<div class=\"input-container\" [ngClass]=\"{'rounded': type === 'rounded', 'floating': type === 'floating', 'has-error': !inputValidity || hasError, 'no-hint': noHints}\">\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{placeholder}}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>","styles":[".input-container{position:relative;padding-bottom:24px}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px}.input-container .input-wrapper>:not(:last-child){margin-right:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0}.input-container.rounded .input-wrapper:focus-within,.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]}]}],"members":{"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"noHints":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"hasError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"formInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":21,"character":3},"arguments":[{"__symbolic":"reference","name":"MisInputDirective"}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"MisInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MisInputComponent"},{"__symbolic":"reference","name":"MisInputDirective"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":12},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":8,"character":26}],"exports":[{"__symbolic":"reference","name":"MisInputComponent"},{"__symbolic":"reference","name":"MisInputDirective"}]}]}],"members":{}}},"origins":{"MisInputDirective":"./directives/input/input.directive","MisInputComponent":"./mis-input.component","MisInputModule":"./mis-input.module"},"importAs":"mis-crystal-design-system/input"}
@@ -0,0 +1,15 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { MisInputDirective } from './directives/input/input.directive';
4
+ export declare class MisInputComponent implements OnInit, OnDestroy {
5
+ type: 'rounded' | 'floating';
6
+ placeholder: string;
7
+ noHints: boolean;
8
+ hasError: boolean;
9
+ set formInput(input: MisInputDirective);
10
+ inputSubscription: Subscription | undefined;
11
+ inputValidity: boolean;
12
+ constructor();
13
+ ngOnInit(): void;
14
+ ngOnDestroy(): void;
15
+ }
@@ -0,0 +1,2 @@
1
+ export declare class MisInputModule {
2
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "main": "../bundles/mis-crystal-design-system-input.umd.js",
3
+ "module": "../fesm2015/mis-crystal-design-system-input.js",
4
+ "es2015": "../fesm2015/mis-crystal-design-system-input.js",
5
+ "esm2015": "../esm2015/input/mis-crystal-design-system-input.js",
6
+ "fesm2015": "../fesm2015/mis-crystal-design-system-input.js",
7
+ "typings": "mis-crystal-design-system-input.d.ts",
8
+ "metadata": "mis-crystal-design-system-input.metadata.json",
9
+ "sideEffects": false,
10
+ "name": "mis-crystal-design-system/input"
11
+ }
@@ -0,0 +1,3 @@
1
+ export { MisInputDirective } from './directives/input/input.directive';
2
+ export { MisInputComponent } from './mis-input.component';
3
+ export { MisInputModule } from './mis-input.module';
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ export { ModuleWrapperComponent as ɵa } from './module-wrapper/module-wrapper.component';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"ModalService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":16,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":22,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":22,"character":58}]}],"show":[{"__symbolic":"method"}],"createInjector":[{"__symbolic":"method"}],"calculatePosition":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ModalRef":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayRef","line":10,"character":30}]}],"close":[{"__symbolic":"method"}]}},"MODAL_DATA_VAR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":34},"arguments":["MISModalDataInjectionToken"]},"ModalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":9,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":12,"character":4},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/cdk/portal","name":"PortalModule","line":14,"character":4}],"entryComponents":[{"__symbolic":"reference","name":"ɵa"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ModalModule"},"providers":[{"__symbolic":"reference","name":"ModalService"}]}},"forChild":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ModalModule"},"providers":[{"__symbolic":"reference","name":"ModalService"}]}}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"mis-module-wrapper","animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":10,"character":4},"arguments":["slideInOut",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":11,"character":6},"arguments":[":enter",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":12,"character":8},"arguments":[{"transform":"translateY(-30%)","opacity":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":13,"character":8},"arguments":["200ms ease-out",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":13,"character":34},"arguments":[{"transform":"translatey(0%)","opacity":1}]}]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":15,"character":6},"arguments":[":leave",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":15,"character":28},"arguments":["200ms ease-out",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":15,"character":54},"arguments":[{"transform":"translatey(-30%)","opacity":0}]}]}]]}]]}],"template":"<div class=\"mis-modal-body\" #place @slideInOut>\n <ng-template [cdkPortalOutlet]=\"modalPortal\"></ng-template>\n</div>\n","styles":[".mis-modal-body{display:block;width:100%;height:100%;background-color:transparent;border-radius:12px;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);overflow:hidden}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"place":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":23,"character":3},"arguments":["place",{"static":false,"read":{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":23,"character":45}}]}]}],"bindComponent":[{"__symbolic":"method"}],"initComponent":[{"__symbolic":"method"}]}}},"origins":{"ModalService":"./modal.service","ModalRef":"./modal-ref","MODAL_DATA_VAR":"./modal-constants","ModalModule":"./modal.module","ɵa":"./module-wrapper/module-wrapper.component"},"importAs":"mis-crystal-design-system/modal"}
@@ -0,0 +1,3 @@
1
+ /** @format */
2
+ import { InjectionToken } from "@angular/core";
3
+ export declare const MODAL_DATA_VAR: InjectionToken<any>;
@@ -0,0 +1,9 @@
1
+ /** @format */
2
+ import { OverlayRef } from "@angular/cdk/overlay";
3
+ export declare class ModalRef {
4
+ overlay: OverlayRef;
5
+ private afterClosed$;
6
+ afterClosed: import("rxjs").Observable<unknown>;
7
+ constructor(overlay: OverlayRef);
8
+ close(data?: unknown): void;
9
+ }
@@ -0,0 +1,5 @@
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ export declare class ModalModule {
3
+ static forRoot(): ModuleWithProviders<ModalModule>;
4
+ static forChild(): ModuleWithProviders<ModalModule>;
5
+ }
@@ -0,0 +1,22 @@
1
+ import { ComponentType, Overlay } from "@angular/cdk/overlay";
2
+ import { Injector } from "@angular/core";
3
+ import { ModalRef } from "./modal-ref";
4
+ interface IModalOptions {
5
+ width?: string;
6
+ height?: string;
7
+ top?: string;
8
+ right?: string;
9
+ bottom?: string;
10
+ left?: string;
11
+ closeOnBackdropClick?: boolean;
12
+ }
13
+ export declare class ModalService {
14
+ private overlay;
15
+ private injector;
16
+ private componentInstance;
17
+ constructor(overlay: Overlay, injector: Injector);
18
+ show<T, D>(component: ComponentType<T>, data?: D, options?: IModalOptions): ModalRef;
19
+ private createInjector;
20
+ private calculatePosition;
21
+ }
22
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ComponentPortal, PortalInjector } from "@angular/cdk/portal";
2
+ import { ViewContainerRef } from "@angular/core";
3
+ export declare class ModuleWrapperComponent {
4
+ modalPortal: ComponentPortal<any>;
5
+ constructor();
6
+ place: ViewContainerRef;
7
+ bindComponent(type: any, injector: PortalInjector): void;
8
+ private initComponent;
9
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "main": "../bundles/mis-crystal-design-system-modal.umd.js",
3
+ "module": "../fesm2015/mis-crystal-design-system-modal.js",
4
+ "es2015": "../fesm2015/mis-crystal-design-system-modal.js",
5
+ "esm2015": "../esm2015/modal/mis-crystal-design-system-modal.js",
6
+ "fesm2015": "../fesm2015/mis-crystal-design-system-modal.js",
7
+ "typings": "mis-crystal-design-system-modal.d.ts",
8
+ "metadata": "mis-crystal-design-system-modal.metadata.json",
9
+ "sideEffects": false,
10
+ "name": "mis-crystal-design-system/modal"
11
+ }
@@ -0,0 +1,4 @@
1
+ export * from './modal.service';
2
+ export * from './modal-ref';
3
+ export * from './modal-constants';
4
+ export * from './modal.module';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mis-crystal-design-system",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "*",
6
6
  "@angular/core": "*",
@@ -0,0 +1,69 @@
1
+ .mis-btn {
2
+ background: none;
3
+ outline: none;
4
+ border: none;
5
+ cursor: pointer;
6
+ border-radius: 4px;
7
+ vertical-align: middle;
8
+ text-align: center;
9
+ box-sizing: border-box;
10
+ display: flex;
11
+ align-items: center;
12
+ text-decoration: none;
13
+ justify-content: center;
14
+
15
+ span,
16
+ img {
17
+ margin-right: 8px;
18
+ }
19
+
20
+ padding: 10px 16px;
21
+ font-size: 16px;
22
+ line-height: 24px;
23
+ &.mis-btn-lg {
24
+ padding: 16px;
25
+ font-weight: bold;
26
+ }
27
+ &.mis-btn-sm {
28
+ padding: 6px 12px;
29
+ font-size: 14px;
30
+ line-height: 20px;
31
+ }
32
+
33
+ background-color: transparent;
34
+ color: #0937b2;
35
+ &:hover {
36
+ background-color: #f0f3fa;
37
+ }
38
+ &:focus {
39
+ background-color: #dae1f3;
40
+ }
41
+ &:disabled {
42
+ color: #929dab;
43
+ pointer-events: none;
44
+ }
45
+
46
+ &.mis-outline {
47
+ border: 1px solid #0937b2;
48
+
49
+ &:disabled {
50
+ color: #929dab;
51
+ border-color: #929dab;
52
+ }
53
+ }
54
+
55
+ &.mis-primary {
56
+ background-color: #0937b2;
57
+ color: #ffffff;
58
+ &:hover {
59
+ background-color: #062a99;
60
+ }
61
+ &:focus {
62
+ background-color: #041f80;
63
+ }
64
+ &:disabled {
65
+ background-color: #e0e0e0;
66
+ color: #929dab;
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,9 @@
1
+ .mis-modal {
2
+ display: block;
3
+ overflow: auto;
4
+ padding: 8px;
5
+ // transition: all 300ms ease-out;
6
+ }
7
+ .mis-modal-overlay {
8
+ background: rgba(0, 0, 0, 0.32);
9
+ }