@progress/kendo-themes-html 14.7.1-dev.7 → 14.9.0-dev.0

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.
Files changed (53) hide show
  1. package/dist/cjs/index.js +4 -4
  2. package/dist/cjs/scheduler/demos/scheduler.js +1 -1
  3. package/dist/cjs/scheduler/scheduler-cell.spec.js +1 -1
  4. package/dist/cjs/scheduler/templates/scheduler-agenda.js +1 -1
  5. package/dist/cjs/scheduler/templates/scheduler-day.js +1 -1
  6. package/dist/cjs/scheduler/templates/scheduler-flex-agenda.js +1 -1
  7. package/dist/cjs/scheduler/templates/scheduler-flex-day.js +1 -1
  8. package/dist/cjs/scheduler/templates/scheduler-flex-horizontal-grouping.js +1 -1
  9. package/dist/cjs/scheduler/templates/scheduler-flex-month-horizontal-grouping.js +1 -1
  10. package/dist/cjs/scheduler/templates/scheduler-flex-month.js +1 -1
  11. package/dist/cjs/scheduler/templates/scheduler-flex-timeline.js +1 -1
  12. package/dist/cjs/scheduler/templates/scheduler-flex-vertical-grouping.js +1 -1
  13. package/dist/cjs/scheduler/templates/scheduler-flex-week.js +1 -1
  14. package/dist/cjs/scheduler/templates/scheduler-flex-year.js +1 -1
  15. package/dist/cjs/scheduler/templates/scheduler-horizontal-grouping.js +1 -1
  16. package/dist/cjs/scheduler/templates/scheduler-month.js +1 -1
  17. package/dist/cjs/scheduler/templates/scheduler-timeline.js +1 -1
  18. package/dist/cjs/scheduler/templates/scheduler-vertical-grouping.js +1 -1
  19. package/dist/cjs/scheduler/templates/scheduler-week.js +1 -1
  20. package/dist/esm/index.mjs +4 -4
  21. package/dist/esm/scheduler/demos/scheduler.mjs +1 -1
  22. package/dist/esm/scheduler/scheduler-cell.spec.mjs +1 -1
  23. package/dist/esm/scheduler/templates/scheduler-agenda.mjs +1 -1
  24. package/dist/esm/scheduler/templates/scheduler-day.mjs +1 -1
  25. package/dist/esm/scheduler/templates/scheduler-flex-agenda.mjs +1 -1
  26. package/dist/esm/scheduler/templates/scheduler-flex-day.mjs +1 -1
  27. package/dist/esm/scheduler/templates/scheduler-flex-horizontal-grouping.mjs +1 -1
  28. package/dist/esm/scheduler/templates/scheduler-flex-month-horizontal-grouping.mjs +1 -1
  29. package/dist/esm/scheduler/templates/scheduler-flex-month.mjs +1 -1
  30. package/dist/esm/scheduler/templates/scheduler-flex-timeline.mjs +1 -1
  31. package/dist/esm/scheduler/templates/scheduler-flex-vertical-grouping.mjs +1 -1
  32. package/dist/esm/scheduler/templates/scheduler-flex-week.mjs +1 -1
  33. package/dist/esm/scheduler/templates/scheduler-flex-year.mjs +1 -1
  34. package/dist/esm/scheduler/templates/scheduler-horizontal-grouping.mjs +1 -1
  35. package/dist/esm/scheduler/templates/scheduler-month.mjs +1 -1
  36. package/dist/esm/scheduler/templates/scheduler-timeline.mjs +1 -1
  37. package/dist/esm/scheduler/templates/scheduler-vertical-grouping.mjs +1 -1
  38. package/dist/esm/scheduler/templates/scheduler-week.mjs +1 -1
  39. package/dist/meta/appbar.json +6 -1
  40. package/dist/meta/card.json +32 -2
  41. package/dist/meta/index.json +51 -3
  42. package/dist/meta/scheduler.json +13 -0
  43. package/dist/types/appbar/appbar.spec.d.ts +3 -0
  44. package/dist/types/card/card.spec.d.ts +8 -0
  45. package/dist/types/scheduler/scheduler-cell.spec.d.ts +3 -0
  46. package/package.json +1 -1
  47. package/src/appbar/appbar.spec.tsx +4 -0
  48. package/src/card/card.spec.tsx +9 -0
  49. package/src/scheduler/scheduler-cell.spec.tsx +13 -2
  50. package/src/scheduler/tests/scheduler-cell-states.tsx +132 -0
  51. package/src/scheduler/tests/scheduler-events-popover.tsx +3 -3
  52. package/src/scheduler/tests/scheduler-events.tsx +83 -83
  53. package/src/scheduler/tests/scheduler-quick-actions-popover.tsx +0 -5
@@ -21,7 +21,12 @@
21
21
  ],
22
22
  "states": [],
23
23
  "aria": [],
24
- "keyboard": [],
24
+ "keyboard": [
25
+ {
26
+ "trigger": "Tab",
27
+ "behavior": "Moves focus through the inner elements; the AppBar itself has no keyboard navigation."
28
+ }
29
+ ],
25
30
  "ux": [
26
31
  {
27
32
  "trigger": "Application header",
@@ -13,8 +13,38 @@
13
13
  "selected",
14
14
  "disabled"
15
15
  ],
16
- "aria": [],
17
- "keyboard": [],
16
+ "aria": [
17
+ {
18
+ "prop": null,
19
+ "attribute": "role=\"listitem\"",
20
+ "description": "Required when the card is located in a `.k-card-list`."
21
+ },
22
+ {
23
+ "prop": null,
24
+ "attribute": "tabindex=\"0\"",
25
+ "description": "The card is focusable when navigatable; inner elements are not focusable until Enter is pressed."
26
+ },
27
+ {
28
+ "prop": null,
29
+ "attribute": "aria-describedby=\".k-card-title id\"",
30
+ "description": "Associates the card with its title element."
31
+ },
32
+ {
33
+ "prop": null,
34
+ "attribute": "aria-keyshortcuts=\"Enter\"",
35
+ "description": "Announces the Enter key that enables navigation inside the card."
36
+ }
37
+ ],
38
+ "keyboard": [
39
+ {
40
+ "trigger": "Enter",
41
+ "behavior": "Enables navigation inside a navigatable card."
42
+ },
43
+ {
44
+ "trigger": "Tab",
45
+ "behavior": "Moves focus through the elements inside the card, following their own keyboard navigation sequence."
46
+ }
47
+ ],
18
48
  "ux": [
19
49
  {
20
50
  "trigger": "Content container",
@@ -282,7 +282,12 @@
282
282
  ],
283
283
  "states": [],
284
284
  "aria": [],
285
- "keyboard": [],
285
+ "keyboard": [
286
+ {
287
+ "trigger": "Tab",
288
+ "behavior": "Moves focus through the inner elements; the AppBar itself has no keyboard navigation."
289
+ }
290
+ ],
286
291
  "ux": [
287
292
  {
288
293
  "trigger": "Application header",
@@ -1310,8 +1315,38 @@
1310
1315
  "selected",
1311
1316
  "disabled"
1312
1317
  ],
1313
- "aria": [],
1314
- "keyboard": [],
1318
+ "aria": [
1319
+ {
1320
+ "prop": null,
1321
+ "attribute": "role=\"listitem\"",
1322
+ "description": "Required when the card is located in a `.k-card-list`."
1323
+ },
1324
+ {
1325
+ "prop": null,
1326
+ "attribute": "tabindex=\"0\"",
1327
+ "description": "The card is focusable when navigatable; inner elements are not focusable until Enter is pressed."
1328
+ },
1329
+ {
1330
+ "prop": null,
1331
+ "attribute": "aria-describedby=\".k-card-title id\"",
1332
+ "description": "Associates the card with its title element."
1333
+ },
1334
+ {
1335
+ "prop": null,
1336
+ "attribute": "aria-keyshortcuts=\"Enter\"",
1337
+ "description": "Announces the Enter key that enables navigation inside the card."
1338
+ }
1339
+ ],
1340
+ "keyboard": [
1341
+ {
1342
+ "trigger": "Enter",
1343
+ "behavior": "Enables navigation inside a navigatable card."
1344
+ },
1345
+ {
1346
+ "trigger": "Tab",
1347
+ "behavior": "Moves focus through the elements inside the card, following their own keyboard navigation sequence."
1348
+ }
1349
+ ],
1315
1350
  "ux": [
1316
1351
  {
1317
1352
  "trigger": "Content container",
@@ -10848,6 +10883,19 @@
10848
10883
  "keyboard": [],
10849
10884
  "ux": []
10850
10885
  },
10886
+ {
10887
+ "name": "SchedulerCell",
10888
+ "isPrimary": true,
10889
+ "rootClass": "k-scheduler-cell",
10890
+ "options": [],
10891
+ "states": [
10892
+ "selected",
10893
+ "readonly"
10894
+ ],
10895
+ "aria": [],
10896
+ "keyboard": [],
10897
+ "ux": []
10898
+ },
10851
10899
  {
10852
10900
  "name": "SchedulerContent",
10853
10901
  "isPrimary": true,
@@ -265,6 +265,19 @@
265
265
  "keyboard": [],
266
266
  "ux": []
267
267
  },
268
+ {
269
+ "name": "SchedulerCell",
270
+ "isPrimary": true,
271
+ "rootClass": "k-scheduler-cell",
272
+ "options": [],
273
+ "states": [
274
+ "selected",
275
+ "readonly"
276
+ ],
277
+ "aria": [],
278
+ "keyboard": [],
279
+ "ux": []
280
+ },
268
281
  {
269
282
  "name": "SchedulerContent",
270
283
  "isPrimary": true,
@@ -16,4 +16,7 @@ export type KendoAppbarProps = KendoAppbarOptions & {
16
16
  * @ux {Sections} Divided into start, center, and end sections for flexible content placement.
17
17
  */
18
18
  export declare const Appbar: KendoComponent<KendoAppbarProps & React.HTMLAttributes<HTMLDivElement>>;
19
+ /**
20
+ * @keyboard {Tab} Moves focus through the inner elements; the AppBar itself has no keyboard navigation.
21
+ */
19
22
  export default Appbar;
@@ -13,7 +13,15 @@ export type KendoCardState = {
13
13
  * @ux {Content container} Groups related content in a visually elevated surface.
14
14
  * @ux {Header and footer} Optional header and footer sections hold titles and actions.
15
15
  * @ux {Media} Supports an image or other media element at the top of the card.
16
+ * @aria {role="listitem"} Required when the card is located in a `.k-card-list`.
17
+ * @aria {tabindex="0"} The card is focusable when navigatable; inner elements are not focusable until Enter is pressed.
18
+ * @aria {aria-describedby=".k-card-title id"} Associates the card with its title element.
19
+ * @aria {aria-keyshortcuts="Enter"} Announces the Enter key that enables navigation inside the card.
16
20
  * @ux {Actions} Optional action buttons are placed in the card body or footer.
17
21
  */
18
22
  export declare const Card: KendoComponent<KendoCardProps & KendoCardState & React.HTMLAttributes<HTMLDivElement>>;
23
+ /**
24
+ * @keyboard {Enter} Enables navigation inside a navigatable card.
25
+ * @keyboard {Tab} Moves focus through the elements inside the card, following their own keyboard navigation sequence.
26
+ */
19
27
  export default Card;
@@ -7,6 +7,9 @@ export type KendoSchedulerCellProps = {
7
7
  dayText?: string;
8
8
  colspan?: number;
9
9
  rowspan?: number;
10
+ selected?: boolean;
11
+ readonly?: boolean;
12
+ nonwork?: boolean;
10
13
  };
11
14
  export declare const SchedulerCell: KendoComponent<KendoSchedulerCellProps & ((React.AllHTMLAttributes<HTMLDivElement> & {
12
15
  as: 'div';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-themes-html",
3
3
  "description": "A collection of HTML helpers used for developing Kendo UI themes",
4
- "version": "14.7.1-dev.7",
4
+ "version": "14.9.0-dev.0",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -68,4 +68,8 @@ Appbar.className = APPBAR_CLASSNAME;
68
68
  Appbar.defaultOptions = defaultOptions;
69
69
  Appbar.moduleName = APPBAR_MODULE_NAME;
70
70
  Appbar.folderName = APPBAR_FOLDER_NAME;
71
+ /**
72
+ * @keyboard {Tab} Moves focus through the inner elements; the AppBar itself has no keyboard navigation.
73
+ */
74
+
71
75
  export default Appbar;
@@ -29,6 +29,10 @@ export type KendoCardState = { [K in (typeof states)[number]]?: boolean };
29
29
  * @ux {Content container} Groups related content in a visually elevated surface.
30
30
  * @ux {Header and footer} Optional header and footer sections hold titles and actions.
31
31
  * @ux {Media} Supports an image or other media element at the top of the card.
32
+ * @aria {role="listitem"} Required when the card is located in a `.k-card-list`.
33
+ * @aria {tabindex="0"} The card is focusable when navigatable; inner elements are not focusable until Enter is pressed.
34
+ * @aria {aria-describedby=".k-card-title id"} Associates the card with its title element.
35
+ * @aria {aria-keyshortcuts="Enter"} Announces the Enter key that enables navigation inside the card.
32
36
  * @ux {Actions} Optional action buttons are placed in the card body or footer.
33
37
  */
34
38
  export const Card: KendoComponent<KendoCardProps & KendoCardState & React.HTMLAttributes<HTMLDivElement>> = (
@@ -79,4 +83,9 @@ Card.defaultOptions = defaultOptions;
79
83
  Card.moduleName = CARD_MODULE_NAME;
80
84
  Card.folderName = CARD_FOLDER_NAME;
81
85
 
86
+ /**
87
+ * @keyboard {Enter} Enables navigation inside a navigatable card.
88
+ * @keyboard {Tab} Moves focus through the elements inside the card, following their own keyboard navigation sequence.
89
+ */
90
+
82
91
  export default Card;
@@ -1,10 +1,10 @@
1
- import { classNames } from '../misc';
1
+ import { classNames, States, stateClassNames } from '../misc';
2
2
 
3
3
  import { KendoComponent } from '../_types/component';
4
4
  import { SCHEDULER_FOLDER_NAME, SCHEDULER_MODULE_NAME } from './constants';
5
5
  const className = 'k-scheduler-cell';
6
6
 
7
- const states = [];
7
+ const states = [States.selected, States.readonly];
8
8
 
9
9
  const options = {};
10
10
 
@@ -18,6 +18,9 @@ export type KendoSchedulerCellProps = {
18
18
  dayText?: string;
19
19
  colspan?: number;
20
20
  rowspan?: number;
21
+ selected?: boolean;
22
+ readonly?: boolean;
23
+ nonwork?: boolean;
21
24
  }
22
25
 
23
26
  export const SchedulerCell: KendoComponent<KendoSchedulerCellProps & ( | ( React.AllHTMLAttributes<HTMLDivElement> & { as: 'div' } ) | ( React.HTMLAttributes<HTMLTableCellElement> & { as: 'th' |'td' } ) )> = (
@@ -34,6 +37,9 @@ export const SchedulerCell: KendoComponent<KendoSchedulerCellProps & ( | ( React
34
37
  dayText,
35
38
  colspan,
36
39
  rowspan,
40
+ selected,
41
+ readonly,
42
+ nonwork,
37
43
  as: Component = 'div',
38
44
  ...other
39
45
  } = props;
@@ -51,9 +57,14 @@ export const SchedulerCell: KendoComponent<KendoSchedulerCellProps & ( | ( React
51
57
  className={classNames(
52
58
  className,
53
59
  props.className,
60
+ stateClassNames(className, {
61
+ selected,
62
+ readonly,
63
+ }),
54
64
  {
55
65
  'k-scheduler-times-all-day': allDay,
56
66
  'k-today': today,
67
+ 'k-nonwork-hour': nonwork,
57
68
  },
58
69
  cellType?.map((t) => ({
59
70
  [`k-${t}-cell`]: true,
@@ -0,0 +1,132 @@
1
+ import { Fragment } from "react";
2
+ import { SchedulerBody, SchedulerCell, SchedulerContent, SchedulerHead, SchedulerHeader, SchedulerTable, SchedulerTimes, SchedulerWeek } from "..";
3
+
4
+ const style = `
5
+ #test-area {
6
+ max-width: 1080px;
7
+ }
8
+ `;
9
+
10
+ const days = [
11
+ { day: "Mon", date: "2" },
12
+ { day: "Tue", date: "3" },
13
+ { day: "Wed", date: "4", today: true },
14
+ { day: "Thu", date: "5" },
15
+ { day: "Fri", date: "6" },
16
+ { day: "Sat", date: "7", nonwork: true },
17
+ { day: "Sun", date: "8", nonwork: true },
18
+ ];
19
+
20
+ const hours = ["8:00 AM", "9:00 AM", "10:00 AM", "11:00 AM"];
21
+
22
+ // Rows are half-hour slots; the 10:00 AM slot is read-only on all days (non-work + readonly on the weekend)
23
+ const isReadonly = (row: number) => row === 4;
24
+
25
+ // The slot below the read-only one is selected on all days
26
+ const isSelectedRow = (row: number) => row === 5;
27
+
28
+ // State names on the first cell of the non-work column and of the read-only and selected rows, keyed by "row-day"
29
+ const labels: Record<string, string> = {
30
+ "0-Sat": "non-work",
31
+ "0-Sun": "non-work",
32
+ "4-Mon": "readonly",
33
+ "5-Mon": "selected",
34
+ };
35
+
36
+ export default () => (
37
+ <>
38
+ <style>{style}</style>
39
+ <div id="test-area" className="k-d-grid k-grid-cols-1">
40
+ <p>This test covers the read-only, non-work and selected cell states, and their combinations.</p>
41
+ <SchedulerWeek
42
+ children={
43
+ <tbody>
44
+ <SchedulerHead as="tr">
45
+ <td>
46
+ <SchedulerTimes>
47
+ <SchedulerTable role="none">
48
+ <tbody>
49
+ <tr style={{ height: "55px" }}>
50
+ <SchedulerCell as="th" />
51
+ </tr>
52
+ <tr style={{ height: "86px" }}>
53
+ <SchedulerCell as="th" allDay text="all day" />
54
+ </tr>
55
+ </tbody>
56
+ </SchedulerTable>
57
+ </SchedulerTimes>
58
+ </td>
59
+ <td>
60
+ <SchedulerHeader>
61
+ <SchedulerTable>
62
+ <tbody>
63
+ <tr className="k-scheduler-date-group">
64
+ {days.map(({ day, date, today }) => (
65
+ <SchedulerCell key={day} as="th" today={today} dayText={day} text={date} />
66
+ ))}
67
+ </tr>
68
+ </tbody>
69
+ </SchedulerTable>
70
+ <SchedulerTable className="k-scheduler-header-all-day">
71
+ <tbody>
72
+ <tr style={{ height: "86px" }}>
73
+ {days.map(({ day, nonwork }) => (
74
+ <SchedulerCell key={day} as="td" nonwork={nonwork} />
75
+ ))}
76
+ </tr>
77
+ </tbody>
78
+ </SchedulerTable>
79
+ </SchedulerHeader>
80
+ </td>
81
+ </SchedulerHead>
82
+ <SchedulerBody as="tr">
83
+ <td>
84
+ <SchedulerTimes>
85
+ <SchedulerTable role="none">
86
+ <tbody>
87
+ {hours.map((hour) => (
88
+ <Fragment key={hour}>
89
+ <tr>
90
+ <SchedulerCell as="th">
91
+ <span>{hour}</span>
92
+ </SchedulerCell>
93
+ </tr>
94
+ <tr>
95
+ <SchedulerCell as="th" cellType={["slot"]} />
96
+ </tr>
97
+ </Fragment>
98
+ ))}
99
+ </tbody>
100
+ </SchedulerTable>
101
+ </SchedulerTimes>
102
+ </td>
103
+ <td>
104
+ <SchedulerContent tabIndex={0}>
105
+ <SchedulerTable>
106
+ <tbody>
107
+ {Array.from({ length: hours.length * 2 }, (_, row) => (
108
+ <tr key={row} className={row % 2 === 0 ? "k-middle-row" : undefined}>
109
+ {days.map(({ day, nonwork }) => (
110
+ <SchedulerCell
111
+ key={day}
112
+ as="td"
113
+ readonly={isReadonly(row)}
114
+ selected={isSelectedRow(row)}
115
+ nonwork={nonwork}
116
+ >
117
+ {labels[`${row}-${day}`] ?? <>&nbsp;</>}
118
+ </SchedulerCell>
119
+ ))}
120
+ </tr>
121
+ ))}
122
+ </tbody>
123
+ </SchedulerTable>
124
+ </SchedulerContent>
125
+ </td>
126
+ </SchedulerBody>
127
+ </tbody>
128
+ }
129
+ />
130
+ </div>
131
+ </>
132
+ );
@@ -29,7 +29,7 @@ export default () => (
29
29
  <span>No Data</span>
30
30
 
31
31
  <section>
32
- <Popover className="k-scheduler-popover" style={{ width: "220px" }} callout="left">
32
+ <Popover className="k-scheduler-popover" style={{ width: "220px" }}>
33
33
  <div className="k-popover-header">
34
34
  <div className="k-month">Jan</div>
35
35
  <div className="k-link k-day">02</div>
@@ -54,7 +54,7 @@ export default () => (
54
54
  </section>
55
55
 
56
56
  <section>
57
- <Popover className="k-scheduler-popover" style={{ width: "220px" }} callout="left">
57
+ <Popover className="k-scheduler-popover" style={{ width: "220px" }}>
58
58
  <div className="k-popover-header">
59
59
  <div className="k-month">Jan</div>
60
60
  <div className="k-link k-day">02</div>
@@ -107,7 +107,7 @@ export default () => (
107
107
  </section>
108
108
 
109
109
  <section>
110
- <Popover className="k-scheduler-popover" style={{ width: "220px" }} callout="left">
110
+ <Popover className="k-scheduler-popover" style={{ width: "220px" }}>
111
111
  <div className="k-popover-header">
112
112
  <div className="k-month">Jan</div>
113
113
  <div className="k-link k-day">29</div>