diff --git a/docs/api/input.md b/docs/api/input.md index 6b897735caa..78059609d8e 100644 --- a/docs/api/input.md +++ b/docs/api/input.md @@ -162,7 +162,7 @@ In most cases, [Icon](./icon.md) components placed in these slots should have `a If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to. ::: -import StartEndSlots from '@site/static/usage/v7/input/start-end-slots/index.md'; +import StartEndSlots from '@site/static/usage/v8/input/start-end-slots/index.md'; diff --git a/static/usage/v7/input/start-end-slots/angular.md b/static/usage/v7/input/start-end-slots/angular/example_component_html.md similarity index 100% rename from static/usage/v7/input/start-end-slots/angular.md rename to static/usage/v7/input/start-end-slots/angular/example_component_html.md diff --git a/static/usage/v7/input/start-end-slots/angular/example_component_ts.md b/static/usage/v7/input/start-end-slots/angular/example_component_ts.md new file mode 100644 index 00000000000..899f7a826a3 --- /dev/null +++ b/static/usage/v7/input/start-end-slots/angular/example_component_ts.md @@ -0,0 +1,22 @@ +```ts +import { Component } from '@angular/core'; + +import { addIcons } from 'ionicons'; +import { eye, lockClosed } from 'ionicons/icons'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], +}) +export class ExampleComponent { + constructor() { + /** + * Any icons you want to use in your application + * can be registered in app.component.ts and then + * referenced by name anywhere in your application. + */ + addIcons({ eye, lockClosed }); + } +} +``` diff --git a/static/usage/v7/input/start-end-slots/index.md b/static/usage/v7/input/start-end-slots/index.md index 1104bcfdc9d..5fc23643289 100644 --- a/static/usage/v7/input/start-end-slots/index.md +++ b/static/usage/v7/input/start-end-slots/index.md @@ -1,17 +1,37 @@ import Playground from '@site/src/components/global/Playground'; -import javascript from './javascript.md'; +import javascript_index_html from './javascript/index_html.md'; +import javascript_index_ts from './javascript/index_ts.md'; + import react from './react.md'; import vue from './vue.md'; -import angular from './angular.md'; + +import angular_example_component_html from './angular/example_component_html.md'; +import angular_example_component_ts from './angular/example_component_ts.md'; diff --git a/static/usage/v7/input/start-end-slots/javascript.md b/static/usage/v7/input/start-end-slots/javascript/index_html.md similarity index 100% rename from static/usage/v7/input/start-end-slots/javascript.md rename to static/usage/v7/input/start-end-slots/javascript/index_html.md diff --git a/static/usage/v7/input/start-end-slots/javascript/index_ts.md b/static/usage/v7/input/start-end-slots/javascript/index_ts.md new file mode 100644 index 00000000000..dadf539a88f --- /dev/null +++ b/static/usage/v7/input/start-end-slots/javascript/index_ts.md @@ -0,0 +1,35 @@ +```ts +import { defineCustomElements } from '@ionic/core/loader'; + +import { addIcons } from 'ionicons'; +import { eye, lockClosed } from 'ionicons/icons'; + +/* Core CSS required for Ionic components to work properly */ +import '@ionic/core/css/core.css'; + +/* Basic CSS for apps built with Ionic */ +import '@ionic/core/css/normalize.css'; +import '@ionic/core/css/structure.css'; +import '@ionic/core/css/typography.css'; + +/* Optional CSS utils that can be commented out */ +import '@ionic/core/css/padding.css'; +import '@ionic/core/css/float-elements.css'; +import '@ionic/core/css/text-alignment.css'; +import '@ionic/core/css/text-transformation.css'; +import '@ionic/core/css/flex-utils.css'; +import '@ionic/core/css/display.css'; + +/* Theme variables */ +import './theme/variables.css'; + +/** + * On Ionicons 7.2+ these icons + * get mapped to a kebab-case key. + * Alternatively, developers can do: + * addIcons({ 'eye': eye, 'lock-closed': lockClosed }); + */ +addIcons({ eye, lockClosed }); + +defineCustomElements(); +``` diff --git a/static/usage/v8/input/start-end-slots/angular/example_component_html.md b/static/usage/v8/input/start-end-slots/angular/example_component_html.md new file mode 100644 index 00000000000..b33306d4727 --- /dev/null +++ b/static/usage/v8/input/start-end-slots/angular/example_component_html.md @@ -0,0 +1,12 @@ +```html + + + + + + + + + + +``` diff --git a/static/usage/v8/input/start-end-slots/angular/example_component_ts.md b/static/usage/v8/input/start-end-slots/angular/example_component_ts.md new file mode 100644 index 00000000000..899f7a826a3 --- /dev/null +++ b/static/usage/v8/input/start-end-slots/angular/example_component_ts.md @@ -0,0 +1,22 @@ +```ts +import { Component } from '@angular/core'; + +import { addIcons } from 'ionicons'; +import { eye, lockClosed } from 'ionicons/icons'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], +}) +export class ExampleComponent { + constructor() { + /** + * Any icons you want to use in your application + * can be registered in app.component.ts and then + * referenced by name anywhere in your application. + */ + addIcons({ eye, lockClosed }); + } +} +``` diff --git a/static/usage/v8/input/start-end-slots/demo.html b/static/usage/v8/input/start-end-slots/demo.html new file mode 100644 index 00000000000..e8e76a8885d --- /dev/null +++ b/static/usage/v8/input/start-end-slots/demo.html @@ -0,0 +1,31 @@ + + + + + + Input + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + diff --git a/static/usage/v8/input/start-end-slots/index.md b/static/usage/v8/input/start-end-slots/index.md new file mode 100644 index 00000000000..d739995f897 --- /dev/null +++ b/static/usage/v8/input/start-end-slots/index.md @@ -0,0 +1,37 @@ +import Playground from '@site/src/components/global/Playground'; + +import javascript_index_html from './javascript/index_html.md'; +import javascript_index_ts from './javascript/index_ts.md'; + +import react from './react.md'; +import vue from './vue.md'; + +import angular_example_component_html from './angular/example_component_html.md'; +import angular_example_component_ts from './angular/example_component_ts.md'; + + diff --git a/static/usage/v8/input/start-end-slots/javascript/index_html.md b/static/usage/v8/input/start-end-slots/javascript/index_html.md new file mode 100644 index 00000000000..ed192bb8c41 --- /dev/null +++ b/static/usage/v8/input/start-end-slots/javascript/index_html.md @@ -0,0 +1,12 @@ +```html + + + + + + + + + + +``` diff --git a/static/usage/v8/input/start-end-slots/javascript/index_ts.md b/static/usage/v8/input/start-end-slots/javascript/index_ts.md new file mode 100644 index 00000000000..6c69dc0bbc0 --- /dev/null +++ b/static/usage/v8/input/start-end-slots/javascript/index_ts.md @@ -0,0 +1,46 @@ +```ts +import { defineCustomElements } from '@ionic/core/loader'; + +import { addIcons } from 'ionicons'; +import { eye, lockClosed } from 'ionicons/icons'; + +/* Core CSS required for Ionic components to work properly */ +import '@ionic/core/css/core.css'; + +/* Basic CSS for apps built with Ionic */ +import '@ionic/core/css/normalize.css'; +import '@ionic/core/css/structure.css'; +import '@ionic/core/css/typography.css'; + +/* Optional CSS utils that can be commented out */ +import '@ionic/core/css/padding.css'; +import '@ionic/core/css/float-elements.css'; +import '@ionic/core/css/text-alignment.css'; +import '@ionic/core/css/text-transformation.css'; +import '@ionic/core/css/flex-utils.css'; +import '@ionic/core/css/display.css'; + +/** + * Ionic Dark Theme + * ----------------------------------------------------- + * For more information, please see: + * https://ionicframework.com/docs/theming/dark-mode + */ + +// import '@ionic/core/css/palettes/dark.always.css'; +// import '@ionic/core/css/palettes/dark.class.css'; +import '@ionic/core/css/palettes/dark.system.css'; + +/* Theme variables */ +import './theme/variables.css'; + +/** + * On Ionicons 7.2+ these icons + * get mapped to a kebab-case key. + * Alternatively, developers can do: + * addIcons({ 'eye': eye, 'lock-closed': lockClosed }); + */ +addIcons({ eye, lockClosed }); + +defineCustomElements(); +``` diff --git a/static/usage/v8/input/start-end-slots/react.md b/static/usage/v8/input/start-end-slots/react.md new file mode 100644 index 00000000000..b638d8c8f07 --- /dev/null +++ b/static/usage/v8/input/start-end-slots/react.md @@ -0,0 +1,21 @@ +```tsx +import React from 'react'; +import { IonButton, IonIcon, IonInput, IonItem, IonList } from '@ionic/react'; +import { eye, lockClosed } from 'ionicons/icons'; + +function Example() { + return ( + + + + + + + + + + + ); +} +export default Example; +``` diff --git a/static/usage/v8/input/start-end-slots/vue.md b/static/usage/v8/input/start-end-slots/vue.md new file mode 100644 index 00000000000..76380eb566a --- /dev/null +++ b/static/usage/v8/input/start-end-slots/vue.md @@ -0,0 +1,33 @@ +```html + + + +```