Skip to content

Commit

Permalink
feat(core, kit, addons, demo, tools): add packages
Browse files Browse the repository at this point in the history
  • Loading branch information
MarsiBarsi committed Dec 2, 2020
1 parent 11dc391 commit 854b544
Show file tree
Hide file tree
Showing 3,776 changed files with 133,167 additions and 681 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
521 changes: 519 additions & 2 deletions angular.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']};
File renamed without changes.
2,609 changes: 1,956 additions & 653 deletions package-lock.json

Large diffs are not rendered by default.

43 changes: 38 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,39 @@
"version": "1.5.2",
"description": "Taiga UI by Tinkoff is a set of components, services, directives and other tools to build high quality UI using modern Angular framework",
"scripts": {
"build:all": "npm run build:cdk",
"build:cdk": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng run cdk:build",
"test": "ng test --browsers=ChromeHeadless --code-coverage=true --karmaConfig=./karma.conf.js --",
"start": "ng serve",
"start:default": "ng serve --configuration def",
"start:shadow": "ng serve --configuration shadow",
"start:hmr": "ng serve --configuration hmr",
"start:aot": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve --configuration production",
"start:ssr": "npm run build:ssr && npm run serve:ssr",
"build:demo": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --configuration=production",
"postbuild:demo": "node scripts/checkDist.js",
"*** Workflow ***": "",
"test": "ng test --browsers=ChromeHeadless --code-coverage=true --",
"lint": "ng lint",
"lint:less": "stylelint '**/*.less'",
"prettier": "prettier --write \"projects/**/*.{js,ts,html,md,less,json}\"",
"clear": "prettier --write '**/projects/**/*.{js,ts,html,md,less,json}' && tslint '**/projects/**/*.ts' --fix",
"typecheck": "tsc --noEmit --skipLibCheck",
"*** build **": "use package=name command to build a package",
"build": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng run $package:build",
"build:cdk": "package=cdk npm run build",
"build:core": "package=core npm run build",
"build:kit": "package=kit npm run build",
"build:addon-charts": "package=addon-charts npm run build",
"build:addon-commerce": "package=addon-commerce npm run build",
"build:addon-doc": "package=addon-doc npm run build",
"build:addon-mobile": "package=addon-mobile npm run build",
"build:addon-table": "package=addon-table npm run build",
"build:addon-tablebars": "package=addon-tablebars npm run build",
"build:tools": "ng build cypress-testing && ng build testing",
"*** Icons ***": "",
"compile:icons": "ts-node --project ./tsconfig.compiler.json scripts/compileIcons.ts",
"prebuild:icons": "npm run compile:icons projects/icons",
"build:icons": "ng run icons:build",
"postbuild:icons": "node projects/icons/scripts/copy-icons.js",
"*** Release ***": "",
"release": "standard-version",
"release:patch": "npm run release -- --release-as patch",
"release:minor": "npm run release -- --release-as minor",
Expand All @@ -19,6 +45,8 @@
"keywords": [
"angular",
"kit",
"ui",
"component-library",
"component",
"service",
"directive"
Expand Down Expand Up @@ -64,16 +92,20 @@
"ngx-highlightjs": "3.0.3",
"ngx-markdown": "^8.2.1",
"preboot": "^7.0.0",
"rxjs": "~6.3.3",
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.9",
"@angular-devkit/build-ng-packagr": "~0.13.9",
"@angular-devkit/schematics": "^7.3.9",
"@angular-devkit/schematics-cli": "~0.13.9",
"@angular/cli": "~7.3.9",
"@angular/compiler-cli": "~7.2.15",
"@angular/language-service": "~7.2.15",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@tinkoff/linters": "^0.6.0",
"@types/dompurify": "^0.0.32",
"@types/express": "4.16.1",
Expand Down Expand Up @@ -118,6 +150,7 @@
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged && npm run typecheck"
}
},
Expand All @@ -126,7 +159,7 @@
"prettier --write",
"git add"
],
"*.ts": "tslint"
"*.ts": "tslint --fix"
},
"standard-version": {
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions projects/addon-charts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Taiga UI — Charts

> Extension package for Taiga UI that adds various charts, graphs and related components.
89 changes: 89 additions & 0 deletions projects/addon-charts/components/axes/axes.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';
import {TUI_ALWAYS_DASHED, TUI_ALWAYS_SOLID} from '@taiga-ui/addon-charts/constants';
import {TuiLineType} from '@taiga-ui/addon-charts/enums';
import {TuiLineHandler} from '@taiga-ui/addon-charts/types';
import {CHAR_NO_BREAK_SPACE, tuiDefaultProp} from '@taiga-ui/cdk';

@Component({
selector: 'tui-axes',
templateUrl: './axes.template.html',
styleUrls: ['./axes.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TuiAxesComponent {
@Input()
@tuiDefaultProp()
axisX: TuiLineType = TuiLineType.Solid;

@Input()
@tuiDefaultProp()
axisXLabels: ReadonlyArray<string | null> = [];

@Input()
@tuiDefaultProp()
axisY: TuiLineType = TuiLineType.Solid;

@Input()
@tuiDefaultProp()
axisYInset = false;

@Input()
@tuiDefaultProp()
axisYLabels: ReadonlyArray<string> = [];

@Input()
@tuiDefaultProp()
axisYName = '';

@Input()
@tuiDefaultProp()
axisYSecondaryInset = false;

@Input()
@tuiDefaultProp()
axisYSecondaryLabels: ReadonlyArray<string> = [];

@Input()
@tuiDefaultProp()
axisYSecondaryName = '';

@Input()
@tuiDefaultProp()
horizontalLines = 0;

@Input()
@tuiDefaultProp()
horizontalLinesHandler: TuiLineHandler = TUI_ALWAYS_SOLID;

@Input()
@tuiDefaultProp()
verticalLines = 0;

@Input()
@tuiDefaultProp()
verticalLinesHandler: TuiLineHandler = TUI_ALWAYS_DASHED;

@HostBinding('class._centered')
get centeredXLabels(): boolean {
return this.axisY === TuiLineType.None;
}

get hasXLabels(): boolean {
return !!this.axisXLabels.length;
}

get hasYLabels(): boolean {
return (!!this.axisYLabels.length && !this.axisYInset) || !!this.axisYName;
}

get hasYSecondaryLabels(): boolean {
return (
(!!this.axisYSecondaryLabels.length && !this.axisYSecondaryInset) ||
!!this.axisYSecondaryName
);
}

fallback(label: string): string {
return label || CHAR_NO_BREAK_SPACE;
}
}
11 changes: 11 additions & 0 deletions projects/addon-charts/components/axes/axes.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {TuiRepeatTimesModule} from '@taiga-ui/cdk';
import {TuiAxesComponent} from './axes.component';

@NgModule({
imports: [CommonModule, TuiRepeatTimesModule],
declarations: [TuiAxesComponent],
exports: [TuiAxesComponent],
})
export class TuiAxesModule {}
160 changes: 160 additions & 0 deletions projects/addon-charts/components/axes/axes.style.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
@import 'taiga-ui-angular-local';

:host {
display: flex;
}

.wrapper {
display: flex;
flex: 1;
height: 100%;
flex-direction: column;
}

.grid {
.createStackingContext();
display: flex;
flex: 1;
justify-content: space-around;
align-items: flex-end;
border-width: 1px;
border-color: var(--tui-base-03);
}

.horizontal {
.fullsize();
display: flex;
flex-direction: column;
}

.vertical {
.fullsize();
display: flex;

:host._centered &:after {
content: '';
display: block;
flex: 1 0 1px;
}
}

.line {
flex: 2 0 1px;
box-sizing: border-box;
border-width: 1px;
border-color: var(--tui-base-03);

&_vertical {
:host._centered &:first-child {
flex: 1 0 1px;
pointer-events: none;
}
}
}

.side {
display: flex;
align-items: stretch;

&_padding {
padding-bottom: 32px;
}
}

.name {
.text-body-xs();
writing-mode: tb;
text-align: center;
padding-left: 12px;
color: var(--tui-text-02);

&_primary {
transform: rotate(180deg);
}
}

.labels-y {
.text-body-xs();
display: flex;
flex-direction: column-reverse;
justify-content: space-between;
color: var(--tui-text-02);

&_primary {
text-align: right;
padding-right: 12px;
}

&_secondary {
padding-left: 12px;
}

&_transparent {
border-color: transparent;
}

&_inset {
position: absolute;
top: 9px;
left: 4px;
bottom: -12px;
pointer-events: none;

&_secondary {
left: auto;
right: 4px;
text-align: right;
}
}
}

.labels-x {
.text-body-xs();
display: flex;
border-right: 1px solid transparent;
color: var(--tui-text-02);
}

.label-x {
height: 7px;
border-left: 1px solid var(--tui-base-03);
flex: 1;
margin-bottom: 25px;

&:before {
content: '';
display: block;
height: 9px;
}

&_transparent {
border-color: transparent;
}

:host._centered & {
height: 32px;
text-align: center;
border: none;
margin: 0;
}
}

.label-y {
&:first-child {
margin-bottom: -6px;
}

&:last-child {
margin-top: -6px;
}
}

.content {
position: absolute;
top: 0;
left: -1px;
right: 0;
bottom: -1px;
display: flex;
align-items: flex-end;
}
Loading

0 comments on commit 854b544

Please sign in to comment.