@react-md/core 1.0.0-next.1 → 1.0.0-next.2

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 (138) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +8 -0
  3. package/coverage/clover.xml +2 -2
  4. package/coverage/lcov-report/DefaultToastRenderer.tsx.html +166 -112
  5. package/coverage/lcov-report/Snackbar.tsx.html +360 -402
  6. package/coverage/lcov-report/Toast.tsx.html +868 -0
  7. package/coverage/lcov-report/ToastManager.tsx.html +1783 -0
  8. package/coverage/lcov-report/ToastManagerProvider.tsx.html +216 -216
  9. package/coverage/lcov-report/icon/FontIcon.tsx.html +28 -28
  10. package/coverage/lcov-report/icon/index.html +1 -1
  11. package/coverage/lcov-report/index.html +1 -1
  12. package/coverage/lcov-report/snackbar/Snackbar.tsx.html +55 -97
  13. package/coverage/lcov-report/snackbar/Toast.tsx.html +546 -501
  14. package/coverage/lcov-report/snackbar/ToastManager.tsx.html +269 -269
  15. package/coverage/lcov-report/snackbar/ToastManagerProvider.tsx.html +23 -23
  16. package/coverage/lcov-report/snackbar/index.html +59 -14
  17. package/coverage/lcov-report/snackbar/snackbarStyles.ts.html +12 -87
  18. package/coverage/lcov-report/snackbar/toastStyles.ts.html +206 -146
  19. package/coverage/lcov-report/snackbar/useCurrentToastActions.ts.html +226 -0
  20. package/coverage/lcov-report/snackbarStyles.ts.html +46 -121
  21. package/coverage/lcov-report/transition/config.ts.html +5 -5
  22. package/coverage/lcov-report/transition/index.html +1 -1
  23. package/coverage/lcov-report/typography/Typography.tsx.html +108 -402
  24. package/coverage/lcov-report/typography/index.html +10 -10
  25. package/dist/_core.scss +34 -1
  26. package/dist/_utils.scss +57 -0
  27. package/dist/app-bar/_app-bar.scss +15 -23
  28. package/dist/avatar/_avatar.scss +25 -34
  29. package/dist/badge/_badge.scss +71 -44
  30. package/dist/box/_box.scss +18 -29
  31. package/dist/button/_button.scss +50 -62
  32. package/dist/card/_card.scss +14 -23
  33. package/dist/chip/_chip.scss +33 -46
  34. package/dist/dialog/_dialog.scss +95 -93
  35. package/dist/divider/Divider.d.ts +0 -1
  36. package/dist/divider/Divider.js.map +1 -1
  37. package/dist/divider/_divider.scss +33 -43
  38. package/dist/form/Label.d.ts +5 -5
  39. package/dist/form/Label.js.map +1 -1
  40. package/dist/form/TextArea.js +1 -1
  41. package/dist/form/TextArea.js.map +1 -1
  42. package/dist/form/TextFieldContainerStyles.d.ts +7 -7
  43. package/dist/form/TextFieldContainerStyles.js.map +1 -1
  44. package/dist/form/_form.scss +200 -203
  45. package/dist/form/textAreaStyles.d.ts +2 -2
  46. package/dist/form/textAreaStyles.js.map +1 -1
  47. package/dist/form/types.d.ts +0 -2
  48. package/dist/form/types.js.map +1 -1
  49. package/dist/icon/_icon.scss +31 -47
  50. package/dist/interaction/_interaction.scss +47 -57
  51. package/dist/layout/_layout.scss +14 -19
  52. package/dist/link/_link.scss +15 -23
  53. package/dist/list/_list.scss +53 -63
  54. package/dist/menu/_menu.scss +16 -27
  55. package/dist/overlay/_overlay.scss +14 -19
  56. package/dist/progress/_progress.scss +25 -30
  57. package/dist/segmented-button/_segmented-button.scss +32 -43
  58. package/dist/sheet/_sheet.scss +24 -42
  59. package/dist/snackbar/DefaultToastRenderer.js +1 -1
  60. package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
  61. package/dist/snackbar/Snackbar.d.ts +1 -3
  62. package/dist/snackbar/Snackbar.js +2 -3
  63. package/dist/snackbar/Snackbar.js.map +1 -1
  64. package/dist/snackbar/Toast.d.ts +1 -1
  65. package/dist/snackbar/Toast.js +5 -1
  66. package/dist/snackbar/Toast.js.map +1 -1
  67. package/dist/snackbar/ToastManager.d.ts +2 -1
  68. package/dist/snackbar/ToastManager.js +1 -1
  69. package/dist/snackbar/ToastManager.js.map +1 -1
  70. package/dist/snackbar/_snackbar.scss +15 -23
  71. package/dist/table/_table.scss +55 -70
  72. package/dist/tabs/_tabs.scss +25 -30
  73. package/dist/theme/_theme.scss +31 -89
  74. package/dist/tooltip/_tooltip.scss +16 -25
  75. package/dist/transition/_transition.scss +38 -37
  76. package/dist/tree/_tree.scss +102 -109
  77. package/dist/typography/_typography.scss +17 -22
  78. package/dist/window-splitter/_window-splitter.scss +19 -45
  79. package/package.json +1 -1
  80. package/src/_core.scss +34 -1
  81. package/src/_utils.scss +57 -0
  82. package/src/app-bar/_app-bar.scss +15 -23
  83. package/src/avatar/_avatar.scss +25 -34
  84. package/src/badge/_badge.scss +71 -44
  85. package/src/box/_box.scss +18 -29
  86. package/src/button/_button.scss +50 -62
  87. package/src/card/_card.scss +14 -23
  88. package/src/chip/_chip.scss +33 -46
  89. package/src/dialog/_dialog.scss +95 -93
  90. package/src/divider/Divider.tsx +0 -1
  91. package/src/divider/_divider.scss +33 -43
  92. package/src/form/Label.tsx +5 -5
  93. package/src/form/TextArea.tsx +1 -1
  94. package/src/form/TextFieldContainerStyles.ts +7 -7
  95. package/src/form/_form.scss +200 -203
  96. package/src/form/textAreaStyles.ts +2 -2
  97. package/src/form/types.ts +0 -2
  98. package/src/icon/_icon.scss +31 -47
  99. package/src/interaction/_interaction.scss +47 -57
  100. package/src/layout/_layout.scss +14 -19
  101. package/src/link/_link.scss +15 -23
  102. package/src/list/_list.scss +53 -63
  103. package/src/menu/_menu.scss +16 -27
  104. package/src/overlay/_overlay.scss +14 -19
  105. package/src/progress/_progress.scss +25 -30
  106. package/src/segmented-button/_segmented-button.scss +32 -43
  107. package/src/sheet/_sheet.scss +24 -42
  108. package/src/snackbar/DefaultToastRenderer.tsx +1 -1
  109. package/src/snackbar/Snackbar.tsx +17 -25
  110. package/src/snackbar/Toast.tsx +7 -2
  111. package/src/snackbar/ToastManager.tsx +3 -2
  112. package/src/snackbar/__tests__/Snackbar.tsx +12 -11
  113. package/src/snackbar/__tests__/ToastManagerProvider.tsx +20 -42
  114. package/src/snackbar/__tests__/__snapshots__/Snackbar.tsx.snap +127 -27
  115. package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +23 -8
  116. package/src/snackbar/_snackbar.scss +15 -23
  117. package/src/table/_table.scss +55 -70
  118. package/src/tabs/_tabs.scss +25 -30
  119. package/src/theme/_theme.scss +31 -89
  120. package/src/tooltip/_tooltip.scss +16 -25
  121. package/src/transition/_transition.scss +38 -37
  122. package/src/tree/_tree.scss +102 -109
  123. package/src/typography/_typography.scss +17 -22
  124. package/src/window-splitter/_window-splitter.scss +19 -45
  125. package/.turbo/turbo-lint.log +0 -12
  126. package/.turbo/turbo-test.log +0 -166
  127. package/.turbo/turbo-typecheck.log +0 -4
  128. package/dist/divider/VerticalDivider.d.ts +0 -32
  129. package/dist/divider/useVerticalDividerHeight.d.ts +0 -37
  130. package/dist/icon/MaterialIconsProvider.d.ts +0 -12
  131. package/dist/icon/MaterialIconsProvider.js +0 -17
  132. package/dist/icon/MaterialIconsProvider.js.map +0 -1
  133. package/dist/icon/MaterialSymbolsProvider.d.ts +0 -145
  134. package/dist/icon/MaterialSymbolsProvider.js +0 -60
  135. package/dist/icon/MaterialSymbolsProvider.js.map +0 -1
  136. package/dist/link/LinkProvider.d.ts +0 -29
  137. package/dist/menu/menuConfig.d.ts +0 -60
  138. package/dist/tooltip/useOverflowTooltip.d.ts +0 -61
@@ -1,60 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import { type SheetPosition, type SheetVerticalSize } from "../sheet/styles.js";
3
- /**
4
- * This allows the menu to be conditionally rendered as a `Sheet` instead of a
5
- * menu.
6
- *
7
- * - `false` - always render as a `Menu`
8
- * - `true` - always render as a `Sheet`
9
- * - `"phone"` - render as a sheet only when the {@link AppSize} is considered
10
- * phone (`isPhone === true`).
11
- *
12
- * @defaultValue `false`
13
- * @remarks \@since 5.0.0
14
- */
15
- export type RenderMenuAsSheet = boolean | "phone";
16
- /**
17
- * @remarks \@since 5.0.0
18
- * @remarks \@since 6.0.0 No longer includes the `horizontal` flag and is no
19
- * longer a context provider.
20
- */
21
- export interface MenuConfiguration {
22
- /** {@inheritDoc RenderMenuAsSheet} */
23
- renderAsSheet?: RenderMenuAsSheet;
24
- /**
25
- * @see {@link SheetPosition}
26
- * @defaultValue `"bottom"`
27
- */
28
- sheetPosition?: SheetPosition;
29
- /**
30
- * @see {@link SheetVerticalSize}
31
- * @defaultValue `"touch"`
32
- */
33
- sheetVerticalSize?: SheetVerticalSize;
34
- /**
35
- * Any children to render above the sheet's menu implementation. This would
36
- * normally be something like a `<DialogHeader>` or `AppBar`.
37
- *
38
- * @defaultValue `null`
39
- */
40
- sheetHeader?: ReactNode;
41
- /**
42
- * Any children to render below the sheet's menu implementation. This would
43
- * normally be something like a `<DialogFooter>`.
44
- *
45
- * @defaultValue `null`
46
- */
47
- sheetFooter?: ReactNode;
48
- }
49
- /**
50
- * @remarks \@since 6.0.0
51
- */
52
- export type MenuConfig = Required<MenuConfiguration>;
53
- /**
54
- * @remarks \@since 6.0.0
55
- */
56
- export declare const MENU_CONFIG: MenuConfig;
57
- /**
58
- * @remarks \@since 6.0.0
59
- */
60
- export declare function getMenuConfig<N extends keyof MenuConfig>(name: N, override?: MenuConfig[N]): MenuConfig[N];
@@ -1,61 +0,0 @@
1
- import { type Ref, type RefCallback } from "react";
2
- import { type TooltipImplementation, type TooltipOptions } from "./useTooltip.js";
3
- /**
4
- * @remarks \@since 6.0.0
5
- */
6
- export interface OverflowTooltipOptions extends TooltipOptions {
7
- elementRef?: Ref<HTMLElement>;
8
- }
9
- /**
10
- * @remarks \@since 6.0.0
11
- */
12
- export interface OverflowTooltipImplementation extends TooltipImplementation {
13
- nodeRef: RefCallback<HTMLElement>;
14
- }
15
- /**
16
- * This hook will ensure that a tooltip will only appear when text has
17
- * overflown by checking the size with the {@link useResizeObserver}.
18
- *
19
- * @example
20
- * ```tsx
21
- * import {
22
- * cssUtils,
23
- * Link,
24
- * Tooltip,
25
- * useOverflowTooltip,
26
- * type LinkProps,
27
- * } from "@react-md/core";
28
- * import { type ReactElement } from "react";
29
- *
30
- * function NavigationLink(props: LinkProps): ReactElement {
31
- * const { children, ...remaining } = props;
32
- * const { nodeRef, elementProps, tooltipProps } = useOverflowTooltip(remaining);
33
- *
34
- * return (
35
- * <Link {...remaining} {...elementProps} style={{ width: "100%" }}>
36
- * <span ref={nodeRef} className={cssUtils({ textOverflow: "ellipsis" })}>
37
- * {children}
38
- * </span>
39
- * <Tooltip {...tooltipProps}>
40
- * {children}
41
- * </Tooltip>
42
- * </Link>
43
- * );
44
- * }
45
- *
46
- * function Example(): ReactElement {
47
- * return (
48
- * <div style={{ width: "10rem", overflow: "auto" }}>
49
- * <NavigationLink href="/">Home</NavigationLink>
50
- * <NavigationLink href="/some-path">
51
- * Super long text that will be truncated with ellipsis and
52
- * have a tooltip appear
53
- * </NavigationLink>
54
- * </div>
55
- * );
56
- * }
57
- * ```
58
- *
59
- * @remarks \@since 6.0.0
60
- */
61
- export declare function useOverflowTooltip(options?: OverflowTooltipOptions): OverflowTooltipImplementation;