-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core, kit, addons, demo, tools): add packages
- Loading branch information
1 parent
11dc391
commit 854b544
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.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {extends: ['@commitlint/config-conventional']}; |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.