Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 9 additions & 9 deletions playwright/cps-accessibility.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ const components: ComponentEntry[] = [
// { route: '/table', name: 'Table', selector: 'cps-table' },
// { route: '/tag', name: 'Tag', selector: 'cps-tag' },
// { route: '/textarea', name: 'Textarea', selector: 'cps-textarea' },
// {
// route: '/timepicker',
// name: 'Timepicker',
// selector: ['cps-timepicker', '.cps-autocomplete-options-menu'],
// setup: async (page) => {
// await page.waitForSelector('cps-timepicker');
// await page.locator('cps-timepicker cps-autocomplete').first().click();
// }
// },
{
route: '/timepicker',
name: 'Timepicker',
selector: ['cps-timepicker', '.cps-autocomplete-options-menu'],
setup: async (page) => {
await page.waitForSelector('cps-timepicker');
await page.locator('cps-timepicker cps-autocomplete').first().click();
}
},
{
route: '/tooltip',
name: 'Tooltip',
Expand Down
8 changes: 8 additions & 0 deletions projects/composition/src/app/api-data/cps-timepicker.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
"default": "",
"description": "Label of the timepicker."
},
{
"name": "ariaLabel",
"optional": false,
"readonly": false,
"type": "string",
"default": "",
"description": "Aria label for the timepicker component, used for accessibility, it takes precedence over label."
},
{
"name": "disabled",
"optional": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.timepickers-group {
gap: 24px;
gap: 1.5rem;
display: flex;
flex-direction: column;
}
Expand Down
9 changes: 9 additions & 0 deletions projects/composition/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"rootDir": "src",
"types": []
},
"include": ["src/**/*.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
</cps-select>
day(s) at
<cps-timepicker
ariaLabel="Time"
data-testid="daily-timepicker"
[disabled]="disabled || state.daily.subTab !== 'everyDays'"
[use24HourTime]="use24HourTime"
Expand All @@ -132,6 +133,7 @@
">
Every working day at
<cps-timepicker
ariaLabel="Time"
[disabled]="disabled || state.daily.subTab !== 'everyWeekDay'"
[use24HourTime]="use24HourTime"
[mandatoryValue]="true"
Expand Down Expand Up @@ -203,6 +205,7 @@
<div class="cps-scheduler-tab-pane-row">
at
<cps-timepicker
ariaLabel="Time"
[disabled]="disabled"
data-testid="weekly-timepicker"
[use24HourTime]="use24HourTime"
Expand Down Expand Up @@ -264,6 +267,7 @@
</cps-select>
month(s) at
<cps-timepicker
ariaLabel="Time"
[disabled]="disabled || state.monthly.subTab !== 'specificDay'"
[use24HourTime]="use24HourTime"
[mandatoryValue]="true"
Expand Down Expand Up @@ -358,6 +362,7 @@
</cps-select>
at
<cps-timepicker
ariaLabel="Time"
[disabled]="
disabled || state.monthly.subTab !== 'specificWeekDay'
"
Expand Down Expand Up @@ -429,6 +434,7 @@
</cps-select>
at
<cps-timepicker
ariaLabel="Time"
[disabled]="
disabled || state.yearly.subTab !== 'specificMonthDay'
"
Expand Down Expand Up @@ -511,6 +517,7 @@
</cps-select>
at
<cps-timepicker
ariaLabel="Time"
[disabled]="
disabled || state.yearly.subTab !== 'specificMonthWeek'
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<div class="cps-timepicker-body">
<cps-autocomplete
#hoursField
ariaLabel="Hours"
[ariaLabel]="`Hours, ${ariaLabel || label}`"
(keypress)="numberOnly($event)"
width="60"
width="3.75rem"
[emptyOptionIndex]="mandatoryValue ? 0 : -1"
[options]="hoursOptions"
[withOptionsAliases]="!use24HourTime"
Expand All @@ -43,7 +43,7 @@
#minutesField
ariaLabel="Minutes"
(keypress)="numberOnly($event)"
width="60"
width="3.75rem"
[emptyOptionIndex]="mandatoryValue ? 0 : -1"
[options]="minutesOptions"
[hideDetails]="true"
Expand All @@ -65,7 +65,7 @@
#secondsField
ariaLabel="Seconds"
(keypress)="numberOnly($event)"
width="60"
width="3.75rem"
[emptyOptionIndex]="mandatoryValue ? 0 : -1"
[options]="secondsOptions"
[hideDetails]="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $timepicker-delimeter-color: var(--cps-color-text-lightest);
font-weight: 600;

&-info-circle {
margin-left: 8px;
margin-left: 0.5rem;
}

&-disabled {
Expand All @@ -31,14 +31,14 @@ $timepicker-delimeter-color: var(--cps-color-text-lightest);
flex-direction: row;

.cps-timepicker-am-pm-selector {
margin-left: 10px;
margin-left: 0.625rem;
margin-top: 0;
}

.cps-timepicker-delimiter {
color: $timepicker-delimeter-color;
font-size: 24px;
margin: 0 10px;
font-size: 1.5rem;
margin: 0 0.625rem;
}
}

Expand Down
Loading
Loading