This repository was archived by the owner on Mar 27, 2023. It is now read-only.
File tree 17 files changed +91
-90
lines changed
17 files changed +91
-90
lines changed Original file line number Diff line number Diff line change @@ -39,18 +39,21 @@ let PreviewID = 0;
39
39
@Component ( {
40
40
selector : 'demo' ,
41
41
template : `
42
- <ng-content></ng-content>
42
+ <div cds-layout="m-b:md">
43
+ <ng-content></ng-content>
44
+ </div>
43
45
44
- <div cds-layout="grid gap:md ">
46
+ <div cds-layout="grid gap:lg m-b:xl ">
45
47
<div *ngFor="let tab of tabs" [attr.cds-layout]="'col:12 col@sm:' + (tabs.length === 1 ? '12' : '6')">
46
- <p cds-text="message">{{ tab.name }} <button (click)="openStackblitz(tab)" class="btn btn-sm btn-link">
47
- <cds-icon shape="bolt"></cds-icon> View in StackBlitz
48
- </button></p>
48
+ <p cds-text="message">
49
+ {{ tab.name }}
50
+ <button (click)="openStackblitz(tab)" class="btn btn-sm btn-link">
51
+ <cds-icon shape="bolt"></cds-icon> View in StackBlitz
52
+ </button>
53
+ </p>
49
54
<div *ngFor="let file of tab.files | keyvalue">
50
55
<sourcecode [src]="file.value" [language]="tab.language || 'ts'"></sourcecode>
51
56
</div>
52
-
53
-
54
57
</div>
55
58
</div>
56
59
` ,
Original file line number Diff line number Diff line change @@ -20,12 +20,13 @@ import { DemoTabData } from '../components/demo.component';
20
20
angularLink="https://angular.clarity.design/documentation/accordion"
21
21
[eslint]="true"
22
22
angularFigma="https://www.figma.com/file/ZvaQGGktjGoW6gz9DqwvrLtz/?node-id=1007%3A0"
23
- coreFigma="https://www.figma.com/file/cjen2ts5Vz0W37NacV1eBE/Clarity-Core-Library-BETA?node-id=1169%3A3267">
24
- An accordion allows generic content to be collapsed and allows users to expand to show more detail.
23
+ coreFigma="https://www.figma.com/file/cjen2ts5Vz0W37NacV1eBE/Clarity-Core-Library-BETA?node-id=1169%3A3267"
24
+ >
25
+ An accordion allows generic content to be collapsed and allows users to expand to show more detail.
25
26
</status-block>
26
27
27
28
<demo [tabs]="demo1">
28
- <h2>Basic</h2 >
29
+ <h3 cds-text="section">With expanded, disabled and exapandable panels</h3 >
29
30
</demo>
30
31
` ,
31
32
} )
Original file line number Diff line number Diff line change @@ -12,13 +12,15 @@ import { DemoTabData } from '../components/demo.component';
12
12
template : `
13
13
<h1>Badges</h1>
14
14
15
- <app-eslint-intro-block rule="no-clr-badge"></app-eslint-intro-block>
15
+ <app-eslint-intro-block rule="no-clr-badge"></app-eslint-intro-block>
16
16
17
17
<demo [tabs]="demo1">
18
- <h2>Basic</h2>
18
+ <h3 cds-text="section">Badge colours</h3>
19
+ <p>Badge in different colours</p>
19
20
</demo>
20
21
<demo [tabs]="demo2">
21
- <h2>Status</h2>
22
+ <h3 cds-text="section">Badge status</h3>
23
+ <p>Badges with all available statuses</p>
22
24
</demo>
23
25
` ,
24
26
} )
Original file line number Diff line number Diff line change @@ -12,31 +12,33 @@ import { DemoTabData } from '../components/demo.component';
12
12
template : `
13
13
<h1>Button</h1>
14
14
15
- <app-eslint-intro-block rule="no-clr-button"></app-eslint-intro-block>
16
-
15
+ <app-eslint-intro-block rule="no-clr-button"></app-eslint-intro-block>
17
16
18
17
<demo [tabs]="demo1">
19
- <h3>Basic</h3>
18
+ <h3 cds-text="section">Primary button</h3>
19
+ <p>Basic primary button</p>
20
20
</demo>
21
21
22
22
<demo [tabs]="demo2">
23
- <h3>All solid buttons</h3>
23
+ <h3 cds-text="section">Solid buttons</h3>
24
+ <p>All solid buttons</p>
24
25
</demo>
25
26
26
27
<demo [tabs]="demo3">
27
- <h3>All outline buttons</h3>
28
+ <h3 cds-text="section">Outline buttons</h3>
29
+ <p>All outline buttons</p>
28
30
</demo>
29
31
30
32
<demo [tabs]="demo4">
31
- <h3>Inverse</h3>
33
+ <h3 cds-text="section" >Inverse buttons </h3>
32
34
</demo>
33
35
34
36
<demo [tabs]="demo5">
35
- <h3>Icon buttons</h3>
37
+ <h3 cds-text="section" >Icon buttons</h3>
36
38
</demo>
37
39
38
40
<demo [tabs]="demo6">
39
- <h3>Loading buttons</h3>
41
+ <h3 cds-text="section" >Loading buttons</h3>
40
42
</demo>
41
43
` ,
42
44
} )
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ import { DemoTabData } from '../components/demo.component';
9
9
<app-eslint-intro-block rule="no-clr-card"></app-eslint-intro-block>
10
10
11
11
<demo [tabs]="demo1">
12
- <h2>Basic</h2 >
12
+ <h3 cds-text="section">Card with title and body</h3 >
13
13
</demo>
14
14
<demo [tabs]="demo2">
15
- <h2 >Card media block</h2 >
15
+ <h3 cds-text="section" >Card media block</h3 >
16
16
</demo>
17
17
` ,
18
18
} )
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ import { DemoTabData } from '../components/demo.component';
15
15
<app-eslint-intro-block rule="no-clr-checkbox"></app-eslint-intro-block>
16
16
17
17
<demo [tabs]="demo1">
18
- <p >Basic checkbox</p >
18
+ <h3 cds-text="section" >Basic checkbox</h3 >
19
19
</demo>
20
20
<demo [tabs]="demo2">
21
- <p >Example of more complex form structure</p >
21
+ <h3 cds-text="section" >Example of more complex form structure</h3 >
22
22
</demo>
23
23
` ,
24
24
} )
Original file line number Diff line number Diff line change @@ -13,11 +13,12 @@ import { DemoTabData } from '../components/demo.component';
13
13
<h1>Datalist</h1>
14
14
15
15
<demo [tabs]="demo">
16
- <h3>Basic </h3>
16
+ <h3 cds-text="section">Datalist with text items </h3>
17
17
</demo>
18
18
19
19
<demo [tabs]="demo2">
20
- <h3>Reactive forms</h3>
20
+ <h3 cds-text="section">Reactive forms</h3>
21
+ <p>Using Angular forms inside datalist</p>
21
22
</demo>
22
23
` ,
23
24
} )
Original file line number Diff line number Diff line change @@ -14,31 +14,34 @@ import { DemoTabData } from '../components/demo.component';
14
14
<app-eslint-intro-block rule="no-clr-form"></app-eslint-intro-block>
15
15
16
16
<demo [tabs]="demo1">
17
- <h2 >Horizontal</h2 >
17
+ <h3 cds-text="section" >Horizontal</h3 >
18
18
</demo>
19
19
20
20
<demo [tabs]="demo2">
21
- <h2 >Vertical</h2 >
21
+ <h3 cds-text="section" >Vertical</h3 >
22
22
</demo>
23
23
24
24
<demo [tabs]="demo3">
25
- <h2 >Compact</h2 >
25
+ <h3 cds-text="section" >Compact</h3 >
26
26
</demo>
27
27
28
28
<demo [tabs]="demo4">
29
- <h2 >Display helpers, errors and success messages</h2 >
29
+ <h3 cds-text="section" >Display helpers, errors and success messages</h3 >
30
30
<p>
31
- Clarity Core don't handle display of messages as <code>error</code> or <code>success</code>
32
- the same way as Clarity Angular does. This is left up to the developer to control when a given message is visible or not
33
- and how to display it. But we provide some examples to show how to do this with Angular Forms. You could check <a href="/textarea">Textarea</a>,
34
- <a href="/datalist">Datalist</a> or some other of the Form components for more examples.
31
+ Clarity Core don't handle display of messages as <code>error</code> or <code>success</code> the same way as
32
+ Clarity Angular does. This is left up to the developer to control when a given message is visible or not and how
33
+ to display it. But we provide some examples to show how to do this with Angular Forms. You could check
34
+ <a href="/textarea">Textarea</a>, <a href="/datalist">Datalist</a> or some other of the Form components for more
35
+ examples.
35
36
</p>
36
37
37
38
<p>
38
- Bellow is a simple form with two form controls (input and textarea) that show and hide control-messages based on the status of
39
- the form or the type of the error.
40
- <p>
41
- </demo>
39
+ Bellow is a simple form with two form controls (input and textarea) that show and hide control-messages based on
40
+ the status of the form or the type of the error.
41
+ </p>
42
+
43
+ <p></p
44
+ ></demo>
42
45
` ,
43
46
} )
44
47
export class FormPage {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { DemoTabData } from '../components/demo.component';
12
12
template : `
13
13
<h1>Icons</h1>
14
14
15
- <app-eslint-intro-block rule="no-clr-icon"></app-eslint-intro-block>
15
+ <app-eslint-intro-block rule="no-clr-icon"></app-eslint-intro-block>
16
16
17
17
<p>
18
18
There is replacement for Clarity Angular icons with
@@ -21,16 +21,16 @@ import { DemoTabData } from '../components/demo.component';
21
21
</p>
22
22
23
23
<demo [tabs]="demo1">
24
- <h3>Basic </h3>
24
+ <h3 cds-text="section">All available icon variants </h3>
25
25
</demo>
26
26
<demo [tabs]="demo2">
27
- <h3>Color states</h3>
27
+ <h3 cds-text="section" >Color states</h3>
28
28
</demo>
29
29
<demo [tabs]="demo3">
30
- <h3>Rotation</h3>
30
+ <h3 cds-text="section" >Rotation</h3>
31
31
</demo>
32
32
<demo [tabs]="demo4">
33
- <h3>Badges</h3>
33
+ <h3 cds-text="section" >Badges</h3>
34
34
</demo>
35
35
` ,
36
36
} )
Original file line number Diff line number Diff line change @@ -13,19 +13,16 @@ import { DemoTabData } from '../components/demo.component';
13
13
<h1>Input</h1>
14
14
15
15
<demo [tabs]="demo1">
16
- <h3>Basic </h3>
16
+ <h3 cds-text="section">Input with placeholder </h3>
17
17
</demo>
18
18
19
19
<demo [tabs]="demo2">
20
- <h3>Input with label</h3>
20
+ <h3 cds-text="section" >Input with label and placeholder </h3>
21
21
</demo>
22
22
23
23
<demo [tabs]="demo3">
24
- <h3>Input with label</h3>
25
- </demo>
26
-
27
- <demo [tabs]="demo4">
28
- <h3>All type of inputs</h3>
24
+ <h3 cds-text="section">Error and Info</h3>
25
+ <p>Input demos with info message and error message</p>
29
26
</demo>
30
27
` ,
31
28
} )
@@ -69,25 +66,6 @@ export class InputPage {
69
66
] ;
70
67
71
68
demo3 : DemoTabData [ ] = [
72
- {
73
- name : 'Angular' ,
74
- files : {
75
- 'src/app/app.component.ts' : 'input/input.3.angular.txt' ,
76
- } ,
77
- language : 'ts' ,
78
- template : 'angular' ,
79
- } ,
80
- {
81
- name : 'Core' ,
82
- files : {
83
- 'src/app/app.component.ts' : 'input/input.3.core.txt' ,
84
- } ,
85
- language : 'ts' ,
86
- template : 'core' ,
87
- } ,
88
- ] ;
89
-
90
- demo4 : DemoTabData [ ] = [
91
69
{
92
70
name : 'Angular' ,
93
71
files : {
Original file line number Diff line number Diff line change @@ -12,13 +12,24 @@ import { DemoTabData } from '../components/demo.component';
12
12
template : `
13
13
<h1>Labels</h1>
14
14
15
- <app-eslint-intro-block rule="no-clr-label"></app-eslint-intro-block>
15
+ <app-eslint-intro-block rule="no-clr-label"></app-eslint-intro-block>
16
16
17
- <demo [tabs]="demo0"></demo>
18
- <demo [tabs]="demo1"></demo>
19
- <demo [tabs]="demo2"></demo>
20
- <demo [tabs]="demo3"></demo>
21
- <demo [tabs]="demo4"></demo>
17
+ <demo [tabs]="demo0">
18
+ <h3 cds-text="section">Simple label with text</h3>
19
+ </demo>
20
+ <demo [tabs]="demo1">
21
+ <h3 cds-text="section">Outline labels with badge</h3>
22
+ </demo>
23
+ <demo [tabs]="demo2">
24
+ <h3 cds-text="section">Clickable outline labels</h3>
25
+ </demo>
26
+ <demo [tabs]="demo3">
27
+ <h3 cds-text="section">Outline labels without badge</h3>
28
+ </demo>
29
+ <demo [tabs]="demo4">
30
+ <h3 cds-text="section">Labels with status</h3>
31
+ <p>Labels with colour background fill</p>
32
+ </demo>
22
33
` ,
23
34
} )
24
35
export class LabelPage {
Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ import { DemoTabData } from '../components/demo.component';
20
20
</p>
21
21
22
22
<demo [tabs]="demo1">
23
- <h3>Basic </h3>
23
+ <h3 cds-text="section">With title, body and footer </h3>
24
24
</demo>
25
25
26
26
<demo [tabs]="demo2">
27
- <h3>Closable</h3>
27
+ <h3 cds-text="section" >Closable</h3>
28
28
29
29
<p>
30
- In some cases there is a need to prevent the user from closing the modal. To achieve this there is an option for removing the closable action button
31
- on the top right corner of the dialog.
30
+ In some cases there is a need to prevent the user from closing the modal. To achieve this there is an option for
31
+ removing the closable action button on the top right corner of the dialog.
32
32
</p>
33
33
</demo>
34
34
` ,
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ import { DemoTabData } from '../components/demo.component';
12
12
template : `
13
13
<h1>Password</h1>
14
14
<demo [tabs]="demo1">
15
- <h3>Basic </h3>
15
+ <h3 cds-text="section">With label </h3>
16
16
</demo>
17
17
18
18
<demo [tabs]="demo2">
19
- <h3>Password with Reactive form</h3>
19
+ <h3 cds-text="section" >Password with Reactive form</h3>
20
20
</demo>
21
21
` ,
22
22
} )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import { DemoTabData } from '../components/demo.component';
15
15
<app-eslint-intro-block rule="no-clr-range"></app-eslint-intro-block>
16
16
17
17
<demo [tabs]="demo1">
18
- <h3>Basic </h3>
18
+ <h3 cds-text="section">With label and info message </h3>
19
19
</demo>
20
20
` ,
21
21
} )
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ import { DemoTabData } from '../components/demo.component';
15
15
<app-eslint-intro-block rule="no-clr-select"></app-eslint-intro-block>
16
16
17
17
<demo [tabs]="demo1">
18
- <h3>Basic </h3>
18
+ <h3 cds-text="section">With 3 elements and label </h3>
19
19
</demo>
20
20
21
21
<demo [tabs]="demo2">
22
- <h3>Reactive form</h3>
22
+ <h3 cds-text="section" >Reactive form</h3>
23
23
</demo>
24
24
` ,
25
25
} )
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ import { DemoTabData } from '../components/demo.component';
15
15
<app-eslint-intro-block rule="no-clr-textarea"></app-eslint-intro-block>
16
16
17
17
<demo [tabs]="demo1">
18
- <h3>Basic </h3>
18
+ <h3 cds-text="section">With label and info message </h3>
19
19
</demo>
20
20
21
21
<demo [tabs]="demo2">
22
- <h3>Reactive forms</h3>
22
+ <h3 cds-text="section" >Reactive forms</h3>
23
23
</demo>
24
24
` ,
25
25
} )
Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ import { DemoTabData } from '../components/demo.component';
13
13
<h1>Toggle</h1>
14
14
15
15
<demo [tabs]="demo1">
16
- <h3>Basic </h3>
16
+ <h3 cds-text="section">With label </h3>
17
17
</demo>
18
18
19
19
<demo [tabs]="demo2">
20
- <h3>With subtext and forms</h3>
20
+ <h3 cds-text="section" >With subtext and forms</h3>
21
21
</demo>
22
22
23
23
<demo [tabs]="demo3">
24
- <h3>Disabled</h3>
24
+ <h3 cds-text="section" >Disabled</h3>
25
25
</demo>
26
26
` ,
27
27
} )
You can’t perform that action at this time.
0 commit comments