accumulation-ui
Version:
Super fast and modern framework for web application development
193 lines (179 loc) • 14.1 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('accumulation-ui', ['exports', '@angular/core', '@angular/common'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['accumulation-ui'] = {}, global.ng.core, global.ng.common));
}(this, (function (exports, i0, i1) { 'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () {
return e[k];
}
});
}
});
}
n['default'] = e;
return Object.freeze(n);
}
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
var AccumulationUIService = /** @class */ (function () {
function AccumulationUIService() {
this.rootElement = document.documentElement;
}
AccumulationUIService.prototype.toggleTheme = function (theme) {
this.rootElement.setAttribute('theme', theme);
};
return AccumulationUIService;
}());
AccumulationUIService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AccumulationUIService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
AccumulationUIService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AccumulationUIService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AccumulationUIService, decorators: [{
type: i0.Injectable,
args: [{
providedIn: 'root',
}]
}], ctorParameters: function () { return []; } });
var IconComponent = /** @class */ (function () {
function IconComponent() {
}
IconComponent.prototype.ngOnInit = function () { };
return IconComponent;
}());
IconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: IconComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
IconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: IconComponent, selector: "acc-icon", inputs: { icon: "icon" }, ngImport: i0__namespace, template: "<div class=\"icon\" [ngClass]=\"icon\"></div>\n", styles: [".icon{width:100%;height:100%;background-color:currentColor}.github{-webkit-mask:var(--svg-github) no-repeat center;mask:var(--svg-github) no-repeat center}.google{-webkit-mask:var(--svg-google) no-repeat center;mask:var(--svg-google) no-repeat center}.facebook{-webkit-mask:var(--svg-facebook) no-repeat center;mask:var(--svg-facebook) no-repeat center}.lock{-webkit-mask:var(--svg-lock) no-repeat center;mask:var(--svg-lock) no-repeat center}\n"], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: IconComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'acc-icon',
templateUrl: './icon.component.html',
styleUrls: ['./icon.component.scss'],
changeDetection: i0.ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { icon: [{
type: i0.Input
}] } });
var ButtonComponent = /** @class */ (function () {
function ButtonComponent() {
this.color = 'light';
}
Object.defineProperty(ButtonComponent.prototype, "getClass", {
get: function () {
return this.color;
},
enumerable: false,
configurable: true
});
ButtonComponent.prototype.ngOnInit = function () { };
return ButtonComponent;
}());
ButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
ButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: ButtonComponent, selector: "button[acc-button]", inputs: { color: "color", icon: "icon" }, host: { properties: { "class": "this.getClass" } }, ngImport: i0__namespace, template: "<span class=\"image\" *ngIf=\"icon\">\n <acc-icon [icon]=\"icon\"></acc-icon>\n</span>\n\n<span class=\"text\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{height:48px;width:100%;padding:0 12px;font-size:1rem;font-weight:500;line-height:1.5;display:flex;align-items:center;justify-content:center;outline:none;cursor:pointer;border:1px solid;border-radius:5px;transition-property:background-color,border-color,color,box-shadow;transition-duration:.15s;transition-timing-function:ease}:host:disabled{cursor:default}:host>.image{height:20px;width:20px;margin-right:8px}:host>.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host{color:var(--button-color);border-color:var(--button-border);background-color:var(--button-background)}:host:hover,:host:focus{color:var(--button-color-hover);border-color:var(--button-border-hover);background-color:var(--button-background-hover)}:host:active,:host:focus{box-shadow:0 0 0 1.5px var(--body-background),0 0 0 3px var(--button-border-hover)}:host:disabled{box-shadow:none;color:var(--button-color-disabled);border-color:var(--button-border-disabled);background-color:var(--button-background-disabled)}:host.light{--button-color: #666666;--button-border: #ced6e0;--button-background: #ffffff;--button-color-hover: #666666;--button-border-hover: #ced6e0;--button-background-hover: #f5f7f9}:host.pink{--button-color: #ffffff;--button-border: #6b4fbb;--button-background: #6b4fbb;--button-color-hover: #ffffff;--button-border-hover: #8367d3;--button-background-hover: #8367d3}:host.dark{--button-color: #ffffff;--button-border: #24292e;--button-background: #24292e;--button-color-hover: #ffffff;--button-border-hover: #555555;--button-background-hover: #555555}:host.blue{--button-color: #ffffff;--button-border: #4687fc;--button-background: #4687fc;--button-color-hover: #ffffff;--button-border-hover: #3f73e6;--button-background-hover: #3f73e6}:host.primary{--button-color: #ffffff;--button-border: #3880ff;--button-background: #3880ff;--button-color-hover: #ffffff;--button-border-hover: #4d8dfd;--button-background-hover: #4d8dfd}:host.secondary{--button-color: red;--button-border: red;--button-background: red}\n"], components: [{ type: IconComponent, selector: "acc-icon", inputs: ["icon"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: ButtonComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'button[acc-button]',
templateUrl: './button.component.html',
styleUrls: ['./button.component.scss'],
changeDetection: i0.ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { color: [{
type: i0.Input
}], icon: [{
type: i0.Input
}], getClass: [{
type: i0.HostBinding,
args: ['class']
}] } });
var DividerComponent = /** @class */ (function () {
function DividerComponent() {
}
DividerComponent.prototype.ngOnInit = function () { };
return DividerComponent;
}());
DividerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: DividerComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
DividerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: DividerComponent, selector: "acc-divider", ngImport: i0__namespace, template: "<hr class=\"divider\" />\n", styles: [".divider{margin:0;border:none;border-top:1px solid var(--divider-color)}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: DividerComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'acc-divider',
templateUrl: './divider.component.html',
styleUrls: ['./divider.component.scss'],
changeDetection: i0.ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; } });
var InputComponent = /** @class */ (function () {
function InputComponent() {
}
InputComponent.prototype.ngOnInit = function () { };
return InputComponent;
}());
InputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: InputComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
InputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: InputComponent, selector: "input[acc-input]", ngImport: i0__namespace, template: "<ng-content></ng-content>\n", styles: [":host{width:100%;height:48px;padding:0 15px;font-size:16px;outline:none;border:1px solid;border-radius:5px;background-color:transparent;transition-property:background-color,border-color,color,box-shadow;transition-duration:.15s;transition-timing-function:ease}:host{color:var(--input-color);border-color:var(--input-border)}:host:focus-visible{border-color:#97a6ba}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: InputComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'input[acc-input]',
templateUrl: './input.component.html',
styleUrls: ['./input.component.scss'],
changeDetection: i0.ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; } });
var AccumulationUIModule = /** @class */ (function () {
function AccumulationUIModule() {
}
return AccumulationUIModule;
}());
AccumulationUIModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AccumulationUIModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
AccumulationUIModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AccumulationUIModule, declarations: [ButtonComponent,
DividerComponent,
IconComponent,
InputComponent], imports: [i1.CommonModule], exports: [ButtonComponent,
DividerComponent,
IconComponent,
InputComponent] });
AccumulationUIModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AccumulationUIModule, imports: [[
i1.CommonModule
]] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AccumulationUIModule, decorators: [{
type: i0.NgModule,
args: [{
declarations: [
ButtonComponent,
DividerComponent,
IconComponent,
InputComponent
],
imports: [
i1.CommonModule
],
exports: [
ButtonComponent,
DividerComponent,
IconComponent,
InputComponent
]
}]
}] });
/*
* Public API Surface of core
*/
/**
* Generated bundle index. Do not edit.
*/
exports.AccumulationUIModule = AccumulationUIModule;
exports.AccumulationUIService = AccumulationUIService;
exports.ButtonComponent = ButtonComponent;
exports.DividerComponent = DividerComponent;
exports.IconComponent = IconComponent;
exports.InputComponent = InputComponent;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=accumulation-ui.umd.js.map