@react-md/core 1.0.0-next.7 → 1.0.0-next.8

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 (60) hide show
  1. package/.turbo/turbo-build.log +6 -6
  2. package/CHANGELOG.md +6 -0
  3. package/coverage/clover.xml +264 -389
  4. package/coverage/coverage-final.json +2 -3
  5. package/coverage/lcov-report/MenuItemCheckbox.tsx.html +223 -0
  6. package/coverage/lcov-report/MenuItemInputToggle.tsx.html +178 -232
  7. package/coverage/lcov-report/MenuItemRadio.tsx.html +436 -0
  8. package/coverage/lcov-report/SrOnly.tsx.html +328 -0
  9. package/coverage/lcov-report/Typography.tsx.html +1027 -0
  10. package/coverage/lcov-report/index.html +15 -30
  11. package/coverage/lcov-report/menuItemInputToggleStyles.ts.html +319 -0
  12. package/coverage/lcov.info +304 -436
  13. package/dist/_core.scss +49 -43
  14. package/dist/badge/_badge.scss +23 -19
  15. package/dist/form/MenuItemInputToggle.d.ts +2 -15
  16. package/dist/form/MenuItemInputToggle.js +26 -37
  17. package/dist/form/MenuItemInputToggle.js.map +1 -1
  18. package/dist/form/_form.scss +39 -16
  19. package/dist/form/menuItemInputToggleStyles.d.ts +39 -0
  20. package/dist/form/menuItemInputToggleStyles.js +31 -0
  21. package/dist/form/menuItemInputToggleStyles.js.map +1 -0
  22. package/dist/icon/_icon.scss +7 -5
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/interaction/_interaction.scss +56 -44
  27. package/dist/list/types.d.ts +10 -1
  28. package/dist/list/types.js.map +1 -1
  29. package/dist/menu/_menu.scss +1 -0
  30. package/dist/theme/_theme.scss +192 -34
  31. package/dist/typography/SrOnly.d.ts +3 -3
  32. package/dist/typography/SrOnly.js +4 -4
  33. package/dist/typography/SrOnly.js.map +1 -1
  34. package/dist/typography/Typography.d.ts +19 -19
  35. package/dist/typography/Typography.js +19 -19
  36. package/dist/typography/Typography.js.map +1 -1
  37. package/dist/typography/_typography.scss +65 -25
  38. package/package.json +11 -11
  39. package/src/_core.scss +49 -43
  40. package/src/badge/_badge.scss +23 -19
  41. package/src/button/__tests__/__snapshots__/Button.tsx.snap +1 -1
  42. package/src/form/MenuItemInputToggle.tsx +46 -64
  43. package/src/form/__tests__/MenuItemCheckbox.tsx +53 -0
  44. package/src/form/__tests__/MenuItemRadio.tsx +53 -0
  45. package/src/form/__tests__/__snapshots__/FileInput.tsx.snap +23 -23
  46. package/src/form/__tests__/__snapshots__/MenuItemCheckbox.tsx.snap +96 -0
  47. package/src/form/__tests__/__snapshots__/MenuItemRadio.tsx.snap +96 -0
  48. package/src/form/_form.scss +39 -16
  49. package/src/form/menuItemInputToggleStyles.ts +78 -0
  50. package/src/icon/_icon.scss +7 -5
  51. package/src/index.ts +1 -0
  52. package/src/interaction/_interaction.scss +56 -44
  53. package/src/list/types.ts +12 -1
  54. package/src/menu/_menu.scss +1 -0
  55. package/src/theme/_theme.scss +192 -34
  56. package/src/typography/SrOnly.tsx +9 -9
  57. package/src/typography/Typography.tsx +19 -19
  58. package/src/typography/__tests__/__snapshots__/SrOnly.tsx.snap +5 -5
  59. package/src/typography/_typography.scss +65 -25
  60. package/.turbo/turbo-lint.log +0 -12
@@ -11,11 +11,11 @@ import { ListItem } from "../list/ListItem.js";
11
11
  import {
12
12
  type ListItemAddonPosition,
13
13
  type ListItemAddonType,
14
+ type ListItemChildrenTextProps,
14
15
  type ListItemHeight,
15
16
  } from "../list/types.js";
16
17
  import { type PropsWithRef } from "../types.js";
17
18
  import { useEnsuredId } from "../useEnsuredId.js";
18
- import { bem } from "../utils/bem.js";
19
19
  import {
20
20
  type IndeterminateCheckboxProps,
21
21
  type InputToggleIconProps,
@@ -23,31 +23,16 @@ import {
23
23
  import { InputToggleIcon } from "./InputToggleIcon.js";
24
24
  import { SwitchTrack } from "./SwitchTrack.js";
25
25
  import { type InputToggleSize } from "./inputToggleStyles.js";
26
+ import {
27
+ menuItemInputToggle,
28
+ menuItemInputToggleBall,
29
+ menuItemInputToggleIcon,
30
+ menuItemInputToggleTrack,
31
+ } from "./menuItemInputToggleStyles.js";
26
32
 
27
33
  const noop = (): void => {
28
34
  // do nothing
29
35
  };
30
- const styles = bem("rmd-menu-item-input-toggle");
31
-
32
- /** @remarks \@since 6.0.0 */
33
- export interface MenuItemInputToggleClassNameOptions {
34
- className?: string;
35
- type: "radio" | "checkbox" | "switch";
36
- }
37
-
38
- /**
39
- * @remarks \@since 6.0.0
40
- */
41
- export function menuItemInputToggle(
42
- options: MenuItemInputToggleClassNameOptions
43
- ): string {
44
- const { className, type } = options;
45
- return cnb(
46
- `rmd-${type}-menu-item`,
47
- styles({ switch: type === "switch" }),
48
- className
49
- );
50
- }
51
36
 
52
37
  /**
53
38
  * @remarks \@since 6.0.0
@@ -60,7 +45,8 @@ export type MenuItemInputToggleCheckedCallback = (
60
45
  /** @remarks \@since 2.8.0 */
61
46
  export interface BaseMenuItemInputToggleProps
62
47
  extends HTMLAttributes<HTMLLIElement>,
63
- InputToggleIconProps {
48
+ InputToggleIconProps,
49
+ ListItemChildrenTextProps {
64
50
  checked: boolean;
65
51
  onCheckedChange: MenuItemInputToggleCheckedCallback;
66
52
 
@@ -95,12 +81,6 @@ export interface BaseMenuItemInputToggleProps
95
81
  /** @defaultValue `"auto"` */
96
82
  height?: ListItemHeight;
97
83
 
98
- /** @defaultValue `false` */
99
- multiline?: boolean;
100
-
101
- /** @defaultValue `false` */
102
- disableTextChildren?: boolean;
103
-
104
84
  /** @defaultValue `false` */
105
85
  iconAfter?: boolean;
106
86
 
@@ -199,41 +179,43 @@ export const MenuItemInputToggle = forwardRef<
199
179
  const id = useEnsuredId(propId, "menu-item");
200
180
 
201
181
  let icon = propIcon;
202
- if (typeof propIcon === "undefined") {
203
- if (type === "switch") {
204
- icon = (
205
- <SwitchTrack
206
- style={trackStyle}
207
- {...trackProps}
208
- className={cnb(
209
- styles("track"),
210
- trackClassName,
211
- trackProps?.className
212
- )}
213
- active={checked}
214
- ballProps={ballProps}
215
- ballStyle={ballStyle}
216
- ballClassName={cnb(styles("ball"), ballClassName)}
217
- />
218
- );
219
- } else {
220
- icon = (
221
- <InputToggleIcon
222
- style={iconStyle}
223
- disableEm
224
- {...iconProps}
225
- className={cnb(styles("icon"), iconClassName, iconProps?.className)}
226
- size={size}
227
- type={type}
228
- checked={checked}
229
- disabled={disabled}
230
- icon={propIcon}
231
- checkedIcon={checkedIcon}
232
- indeterminate={indeterminate}
233
- indeterminateIcon={indeterminateIcon}
234
- />
235
- );
236
- }
182
+ if (type === "switch") {
183
+ icon = (
184
+ <SwitchTrack
185
+ style={trackStyle}
186
+ {...trackProps}
187
+ className={cnb(
188
+ menuItemInputToggleTrack(),
189
+ trackClassName,
190
+ trackProps?.className
191
+ )}
192
+ active={checked}
193
+ ballProps={ballProps}
194
+ ballStyle={ballStyle}
195
+ ballClassName={cnb(menuItemInputToggleBall(), ballClassName)}
196
+ />
197
+ );
198
+ } else {
199
+ icon = (
200
+ <InputToggleIcon
201
+ style={iconStyle}
202
+ disableEm
203
+ {...iconProps}
204
+ className={cnb(
205
+ menuItemInputToggleIcon(),
206
+ iconClassName,
207
+ iconProps?.className
208
+ )}
209
+ size={size}
210
+ type={type}
211
+ checked={checked}
212
+ disabled={disabled}
213
+ icon={propIcon}
214
+ checkedIcon={checkedIcon}
215
+ indeterminate={indeterminate}
216
+ indeterminateIcon={indeterminateIcon}
217
+ />
218
+ );
237
219
  }
238
220
 
239
221
  let leftAddon: ReactNode;
@@ -0,0 +1,53 @@
1
+ import { describe, expect, it, jest } from "@jest/globals";
2
+ import { createRef } from "react";
3
+ import { rmdRender, screen } from "../../test-utils/index.js";
4
+ import { type MenuItemCheckboxProps } from "../MenuItemInputToggle.js";
5
+ import { MenuItemCheckbox } from "../MenuItemCheckbox.js";
6
+
7
+ describe("MenuItemCheckbox", () => {
8
+ it("should apply the correct styling, HTMLAttributes, and allow a ref", () => {
9
+ const ref = createRef<HTMLLIElement>();
10
+ const props = {
11
+ ref,
12
+ checked: false,
13
+ onCheckedChange: jest.fn(),
14
+ children: "Checkbox",
15
+ } as const;
16
+
17
+ const { rerender } = rmdRender(<MenuItemCheckbox {...props} />);
18
+
19
+ const element = screen.getByRole("menuitemcheckbox", { name: "Checkbox" });
20
+ expect(ref.current).toBeInstanceOf(HTMLLIElement);
21
+ expect(ref.current).toBe(element);
22
+ expect(element).toMatchSnapshot();
23
+
24
+ rerender(
25
+ <MenuItemCheckbox
26
+ {...props}
27
+ style={{ color: "white" }}
28
+ className="custom-class-name"
29
+ />
30
+ );
31
+ expect(element).toMatchSnapshot();
32
+ });
33
+
34
+ it("should allow for a custom unchecked and checked icon", async () => {
35
+ const props: MenuItemCheckboxProps = {
36
+ icon: null,
37
+ checkedIcon: <span data-testid="checked" />,
38
+ iconAfter: true,
39
+ children: "Checkbox",
40
+ checked: false,
41
+ onCheckedChange: jest.fn(),
42
+ };
43
+
44
+ const { rerender } = rmdRender(<MenuItemCheckbox {...props} />);
45
+
46
+ const element = screen.getByRole("menuitemcheckbox", { name: "Checkbox" });
47
+ expect(element).toMatchSnapshot();
48
+ expect(element.querySelector(".rmd-icon")).toBeNull();
49
+
50
+ rerender(<MenuItemCheckbox {...props} checked />);
51
+ expect(element).toMatchSnapshot();
52
+ });
53
+ });
@@ -0,0 +1,53 @@
1
+ import { describe, expect, it, jest } from "@jest/globals";
2
+ import { createRef } from "react";
3
+ import { rmdRender, screen } from "../../test-utils/index.js";
4
+ import { type MenuItemRadioProps } from "../MenuItemInputToggle.js";
5
+ import { MenuItemRadio } from "../MenuItemRadio.js";
6
+
7
+ describe("MenuItemRadio", () => {
8
+ it("should apply the correct styling, HTMLAttributes, and allow a ref", () => {
9
+ const ref = createRef<HTMLLIElement>();
10
+ const props = {
11
+ ref,
12
+ checked: false,
13
+ onCheckedChange: jest.fn(),
14
+ children: "Radio",
15
+ } as const;
16
+
17
+ const { rerender } = rmdRender(<MenuItemRadio {...props} />);
18
+
19
+ const element = screen.getByRole("menuitemradio", { name: "Radio" });
20
+ expect(ref.current).toBeInstanceOf(HTMLLIElement);
21
+ expect(ref.current).toBe(element);
22
+ expect(element).toMatchSnapshot();
23
+
24
+ rerender(
25
+ <MenuItemRadio
26
+ {...props}
27
+ style={{ color: "white" }}
28
+ className="custom-class-name"
29
+ />
30
+ );
31
+ expect(element).toMatchSnapshot();
32
+ });
33
+
34
+ it("should allow for a custom unchecked and checked icon", async () => {
35
+ const props: MenuItemRadioProps = {
36
+ icon: null,
37
+ checkedIcon: <span data-testid="checked" />,
38
+ iconAfter: true,
39
+ children: "Radio",
40
+ checked: false,
41
+ onCheckedChange: jest.fn(),
42
+ };
43
+
44
+ const { rerender } = rmdRender(<MenuItemRadio {...props} />);
45
+
46
+ const element = screen.getByRole("menuitemradio", { name: "Radio" });
47
+ expect(element).toMatchSnapshot();
48
+ expect(element.querySelector(".rmd-icon")).toBeNull();
49
+
50
+ rerender(<MenuItemRadio {...props} checked />);
51
+ expect(element).toMatchSnapshot();
52
+ });
53
+ });
@@ -12,7 +12,7 @@ exports[`FileInput should apply the correct styling, HTMLAttributes, and allow a
12
12
  file_upload
13
13
  </span>
14
14
  <span
15
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
15
+ class="rmd-sr-only"
16
16
  >
17
17
  Upload
18
18
  </span>
@@ -37,7 +37,7 @@ exports[`FileInput should apply the correct styling, HTMLAttributes, and allow a
37
37
  file_upload
38
38
  </span>
39
39
  <span
40
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
40
+ class="rmd-sr-only"
41
41
  >
42
42
  Upload
43
43
  </span>
@@ -63,7 +63,7 @@ exports[`FileInput should render as an icon button unless children are provided
63
63
  file_upload
64
64
  </span>
65
65
  <span
66
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
66
+ class="rmd-sr-only"
67
67
  >
68
68
  Upload
69
69
  </span>
@@ -87,7 +87,7 @@ exports[`FileInput should render as an icon button unless children are provided
87
87
  file_upload
88
88
  </span>
89
89
  <span
90
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
90
+ class="rmd-sr-only"
91
91
  >
92
92
  Upload
93
93
  </span>
@@ -165,7 +165,7 @@ exports[`FileInput should support all the button themes 1`] = `
165
165
  file_upload
166
166
  </span>
167
167
  <span
168
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
168
+ class="rmd-sr-only"
169
169
  >
170
170
  Upload
171
171
  </span>
@@ -189,7 +189,7 @@ exports[`FileInput should support all the button themes 2`] = `
189
189
  file_upload
190
190
  </span>
191
191
  <span
192
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
192
+ class="rmd-sr-only"
193
193
  >
194
194
  Upload
195
195
  </span>
@@ -213,7 +213,7 @@ exports[`FileInput should support all the button themes 3`] = `
213
213
  file_upload
214
214
  </span>
215
215
  <span
216
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
216
+ class="rmd-sr-only"
217
217
  >
218
218
  Upload
219
219
  </span>
@@ -237,7 +237,7 @@ exports[`FileInput should support all the button themes 4`] = `
237
237
  file_upload
238
238
  </span>
239
239
  <span
240
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
240
+ class="rmd-sr-only"
241
241
  >
242
242
  Upload
243
243
  </span>
@@ -261,7 +261,7 @@ exports[`FileInput should support all the button themes 5`] = `
261
261
  file_upload
262
262
  </span>
263
263
  <span
264
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
264
+ class="rmd-sr-only"
265
265
  >
266
266
  Upload
267
267
  </span>
@@ -285,7 +285,7 @@ exports[`FileInput should support all the button themes 6`] = `
285
285
  file_upload
286
286
  </span>
287
287
  <span
288
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
288
+ class="rmd-sr-only"
289
289
  >
290
290
  Upload
291
291
  </span>
@@ -309,7 +309,7 @@ exports[`FileInput should support all the button themes 7`] = `
309
309
  file_upload
310
310
  </span>
311
311
  <span
312
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
312
+ class="rmd-sr-only"
313
313
  >
314
314
  Upload
315
315
  </span>
@@ -333,7 +333,7 @@ exports[`FileInput should support all the button themes 8`] = `
333
333
  file_upload
334
334
  </span>
335
335
  <span
336
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
336
+ class="rmd-sr-only"
337
337
  >
338
338
  Upload
339
339
  </span>
@@ -357,7 +357,7 @@ exports[`FileInput should support all the button themes 9`] = `
357
357
  file_upload
358
358
  </span>
359
359
  <span
360
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
360
+ class="rmd-sr-only"
361
361
  >
362
362
  Upload
363
363
  </span>
@@ -381,7 +381,7 @@ exports[`FileInput should support all the button themes 10`] = `
381
381
  file_upload
382
382
  </span>
383
383
  <span
384
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
384
+ class="rmd-sr-only"
385
385
  >
386
386
  Upload
387
387
  </span>
@@ -405,7 +405,7 @@ exports[`FileInput should support all the button themes 11`] = `
405
405
  file_upload
406
406
  </span>
407
407
  <span
408
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
408
+ class="rmd-sr-only"
409
409
  >
410
410
  Upload
411
411
  </span>
@@ -429,7 +429,7 @@ exports[`FileInput should support all the button themes 12`] = `
429
429
  file_upload
430
430
  </span>
431
431
  <span
432
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
432
+ class="rmd-sr-only"
433
433
  >
434
434
  Upload
435
435
  </span>
@@ -453,7 +453,7 @@ exports[`FileInput should support all the button themes 13`] = `
453
453
  file_upload
454
454
  </span>
455
455
  <span
456
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
456
+ class="rmd-sr-only"
457
457
  >
458
458
  Upload
459
459
  </span>
@@ -477,7 +477,7 @@ exports[`FileInput should support all the button themes 14`] = `
477
477
  file_upload
478
478
  </span>
479
479
  <span
480
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
480
+ class="rmd-sr-only"
481
481
  >
482
482
  Upload
483
483
  </span>
@@ -501,7 +501,7 @@ exports[`FileInput should support all the button themes 15`] = `
501
501
  file_upload
502
502
  </span>
503
503
  <span
504
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
504
+ class="rmd-sr-only"
505
505
  >
506
506
  Upload
507
507
  </span>
@@ -525,7 +525,7 @@ exports[`FileInput should support all the button themes 16`] = `
525
525
  file_upload
526
526
  </span>
527
527
  <span
528
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
528
+ class="rmd-sr-only"
529
529
  >
530
530
  Upload
531
531
  </span>
@@ -549,7 +549,7 @@ exports[`FileInput should support all the button themes 17`] = `
549
549
  file_upload
550
550
  </span>
551
551
  <span
552
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
552
+ class="rmd-sr-only"
553
553
  >
554
554
  Upload
555
555
  </span>
@@ -573,7 +573,7 @@ exports[`FileInput should support all the button themes 18`] = `
573
573
  file_upload
574
574
  </span>
575
575
  <span
576
- class="rmd-typography rmd-typography--body-1 rmd-sr-only"
576
+ class="rmd-sr-only"
577
577
  >
578
578
  Upload
579
579
  </span>
@@ -598,7 +598,7 @@ exports[`FileInput should update the default SrOnly text to be phoneOnly when th
598
598
  file_upload
599
599
  </span>
600
600
  <span
601
- class="rmd-typography rmd-typography--body-1 rmd-phone-sr-only"
601
+ class="rmd-phone-sr-only"
602
602
  >
603
603
  Upload
604
604
  </span>
@@ -0,0 +1,96 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`MenuItemCheckbox should allow for a custom unchecked and checked icon 1`] = `
4
+ <li
5
+ aria-checked="false"
6
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-checkbox-menu-item rmd-menu-item-input-toggle"
7
+ id="menu-item-:r1:"
8
+ role="menuitemcheckbox"
9
+ tabindex="-1"
10
+ >
11
+ <span
12
+ class="rmd-list-item__text"
13
+ >
14
+ Checkbox
15
+ </span>
16
+ <span
17
+ class="rmd-checkbox rmd-input-toggle rmd-icon--after rmd-list-item__addon rmd-menu-item-input-toggle__icon"
18
+ />
19
+ </li>
20
+ `;
21
+
22
+ exports[`MenuItemCheckbox should allow for a custom unchecked and checked icon 2`] = `
23
+ <li
24
+ aria-checked="true"
25
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-checkbox-menu-item rmd-menu-item-input-toggle"
26
+ id="menu-item-:r1:"
27
+ role="menuitemcheckbox"
28
+ tabindex="-1"
29
+ >
30
+ <span
31
+ class="rmd-list-item__text"
32
+ >
33
+ Checkbox
34
+ </span>
35
+ <span
36
+ class="rmd-checkbox rmd-input-toggle rmd-input-toggle--active rmd-icon--after rmd-list-item__addon rmd-menu-item-input-toggle__icon"
37
+ >
38
+ <span
39
+ data-testid="checked"
40
+ />
41
+ </span>
42
+ </li>
43
+ `;
44
+
45
+ exports[`MenuItemCheckbox should apply the correct styling, HTMLAttributes, and allow a ref 1`] = `
46
+ <li
47
+ aria-checked="false"
48
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-checkbox-menu-item rmd-menu-item-input-toggle"
49
+ id="menu-item-:r0:"
50
+ role="menuitemcheckbox"
51
+ tabindex="-1"
52
+ >
53
+ <span
54
+ class="rmd-checkbox rmd-input-toggle rmd-icon--before rmd-list-item__addon rmd-list-item__addon--before rmd-menu-item-input-toggle__icon"
55
+ >
56
+ <span
57
+ aria-hidden="true"
58
+ class="rmd-icon rmd-icon--font material-icons"
59
+ >
60
+ check_box_outline_blank
61
+ </span>
62
+ </span>
63
+ <span
64
+ class="rmd-list-item__text"
65
+ >
66
+ Checkbox
67
+ </span>
68
+ </li>
69
+ `;
70
+
71
+ exports[`MenuItemCheckbox should apply the correct styling, HTMLAttributes, and allow a ref 2`] = `
72
+ <li
73
+ aria-checked="false"
74
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-checkbox-menu-item rmd-menu-item-input-toggle custom-class-name"
75
+ id="menu-item-:r0:"
76
+ role="menuitemcheckbox"
77
+ style="color: white;"
78
+ tabindex="-1"
79
+ >
80
+ <span
81
+ class="rmd-checkbox rmd-input-toggle rmd-icon--before rmd-list-item__addon rmd-list-item__addon--before rmd-menu-item-input-toggle__icon"
82
+ >
83
+ <span
84
+ aria-hidden="true"
85
+ class="rmd-icon rmd-icon--font material-icons"
86
+ >
87
+ check_box_outline_blank
88
+ </span>
89
+ </span>
90
+ <span
91
+ class="rmd-list-item__text"
92
+ >
93
+ Checkbox
94
+ </span>
95
+ </li>
96
+ `;
@@ -0,0 +1,96 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`MenuItemRadio should allow for a custom unchecked and checked icon 1`] = `
4
+ <li
5
+ aria-checked="false"
6
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-radio-menu-item rmd-menu-item-input-toggle"
7
+ id="menu-item-:r1:"
8
+ role="menuitemradio"
9
+ tabindex="-1"
10
+ >
11
+ <span
12
+ class="rmd-list-item__text"
13
+ >
14
+ Radio
15
+ </span>
16
+ <span
17
+ class="rmd-radio rmd-input-toggle rmd-icon--after rmd-list-item__addon rmd-menu-item-input-toggle__icon"
18
+ />
19
+ </li>
20
+ `;
21
+
22
+ exports[`MenuItemRadio should allow for a custom unchecked and checked icon 2`] = `
23
+ <li
24
+ aria-checked="true"
25
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-radio-menu-item rmd-menu-item-input-toggle"
26
+ id="menu-item-:r1:"
27
+ role="menuitemradio"
28
+ tabindex="-1"
29
+ >
30
+ <span
31
+ class="rmd-list-item__text"
32
+ >
33
+ Radio
34
+ </span>
35
+ <span
36
+ class="rmd-radio rmd-input-toggle rmd-input-toggle--active rmd-icon--after rmd-list-item__addon rmd-menu-item-input-toggle__icon"
37
+ >
38
+ <span
39
+ data-testid="checked"
40
+ />
41
+ </span>
42
+ </li>
43
+ `;
44
+
45
+ exports[`MenuItemRadio should apply the correct styling, HTMLAttributes, and allow a ref 1`] = `
46
+ <li
47
+ aria-checked="false"
48
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-radio-menu-item rmd-menu-item-input-toggle"
49
+ id="menu-item-:r0:"
50
+ role="menuitemradio"
51
+ tabindex="-1"
52
+ >
53
+ <span
54
+ class="rmd-radio rmd-input-toggle rmd-icon--before rmd-list-item__addon rmd-list-item__addon--before rmd-menu-item-input-toggle__icon"
55
+ >
56
+ <span
57
+ aria-hidden="true"
58
+ class="rmd-icon rmd-icon--font material-icons"
59
+ >
60
+ radio_button_unchecked
61
+ </span>
62
+ </span>
63
+ <span
64
+ class="rmd-list-item__text"
65
+ >
66
+ Radio
67
+ </span>
68
+ </li>
69
+ `;
70
+
71
+ exports[`MenuItemRadio should apply the correct styling, HTMLAttributes, and allow a ref 2`] = `
72
+ <li
73
+ aria-checked="false"
74
+ class="rmd-list-item rmd-list-item--medium rmd-interaction-surface rmd-radio-menu-item rmd-menu-item-input-toggle custom-class-name"
75
+ id="menu-item-:r0:"
76
+ role="menuitemradio"
77
+ style="color: white;"
78
+ tabindex="-1"
79
+ >
80
+ <span
81
+ class="rmd-radio rmd-input-toggle rmd-icon--before rmd-list-item__addon rmd-list-item__addon--before rmd-menu-item-input-toggle__icon"
82
+ >
83
+ <span
84
+ aria-hidden="true"
85
+ class="rmd-icon rmd-icon--font material-icons"
86
+ >
87
+ radio_button_unchecked
88
+ </span>
89
+ </span>
90
+ <span
91
+ class="rmd-list-item__text"
92
+ >
93
+ Radio
94
+ </span>
95
+ </li>
96
+ `;