@rdlabo/ionic-theme-ios26 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/css-compilation.mdc +34 -0
- package/.cursor/rules/demo-application.mdc +39 -0
- package/.cursor/rules/development-workflow.mdc +41 -0
- package/.cursor/rules/project-role.mdc +21 -0
- package/.github/FUNDING.yml +15 -0
- package/.husky/pre-commit +1 -0
- package/.lintstagedrc.yml +6 -0
- package/.prettierignore +3 -0
- package/FEEDBACK.md +25 -0
- package/README.md +58 -87
- package/USING_ION_ITEM_GROUP.md +58 -0
- package/build-sass.js +25 -0
- package/demo/ .cursor/rules/angular-20.mdc +136 -0
- package/demo/.browserslistrc +15 -0
- package/demo/.editorconfig +16 -0
- package/demo/.vscode/extensions.json +5 -0
- package/demo/.vscode/settings.json +3 -0
- package/demo/angular.json +141 -0
- package/demo/capacitor.config.ts +9 -0
- package/demo/eslint.config.js +47 -0
- package/demo/ionic.config.json +7 -0
- package/demo/karma.conf.js +44 -0
- package/demo/package-lock.json +20001 -0
- package/demo/package.json +60 -0
- package/demo/src/app/album/album-page.component.html +24 -0
- package/demo/src/app/album/album-page.component.scss +31 -0
- package/demo/src/app/album/album-page.component.spec.ts +21 -0
- package/demo/src/app/album/album-page.component.ts +24 -0
- package/demo/src/app/app.component.html +3 -0
- package/demo/src/app/app.component.ts +16 -0
- package/demo/src/app/app.config.ts +17 -0
- package/demo/src/app/app.routes.ts +8 -0
- package/demo/src/app/health/health-page.component.html +17 -0
- package/demo/src/app/health/health-page.component.scss +0 -0
- package/demo/src/app/health/health-page.component.spec.ts +21 -0
- package/demo/src/app/health/health-page.component.ts +14 -0
- package/demo/src/app/index/index-page.component.html +41 -0
- package/demo/src/app/index/index-page.component.scss +0 -0
- package/demo/src/app/index/index-page.component.spec.ts +21 -0
- package/demo/src/app/index/index-page.component.ts +102 -0
- package/demo/src/app/index/index.routes.ts +25 -0
- package/demo/src/app/index/pages/action-sheet/action-sheet.page.html +33 -0
- package/demo/src/app/index/pages/action-sheet/action-sheet.page.scss +0 -0
- package/demo/src/app/index/pages/action-sheet/action-sheet.page.spec.ts +17 -0
- package/demo/src/app/index/pages/action-sheet/action-sheet.page.ts +75 -0
- package/demo/src/app/index/pages/action-sheet/action-sheet.util.ts +28 -0
- package/demo/src/app/index/pages/alert/alert.page.html +33 -0
- package/demo/src/app/index/pages/alert/alert.page.scss +0 -0
- package/demo/src/app/index/pages/alert/alert.page.spec.ts +17 -0
- package/demo/src/app/index/pages/alert/alert.page.ts +75 -0
- package/demo/src/app/index/pages/alert/alert.util.ts +21 -0
- package/demo/src/app/index/pages/button/button.page.html +90 -0
- package/demo/src/app/index/pages/button/button.page.scss +0 -0
- package/demo/src/app/index/pages/button/button.page.spec.ts +17 -0
- package/demo/src/app/index/pages/button/button.page.ts +53 -0
- package/demo/src/app/index/pages/checkbox/checkbox.page.html +66 -0
- package/demo/src/app/index/pages/checkbox/checkbox.page.scss +0 -0
- package/demo/src/app/index/pages/checkbox/checkbox.page.spec.ts +17 -0
- package/demo/src/app/index/pages/checkbox/checkbox.page.ts +47 -0
- package/demo/src/app/settings/settings-page.component.html +120 -0
- package/demo/src/app/settings/settings-page.component.scss +33 -0
- package/demo/src/app/settings/settings-page.component.spec.ts +21 -0
- package/demo/src/app/settings/settings-page.component.ts +55 -0
- package/demo/src/app/tabs/tabs.page.html +23 -0
- package/demo/src/app/tabs/tabs.page.scss +9 -0
- package/demo/src/app/tabs/tabs.page.spec.ts +26 -0
- package/demo/src/app/tabs/tabs.page.ts +28 -0
- package/demo/src/app/tabs/tabs.routes.ts +41 -0
- package/demo/src/assets/.gitkeep +0 -0
- package/demo/src/favicon.ico +0 -0
- package/demo/src/global.scss +47 -0
- package/demo/src/index.html +24 -0
- package/demo/src/main.ts +5 -0
- package/demo/src/theme/theme-ios26.scss +25 -0
- package/demo/src/theme/variables.scss +2 -0
- package/demo/tsconfig.app.json +14 -0
- package/demo/tsconfig.json +30 -0
- package/demo/tsconfig.spec.json +17 -0
- package/package.json +38 -11
- package/prettier.config.js +18 -0
- package/screenshots/ios26.png +0 -0
- package/screenshots/why-ion-list-inset.png +0 -0
- package/src/components/ion-action-sheet.scss +42 -0
- package/src/components/ion-alert.scss +31 -0
- package/src/components/ion-button.scss +111 -0
- package/src/components/ion-card.scss +3 -0
- package/src/components/ion-fab.scss +16 -0
- package/src/components/ion-list.scss +33 -0
- package/src/components/ion-modal.scss +6 -0
- package/src/components/ion-popover.scss +21 -0
- package/src/components/ion-searchbar.scss +37 -0
- package/src/components/ion-segment.scss +10 -0
- package/src/components/ion-tabs.scss +47 -0
- package/src/components/ion-toast.scss +3 -0
- package/src/components/ion-toggle.scss +47 -0
- package/src/components-dark/ion-button.scss +28 -0
- package/src/components-dark/theme-dark.scss +14 -0
- package/src/ionic-theme-dark-class.scss +6 -0
- package/src/ionic-theme-dark-system.scss +8 -0
- package/src/ionic-theme-ios26.scss +32 -0
- package/src/md-ion-list-inset.scss +19 -0
- package/src/utils/api.scss +20 -0
- package/src/utils/default-variables.scss +10 -0
- package/src/utils/theme-list-inset.scss +92 -0
- package/src/utils/translucent.scss +70 -0
- package/tsconfig.json +5 -0
- package/css/ion-list-inset.css +0 -247
- package/css/ion-list-inset.css.map +0 -1
- package/css/ionic-theme-ios26.css +0 -349
- package/css/ionic-theme-ios26.css.map +0 -1
- package/fesm2022/rdlabo-ionic-theme-ios26.mjs +0 -4
- package/fesm2022/rdlabo-ionic-theme-ios26.mjs.map +0 -1
- package/index.d.ts +0 -3
- package/src/assets/ion-list-inset.scss +0 -198
- package/src/assets/ios-design/ion-button.scss +0 -68
- package/src/assets/ios-design/ion-popover.scss +0 -23
- package/src/assets/ios-design/ion-searchbar.scss +0 -44
- package/src/assets/ios-design/ion-segment.scss +0 -12
- package/src/assets/ios-design/ion-tabs.scss +0 -60
- package/src/assets/ios-design/ion-toggle.scss +0 -8
- package/src/assets/ios-design/ios-design-dark.scss +0 -28
- package/src/assets/ios-design.scss +0 -110
- package/src/assets/ios-variables.scss +0 -38
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "demo",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"author": "Ionic Framework",
|
|
5
|
+
"homepage": "https://ionicframework.com/",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"ng": "ng",
|
|
8
|
+
"start": "ng serve",
|
|
9
|
+
"build": "ng build",
|
|
10
|
+
"watch": "ng build --watch --configuration development",
|
|
11
|
+
"test": "ng test",
|
|
12
|
+
"lint": "ng lint"
|
|
13
|
+
},
|
|
14
|
+
"private": true,
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@angular/animations": "^20.0.0",
|
|
17
|
+
"@angular/common": "^20.0.0",
|
|
18
|
+
"@angular/compiler": "^20.0.0",
|
|
19
|
+
"@angular/core": "^20.0.0",
|
|
20
|
+
"@angular/forms": "^20.0.0",
|
|
21
|
+
"@angular/platform-browser": "^20.0.0",
|
|
22
|
+
"@angular/platform-browser-dynamic": "^20.0.0",
|
|
23
|
+
"@angular/router": "^20.0.0",
|
|
24
|
+
"@capacitor/app": "7.1.0",
|
|
25
|
+
"@capacitor/core": "7.4.3",
|
|
26
|
+
"@capacitor/haptics": "7.0.2",
|
|
27
|
+
"@capacitor/keyboard": "7.0.3",
|
|
28
|
+
"@capacitor/status-bar": "7.0.3",
|
|
29
|
+
"@ionic/angular": "^8.0.0",
|
|
30
|
+
"ionicons": "^7.0.0",
|
|
31
|
+
"rxjs": "~7.8.0",
|
|
32
|
+
"tslib": "^2.3.0",
|
|
33
|
+
"zone.js": "~0.15.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@angular-devkit/build-angular": "^20.0.0",
|
|
37
|
+
"@angular/cli": "^20.0.0",
|
|
38
|
+
"@angular/compiler-cli": "^20.0.0",
|
|
39
|
+
"@angular/language-service": "^20.0.0",
|
|
40
|
+
"@capacitor/cli": "7.4.3",
|
|
41
|
+
"@ionic/angular-toolkit": "^12.0.0",
|
|
42
|
+
"@rdlabo/eslint-plugin-rules": "^20.3.0",
|
|
43
|
+
"@types/jasmine": "~5.1.0",
|
|
44
|
+
"angular-eslint": "20.3.0",
|
|
45
|
+
"eslint": "^9.35.0",
|
|
46
|
+
"eslint-plugin-import": "^2.29.1",
|
|
47
|
+
"eslint-plugin-jsdoc": "^48.2.1",
|
|
48
|
+
"eslint-plugin-prefer-arrow": "1.2.2",
|
|
49
|
+
"jasmine-core": "~5.1.0",
|
|
50
|
+
"jasmine-spec-reporter": "~5.0.0",
|
|
51
|
+
"karma": "~6.4.0",
|
|
52
|
+
"karma-chrome-launcher": "~3.2.0",
|
|
53
|
+
"karma-coverage": "~2.2.0",
|
|
54
|
+
"karma-jasmine": "~5.1.0",
|
|
55
|
+
"karma-jasmine-html-reporter": "~2.1.0",
|
|
56
|
+
"typescript": "~5.8.0",
|
|
57
|
+
"typescript-eslint": "8.40.0"
|
|
58
|
+
},
|
|
59
|
+
"description": "An Ionic project"
|
|
60
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<ion-header [translucent]="true" class="ion-palette-dark">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-title size="large" style="margin-top: 8px">Library</ion-title>
|
|
4
|
+
<ion-buttons slot="end">
|
|
5
|
+
<ion-button fill="default" href="https://github.com/rdlabo-team/ionic-theme-ios26"
|
|
6
|
+
><ion-icon name="logo-github" slot="icon-only"></ion-icon
|
|
7
|
+
></ion-button>
|
|
8
|
+
<ion-button fill="default">Select</ion-button>
|
|
9
|
+
</ion-buttons>
|
|
10
|
+
</ion-toolbar>
|
|
11
|
+
</ion-header>
|
|
12
|
+
<ion-content [fullscreen]="true">
|
|
13
|
+
<section class="images">
|
|
14
|
+
@for (item of sourceIonIcons; track item) {
|
|
15
|
+
<img [src]="'https://picsum.photos/600/600?id=' + item" alt="" />
|
|
16
|
+
}
|
|
17
|
+
</section>
|
|
18
|
+
|
|
19
|
+
<ion-fab class="inner-tab-bar" vertical="bottom" horizontal="end" slot="fixed">
|
|
20
|
+
<ion-fab-button>
|
|
21
|
+
<ion-icon name="search"></ion-icon>
|
|
22
|
+
</ion-fab-button>
|
|
23
|
+
</ion-fab>
|
|
24
|
+
</ion-content>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--ios26-color-background-rgb: var(--ion-color-dark-rgb);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
ion-header {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
ion-title,
|
|
10
|
+
ion-button::part(native) {
|
|
11
|
+
color: var(--ion-text-color, #fff);
|
|
12
|
+
}
|
|
13
|
+
&.header-translucent::after {
|
|
14
|
+
// Overwrite default settings
|
|
15
|
+
box-shadow:
|
|
16
|
+
inset 0 0 0 0 rgba(0, 0, 0, 0),
|
|
17
|
+
inset 0 calc(66px + var(--ion-safe-area-top)) 20px -20px rgba(0, 0, 0, 0.4);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ion-content {
|
|
22
|
+
position: relative;
|
|
23
|
+
section.images {
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-template-columns: 33.33% 33.33% 33.33%;
|
|
26
|
+
img {
|
|
27
|
+
border: 0.1px solid #fff;
|
|
28
|
+
border-top: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { AlbumPage } from './album-page.component';
|
|
3
|
+
import { testConfig } from '../../../../util/test.config';
|
|
4
|
+
|
|
5
|
+
describe('ScrollHeaderPage', () => {
|
|
6
|
+
let component: AlbumPage;
|
|
7
|
+
let fixture: ComponentFixture<AlbumPage>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
providers: testConfig.providers,
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
fixture = TestBed.createComponent(AlbumPage);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import {
|
|
5
|
+
IonButton,
|
|
6
|
+
IonButtons,
|
|
7
|
+
IonContent,
|
|
8
|
+
IonFab,
|
|
9
|
+
IonFabButton,
|
|
10
|
+
IonHeader,
|
|
11
|
+
IonIcon,
|
|
12
|
+
IonTitle,
|
|
13
|
+
IonToolbar,
|
|
14
|
+
} from '@ionic/angular/standalone';
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'app-album-page',
|
|
18
|
+
templateUrl: './album-page.component.html',
|
|
19
|
+
styleUrls: ['./album-page.component.scss'],
|
|
20
|
+
imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule, IonIcon, IonButton, IonButtons, IonFab, IonFabButton],
|
|
21
|
+
})
|
|
22
|
+
export class AlbumPage {
|
|
23
|
+
readonly sourceIonIcons = [...Array(60)].map((_, i) => i);
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';
|
|
3
|
+
import { addIcons } from 'ionicons';
|
|
4
|
+
import * as allIcons from 'ionicons/icons';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-root',
|
|
8
|
+
imports: [IonRouterOutlet, IonApp],
|
|
9
|
+
templateUrl: './app.component.html',
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
})
|
|
12
|
+
export class AppComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
addIcons(allIcons);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ApplicationConfig, provideZonelessChangeDetection } from '@angular/core';
|
|
2
|
+
import { provideRouter } from '@angular/router';
|
|
3
|
+
import * as allIcons from 'ionicons/icons';
|
|
4
|
+
|
|
5
|
+
import { routes } from './app.routes';
|
|
6
|
+
import { provideIonicAngular } from '@ionic/angular/standalone';
|
|
7
|
+
import { addIcons } from 'ionicons';
|
|
8
|
+
|
|
9
|
+
addIcons(allIcons);
|
|
10
|
+
|
|
11
|
+
export const appConfig: ApplicationConfig = {
|
|
12
|
+
providers: [
|
|
13
|
+
provideZonelessChangeDetection(),
|
|
14
|
+
provideRouter(routes),
|
|
15
|
+
provideIonicAngular({ useSetInputAPI: true, mode: 'ios', backButtonText: '' }),
|
|
16
|
+
],
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<ion-header [translucent]="true">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-title>Health</ion-title>
|
|
4
|
+
<ion-buttons slot="end">
|
|
5
|
+
<ion-button fill="default" color="dark" href="https://github.com/rdlabo-team/ionic-theme-ios26"
|
|
6
|
+
><ion-icon name="logo-github" slot="icon-only"></ion-icon
|
|
7
|
+
></ion-button>
|
|
8
|
+
</ion-buttons>
|
|
9
|
+
</ion-toolbar>
|
|
10
|
+
</ion-header>
|
|
11
|
+
<ion-content [fullscreen]="true">
|
|
12
|
+
<ion-header collapse="condense">
|
|
13
|
+
<ion-toolbar>
|
|
14
|
+
<ion-title size="large">Health(WIP)</ion-title>
|
|
15
|
+
</ion-toolbar>
|
|
16
|
+
</ion-header>
|
|
17
|
+
</ion-content>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { HealthPage } from './health-page.component';
|
|
3
|
+
import { testConfig } from '../../../../util/test.config';
|
|
4
|
+
|
|
5
|
+
describe('VirtualScrollHeaderPage', () => {
|
|
6
|
+
let component: HealthPage;
|
|
7
|
+
let fixture: ComponentFixture<HealthPage>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
providers: testConfig.providers,
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
fixture = TestBed.createComponent(HealthPage);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, inject } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { IonButton, IonButtons, IonContent, IonHeader, IonIcon, IonTitle, IonToolbar, Platform } from '@ionic/angular/standalone';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-health-page',
|
|
8
|
+
templateUrl: './health-page.component.html',
|
|
9
|
+
styleUrls: ['./health-page.component.scss'],
|
|
10
|
+
imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule, IonIcon, IonButton, IonButtons],
|
|
11
|
+
})
|
|
12
|
+
export class HealthPage {
|
|
13
|
+
readonly platform = inject(Platform);
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<ion-header [translucent]="true">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-title>Index</ion-title>
|
|
4
|
+
<ion-buttons slot="end">
|
|
5
|
+
<ion-button color="dark" fill="default" href="https://github.com/rdlabo-team/ionic-theme-ios26"
|
|
6
|
+
><ion-icon name="logo-github" slot="icon-only"></ion-icon
|
|
7
|
+
></ion-button>
|
|
8
|
+
</ion-buttons>
|
|
9
|
+
</ion-toolbar>
|
|
10
|
+
</ion-header>
|
|
11
|
+
<ion-content color="light" [fullscreen]="true">
|
|
12
|
+
<ion-header collapse="condense">
|
|
13
|
+
<ion-toolbar color="light">
|
|
14
|
+
<ion-title size="large">Index</ion-title>
|
|
15
|
+
</ion-toolbar>
|
|
16
|
+
</ion-header>
|
|
17
|
+
<ion-list [inset]="true">
|
|
18
|
+
<ion-list-header><ion-label>Enable Demo</ion-label></ion-list-header>
|
|
19
|
+
<ion-item-group>
|
|
20
|
+
@for (item of enableComponents(); track item.name) {
|
|
21
|
+
<ion-item [disabled]="!item.enable" [button]="item.enable" (click)="navigateComponent(item)">
|
|
22
|
+
<ion-label>{{ item.name }}</ion-label>
|
|
23
|
+
</ion-item>
|
|
24
|
+
}
|
|
25
|
+
</ion-item-group>
|
|
26
|
+
<ion-note>These components have largely finalized their APIs. However, please note that they are not yet stable.</ion-note>
|
|
27
|
+
</ion-list>
|
|
28
|
+
|
|
29
|
+
<ion-list [inset]="true">
|
|
30
|
+
<ion-list-header><ion-label>Disable Demo</ion-label></ion-list-header>
|
|
31
|
+
<ion-item-group>
|
|
32
|
+
@for (item of disableComponents(); track item.name) {
|
|
33
|
+
<ion-item [disabled]="!item.enable" [button]="item.enable">
|
|
34
|
+
<ion-label>{{ item.name }}</ion-label>
|
|
35
|
+
<ion-text>WIP</ion-text>
|
|
36
|
+
</ion-item>
|
|
37
|
+
}
|
|
38
|
+
</ion-item-group>
|
|
39
|
+
<ion-note>These components are under development. However, that doesn't mean they can't be used.</ion-note>
|
|
40
|
+
</ion-list>
|
|
41
|
+
</ion-content>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { DemoPhotoEditorPage } from './index-page.component';
|
|
3
|
+
import { testConfig } from '../../../../util/test.config';
|
|
4
|
+
|
|
5
|
+
describe('PhotoEditorPage', () => {
|
|
6
|
+
let component: DemoPhotoEditorPage;
|
|
7
|
+
let fixture: ComponentFixture<DemoPhotoEditorPage>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
providers: testConfig.providers,
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
fixture = TestBed.createComponent(DemoPhotoEditorPage);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, inject, signal } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import {
|
|
5
|
+
IonButton,
|
|
6
|
+
IonButtons,
|
|
7
|
+
IonContent,
|
|
8
|
+
IonHeader,
|
|
9
|
+
IonIcon,
|
|
10
|
+
IonItem,
|
|
11
|
+
IonItemGroup,
|
|
12
|
+
IonLabel,
|
|
13
|
+
IonList,
|
|
14
|
+
IonListHeader,
|
|
15
|
+
IonNote,
|
|
16
|
+
IonText,
|
|
17
|
+
IonTitle,
|
|
18
|
+
IonToolbar,
|
|
19
|
+
} from '@ionic/angular/standalone';
|
|
20
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
21
|
+
|
|
22
|
+
interface IComponent {
|
|
23
|
+
name: string;
|
|
24
|
+
enable: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@Component({
|
|
28
|
+
selector: 'index-page',
|
|
29
|
+
templateUrl: './index-page.component.html',
|
|
30
|
+
styleUrls: ['./index-page.component.scss'],
|
|
31
|
+
imports: [
|
|
32
|
+
IonContent,
|
|
33
|
+
IonHeader,
|
|
34
|
+
IonTitle,
|
|
35
|
+
IonToolbar,
|
|
36
|
+
CommonModule,
|
|
37
|
+
FormsModule,
|
|
38
|
+
IonButton,
|
|
39
|
+
IonButtons,
|
|
40
|
+
IonIcon,
|
|
41
|
+
IonItem,
|
|
42
|
+
IonLabel,
|
|
43
|
+
IonList,
|
|
44
|
+
IonListHeader,
|
|
45
|
+
IonItemGroup,
|
|
46
|
+
IonText,
|
|
47
|
+
IonNote,
|
|
48
|
+
],
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
})
|
|
51
|
+
export class IndexPageComponent {
|
|
52
|
+
readonly components = signal<IComponent[]>([
|
|
53
|
+
{ name: 'accordion', enable: false },
|
|
54
|
+
{ name: 'action-sheet', enable: true },
|
|
55
|
+
{ name: 'alert', enable: true },
|
|
56
|
+
{ name: 'badge', enable: false },
|
|
57
|
+
{ name: 'breadcrumbs', enable: false },
|
|
58
|
+
{ name: 'button', enable: true },
|
|
59
|
+
{ name: 'card', enable: false },
|
|
60
|
+
{ name: 'checkbox', enable: true },
|
|
61
|
+
{ name: 'chip', enable: false },
|
|
62
|
+
{ name: 'content', enable: false },
|
|
63
|
+
{ name: 'date-and-time-pickers', enable: false },
|
|
64
|
+
{ name: 'floating-action-button', enable: false },
|
|
65
|
+
{ name: 'grid', enable: false },
|
|
66
|
+
{ name: 'icons', enable: false },
|
|
67
|
+
{ name: 'infinite-scroll', enable: false },
|
|
68
|
+
{ name: 'inputs', enable: false },
|
|
69
|
+
{ name: 'item-list', enable: false },
|
|
70
|
+
{ name: 'media', enable: false },
|
|
71
|
+
{ name: 'menu', enable: false },
|
|
72
|
+
{ name: 'modal', enable: false },
|
|
73
|
+
{ name: 'navigate', enable: false },
|
|
74
|
+
{ name: 'popover', enable: false },
|
|
75
|
+
{ name: 'progress-indicators', enable: false },
|
|
76
|
+
{ name: 'radio', enable: false },
|
|
77
|
+
{ name: 'range', enable: false },
|
|
78
|
+
{ name: 'refresher', enable: false },
|
|
79
|
+
{ name: 'reorder', enable: false },
|
|
80
|
+
{ name: 'routing', enable: false },
|
|
81
|
+
{ name: 'searchbar', enable: false },
|
|
82
|
+
{ name: 'segment', enable: false },
|
|
83
|
+
{ name: 'select', enable: false },
|
|
84
|
+
{ name: 'tabs', enable: false },
|
|
85
|
+
{ name: 'toast', enable: false },
|
|
86
|
+
{ name: 'toggle', enable: false },
|
|
87
|
+
{ name: 'toolbar', enable: false },
|
|
88
|
+
{ name: 'typography', enable: false },
|
|
89
|
+
]);
|
|
90
|
+
readonly enableComponents = computed(() => this.components().filter((c) => c.enable));
|
|
91
|
+
readonly disableComponents = computed(() => this.components().filter((c) => !c.enable));
|
|
92
|
+
|
|
93
|
+
readonly #router = inject(Router);
|
|
94
|
+
readonly #route = inject(ActivatedRoute);
|
|
95
|
+
|
|
96
|
+
async navigateComponent(item: IComponent) {
|
|
97
|
+
if (!item.enable) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
await this.#router.navigate([item.name], { relativeTo: this.#route });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
2
|
+
import { IndexPageComponent } from './index-page.component';
|
|
3
|
+
|
|
4
|
+
export const routes: Routes = [
|
|
5
|
+
{
|
|
6
|
+
path: '',
|
|
7
|
+
component: IndexPageComponent,
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
path: 'action-sheet',
|
|
11
|
+
loadComponent: () => import('./pages/action-sheet/action-sheet.page').then((m) => m.ActionSheetPage),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
path: 'alert',
|
|
15
|
+
loadComponent: () => import('./pages/alert/alert.page').then((m) => m.AlertPage),
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
path: 'button',
|
|
19
|
+
loadComponent: () => import('./pages/button/button.page').then((m) => m.ButtonPage),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
path: 'checkbox',
|
|
23
|
+
loadComponent: () => import('./pages/checkbox/checkbox.page').then((m) => m.CheckboxPage),
|
|
24
|
+
},
|
|
25
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<ion-header [translucent]="true">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-back-button slot="start" defaultHref="/main/index"></ion-back-button>
|
|
4
|
+
<ion-title>action-sheet</ion-title>
|
|
5
|
+
</ion-toolbar>
|
|
6
|
+
</ion-header>
|
|
7
|
+
|
|
8
|
+
<ion-content [fullscreen]="true" color="light">
|
|
9
|
+
<ion-list [inset]="true">
|
|
10
|
+
<ion-item-group class="header-item-group">
|
|
11
|
+
<ion-item>
|
|
12
|
+
<ion-label>
|
|
13
|
+
<ion-icon name="logo-ionic" style="background: linear-gradient(#489bfd, #2b77f4)"></ion-icon>
|
|
14
|
+
<h2>action-sheet</h2>
|
|
15
|
+
<ion-header collapse="condense">
|
|
16
|
+
<ion-toolbar></ion-toolbar>
|
|
17
|
+
</ion-header>
|
|
18
|
+
<ion-text><code>This page is a component demo for @rdlabo/ionic-theme-ios26.</code></ion-text>
|
|
19
|
+
</ion-label>
|
|
20
|
+
</ion-item>
|
|
21
|
+
</ion-item-group>
|
|
22
|
+
</ion-list>
|
|
23
|
+
|
|
24
|
+
<ion-list [inset]="true">
|
|
25
|
+
<ion-item-group>
|
|
26
|
+
<ion-item (click)="present('all')" [button]="true">present:all</ion-item>
|
|
27
|
+
<ion-item (click)="present('button-only')" [button]="true">present:button-only</ion-item>
|
|
28
|
+
<ion-item (click)="present('no-cancel')" [button]="true">present:no-cancel</ion-item>
|
|
29
|
+
<ion-item (click)="present('force-dark-mode')" [button]="true">present:force-dark-mode</ion-item>
|
|
30
|
+
</ion-item-group>
|
|
31
|
+
<ion-note>If the Ionic Theme remains in light mode, ion-dark-text-color-rgb isn’t set, so some text stays black.</ion-note>
|
|
32
|
+
</ion-list>
|
|
33
|
+
</ion-content>
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { ActionSheetPage } from './action-sheet.page';
|
|
3
|
+
|
|
4
|
+
describe('ActionSheetPage', () => {
|
|
5
|
+
let component: ActionSheetPage;
|
|
6
|
+
let fixture: ComponentFixture<ActionSheetPage>;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
fixture = TestBed.createComponent(ActionSheetPage);
|
|
10
|
+
component = fixture.componentInstance;
|
|
11
|
+
fixture.detectChanges();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should create', () => {
|
|
15
|
+
expect(component).toBeTruthy();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Component, inject, OnInit } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import {
|
|
5
|
+
IonBackButton,
|
|
6
|
+
IonButtons,
|
|
7
|
+
IonContent,
|
|
8
|
+
IonHeader,
|
|
9
|
+
IonIcon,
|
|
10
|
+
IonItem,
|
|
11
|
+
IonItemGroup,
|
|
12
|
+
IonLabel,
|
|
13
|
+
IonList,
|
|
14
|
+
IonNote,
|
|
15
|
+
IonText,
|
|
16
|
+
IonTitle,
|
|
17
|
+
IonToolbar,
|
|
18
|
+
} from '@ionic/angular/standalone';
|
|
19
|
+
import { ActionSheetController } from '@ionic/angular';
|
|
20
|
+
import { actionSheetUtil } from './action-sheet.util';
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
selector: 'app-action-sheet',
|
|
24
|
+
templateUrl: './action-sheet.page.html',
|
|
25
|
+
styleUrls: ['./action-sheet.page.scss'],
|
|
26
|
+
standalone: true,
|
|
27
|
+
imports: [
|
|
28
|
+
IonContent,
|
|
29
|
+
IonHeader,
|
|
30
|
+
IonTitle,
|
|
31
|
+
IonToolbar,
|
|
32
|
+
CommonModule,
|
|
33
|
+
FormsModule,
|
|
34
|
+
IonButtons,
|
|
35
|
+
IonBackButton,
|
|
36
|
+
IonList,
|
|
37
|
+
IonItem,
|
|
38
|
+
IonItemGroup,
|
|
39
|
+
IonLabel,
|
|
40
|
+
IonIcon,
|
|
41
|
+
IonText,
|
|
42
|
+
IonNote,
|
|
43
|
+
],
|
|
44
|
+
})
|
|
45
|
+
export class ActionSheetPage implements OnInit {
|
|
46
|
+
readonly overlayCtrl = inject(ActionSheetController);
|
|
47
|
+
|
|
48
|
+
ngOnInit() {}
|
|
49
|
+
|
|
50
|
+
async present(type: 'all' | 'button-only' | 'no-cancel' | 'force-dark-mode') {
|
|
51
|
+
const applyConfig = ((type) => {
|
|
52
|
+
if (type === 'button-only') {
|
|
53
|
+
return {
|
|
54
|
+
...actionSheetUtil(),
|
|
55
|
+
header: undefined,
|
|
56
|
+
subHeader: undefined,
|
|
57
|
+
};
|
|
58
|
+
} else if (type === 'no-cancel') {
|
|
59
|
+
return {
|
|
60
|
+
...actionSheetUtil(),
|
|
61
|
+
buttons: actionSheetUtil().buttons.filter((button) => button.role !== 'cancel'),
|
|
62
|
+
};
|
|
63
|
+
} else if (type === 'force-dark-mode') {
|
|
64
|
+
return {
|
|
65
|
+
...actionSheetUtil(),
|
|
66
|
+
cssClass: 'ion-palette-dark',
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return actionSheetUtil();
|
|
70
|
+
})(type);
|
|
71
|
+
|
|
72
|
+
const actionSheet = await this.overlayCtrl.create(applyConfig);
|
|
73
|
+
await actionSheet.present();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const actionSheetUtil = () => ({
|
|
2
|
+
header: 'Actions',
|
|
3
|
+
subHeader: 'Action Sheet',
|
|
4
|
+
buttons: [
|
|
5
|
+
{
|
|
6
|
+
text: 'Delete',
|
|
7
|
+
role: 'destructive',
|
|
8
|
+
icon: 'trash-outline',
|
|
9
|
+
data: {
|
|
10
|
+
action: 'delete',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
text: 'Share',
|
|
15
|
+
icon: 'share-outline',
|
|
16
|
+
data: {
|
|
17
|
+
action: 'share',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
text: 'Cancel',
|
|
22
|
+
role: 'cancel',
|
|
23
|
+
data: {
|
|
24
|
+
action: 'cancel',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<ion-header [translucent]="true">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-back-button slot="start" defaultHref="/main/index"></ion-back-button>
|
|
4
|
+
<ion-title>alert</ion-title>
|
|
5
|
+
</ion-toolbar>
|
|
6
|
+
</ion-header>
|
|
7
|
+
|
|
8
|
+
<ion-content [fullscreen]="true" color="light">
|
|
9
|
+
<ion-list [inset]="true">
|
|
10
|
+
<ion-item-group class="header-item-group">
|
|
11
|
+
<ion-item>
|
|
12
|
+
<ion-label>
|
|
13
|
+
<ion-icon name="logo-ionic" style="background: linear-gradient(#489bfd, #2b77f4)"></ion-icon>
|
|
14
|
+
<h2>alert</h2>
|
|
15
|
+
<ion-header collapse="condense">
|
|
16
|
+
<ion-toolbar></ion-toolbar>
|
|
17
|
+
</ion-header>
|
|
18
|
+
<ion-text><code>This page is a component demo for @rdlabo/ionic-theme-ios26.</code></ion-text>
|
|
19
|
+
</ion-label>
|
|
20
|
+
</ion-item>
|
|
21
|
+
</ion-item-group>
|
|
22
|
+
</ion-list>
|
|
23
|
+
|
|
24
|
+
<ion-list [inset]="true">
|
|
25
|
+
<ion-item-group>
|
|
26
|
+
<ion-item (click)="present('all')" [button]="true">present:all</ion-item>
|
|
27
|
+
<ion-item (click)="present('button-only')" [button]="true">present:button-only</ion-item>
|
|
28
|
+
<ion-item (click)="present('no-cancel')" [button]="true">present:no-cancel</ion-item>
|
|
29
|
+
<ion-item (click)="present('force-dark-mode')" [button]="true">present:force-dark-mode</ion-item>
|
|
30
|
+
</ion-item-group>
|
|
31
|
+
<ion-note>If the Ionic Theme remains in light mode, ion-dark-text-color-rgb isn’t set, so some text stays black.</ion-note>
|
|
32
|
+
</ion-list>
|
|
33
|
+
</ion-content>
|
|
File without changes
|