Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c0c8394
add focus to select
BenOsodrac Dec 11, 2024
271cf78
add select focus test and snapshots
BenOsodrac Dec 12, 2024
31c5584
Merge branch 'next' into ROU-11445-select
BenOsodrac Dec 12, 2024
ef9a8ef
fix lint
BenOsodrac Dec 12, 2024
c7fc655
removed unnecessary select tests
BenOsodrac Dec 12, 2024
afbce6c
added correct tokens for highlight variable on ionic theme
BenOsodrac Dec 12, 2024
9df7cb0
added highlight styles
BenOsodrac Dec 12, 2024
fbc42c5
added highlight for ionic theme
BenOsodrac Dec 12, 2024
08d85a8
removed previously added snapshots
BenOsodrac Dec 12, 2024
51c7cad
removed highlight div on ionic
BenOsodrac Dec 12, 2024
5ebf449
lint
BenOsodrac Dec 12, 2024
2658ada
adjusted highlight test for ionic theme
BenOsodrac Dec 12, 2024
d731c5e
lint.fix
BenOsodrac Dec 12, 2024
889f85b
chore(): add updated snapshots
Ionitron Dec 12, 2024
6d04e6f
Merge branch 'next' into ROU-11445-select
BenOsodrac Dec 13, 2024
36fdec5
Update core/src/components/select/select.ionic.outline.scss
BenOsodrac Dec 16, 2024
6482b3a
Update core/src/components/select/select.ionic.scss
BenOsodrac Dec 16, 2024
de7cd76
Merge branch 'next' into ROU-11445-select
BenOsodrac Dec 16, 2024
5cc60f6
update snaphsots for border-width
BenOsodrac Dec 16, 2024
dad7bcd
Update core/src/components/select/select.ionic.outline.scss
BenOsodrac Dec 16, 2024
153a85e
fixed default border token
BenOsodrac Dec 16, 2024
cd7c150
added styles for valid and invalid
BenOsodrac Dec 16, 2024
7044539
revert token change
BenOsodrac Dec 16, 2024
c676d41
updated snaphots
BenOsodrac Dec 16, 2024
7905cc0
lint fix
BenOsodrac Dec 16, 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
20 changes: 20 additions & 0 deletions core/src/components/select/select.ionic.outline.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,23 @@

box-sizing: border-box;
}

// Focus
// ---------------------------------------------

:host(.ion-focused.select-fill-outline) {
--border-color: var(--highlight-color);
}

:host(.ion-focused.select-fill-outline:not(.ion-invalid):not(.ion-valid)) {
--border-width: #{globals.$ion-border-size-050};
}

/**
* If the select has a validity state, the
* border should reflect that as a color.
*/
:host(.has-focus.select-fill-outline.ion-valid),
:host(.select-fill-outline.ion-touched.ion-invalid) {
--border-color: var(--highlight-color);
}
5 changes: 4 additions & 1 deletion core/src/components/select/select.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@
--background: #{globals.$ion-primitives-base-white};
// TODO(ROU-10778, ROU-10875): Sync the color names to the design system of
// ios and md. This will allow us to have a single color map.
--border-color: #{globals.current-color(neutral)};
--border-color: #{globals.$ion-primitives-neutral-500};
--border-width: #{globals.$ion-border-size-025};
--padding-start: #{globals.$ion-space-400};
--padding-end: #{globals.$ion-space-400};
--padding-top: #{globals.$ion-space-300};
--padding-bottom: #{globals.$ion-space-300};
--placeholder-color: #{globals.$ion-primitives-neutral-800};
--placeholder-opacity: 1;
--highlight-color-focused: #{globals.$ion-border-focus-default};
--highlight-color-valid: #{globals.$ion-semantics-success-900};
--highlight-color-invalid: #{globals.$ion-semantics-danger-800};
}

// Select Label
Expand Down
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.
89 changes: 47 additions & 42 deletions core/src/components/select/test/highlight/select.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,53 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
await expect(container).toHaveScreenshot(screenshot(`select-solid-custom-highlight`));
});
});
});

test.describe(title('select: expanded highlight'), () => {
test.describe('select: no fill', () => {
test('should render bottom highlight', async ({ page }) => {
await page.setContent(
`
<ion-select label="Label" class="select-expanded"></ion-select>
`,
config
);

const select = page.locator('ion-select');
await expect(select).toHaveScreenshot(screenshot(`select-no-fill-highlight`));
});
});
test.describe('select: solid', () => {
test('should render bottom highlight', async ({ page }) => {
await page.setContent(
`
<ion-select fill="solid" label="Label" class="select-expanded"></ion-select>
`,
config
);

const select = page.locator('ion-select');
await expect(select).toHaveScreenshot(screenshot(`select-solid-highlight`));
});
});
test.describe('select: outline', () => {
test('should render bottom highlight', async ({ page }) => {
await page.setContent(
`
<ion-select fill="outline" label="Label" class="select-expanded"></ion-select>
`,
config
);

const select = page.locator('ion-select');
await expect(select).toHaveScreenshot(screenshot(`select-outline-highlight`));
});
});
});
});

configs({ modes: ['md', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('select: highlights'), () => {
test.describe('select: outline', () => {
test('should render valid state correctly', async ({ page }) => {
await page.setContent(
Expand Down Expand Up @@ -223,46 +270,4 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
});
});
});

test.describe(title('select: expanded highlight'), () => {
test.describe('select: no fill', () => {
test('should render bottom highlight', async ({ page }) => {
await page.setContent(
`
<ion-select label="Label" class="select-expanded"></ion-select>
`,
config
);

const select = page.locator('ion-select');
await expect(select).toHaveScreenshot(screenshot(`select-no-fill-highlight`));
});
});
test.describe('select: solid', () => {
test('should render bottom highlight', async ({ page }) => {
await page.setContent(
`
<ion-select fill="solid" label="Label" class="select-expanded"></ion-select>
`,
config
);

const select = page.locator('ion-select');
await expect(select).toHaveScreenshot(screenshot(`select-solid-highlight`));
});
});
test.describe('select: outline', () => {
test('should render bottom highlight', async ({ page }) => {
await page.setContent(
`
<ion-select fill="outline" label="Label" class="select-expanded"></ion-select>
`,
config
);

const select = page.locator('ion-select');
await expect(select).toHaveScreenshot(screenshot(`select-outline-highlight`));
});
});
});
});
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