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

feat(toolbar): add ionic theme styles #29656

Merged
merged 65 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
4758123
basic toolbar scs structure
BenOsodrac Jun 17, 2024
5d4030f
add ionic page for toolbar
BenOsodrac Jun 18, 2024
0442813
add base ionic css
BenOsodrac Jun 18, 2024
b03d097
Merge branch 'next' into ROU-10837
BenOsodrac Jun 19, 2024
bdf7eb6
renamed ios/md partial
BenOsodrac Jun 19, 2024
b77ce29
updated imports
BenOsodrac Jun 19, 2024
318529a
add toolbar ionic test
BenOsodrac Jun 20, 2024
6f225b1
added toolbar ionic styles
BenOsodrac Jun 20, 2024
7025285
cleaned up slots
BenOsodrac Jun 20, 2024
0f9cd15
removed titles specific styles
BenOsodrac Jun 24, 2024
cbe4242
add title default alignment
BenOsodrac Jun 24, 2024
26256a8
added TODOS
BenOsodrac Jun 24, 2024
16d1939
run lint.fix
BenOsodrac Jun 24, 2024
b988ba4
feat(ion-menu-button): add ionic theme base styles for ion-menu-butto…
BenOsodrac Jun 24, 2024
bc33670
feat(ion-searchbar): add ionic theme base styles for searchbar (#29654)
BenOsodrac Jun 24, 2024
4d18fb4
feat(ion-button): add base styles for ionic theme buttons (#29653)
BenOsodrac Jun 24, 2024
7b52918
feat(ion-title): add base ionic theme styles to ion-title (#29652)
BenOsodrac Jun 24, 2024
672986e
fixed title-large alignment
BenOsodrac Jun 24, 2024
36070fe
fixed title alignment rule
BenOsodrac Jun 24, 2024
1ec47bb
Merge branch 'next' into ROU-10837
BenOsodrac Jun 24, 2024
61313df
changed default title alignment
BenOsodrac Jun 24, 2024
5093071
update typography snapshots
BenOsodrac Jun 24, 2024
fb04e67
chore(): add updated snapshots
Ionitron Jun 24, 2024
d25e70c
fix button inside toolbar
BenOsodrac Jun 24, 2024
44deac3
Merge branch 'next' into ROU-10837
BenOsodrac Jun 24, 2024
a82417a
update button snapshots
BenOsodrac Jun 24, 2024
e44aff2
update Item snaphots
BenOsodrac Jun 24, 2024
276a0b2
update item-sliding snapshots
BenOsodrac Jun 24, 2024
caf5417
chore(): add updated snapshots
Ionitron Jun 24, 2024
ad2b1b8
Merge branch 'next' into ROU-10837
BenOsodrac Jun 25, 2024
1b5245d
fix title alignment
BenOsodrac Jun 25, 2024
aef7eeb
chore(): add updated snapshots
Ionitron Jun 25, 2024
8037a08
Update core/src/components/searchbar/searchbar.common.scss
BenOsodrac Jun 26, 2024
ba28877
remove z-index from toolbar
BenOsodrac Jun 26, 2024
896868d
fix close icon background
BenOsodrac Jun 26, 2024
4dd2b92
remove inline style on typography test
BenOsodrac Jun 26, 2024
f665770
change button clear color
BenOsodrac Jun 26, 2024
1ede906
change menu radius to initial
BenOsodrac Jun 26, 2024
c0c20a0
change buttons hover
BenOsodrac Jun 26, 2024
e1dddb6
removed title test for ionic
BenOsodrac Jun 26, 2024
10ab5df
add ionic to basic title tests
BenOsodrac Jun 26, 2024
7e5dc82
fixed title z-index
BenOsodrac Jun 26, 2024
5437600
chore(): add updated snapshots
Ionitron Jun 26, 2024
556c3ee
Merge branch 'next' into ROU-10837
BenOsodrac Jun 26, 2024
b437d74
run lint.fix
BenOsodrac Jun 26, 2024
5d4a942
updated list header snapshots
BenOsodrac Jun 26, 2024
400d568
update item snapshots
BenOsodrac Jun 26, 2024
9f3ea2e
update title page test
BenOsodrac Jun 26, 2024
9c633dd
updated title snapshots
BenOsodrac Jun 26, 2024
0a41379
update item-sliding snapshots
BenOsodrac Jun 26, 2024
ac6b698
chore(): add updated snapshots
Ionitron Jun 26, 2024
c884978
Update core/src/components/searchbar/searchbar.common.scss
BenOsodrac Jun 27, 2024
cd98b10
Merge branch 'next' into ROU-10837
BenOsodrac Jun 27, 2024
7e0367f
update title and its tests
BenOsodrac Jun 27, 2024
d792a9b
changed slots flex spacing and alignments
BenOsodrac Jun 27, 2024
5bcf6e3
added padding to sibling toolbar
BenOsodrac Jun 27, 2024
a5c2931
adjuested toolbar test page
BenOsodrac Jun 27, 2024
a81e332
run lint
BenOsodrac Jun 27, 2024
7032e81
Merge branch 'next' into ROU-10837
BenOsodrac Jun 27, 2024
3a015cf
chore(): add updated snapshots
Ionitron Jun 27, 2024
7b5eb08
Merge branch 'next' into ROU-10837
BenOsodrac Jun 28, 2024
72a6127
chore(): add updated snapshots
Ionitron Jun 28, 2024
72a7e7a
Merge branch 'next' into ROU-10837
BenOsodrac Jun 28, 2024
cd1fc7e
chore(): add updated snapshots
Ionitron Jun 28, 2024
833ba65
revert item-sliding images
BenOsodrac Jun 28, 2024
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions core/src/components/buttons/buttons.common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@use "../../themes/mixins" as mixins;

:host {
display: flex;

align-items: center;

transform: translateZ(0);
}

// Toolbar Buttons
// --------------------------------------------------

::slotted(*) ion-button {
--padding-top: 0;
--padding-bottom: 0;

@include mixins.margin(0);
}
33 changes: 33 additions & 0 deletions core/src/components/buttons/buttons.ionic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@use "./buttons.common";
@use "../../themes/ionic/ionic.globals.scss" as globals;

// Ionic Buttons
// --------------------------------------------------

::slotted(*) .button-has-icon-only {
--padding-top: 0;
--padding-bottom: 0;
}

// Toolbar Clear Button
// --------------------------------------------------

::slotted(*) .button-clear {
--color: globals.$ionic-color-neutral-1200;
--background: transparent;
--background-activated: transparent;
--background-focused: transparent;
--background-hover: transparent;
}

// Toolbar Button Icon
// --------------------------------------------------

::slotted(*) .button-has-icon-only {
width: globals.$ionic-scale-1000;
height: globals.$ionic-scale-1000;
}

::slotted(*) ion-icon[slot="icon-only"] {
font-size: globals.$ionic-font-size-600;
thetaPC marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 1 addition & 1 deletion core/src/components/buttons/buttons.ios.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "./buttons.ios.vars";
@import "./buttons";
@import "./buttons.native";

// iOS Toolbar Default Button
// --------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/buttons/buttons.md.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "./buttons.md.vars";
@import "./buttons";
@import "./buttons.native";

// Material Design Toolbar Default Button
// --------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
@import "./buttons.common";
@import "../../themes/native/native.globals";

:host {
display: flex;

align-items: center;

transform: translateZ(0);

z-index: $z-index-toolbar-buttons;
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/buttons/buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { getIonTheme } from '../../global/ionic-global';
styleUrls: {
ios: 'buttons.ios.scss',
md: 'buttons.md.scss',
ionic: 'buttons.md.scss',
ionic: 'buttons.ionic.scss',
},
scoped: true,
})
Expand Down
5 changes: 5 additions & 0 deletions core/src/components/header/header.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ ion-header {
border-bottom: globals.$ionic-border-size-025 globals.$ionic-border-style-solid globals.$ionic-color-neutral-300;
}
}

ion-toolbar + ion-toolbar {
--padding-start: #{globals.$ionic-space-400};
--padding-end: #{globals.$ionic-space-400};
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../themes/native/native.globals";
@import "../../themes/mixins";

// Menu Button
// --------------------------------------------------
Expand Down Expand Up @@ -107,15 +107,6 @@ ion-icon {
display: none;
}

// Menu Button: Disabled
// --------------------------------------------------

:host(.menu-button-disabled) {
cursor: default;
opacity: 0.5;
pointer-events: none;
}

// Menu Button: Focused
// --------------------------------------------------

Expand Down Expand Up @@ -148,13 +139,6 @@ ion-icon {
}
}

// Menu Button with Color
// --------------------------------------------------

:host(.ion-color) .button-native {
color: current-color(base);
}

// Menu Button in Toolbar: Global Theming
// --------------------------------------------------

Expand Down
22 changes: 22 additions & 0 deletions core/src/components/menu-button/menu-button.ionic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use "../../themes/ionic/ionic.globals.scss" as globals;
@import "./menu-button.common";

// Menu Button Ionic
// --------------------------------------------------

:host {
--background-focused: currentColor;
--background-focused-opacity: 0.12;
--background-hover: currentColor;
thetaPC marked this conversation as resolved.
Show resolved Hide resolved
--background-hover-opacity: 0.04;
--border-radius: initial;
--color: initial;
thetaPC marked this conversation as resolved.
Show resolved Hide resolved
--padding-start: 0;
--padding-end: 0;
position: relative;

width: globals.$ionic-scale-1000;
height: globals.$ionic-scale-1000;
BenOsodrac marked this conversation as resolved.
Show resolved Hide resolved

font-size: globals.$ionic-font-size-600;
BenOsodrac marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 1 addition & 1 deletion core/src/components/menu-button/menu-button.ios.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "../../themes/native/native.globals.ios";
@import "./menu-button";
@import "./menu-button.native";

// iOS Menu Button
// --------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/menu-button/menu-button.md.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "../../themes/native/native.globals.md";
@import "./menu-button";
@import "./menu-button.native";

// MD Menu Button
// --------------------------------------------------
Expand Down
21 changes: 21 additions & 0 deletions core/src/components/menu-button/menu-button.native.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@import "../../themes/native/native.globals";
@import "./menu-button.common";

// Menu Button
// --------------------------------------------------

// Menu Button: Disabled
// --------------------------------------------------

:host(.menu-button-disabled) {
cursor: default;
opacity: 0.5;
pointer-events: none;
}

// Menu Button with Color
// --------------------------------------------------

:host(.ion-color) .button-native {
color: current-color(base);
}
2 changes: 1 addition & 1 deletion core/src/components/menu-button/menu-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { updateVisibility } from '../menu-toggle/menu-toggle-util';
styleUrls: {
ios: 'menu-button.ios.scss',
md: 'menu-button.md.scss',
ionic: 'menu-button.md.scss',
ionic: 'menu-button.ionic.scss',
},
shadow: true,
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../themes/native/native.globals";
@import "../../themes/mixins";

// Searchbar
// --------------------------------------------------
Expand All @@ -20,7 +20,7 @@
--placeholder-color: initial;
--placeholder-font-style: initial;
--placeholder-font-weight: initial;
--placeholder-opacity: #{$placeholder-opacity};
--placeholder-opacity: var(--ion-placeholder-opacity, 1);

@include font-smoothing();

Expand All @@ -33,24 +33,9 @@

color: var(--color);

font-family: $font-family-base;
box-sizing: border-box;
}

:host(.ion-color) {
color: current-color(contrast);
}

:host(.ion-color) .searchbar-input {
background: current-color(base);
}

:host(.ion-color) .searchbar-clear-button,
:host(.ion-color) .searchbar-cancel-button,
:host(.ion-color) .searchbar-search-icon {
color: inherit;
}

.searchbar-search-icon {
// Don't let them tap on the icon
color: var(--icon-color);
Expand Down Expand Up @@ -160,9 +145,3 @@
:host(.searchbar-has-value.searchbar-should-show-clear) .searchbar-clear-button {
display: block;
}

:host(.searchbar-disabled) {
cursor: default;
opacity: 0.4;
pointer-events: none;
}
73 changes: 73 additions & 0 deletions core/src/components/searchbar/searchbar.ionic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
@use "searchbar.common";
@use "../../themes/ionic/ionic.globals.scss" as globals;

// Ionic Searchbar
// --------------------------------------------------

:host {
--background: #{globals.$ionic-color-neutral-100};
--border-radius: #{globals.$ionic-border-radius-800};
--box-shadow: none;
--cancel-button-color: #{globals.$ionic-color-neutral-800};
--clear-button-color: #{globals.$ionic-color-neutral-800};
BenOsodrac marked this conversation as resolved.
Show resolved Hide resolved
--color: #{globals.$ionic-color-neutral-800};
--icon-color: #{globals.$ionic-color-neutral-800};

@include globals.padding(0);

min-height: globals.$ionic-scale-1000;

contain: content;
}

.searchbar-input-container {
min-height: globals.$ionic-scale-1000;
}

// Searchbar Search Icon
// -----------------------------------------

.searchbar-search-icon {
display: none;
}

// Searchbar Input Field
// -----------------------------------------

.searchbar-input {
@include globals.padding(globals.$ionic-space-300);

height: 100%;

font-size: globals.$ionic-font-size-350;
font-weight: globals.$ionic-font-weight-regular;

contain: strict;
}

// Searchbar Clear Input Icon
// -----------------------------------------

.searchbar-clear-button {
BenOsodrac marked this conversation as resolved.
Show resolved Hide resolved
BenOsodrac marked this conversation as resolved.
Show resolved Hide resolved
@include globals.position(50%, globals.$ionic-space-200, null, null);

position: absolute;

width: globals.$ionic-scale-600;
height: globals.$ionic-scale-600;

transform: translateY(-50%);

background-color: transparent;

font-size: globals.$ionic-font-size-400;

contain: strict;
}

// Searchbar in Toolbar
// -----------------------------------------

:host-context(ion-toolbar) {
min-height: globals.$ionic-scale-1000;
}
2 changes: 1 addition & 1 deletion core/src/components/searchbar/searchbar.ios.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./searchbar";
@import "./searchbar.native";
@import "./searchbar.ios.vars";

// iOS Searchbar
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/searchbar/searchbar.md.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./searchbar";
@import "./searchbar.native";
@import "./searchbar.md.vars";

// Material Design Searchbar
Expand Down
31 changes: 31 additions & 0 deletions core/src/components/searchbar/searchbar.native.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@import "../../themes/native/native.globals";
@import "searchbar.common";

// Searchbar
// --------------------------------------------------

:host {
--placeholder-opacity: #{$placeholder-opacity};

font-family: $font-family-base;
}

:host(.ion-color) {
color: current-color(contrast);
}

:host(.ion-color) .searchbar-input {
background: current-color(base);
}

:host(.ion-color) .searchbar-clear-button,
:host(.ion-color) .searchbar-cancel-button,
:host(.ion-color) .searchbar-search-icon {
color: inherit;
}

:host(.searchbar-disabled) {
cursor: default;
opacity: 0.4;
pointer-events: none;
}
2 changes: 1 addition & 1 deletion core/src/components/searchbar/searchbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type { SearchbarChangeEventDetail, SearchbarInputEventDetail } from './se
styleUrls: {
ios: 'searchbar.ios.scss',
md: 'searchbar.md.scss',
ionic: 'searchbar.md.scss',
ionic: 'searchbar.ionic.scss',
},
scoped: true,
})
Expand Down
5 changes: 3 additions & 2 deletions core/src/components/title/test/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</ion-header>

<ion-header>
<ion-toolbar>
<ion-toolbar class="toolbar-title-default">
BenOsodrac marked this conversation as resolved.
Show resolved Hide resolved
<ion-buttons slot="start">
<ion-back-button default-href="#"></ion-back-button>
</ion-buttons>
Expand Down Expand Up @@ -80,7 +80,8 @@
</ion-app>

<style>
.ios .hide-ios {
.ios .hide-ios,
.ionic .hide-ios {
display: none;
}
</style>
Expand Down
Loading
Loading