Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy cookbook by merging develop into main #2561

Merged
merged 174 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
c852ec0
Fix no fabSheet close on item select
mictro Sep 19, 2022
598e7e9
Add unit-tests for fabSheet
mictro Sep 19, 2022
fafd525
💡 Add dummy TODO comment
jkaltoft Aug 16, 2022
d905d64
Work In Progress
jkaltoft Aug 18, 2022
537962f
🚧 Keep focusedIndex variable updated
jkaltoft Aug 18, 2022
96eef96
🚧 Clean up a bit
jkaltoft Aug 20, 2022
1c5f70d
🚧 Control arrow up/down depending on open/closed
jkaltoft Aug 20, 2022
12865dd
🚧 Select item on Enter/Space keypress
jkaltoft Aug 20, 2022
a9a8885
🐛 Only select focused item on enter/space when open
jkaltoft Aug 22, 2022
ab2fe2a
On opening move focus to selected index (if any)
jkaltoft Aug 22, 2022
309ff96
✅ Extend test
jkaltoft Aug 22, 2022
ae64812
✅ Update tests to match new behavior
jkaltoft Aug 22, 2022
524e543
Update todo-comment
jkaltoft Aug 23, 2022
0f13ede
♿️ Make Home and End key press behave properly
jkaltoft Aug 24, 2022
4483179
♿️ Focus on last item if key press ArrowUp
jkaltoft Aug 24, 2022
9e57b2f
⚗️ Try to remove focus outline on iOS
jkaltoft Aug 25, 2022
f30ecfc
🚧 stash commit
jkaltoft Sep 13, 2022
46f3cf5
fixed top content directive
RasmusTraeholt Sep 20, 2022
51eb332
merge - solve conflicts
RasmusTraeholt Sep 20, 2022
2ef74e0
removed cookbook example
RasmusTraeholt Sep 20, 2022
20a92da
updates
RasmusTraeholt Sep 20, 2022
31cf3e8
removed redundant style
RasmusTraeholt Sep 20, 2022
745937c
local navigation component
RasmusTraeholt Sep 21, 2022
6043fbb
update directive name
RasmusTraeholt Sep 21, 2022
e4cb57d
rollback unwanted linting changes
RasmusTraeholt Sep 21, 2022
5fdf17b
removed duplicate style value
RasmusTraeholt Sep 21, 2022
139a932
removed console log + redundant styles
RasmusTraeholt Sep 22, 2022
7018879
added console warn
RasmusTraeholt Sep 22, 2022
d686cb6
revert
RasmusTraeholt Sep 22, 2022
18d8ceb
Refactor logic to focus items
mark-drastrup Sep 22, 2022
61e001f
Remove the focusItem method
mark-drastrup Sep 22, 2022
3681ec8
Clean up code for focusing items
mark-drastrup Sep 22, 2022
1ff9a90
Remove ToDo comments
mark-drastrup Sep 23, 2022
b14e005
Utilize scrollIntoView to simplify scrolling logic
mark-drastrup Sep 23, 2022
634e965
Update cookbook example for custom item template
mark-drastrup Sep 23, 2022
c4c4e99
Merge branch 'develop' into feature/2342-dropdown-keyboard-navigation
mark-drastrup Sep 23, 2022
8d6bbd6
Added Data Table examples and showcase
Sep 26, 2022
6cb52e2
Add data-table directive
Sep 26, 2022
cbf5fed
Add initial unittest to data-table directive
Sep 28, 2022
e5be0aa
rename directive from data-table to table
SigurdVilstrup Sep 28, 2022
e12863e
Add option to show an alert before dismissing the modal
mark-drastrup Sep 28, 2022
09ee1c2
Update cookbook
mark-drastrup Sep 28, 2022
67362f5
Fix broken unit tests
mark-drastrup Sep 29, 2022
1f5ab4d
Create a separate method to handle showAlert
mark-drastrup Sep 30, 2022
43e597e
Write unit tests to check if a bool or a function is passed to canDis…
mark-drastrup Sep 30, 2022
3cf0b4c
Remove focused test
mark-drastrup Sep 30, 2022
319809d
Merge branch 'develop' into enhancement/376-modal-alert-before-close
mark-drastrup Sep 30, 2022
5a6adb9
Add initial styling of table
SigurdVilstrup Sep 30, 2022
3305cbe
Add showcase with icon button
SigurdVilstrup Sep 30, 2022
7a59067
Reassign the showAlert method instead of creating a spy
mark-drastrup Oct 2, 2022
a871c28
add mockdata to showcase + rmv constructor elem
SigurdVilstrup Oct 3, 2022
0296d23
modified Camel case to Kebab case selectors
SigurdVilstrup Oct 3, 2022
ffd34f0
Reorganize unit test in accordance with the AAA pattern
mark-drastrup Oct 3, 2022
867b69b
Merge branch 'develop' into feature/local-navigation
RasmusTraeholt Oct 3, 2022
5a88d42
Merge branch 'develop' into enhancement/376-modal-alert-before-close
mark-drastrup Oct 3, 2022
f2e461c
Add accordian to example
SigurdVilstrup Oct 3, 2022
56bb47f
add colors from Kirby utils
SigurdVilstrup Oct 3, 2022
d6c3f14
fixed top content spacing
RasmusTraeholt Oct 3, 2022
b682504
Remove unused CSS
mark-drastrup Oct 4, 2022
a129144
change row border-bottom & add global style vars
SigurdVilstrup Oct 4, 2022
c25459b
Remove beforeEach and move the content into the it block, if there is…
mark-drastrup Oct 4, 2022
15aceec
Remove focused test
mark-drastrup Oct 4, 2022
0fc24d4
Merge branch 'develop' into feature/2342-dropdown-keyboard-navigation
mark-drastrup Oct 4, 2022
f814d00
fix index.ts exports
SigurdVilstrup Oct 4, 2022
7d19280
add export DataTableModule
SigurdVilstrup Oct 4, 2022
4c7c7a6
Merge branch 'develop' into feature/local-navigation
RasmusTraeholt Oct 5, 2022
a9a663b
solve conflicts + removed unsued imports
RasmusTraeholt Oct 5, 2022
7f844b9
Correct review changes from RKK
SigurdVilstrup Oct 6, 2022
e5dd99b
Merge branch 'develop' into component/2494-kirby-data-table
Oct 6, 2022
6e9b731
Change naming convention of table components
SigurdVilstrup Oct 6, 2022
281794b
Merge branch 'develop' into enhancement/376-modal-alert-before-close
mark-drastrup Oct 6, 2022
7b87251
Write test to check if focusedIndex is set when selecting an item
mark-drastrup Oct 6, 2022
eb87b73
Write tests for arrow key behaviour
mark-drastrup Oct 6, 2022
6e798d3
Merge branch 'develop' into feature/2342-dropdown-keyboard-navigation
mark-drastrup Oct 6, 2022
6b36e9f
Move css to relevant components
SigurdVilstrup Oct 10, 2022
1e246e3
Remove defined action-padding
SigurdVilstrup Oct 10, 2022
9b22d07
Merge branch 'develop' into feature/2342-dropdown-keyboard-navigation
mark-drastrup Oct 11, 2022
657ea8b
Merge branch 'develop' into feature/local-navigation
RasmusTraeholt Oct 11, 2022
f1cc74c
updates
RasmusTraeholt Oct 11, 2022
a059f98
update showcase w/ disclaimer, API, CSS desc.
SigurdVilstrup Oct 11, 2022
4678931
Merge branch 'feature/local-navigation' of https://github.com/kirbyde…
RasmusTraeholt Oct 11, 2022
107d1ea
refactor + review changes
RasmusTraeholt Oct 11, 2022
18759b0
Update package.json
RasmusTraeholt Oct 11, 2022
10ca2d6
line-height sass var
RasmusTraeholt Oct 11, 2022
cd6c1c4
Update core version
jkaltoft Oct 12, 2022
ad07080
Bump to version 7.1.1
jkaltoft Oct 12, 2022
c6d4a1d
Merge pull request #2540 from kirbydesign/release/v7.1.1
jkaltoft Oct 12, 2022
155d9b8
Update changelog
jkaltoft Oct 12, 2022
cec0761
Merge branch 'develop' into release/v7.1.1-changelog
jkaltoft Oct 12, 2022
d43b3fb
update unittest imports
SigurdVilstrup Oct 12, 2022
a7a1410
corrected kirby-selectable-th class name
SigurdVilstrup Oct 12, 2022
e6aa36b
add unittest for data table and table row
SigurdVilstrup Oct 12, 2022
4d5735c
rename tr to table-row for clarity
SigurdVilstrup Oct 12, 2022
cbaf182
implements onPush change detection
SigurdVilstrup Oct 12, 2022
155e610
unit tests + experimental examples module
RasmusTraeholt Oct 12, 2022
f9b7204
update table component unittest
SigurdVilstrup Oct 12, 2022
49ca6ee
Merge branch 'develop' into component/2494-kirby-data-table
Oct 12, 2022
27328c3
Merge branch 'develop' into feature/2342-dropdown-keyboard-navigation
mark-drastrup Oct 12, 2022
2b8c4f9
Merge branch 'develop' into enhancement/376-modal-alert-before-close
mark-drastrup Oct 12, 2022
879dbb0
added cookbook affix examples
thsp-jyskebank-dk Oct 12, 2022
68aab47
remove unused imports
SigurdVilstrup Oct 12, 2022
8097178
added prefix / suffix slots to form-field.component.html
thsp-jyskebank-dk Oct 12, 2022
02e3a41
remove fixed comments
SigurdVilstrup Oct 12, 2022
a91ddb2
fix module scope
RasmusTraeholt Oct 12, 2022
8d31953
Remove todo comment
mark-drastrup Oct 12, 2022
837c973
affix directive
thsp-jyskebank-dk Oct 12, 2022
a27a26f
position affix correctly. Input field padding still wrong
thsp-jyskebank-dk Oct 12, 2022
1167ae7
fix affix example to align with new syntax
thsp-jyskebank-dk Oct 12, 2022
0e819f7
moved some shared form field variables to a new file from form-field-…
thsp-jyskebank-dk Oct 13, 2022
df2079f
ResizeObserver for affix
thsp-jyskebank-dk Oct 13, 2022
40a87f9
update divider widht and item spacing
RasmusTraeholt Oct 13, 2022
58d9915
Refactor template to simplify calculations
RasmusKjeldgaard Oct 13, 2022
f41d5b5
Leftalign code snippet for better presentation
RasmusKjeldgaard Oct 13, 2022
2add694
Remove affix heading from example page
RasmusKjeldgaard Oct 13, 2022
f0c69df
Use designtoken instead of css prop for padding
RasmusKjeldgaard Oct 13, 2022
27d49d0
Move ResizeObserver init to AfterContentInit hook
RasmusKjeldgaard Oct 13, 2022
04144ba
Revert form-field-variables
RasmusKjeldgaard Oct 13, 2022
9d42445
remove view encapsulation
SigurdVilstrup Oct 13, 2022
1fd32d8
updated showcase card example subheading
SigurdVilstrup Oct 13, 2022
c6b5cc5
Simplify styling of affix and prefix/suffix container
RasmusKjeldgaard Oct 13, 2022
af07da7
🐛 Fix missing input element after content init
RasmusKjeldgaard Oct 13, 2022
19f97d7
Disable eslint for kirby-affix selector
RasmusKjeldgaard Oct 13, 2022
e1f9f35
📝 Add disclaimer with known limitations to docs
RasmusKjeldgaard Oct 14, 2022
cb1173e
✅ Adjust tests to fit new DOM structure
RasmusKjeldgaard Oct 14, 2022
67f07cb
Merge pull request #2424 from kirbydesign/feature/2342-dropdown-keybo…
mark-drastrup Oct 14, 2022
d714917
affixElements should never be undefined after content init
RasmusKjeldgaard Oct 14, 2022
baa789b
Increase readability of input padding calculation
RasmusKjeldgaard Oct 14, 2022
60a0d55
review changes
RasmusTraeholt Oct 14, 2022
7ef318a
remove onClickHeading
SigurdVilstrup Oct 14, 2022
11ea990
Merge branch 'develop' into enhancement/376-modal-alert-before-close
mark-drastrup Oct 14, 2022
2532072
Update cookbook example to include custom icon
mark-drastrup Oct 14, 2022
643e0da
added some tests for affix on formfield spec
thsp-jyskebank-dk Oct 14, 2022
c5e8ed0
increase wait time for formfield affix test
thsp-jyskebank-dk Oct 14, 2022
89983cd
Merge branch 'develop' into feature/form-field-affix-functionality
tspringborg Oct 14, 2022
26bda4a
Enforce affix text color as semi-dark
RasmusKjeldgaard Oct 14, 2022
470dc5f
✅ Reuse existing test util and improve structure
RasmusKjeldgaard Oct 14, 2022
71a0c49
✅ Remove flaky tests
RasmusKjeldgaard Oct 15, 2022
e4f387c
Merge pull request #2549 from kirbydesign/housekeeping/2508-custom-ic…
mark-drastrup Oct 15, 2022
5dcd094
Merge branch 'develop' into feature/form-field-affix-functionality
RasmusKjeldgaard Oct 15, 2022
44caa2f
Merge pull request #2545 from kirbydesign/feature/form-field-affix-fu…
RasmusKjeldgaard Oct 15, 2022
f2e7108
changed PR changes from RasmusKjeldgaard
SigurdVilstrup Oct 16, 2022
2c08237
Merge branch 'develop' into component/2494-kirby-data-table
Oct 16, 2022
d2ec460
corrects kirby-table fixedLayout prop. in example
SigurdVilstrup Oct 17, 2022
f7d922d
updated styling comments
RasmusTraeholt Oct 17, 2022
e567f11
Merge branch 'develop' into feature/local-navigation
RasmusTraeholt Oct 17, 2022
a4f13ab
bump designsystem version
RasmusTraeholt Oct 17, 2022
e19c13f
Merge pull request #2517 from kirbydesign/component/2494-kirby-data-t…
RasmusKjeldgaard Oct 17, 2022
57b6a68
Merge branch 'develop' into feature/local-navigation
RasmusTraeholt Oct 18, 2022
a498a14
Set the Intersection Observer rootMargin to the height of the dropdow…
mark-drastrup Oct 19, 2022
d972294
Create settings.json in the .vscode folder
mark-drastrup Oct 19, 2022
caeee71
Add update icon
mark-drastrup Oct 21, 2022
e758acd
Merge pull request #2558 from kirbydesign/enhancement/2551-add-update…
mark-drastrup Oct 24, 2022
813edb8
Update package.json
RasmusTraeholt Oct 24, 2022
307c5ae
Merge branch 'develop' into release/v7.1.1-changelog
jkaltoft Oct 24, 2022
9860c5e
Merge branch 'develop' into eslint-config
mark-drastrup Oct 24, 2022
bf58302
Merge pull request #2554 from kirbydesign/eslint-config
mark-drastrup Oct 24, 2022
0e300b7
Merge branch 'develop' into release/v7.1.1-changelog
jkaltoft Oct 24, 2022
278e3ad
Merge branch 'develop' into feature/local-navigation
mictro Oct 24, 2022
55a860d
Merge pull request #2542 from kirbydesign/release/v7.1.1-changelog
jkaltoft Oct 24, 2022
7c99477
Merge branch 'develop' into feature/local-navigation
mictro Oct 24, 2022
61c50e5
Merge pull request #2501 from kirbydesign/feature/local-navigation
mictro Oct 24, 2022
98983bd
Merge branch 'develop' into bug/2457-fab-sheet-not-automatically-clos…
RasmusKjeldgaard Oct 24, 2022
4d7a92f
Merge branch 'develop' into enhancement/376-modal-alert-before-close
mark-drastrup Oct 24, 2022
96ac460
Merge pull request #2514 from kirbydesign/enhancement/376-modal-alert…
mark-drastrup Oct 24, 2022
7e4e877
Merge branch 'develop' into bug/2500-dropdown-opening-direction
mark-drastrup Oct 24, 2022
22f8d9d
Merge branch 'develop' into bug/2457-fab-sheet-not-automatically-clos…
mictro Oct 24, 2022
d9d7b4f
Merge pull request #2472 from kirbydesign/bug/2457-fab-sheet-not-auto…
mictro Oct 24, 2022
0838445
Merge branch 'main' into develop
jkaltoft Oct 24, 2022
e863478
Merge branch 'develop' into bug/2500-dropdown-opening-direction
mark-drastrup Oct 25, 2022
93d2218
Merge pull request #2552 from kirbydesign/bug/2500-dropdown-opening-d…
mark-drastrup Oct 25, 2022
a7ae231
Change position of tabbar badges (#2555)
mictro Oct 25, 2022
c02a88f
Prevent dropdown focus ring on click (#2544)
mark-drastrup Oct 26, 2022
7511877
Upgrade Chart.js to version 3.9.1 (#2548)
mark-drastrup Oct 26, 2022
37448c6
Release v7.2.1 (#2568)
RasmusKjeldgaard Oct 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"[html]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true
}
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

Notable changes to the project will be documented in this file.

## [7.2.1](https://github.com/kirbydesign/designsystem/compare/v7.1.1...v7.2.1) (28-10-2022)

### Features

- **data table** - introduce new Kirby Data Table component ([#2517](https://github.com/kirbydesign/designsystem/pull/2517))
- **dropdown** - enable keyboard navigation in the dropdown ([#2424](https://github.com/kirbydesign/designsystem/pull/2424))
- **formfield** - introduce affix functionality (pre- and suffix) ([#2545](https://github.com/kirbydesign/designsystem/pull/2545))
- **icon** - add update icon ([#2558](https://github.com/kirbydesign/designsystem/pull/2558))
- **local navigation** - introduce **experimental** local navigation component ([#2501](https://github.com/kirbydesign/designsystem/pull/2501))
- **modal** - Add option to show an alert before dismissing modal ([#2514](https://github.com/kirbydesign/designsystem/pull/2514))
- **tabs** - change position of badges([#2555](https://github.com/kirbydesign/designsystem/pull/2555))

### Bugfixes

- **chart** - upgrade Chart.js dependency to avoid chart-annotations version warning ([#2548 ](https://github.com/kirbydesign/designsystem/pull/2548))
- **dropdown** - prevent dropdown focus ring on click ([#2544](https://github.com/kirbydesign/designsystem/pull/2544))
- **dropdown** - fix opening direction when button intersects bottom of viewport ([#2544](https://github.com/kirbydesign/designsystem/pull/2544))
- **fab-sheet** - fix no automatic close of fab-sheet on item click([#2472](https://github.com/kirbydesign/designsystem/pull/2472))

## [7.1.1](https://github.com/kirbydesign/designsystem/compare/v7.1.0...v7.1.1) (12-10-2022)

Fixes missing stylesheets in core packages. Due to modified publish flow made in v7.1.0. This only affects the published npm packages.

## [7.1.0](https://github.com/kirbydesign/designsystem/compare/v7.0.0...v7.1.0) (07-10-2022)

### Features
Expand Down
3 changes: 2 additions & 1 deletion apps/cookbook/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { KirbyModule } from '@kirbydesign/designsystem';
import { KirbyExperimentalModule, KirbyModule } from '@kirbydesign/designsystem';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
Expand Down Expand Up @@ -34,6 +34,7 @@ registerLocaleData(localeData);
HttpClientModule,
FormsModule,
KirbyModule,
KirbyExperimentalModule,
],

providers: [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<h1>Data table</h1>

<h2>Data table</h2>
<cookbook-data-table-default-example></cookbook-data-table-default-example>

<h2>Data table in card</h2>
<cookbook-data-table-card-example></cookbook-data-table-card-example>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Component } from '@angular/core';

@Component({
selector: 'cookbook-data-table-example',
templateUrl: './data-table-example.component.html',
})
export class DataTableExampleComponent {}
54 changes: 54 additions & 0 deletions apps/cookbook/src/app/examples/data-table-example/examples/card.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { Component } from '@angular/core';
import { ToastController } from '@kirbydesign/designsystem';
import { Person, table_example_data } from '../table_example_data';

const config = {
selector: 'cookbook-data-table-card-example',
template: `<kirby-card>
<table kirby-table>
<thead>
<tr>
<th>Name</th>
<th>Eyes</th>
<th>Gender</th>
<th>Hair</th>
<th>Skin</th>
<th>Birth year</th>
<th style="text-align:right;">Height (cm)</th>
<th style="text-align:right;">Weight (kg)</th>
</tr>
</thead>
<tbody>
<tr kirby-tr *ngFor="let rowData of tableData; let i = index" [selectable]="true" (click)="onClickRow(i)">
<td>{{rowData.name}}</td>
<td>{{rowData.eye_color}}</td>
<td>{{rowData.gender}}</td>
<td>{{rowData.hair_color}}</td>
<td>{{rowData.skin_color}}</td>
<td>{{rowData.birth_year}}</td>
<td style="text-align:right;">{{rowData.height}}</td>
<td style="text-align:right;">{{rowData.mass}}</td>
</tr>
</tbody>
</table>
</kirby-card>`,
};

@Component({
selector: config.selector,
template: config.template,
})
export class DataTableCardExampleComponent {
tableData: Person[] = table_example_data;
template: string = config.template;

constructor(private toastController: ToastController) {}

onClickRow(index: number) {
this.toastController.showToast({
message: `You pressed row number ${index}`,
messageType: 'success',
durationInMs: 2000,
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Component } from '@angular/core';
import { Person, table_example_data } from '../table_example_data';

const config = {
selector: 'cookbook-data-table-default-example',
template: `<table kirby-table [fixedLayout]="true">
<thead>
<tr>
<th>Name</th>
<th style="text-align:right;">Height (cm)</th>
<th style="text-align:right;">Weight (kg)</th>
</tr>
</thead>
<tbody>
<tr kirby-tr *ngFor="let rowData of tableData">
<td>{{rowData.name}}</td>
<td style="text-align:right;">{{rowData.height}}</td>
<td style="text-align:right;">{{rowData.mass}}</td>
</tr>
</tbody>
</table>`,
};

@Component({
selector: config.selector,
template: config.template,
})
export class DataTableDefaultExampleComponent {
template: string = config.template;
tableData: Person[] = table_example_data.slice(0, 3);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { KirbyModule } from '@kirbydesign/designsystem';

import { DataTableCardExampleComponent } from './examples/card';
import { DataTableDefaultExampleComponent } from './examples/default';

const COMPONENT_DECLARATIONS = [DataTableCardExampleComponent, DataTableDefaultExampleComponent];

@NgModule({
imports: [CommonModule, KirbyModule],
declarations: COMPONENT_DECLARATIONS,
exports: COMPONENT_DECLARATIONS,
})
export class DataTableExampleModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
export interface Person {
name: string;
eye_color: string;
gender: string;
hair_color: string;
skin_color: string;
birth_year: string;
height: string;
mass: string;
}

export const table_example_data: Person[] = [
{
name: 'Luke Skywalker',
height: '172',
mass: '77',
hair_color: 'blond',
skin_color: 'fair',
eye_color: 'blue',
birth_year: '19BBY',
gender: 'male',
},
{
name: 'C-3PO',
height: '167',
mass: '75',
hair_color: 'n/a',
skin_color: 'gold',
eye_color: 'yellow',
birth_year: '112BBY',
gender: 'n/a',
},
{
name: 'R2-D2',
height: '96',
mass: '32',
hair_color: 'n/a',
skin_color: 'white, blue',
eye_color: 'red',
birth_year: '33BBY',
gender: 'n/a',
},
{
name: 'Darth Vader',
height: '202',
mass: '136',
hair_color: 'none',
skin_color: 'white',
eye_color: 'yellow',
birth_year: '41.9BBY',
gender: 'male',
},
{
name: 'Leia Organa',
height: '150',
mass: '49',
hair_color: 'brown',
skin_color: 'light',
eye_color: 'brown',
birth_year: '19BBY',
gender: 'female',
},
{
name: 'Obi-Wan Kenobi',
height: '182',
mass: '77',
hair_color: 'auburn, white',
skin_color: 'fair',
eye_color: 'blue-gray',
birth_year: '57BBY',
gender: 'male',
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ const config = {
[items]="items"
itemTextProperty="title">
<kirby-item
*kirbyListItemTemplate="let item; let selected = selected"
*kirbyListItemTemplate="let item; let selected = selected; let focused = focused"
selectable="true"
[selected]="selected">
[selected]="selected"
[class.focused]="focused"
>
<kirby-icon *ngIf="selected" name="checkmark-selected" slot="start"></kirby-icon>
<kirby-label>
<h3>{{ item.title }}</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</kirby-empty-state>
<hr />
<kirby-empty-state
iconName="help"
customIconName="football"
title="No items"
subtitle="You don't have any items. Call support to add some items to your account."
></kirby-empty-state>
Expand Down
2 changes: 2 additions & 0 deletions apps/cookbook/src/app/examples/examples.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { ToastExampleComponent } from './toast-example/toast-example.component';
import { ToggleExampleComponent } from './toggle-example/toggle-example.component';
import { PagePullToRefreshExampleComponent } from './page-example/pull-to-refresh/page-pull-to-refresh-example.component';
import { DropdownExampleComponent } from './dropdown-example/dropdown-example.component';
import { DataTableExampleComponent } from './data-table-example/data-table-example.component';

export const COMPONENT_DECLARATIONS: any[] = [
ExamplesComponent,
Expand Down Expand Up @@ -99,4 +100,5 @@ export const COMPONENT_DECLARATIONS: any[] = [
ItemGroupExampleComponent,
SectionHeaderExampleComponent,
ListExperimentalExampleComponent,
DataTableExampleComponent,
];
12 changes: 10 additions & 2 deletions apps/cookbook/src/app/examples/examples.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { IconRegistryService, KirbyModule } from '@kirbydesign/designsystem';
import {
IconRegistryService,
KirbyExperimentalModule,
KirbyModule,
} from '@kirbydesign/designsystem';

import { AccordionExampleModule } from './accordion-example/accordion-example.module';
import { AvatarExampleModule } from './avatar-example/avatar-example.module';
import { BadgeExampleModule } from './badge-example/badge-example.module';
import { CardExampleModule } from './card-example/card-example.module';
import { ChartsExampleModule } from './charts-example/charts-example.module';
import { CheckboxExampleModule } from './checkbox-example/checkbox-example.module';
import { DataTableExampleModule } from './data-table-example/table-example.module';
import { DropdownExampleModule } from './dropdown-example/dropdown-example.module';
import { COMPONENT_DECLARATIONS } from './examples.common';
import { ExamplesSharedModule } from './examples.shared.module';
import { ExperimentalExamplesModule } from './experimental-examples/experimental-examples.module';
import { FlagExampleModule } from './flag-example/flag-example.module';
import { FormFieldExamplesModule } from './form-field-example/form-field-example.module';
import { GridLayoutExamplesModule } from './grid-layout-example/grid-layout-example.module';
Expand Down Expand Up @@ -57,10 +63,12 @@ const IMPORTS = [
ItemGroupExampleModule,
ListExperimentalExampleModule,
VirtualScrollExampleModule,
ExperimentalExamplesModule,
DataTableExampleModule,
];

@NgModule({
imports: [CommonModule, RouterModule, KirbyModule, ...IMPORTS],
imports: [CommonModule, RouterModule, KirbyModule, KirbyExperimentalModule, ...IMPORTS],
declarations: COMPONENT_DECLARATIONS,
exports: [...COMPONENT_DECLARATIONS, ...IMPORTS],
})
Expand Down
12 changes: 12 additions & 0 deletions apps/cookbook/src/app/examples/examples.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import { ToggleExampleComponent } from './toggle-example/toggle-example.componen
import { VirtualScrollListExampleComponent } from './virtual-scroll-example/virtual-scroll-list-example/virtual-scroll-list-example.component';
import { PagePullToRefreshExampleComponent } from './page-example/pull-to-refresh/page-pull-to-refresh-example.component';
import { DropdownExampleComponent } from './dropdown-example/dropdown-example.component';
import { DataTableExampleComponent } from './data-table-example/data-table-example.component';

VirtualScrollListExampleComponent;
export const routes: Routes = [
Expand Down Expand Up @@ -258,6 +259,13 @@ export const routes: Routes = [
},
],
},
{
path: 'experimental',
loadChildren: () =>
import('./experimental-examples/experimental-examples.module').then(
(m) => m.ExperimentalExamplesModule
),
},
],
},
{
Expand Down Expand Up @@ -478,4 +486,8 @@ export const routes: Routes = [
path: 'styling-HTML-lists',
component: StylingHtmlListsExampleComponent,
},
{
path: 'data-table',
component: DataTableExampleComponent,
},
];
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { PageLocalNavigationExampleComponent } from './page-local-navigation/page-local-navigation-example.component';
Loading