@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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +8 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/DefaultToastRenderer.tsx.html +166 -112
- package/coverage/lcov-report/Snackbar.tsx.html +360 -402
- package/coverage/lcov-report/Toast.tsx.html +868 -0
- package/coverage/lcov-report/ToastManager.tsx.html +1783 -0
- package/coverage/lcov-report/ToastManagerProvider.tsx.html +216 -216
- package/coverage/lcov-report/icon/FontIcon.tsx.html +28 -28
- package/coverage/lcov-report/icon/index.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/snackbar/Snackbar.tsx.html +55 -97
- package/coverage/lcov-report/snackbar/Toast.tsx.html +546 -501
- package/coverage/lcov-report/snackbar/ToastManager.tsx.html +269 -269
- package/coverage/lcov-report/snackbar/ToastManagerProvider.tsx.html +23 -23
- package/coverage/lcov-report/snackbar/index.html +59 -14
- package/coverage/lcov-report/snackbar/snackbarStyles.ts.html +12 -87
- package/coverage/lcov-report/snackbar/toastStyles.ts.html +206 -146
- package/coverage/lcov-report/snackbar/useCurrentToastActions.ts.html +226 -0
- package/coverage/lcov-report/snackbarStyles.ts.html +46 -121
- package/coverage/lcov-report/transition/config.ts.html +5 -5
- package/coverage/lcov-report/transition/index.html +1 -1
- package/coverage/lcov-report/typography/Typography.tsx.html +108 -402
- package/coverage/lcov-report/typography/index.html +10 -10
- package/dist/_core.scss +34 -1
- package/dist/_utils.scss +57 -0
- package/dist/app-bar/_app-bar.scss +15 -23
- package/dist/avatar/_avatar.scss +25 -34
- package/dist/badge/_badge.scss +71 -44
- package/dist/box/_box.scss +18 -29
- package/dist/button/_button.scss +50 -62
- package/dist/card/_card.scss +14 -23
- package/dist/chip/_chip.scss +33 -46
- package/dist/dialog/_dialog.scss +95 -93
- package/dist/divider/Divider.d.ts +0 -1
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/_divider.scss +33 -43
- package/dist/form/Label.d.ts +5 -5
- package/dist/form/Label.js.map +1 -1
- package/dist/form/TextArea.js +1 -1
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextFieldContainerStyles.d.ts +7 -7
- package/dist/form/TextFieldContainerStyles.js.map +1 -1
- package/dist/form/_form.scss +200 -203
- package/dist/form/textAreaStyles.d.ts +2 -2
- package/dist/form/textAreaStyles.js.map +1 -1
- package/dist/form/types.d.ts +0 -2
- package/dist/form/types.js.map +1 -1
- package/dist/icon/_icon.scss +31 -47
- package/dist/interaction/_interaction.scss +47 -57
- package/dist/layout/_layout.scss +14 -19
- package/dist/link/_link.scss +15 -23
- package/dist/list/_list.scss +53 -63
- package/dist/menu/_menu.scss +16 -27
- package/dist/overlay/_overlay.scss +14 -19
- package/dist/progress/_progress.scss +25 -30
- package/dist/segmented-button/_segmented-button.scss +32 -43
- package/dist/sheet/_sheet.scss +24 -42
- package/dist/snackbar/DefaultToastRenderer.js +1 -1
- package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
- package/dist/snackbar/Snackbar.d.ts +1 -3
- package/dist/snackbar/Snackbar.js +2 -3
- package/dist/snackbar/Snackbar.js.map +1 -1
- package/dist/snackbar/Toast.d.ts +1 -1
- package/dist/snackbar/Toast.js +5 -1
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastManager.d.ts +2 -1
- package/dist/snackbar/ToastManager.js +1 -1
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/_snackbar.scss +15 -23
- package/dist/table/_table.scss +55 -70
- package/dist/tabs/_tabs.scss +25 -30
- package/dist/theme/_theme.scss +31 -89
- package/dist/tooltip/_tooltip.scss +16 -25
- package/dist/transition/_transition.scss +38 -37
- package/dist/tree/_tree.scss +102 -109
- package/dist/typography/_typography.scss +17 -22
- package/dist/window-splitter/_window-splitter.scss +19 -45
- package/package.json +1 -1
- package/src/_core.scss +34 -1
- package/src/_utils.scss +57 -0
- package/src/app-bar/_app-bar.scss +15 -23
- package/src/avatar/_avatar.scss +25 -34
- package/src/badge/_badge.scss +71 -44
- package/src/box/_box.scss +18 -29
- package/src/button/_button.scss +50 -62
- package/src/card/_card.scss +14 -23
- package/src/chip/_chip.scss +33 -46
- package/src/dialog/_dialog.scss +95 -93
- package/src/divider/Divider.tsx +0 -1
- package/src/divider/_divider.scss +33 -43
- package/src/form/Label.tsx +5 -5
- package/src/form/TextArea.tsx +1 -1
- package/src/form/TextFieldContainerStyles.ts +7 -7
- package/src/form/_form.scss +200 -203
- package/src/form/textAreaStyles.ts +2 -2
- package/src/form/types.ts +0 -2
- package/src/icon/_icon.scss +31 -47
- package/src/interaction/_interaction.scss +47 -57
- package/src/layout/_layout.scss +14 -19
- package/src/link/_link.scss +15 -23
- package/src/list/_list.scss +53 -63
- package/src/menu/_menu.scss +16 -27
- package/src/overlay/_overlay.scss +14 -19
- package/src/progress/_progress.scss +25 -30
- package/src/segmented-button/_segmented-button.scss +32 -43
- package/src/sheet/_sheet.scss +24 -42
- package/src/snackbar/DefaultToastRenderer.tsx +1 -1
- package/src/snackbar/Snackbar.tsx +17 -25
- package/src/snackbar/Toast.tsx +7 -2
- package/src/snackbar/ToastManager.tsx +3 -2
- package/src/snackbar/__tests__/Snackbar.tsx +12 -11
- package/src/snackbar/__tests__/ToastManagerProvider.tsx +20 -42
- package/src/snackbar/__tests__/__snapshots__/Snackbar.tsx.snap +127 -27
- package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +23 -8
- package/src/snackbar/_snackbar.scss +15 -23
- package/src/table/_table.scss +55 -70
- package/src/tabs/_tabs.scss +25 -30
- package/src/theme/_theme.scss +31 -89
- package/src/tooltip/_tooltip.scss +16 -25
- package/src/transition/_transition.scss +38 -37
- package/src/tree/_tree.scss +102 -109
- package/src/typography/_typography.scss +17 -22
- package/src/window-splitter/_window-splitter.scss +19 -45
- package/.turbo/turbo-lint.log +0 -12
- package/.turbo/turbo-test.log +0 -166
- package/.turbo/turbo-typecheck.log +0 -4
- package/dist/divider/VerticalDivider.d.ts +0 -32
- package/dist/divider/useVerticalDividerHeight.d.ts +0 -37
- package/dist/icon/MaterialIconsProvider.d.ts +0 -12
- package/dist/icon/MaterialIconsProvider.js +0 -17
- package/dist/icon/MaterialIconsProvider.js.map +0 -1
- package/dist/icon/MaterialSymbolsProvider.d.ts +0 -145
- package/dist/icon/MaterialSymbolsProvider.js +0 -60
- package/dist/icon/MaterialSymbolsProvider.js.map +0 -1
- package/dist/link/LinkProvider.d.ts +0 -29
- package/dist/menu/menuConfig.d.ts +0 -60
- package/dist/tooltip/useOverflowTooltip.d.ts +0 -61
|
@@ -9,43 +9,17 @@ $disable-vertical: false !default;
|
|
|
9
9
|
$disable-reversed: false !default;
|
|
10
10
|
$disable-absolute-position: false !default;
|
|
11
11
|
|
|
12
|
-
$
|
|
13
|
-
$
|
|
14
|
-
$
|
|
15
|
-
$
|
|
16
|
-
|
|
17
|
-
$var-lookup: (
|
|
18
|
-
top: (
|
|
19
|
-
var: --rmd-window-splitter-top,
|
|
20
|
-
value: 0,
|
|
21
|
-
),
|
|
22
|
-
right: (
|
|
23
|
-
var: --rmd-window-splitter-right,
|
|
24
|
-
value: 0,
|
|
25
|
-
),
|
|
26
|
-
bottom: (
|
|
27
|
-
var: --rmd-window-splitter-bottom,
|
|
28
|
-
value: 0,
|
|
29
|
-
),
|
|
30
|
-
left: (
|
|
31
|
-
var: --rmd-window-splitter-left,
|
|
32
|
-
value: 0,
|
|
33
|
-
),
|
|
34
|
-
opacity: (
|
|
35
|
-
var: --rmd-window-splitter-opacity,
|
|
36
|
-
value: 0,
|
|
37
|
-
),
|
|
38
|
-
position: (
|
|
39
|
-
var: --rmd-window-splitter-position,
|
|
40
|
-
value: 0,
|
|
41
|
-
),
|
|
42
|
-
);
|
|
12
|
+
$size: 1rem !default;
|
|
13
|
+
$background-size: 0.25rem !default;
|
|
14
|
+
$background-color: interaction.get-var(focus-color) !default;
|
|
15
|
+
$z-index: 30 !default;
|
|
43
16
|
|
|
44
|
-
|
|
45
|
-
$found: utils.validate($var-lookup, $name, "window-splitter var");
|
|
46
|
-
$var: map.get($found, var);
|
|
47
|
-
$value: if($fallback, $fallback, map.get($found, value));
|
|
17
|
+
$variables: (top, right, bottom, left, opacity, position);
|
|
48
18
|
|
|
19
|
+
@function get-var($name, $fallback: null) {
|
|
20
|
+
$var: utils.get-var-name($variables, $name, "window-splitter");
|
|
21
|
+
// window-splitter variables don't make much sense to set globally
|
|
22
|
+
$value: if($fallback, $fallback, 0);
|
|
49
23
|
@if $value {
|
|
50
24
|
@return var(#{$var}, #{$value});
|
|
51
25
|
}
|
|
@@ -54,9 +28,9 @@ $var-lookup: (
|
|
|
54
28
|
}
|
|
55
29
|
|
|
56
30
|
@mixin set-var($name, $value) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
31
|
+
@if $value {
|
|
32
|
+
#{utils.get-var-name($variables, $name, "window-splitter")}: #{$value};
|
|
33
|
+
}
|
|
60
34
|
}
|
|
61
35
|
|
|
62
36
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
@@ -74,10 +48,10 @@ $var-lookup: (
|
|
|
74
48
|
padding: 0;
|
|
75
49
|
position: fixed;
|
|
76
50
|
transition: opacity transition.$linear-duration;
|
|
77
|
-
z-index: $
|
|
51
|
+
z-index: $z-index;
|
|
78
52
|
|
|
79
53
|
&::after {
|
|
80
|
-
background-color: $
|
|
54
|
+
background-color: $background-color;
|
|
81
55
|
content: "";
|
|
82
56
|
inset: 0;
|
|
83
57
|
position: absolute;
|
|
@@ -106,10 +80,10 @@ $var-lookup: (
|
|
|
106
80
|
@include use-var(top);
|
|
107
81
|
|
|
108
82
|
cursor: col-resize;
|
|
109
|
-
width: $
|
|
83
|
+
width: $size;
|
|
110
84
|
|
|
111
85
|
&::after {
|
|
112
|
-
width: $
|
|
86
|
+
width: $background-size;
|
|
113
87
|
}
|
|
114
88
|
}
|
|
115
89
|
|
|
@@ -133,11 +107,11 @@ $var-lookup: (
|
|
|
133
107
|
@include use-var(top, position);
|
|
134
108
|
|
|
135
109
|
cursor: row-resize;
|
|
136
|
-
height: $
|
|
110
|
+
height: $size;
|
|
137
111
|
width: 100%;
|
|
138
112
|
|
|
139
113
|
&::after {
|
|
140
|
-
height: $
|
|
114
|
+
height: $background-size;
|
|
141
115
|
}
|
|
142
116
|
}
|
|
143
117
|
|
|
@@ -148,7 +122,7 @@ $var-lookup: (
|
|
|
148
122
|
top: auto;
|
|
149
123
|
|
|
150
124
|
&::after {
|
|
151
|
-
top: calc(100% - $
|
|
125
|
+
top: calc(100% - $background-size);
|
|
152
126
|
}
|
|
153
127
|
}
|
|
154
128
|
}
|
package/.turbo/turbo-lint.log
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @react-md/core@1.0.0-next.0 lint /home/mlaursen/code/react-md/packages/core
|
|
3
|
-
> npm-run-all lint-scripts lint-styles
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
> @react-md/core@1.0.0-next.0 lint-scripts /home/mlaursen/code/react-md/packages/core
|
|
7
|
-
> eslint "src/**/*.{ts,tsx,js,jsx,cjs,mjs}"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> @react-md/core@1.0.0-next.0 lint-styles /home/mlaursen/code/react-md/packages/core
|
|
11
|
-
> stylelint "src/**/*.{css,scss}"
|
|
12
|
-
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @react-md/core@1.0.0-next.0 test /home/mlaursen/code/react-md/packages/core
|
|
3
|
-
> NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 jest
|
|
4
|
-
|
|
5
|
-
PASS src/layout/__tests__/useLayoutTree.tsx
|
|
6
|
-
PASS src/overlay/__tests__/Overlay.tsx
|
|
7
|
-
PASS src/tabs/__tests__/TabList.tsx
|
|
8
|
-
PASS src/__tests__/useThrottledFunction.tsx
|
|
9
|
-
PASS src/expansion-panel/__tests__/ExpansionPanel.tsx
|
|
10
|
-
PASS src/dialog/__tests__/Dialog.tsx
|
|
11
|
-
PASS src/focus/__tests__/useFocusContainer.tsx
|
|
12
|
-
PASS src/layout/__tests__/useResizableLayout.tsx
|
|
13
|
-
PASS src/form/__tests__/Switch.tsx
|
|
14
|
-
PASS src/tabs/__tests__/useTabs.tsx
|
|
15
|
-
PASS src/snackbar/__tests__/ToastManagerProvider.tsx
|
|
16
|
-
PASS src/form/__tests__/useCheckboxGroup.tsx
|
|
17
|
-
PASS src/form/__tests__/useFileUpload.tsx
|
|
18
|
-
PASS src/form/__tests__/useRadioGroup.tsx
|
|
19
|
-
PASS src/layout/__tests__/useExpandableLayout.tsx
|
|
20
|
-
PASS src/utils/__tests__/wait.ts
|
|
21
|
-
PASS src/table/__tests__/TableRadio.tsx
|
|
22
|
-
PASS src/layout/__tests__/useTemporaryLayout.tsx
|
|
23
|
-
PASS src/__tests__/useDebouncedFunction.tsx
|
|
24
|
-
PASS src/table/__tests__/TableCheckbox.tsx
|
|
25
|
-
PASS src/table/__tests__/Table.tsx
|
|
26
|
-
PASS src/table/__tests__/TableRow.tsx
|
|
27
|
-
PASS src/draggable/__tests__/useDraggable.tsx
|
|
28
|
-
PASS src/list/__tests__/ListItem.tsx
|
|
29
|
-
PASS src/table/__tests__/TableBody.tsx
|
|
30
|
-
PASS src/transition/__tests__/useCrossFadeTransition.tsx
|
|
31
|
-
PASS src/chip/__tests__/Chip.tsx
|
|
32
|
-
PASS src/button/__tests__/AsyncButton.tsx
|
|
33
|
-
PASS src/layout/__tests__/LayoutAppBar.tsx
|
|
34
|
-
PASS src/menu/__tests__/MenuBar.tsx (5.644 s)
|
|
35
|
-
PASS src/snackbar/__tests__/ToastCloseButton.tsx
|
|
36
|
-
PASS src/transition/__tests__/useTransition.tsx
|
|
37
|
-
PASS src/snackbar/__tests__/Snackbar.tsx
|
|
38
|
-
PASS src/icon/__tests__/TextIconSpacing.tsx
|
|
39
|
-
PASS src/transition/__tests__/useCollapseTransition.tsx
|
|
40
|
-
PASS src/tree/__tests__/Tree.tsx (5.729 s)
|
|
41
|
-
PASS src/__tests__/useLocalStorage.tsx
|
|
42
|
-
PASS src/tree/__tests__/TreeGroup.tsx
|
|
43
|
-
PASS src/__tests__/useOrientation.node.tsx
|
|
44
|
-
PASS src/positioning/__tests__/useFixedPositioning.tsx
|
|
45
|
-
PASS src/card/__tests__/CardTitle.tsx
|
|
46
|
-
PASS src/media-queries/__tests__/useMediaQuery.node.tsx
|
|
47
|
-
PASS src/form/__tests__/FileInput.tsx
|
|
48
|
-
PASS src/menu/__tests__/DropdownMenu.tsx (6.189 s)
|
|
49
|
-
PASS src/tooltip/__tests__/TooltipHoverModeProvider.tsx (6.154 s)
|
|
50
|
-
PASS src/transition/__tests__/useCSSTransition.tsx
|
|
51
|
-
PASS src/portal/__tests__/PortalContainerProvider.node.tsx
|
|
52
|
-
PASS src/button/__tests__/Button.tsx
|
|
53
|
-
PASS src/snackbar/__tests__/ToastActionButton.tsx
|
|
54
|
-
PASS src/__tests__/useToggle.tsx
|
|
55
|
-
PASS src/transition/__tests__/Collapse.tsx
|
|
56
|
-
PASS src/theme/__tests__/LocalStorageColorSchemeProvider.tsx
|
|
57
|
-
PASS src/__tests__/useEnsuredState.tsx
|
|
58
|
-
PASS src/__tests__/useAsyncAction.tsx
|
|
59
|
-
PASS src/utils/__tests__/parseCssLengthUnit.node.ts
|
|
60
|
-
PASS src/app-bar/__tests__/AppBar.tsx
|
|
61
|
-
PASS src/list/__tests__/ListSubheader.tsx
|
|
62
|
-
PASS src/icon/__tests__/MaterialSymbol.tsx
|
|
63
|
-
PASS src/theme/__tests__/useCSSVariables.tsx
|
|
64
|
-
PASS src/__tests__/useDropzone.tsx
|
|
65
|
-
PASS src/transition/__tests__/CrossFade.tsx
|
|
66
|
-
PASS src/card/__tests__/CardSubtitle.tsx
|
|
67
|
-
PASS src/tabs/__tests__/Tab.tsx
|
|
68
|
-
PASS src/segmented-button/__tests__/SegmentedButton.tsx
|
|
69
|
-
PASS src/transition/__tests__/ScaleTransition.tsx
|
|
70
|
-
PASS src/progress/__tests__/LinearProgress.tsx
|
|
71
|
-
PASS src/transition/__tests__/useMaxWidthTransition.tsx
|
|
72
|
-
PASS src/media-queries/__tests__/AppSizeProvider.tsx
|
|
73
|
-
PASS src/link/__tests__/SkipToMainContent.tsx
|
|
74
|
-
PASS src/snackbar/__tests__/ToastContent.tsx
|
|
75
|
-
PASS src/layout/__tests__/LayoutWindowSplitter.tsx
|
|
76
|
-
PASS src/icon/__tests__/FontIcon.tsx
|
|
77
|
-
PASS src/progress/__tests__/CircularProgress.tsx
|
|
78
|
-
PASS src/icon/__tests__/IconRotator.tsx
|
|
79
|
-
PASS src/interaction/__tests__/UserInteractionModeProvider.tsx
|
|
80
|
-
PASS src/dialog/__tests__/DialogFooter.tsx
|
|
81
|
-
PASS src/progress/__tests__/getProgressA11y.ts
|
|
82
|
-
PASS src/icon/__tests__/SVGIcon.tsx
|
|
83
|
-
PASS src/__tests__/NoSsr.node.tsx
|
|
84
|
-
PASS src/responsive-item/__tests__/ResponsiveItemContainer.tsx
|
|
85
|
-
PASS src/button/__tests__/ButtonUnstyled.tsx
|
|
86
|
-
PASS src/layout/__tests__/Main.tsx
|
|
87
|
-
PASS src/portal/__tests__/PortalContainerProvider.tsx
|
|
88
|
-
PASS src/__tests__/useResizeObserver.tsx
|
|
89
|
-
PASS src/theme/__tests__/ThemeProvider.tsx
|
|
90
|
-
PASS src/card/__tests__/Card.tsx
|
|
91
|
-
PASS src/chip/__tests__/styles.ts
|
|
92
|
-
PASS src/__tests__/useHtmlClassName.tsx
|
|
93
|
-
PASS src/form/__tests__/Label.tsx
|
|
94
|
-
PASS src/test-utils/__tests__/ResizeObserver.ts
|
|
95
|
-
PASS src/icon/__tests__/MaterialIcon.tsx
|
|
96
|
-
PASS src/list/__tests__/List.tsx
|
|
97
|
-
PASS src/typography/__tests__/Typography.tsx
|
|
98
|
-
PASS src/transition/__tests__/CSSTransition.tsx
|
|
99
|
-
PASS src/card/__tests__/CardFooter.tsx
|
|
100
|
-
PASS src/form/__tests__/Checkbox.tsx
|
|
101
|
-
PASS src/app-bar/__tests__/AppBarTitle.tsx
|
|
102
|
-
PASS src/typography/__tests__/WritingDirectionProvider.tsx
|
|
103
|
-
PASS src/snackbar/__tests__/Toast.tsx
|
|
104
|
-
PASS src/card/__tests__/CardHeader.tsx
|
|
105
|
-
PASS src/link/__tests__/Link.tsx
|
|
106
|
-
PASS src/avatar/__tests__/Avatar.tsx
|
|
107
|
-
PASS src/interaction/__tests__/useHigherContrastChildren.tsx
|
|
108
|
-
PASS src/menu/__tests__/MenuVisibilityProvider.tsx
|
|
109
|
-
PASS src/tooltip/__tests__/Tooltip.tsx (8.92 s)
|
|
110
|
-
PASS src/positioning/__tests__/utils.ts
|
|
111
|
-
PASS src/responsive-item/__tests__/ResponsiveItemOverlay.tsx
|
|
112
|
-
PASS src/transition/__tests__/useScaleTransition.tsx
|
|
113
|
-
PASS src/media-queries/__tests__/useMediaQuery.tsx
|
|
114
|
-
PASS src/list/__tests__/ListItemLink.tsx
|
|
115
|
-
PASS src/movement/__tests__/utils.ts
|
|
116
|
-
PASS src/form/__tests__/Radio.tsx
|
|
117
|
-
PASS src/tree/__tests__/TreeItemExpander.tsx
|
|
118
|
-
PASS src/form/__tests__/Legend.tsx
|
|
119
|
-
PASS src/theme/__tests__/useColorSchemeMetaTag.tsx
|
|
120
|
-
PASS src/layout/__tests__/LayoutNav.tsx
|
|
121
|
-
PASS src/utils/__tests__/filters.ts
|
|
122
|
-
PASS src/tree/__tests__/utils.ts
|
|
123
|
-
PASS src/badge/__tests__/Badge.tsx
|
|
124
|
-
PASS src/form/__tests__/utils.ts
|
|
125
|
-
PASS src/divider/__tests__/Divider.tsx
|
|
126
|
-
PASS src/utils/__tests__/bem.ts
|
|
127
|
-
PASS src/card/__tests__/CardContent.tsx
|
|
128
|
-
PASS src/table/__tests__/TableContainer.tsx
|
|
129
|
-
PASS src/dialog/__tests__/DialogContent.tsx
|
|
130
|
-
PASS src/typography/__tests__/SrOnly.tsx
|
|
131
|
-
PASS src/segmented-button/__tests__/SegmentedButtonContainer.tsx
|
|
132
|
-
PASS src/typography/__tests__/TextContainer.tsx
|
|
133
|
-
PASS src/utils/__tests__/nearest.ts
|
|
134
|
-
PASS src/form/__tests__/Fieldset.tsx
|
|
135
|
-
PASS src/utils/__tests__/RenderRecursively.tsx
|
|
136
|
-
PASS src/__tests__/NoSsr.tsx
|
|
137
|
-
PASS src/__tests__/useEnsuredId.tsx
|
|
138
|
-
PASS src/menu/__tests__/utils.ts
|
|
139
|
-
PASS src/positioning/__tests__/createVerticalPosition.ts
|
|
140
|
-
PASS src/__tests__/useOrientation.tsx
|
|
141
|
-
PASS src/utils/__tests__/applyRef.ts
|
|
142
|
-
PASS src/dialog/__tests__/DialogTitle.tsx
|
|
143
|
-
PASS src/icon/__tests__/styles.ts
|
|
144
|
-
PASS src/positioning/__tests__/createHorizontalPosition.ts
|
|
145
|
-
PASS src/utils/__tests__/parseCssLengthUnit.ts
|
|
146
|
-
PASS src/utils/__tests__/getPercentage.ts
|
|
147
|
-
PASS src/list/__tests__/getListItemHeight.ts
|
|
148
|
-
PASS src/theme/__tests__/utils.ts
|
|
149
|
-
PASS src/tooltip/__tests__/utils.ts
|
|
150
|
-
PASS src/movement/__tests__/findMatchIndex.ts
|
|
151
|
-
PASS src/responsive-item/__tests__/styles.ts
|
|
152
|
-
PASS src/card/__tests__/styles.ts
|
|
153
|
-
PASS src/dialog/__tests__/DialogHeader.tsx
|
|
154
|
-
PASS src/media-queries/__tests__/AppSizeProvider.node.tsx
|
|
155
|
-
PASS src/utils/__tests__/withinRange.ts
|
|
156
|
-
PASS src/utils/__tests__/loop.ts
|
|
157
|
-
PASS src/transition/__tests__/utils.ts
|
|
158
|
-
PASS src/button/__tests__/buttonStyles.ts
|
|
159
|
-
PASS src/typography/__tests__/WritingDirectionProvider.node.tsx
|
|
160
|
-
PASS src/utils/__tests__/getRangeSteps.ts
|
|
161
|
-
|
|
162
|
-
Test Suites: 156 passed, 156 total
|
|
163
|
-
Tests: 2 todo, 684 passed, 686 total
|
|
164
|
-
Snapshots: 788 passed, 788 total
|
|
165
|
-
Time: 12.138 s
|
|
166
|
-
Ran all test suites.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "react";
|
|
2
|
-
import { type VerticalDividerHookOptions } from "./useVerticalDividerHeight.js";
|
|
3
|
-
export interface VerticalDividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/**
|
|
5
|
-
* @see {@link VerticalDividerHookOptions.maxHeight}
|
|
6
|
-
* @defaultValue `1`
|
|
7
|
-
*/
|
|
8
|
-
maxHeight?: VerticalDividerHookOptions<HTMLDivElement>["maxHeight"];
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* **Client Component**
|
|
12
|
-
*
|
|
13
|
-
* This component is used to create a vertical divider based on a parent
|
|
14
|
-
* element's height. This is really only needed when the parent element **has no
|
|
15
|
-
* defined height**. If there is a defined height, this component is not worth
|
|
16
|
-
* much as the height can be computed in css as normal. This really just fixes
|
|
17
|
-
* the issue that the height would be set to `auto` (which computes to 0 most of
|
|
18
|
-
* the time) when it is not set on a parent element.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* Server Component Implementation
|
|
22
|
-
* ```tsx
|
|
23
|
-
* import type { ReactElement } from "react";
|
|
24
|
-
* import { Divider } from "@react-md/core";
|
|
25
|
-
*
|
|
26
|
-
* function Example(): ReactElement {
|
|
27
|
-
* // or use a custom className
|
|
28
|
-
* return <Divider vertical style={{ height: "80%" }} />;
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export declare const VerticalDivider: import("react").ForwardRefExoticComponent<VerticalDividerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, Ref, RefCallback } from "react";
|
|
2
|
-
/** @remarks \@since 5.0.0 */
|
|
3
|
-
export interface VerticalDividerHookOptions<E extends HTMLElement> {
|
|
4
|
-
/**
|
|
5
|
-
* An optional ref to merge with the returned ref.
|
|
6
|
-
*/
|
|
7
|
-
ref?: Ref<E>;
|
|
8
|
-
/**
|
|
9
|
-
* An optional style object to merge with the divider's height style.
|
|
10
|
-
*/
|
|
11
|
-
style?: CSSProperties;
|
|
12
|
-
/**
|
|
13
|
-
* The max height for the vertical divider. When this is `<= 0`, the hook will
|
|
14
|
-
* be disabled.
|
|
15
|
-
*
|
|
16
|
-
* When the value is between 0 and 1, it will be used as a multiplier with the
|
|
17
|
-
* parent element's height. When the value is greater than 1, it will be used
|
|
18
|
-
* in `Math.min(parentElementHeight, maxHeight)`.
|
|
19
|
-
*/
|
|
20
|
-
maxHeight: number;
|
|
21
|
-
}
|
|
22
|
-
/** @remarks \@since 5.0.0 */
|
|
23
|
-
export interface VerticalDividerHeight<E extends HTMLElement> {
|
|
24
|
-
ref: RefCallback<E>;
|
|
25
|
-
style: CSSProperties | undefined;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* This is a small hook that is used to automatically create a vertical divider
|
|
29
|
-
* based on the computed height of its parent element.
|
|
30
|
-
*
|
|
31
|
-
* @internal
|
|
32
|
-
* @remarks \@since 5.0.0 The hook accepts an object instead of using multiple
|
|
33
|
-
* params and uses a generic for the HTMLElement type.
|
|
34
|
-
* @remarks \@since 6.0.0 Updated to be internal only since it doesn't make much
|
|
35
|
-
* sense to be a public API.
|
|
36
|
-
*/
|
|
37
|
-
export declare function useVerticalDividerHeight<E extends HTMLElement>(options: VerticalDividerHookOptions<E>): VerticalDividerHeight<E>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { MaterialIconFamily } from "./material.js";
|
|
3
|
-
/**
|
|
4
|
-
* **Client Component**
|
|
5
|
-
*
|
|
6
|
-
* @remarks \@since 6.0.0
|
|
7
|
-
*/
|
|
8
|
-
export declare const MaterialIconsProvider: import("react").Provider<MaterialIconFamily>;
|
|
9
|
-
/**
|
|
10
|
-
* @remarks \@since 6.0.0
|
|
11
|
-
*/
|
|
12
|
-
export declare function useMaterialIconsFamily(override?: MaterialIconFamily): MaterialIconFamily;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { createContext, useContext } from "react";
|
|
3
|
-
const context = createContext("filled");
|
|
4
|
-
context.displayName = "MaterialIcons";
|
|
5
|
-
/**
|
|
6
|
-
* **Client Component**
|
|
7
|
-
*
|
|
8
|
-
* @remarks \@since 6.0.0
|
|
9
|
-
*/ export const { Provider: MaterialIconsProvider } = context;
|
|
10
|
-
/**
|
|
11
|
-
* @remarks \@since 6.0.0
|
|
12
|
-
*/ export function useMaterialIconsFamily(override) {
|
|
13
|
-
const value = useContext(context);
|
|
14
|
-
return override || value;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=MaterialIconsProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/icon/MaterialIconsProvider.ts"],"sourcesContent":["\"use client\";\nimport { createContext, useContext } from \"react\";\nimport type { MaterialIconFamily } from \"./material.js\";\n\nconst context = createContext<MaterialIconFamily>(\"filled\");\ncontext.displayName = \"MaterialIcons\";\n\n/**\n * **Client Component**\n *\n * @remarks \\@since 6.0.0\n */\nexport const { Provider: MaterialIconsProvider } = context;\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function useMaterialIconsFamily(\n override?: MaterialIconFamily\n): MaterialIconFamily {\n const value = useContext(context);\n return override || value;\n}\n"],"names":["createContext","useContext","context","displayName","Provider","MaterialIconsProvider","useMaterialIconsFamily","override","value"],"mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAGlD,MAAMC,UAAUF,cAAkC;AAClDE,QAAQC,WAAW,GAAG;AAEtB;;;;CAIC,GACD,OAAO,MAAM,EAAEC,UAAUC,qBAAqB,EAAE,GAAGH,QAAQ;AAE3D;;CAEC,GACD,OAAO,SAASI,uBACdC,QAA6B;IAE7B,MAAMC,QAAQP,WAAWC;IACzB,OAAOK,YAAYC;AACrB"}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { type CSSProperties, type ReactElement, type ReactNode } from "react";
|
|
2
|
-
import { type MaterialSymbolFamily } from "./material.js";
|
|
3
|
-
/**
|
|
4
|
-
* Fill gives you the ability to modify the default icon style. A single icon
|
|
5
|
-
* can render both unfilled and filled states.
|
|
6
|
-
*
|
|
7
|
-
* To convey a state transition, use the fill axis for animation or
|
|
8
|
-
* interaction. The values are 0 for default or 1 for completely filled. Along
|
|
9
|
-
* with the weight axis, the fill also impacts the look of the icon.
|
|
10
|
-
*
|
|
11
|
-
* @remarks \@since 6.0.0
|
|
12
|
-
*/
|
|
13
|
-
export type MaterialSymbolFill = 0 | 1;
|
|
14
|
-
/**
|
|
15
|
-
* Weight defines the symbol’s stroke weight, with a range of weights between
|
|
16
|
-
* thin (100) and bold (700). Weight can also affect the overall size of the
|
|
17
|
-
* symbol.
|
|
18
|
-
*
|
|
19
|
-
* @remarks \@since 6.0.0
|
|
20
|
-
*/
|
|
21
|
-
export type MaterialSymbolWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;
|
|
22
|
-
/**
|
|
23
|
-
* Weight and grade affect a symbol’s thickness. Adjustments to grade are more
|
|
24
|
-
* granular than adjustments to weight and have a small impact on the size of
|
|
25
|
-
* the symbol.
|
|
26
|
-
*
|
|
27
|
-
* Grade is also available in some text fonts. You can match grade levels
|
|
28
|
-
* between text and symbols for a harmonious visual effect. For example, if
|
|
29
|
-
* the text font has a -25 grade value, the symbols can match it with a
|
|
30
|
-
* suitable value, say -25.
|
|
31
|
-
*
|
|
32
|
-
* You can use grade for different needs:
|
|
33
|
-
*
|
|
34
|
-
* - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a
|
|
35
|
-
* dark background, use a low grade.
|
|
36
|
-
* - High emphasis (e.g. 200 grade): To highlight a symbol, increase the
|
|
37
|
-
* positive grade.
|
|
38
|
-
*
|
|
39
|
-
* @remarks \@since 6.0.0
|
|
40
|
-
*/
|
|
41
|
-
export type MaterialSymbolGrade = -25 | 0 | 200;
|
|
42
|
-
/**
|
|
43
|
-
* Optical Sizes range from 20dp to 48dp.
|
|
44
|
-
*
|
|
45
|
-
* For the image to look the same at different sizes, the stroke weight
|
|
46
|
-
* (thickness) changes as the icon size scales. Optical Size offers a way to
|
|
47
|
-
* automatically adjust the stroke weight when you increase or decrease the
|
|
48
|
-
* symbol size.
|
|
49
|
-
*
|
|
50
|
-
* @remarks \@since 6.0.0
|
|
51
|
-
*/
|
|
52
|
-
export type MaterialSymbolOpticalSize = 20 | 24 | 40 | 48;
|
|
53
|
-
/**
|
|
54
|
-
* The comments for each customizable part was copied from
|
|
55
|
-
* https://fonts.google.com/icons?icon.set=Material+Symbols and clicking the
|
|
56
|
-
* info icon next to each property.
|
|
57
|
-
*
|
|
58
|
-
* @see https://fonts.google.com/icons?icon.set=Material+Symbols
|
|
59
|
-
* @remarks \@since 6.0.0
|
|
60
|
-
*/
|
|
61
|
-
export interface MaterialSymbolCustomization {
|
|
62
|
-
/**
|
|
63
|
-
* Fill gives you the ability to modify the default icon style. A single icon
|
|
64
|
-
* can render both unfilled and filled states.
|
|
65
|
-
*
|
|
66
|
-
* To convey a state transition, use the fill axis for animation or
|
|
67
|
-
* interaction. The values are 0 for default or 1 for completely filled. Along
|
|
68
|
-
* with the weight axis, the fill also impacts the look of the icon.
|
|
69
|
-
*
|
|
70
|
-
* @defaultValue `0`
|
|
71
|
-
*/
|
|
72
|
-
fill?: MaterialSymbolFill;
|
|
73
|
-
/**
|
|
74
|
-
* Weight defines the symbol’s stroke weight, with a range of weights between
|
|
75
|
-
* thin (100) and bold (700). Weight can also affect the overall size of the
|
|
76
|
-
* symbol.
|
|
77
|
-
*
|
|
78
|
-
* @defaultValue `400`
|
|
79
|
-
*/
|
|
80
|
-
weight?: MaterialSymbolWeight;
|
|
81
|
-
/**
|
|
82
|
-
* Weight and grade affect a symbol’s thickness. Adjustments to grade are more
|
|
83
|
-
* granular than adjustments to weight and have a small impact on the size of
|
|
84
|
-
* the symbol.
|
|
85
|
-
*
|
|
86
|
-
* Grade is also available in some text fonts. You can match grade levels
|
|
87
|
-
* between text and symbols for a harmonious visual effect. For example, if
|
|
88
|
-
* the text font has a -25 grade value, the symbols can match it with a
|
|
89
|
-
* suitable value, say -25.
|
|
90
|
-
*
|
|
91
|
-
* You can use grade for different needs:
|
|
92
|
-
*
|
|
93
|
-
* - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a
|
|
94
|
-
* dark background, use a low grade.
|
|
95
|
-
* - High emphasis (e.g. 200 grade): To highlight a symbol, increase the
|
|
96
|
-
* positive grade.
|
|
97
|
-
*
|
|
98
|
-
* @defaultValue `0`
|
|
99
|
-
*/
|
|
100
|
-
grade?: MaterialSymbolGrade;
|
|
101
|
-
/**
|
|
102
|
-
* Optical Sizes range from 20dp to 48dp.
|
|
103
|
-
*
|
|
104
|
-
* For the image to look the same at different sizes, the stroke weight
|
|
105
|
-
* (thickness) changes as the icon size scales. Optical Size offers a way to
|
|
106
|
-
* automatically adjust the stroke weight when you increase or decrease the
|
|
107
|
-
* symbol size.
|
|
108
|
-
*
|
|
109
|
-
* @defaultValue `48`
|
|
110
|
-
*/
|
|
111
|
-
opticalSize?: MaterialSymbolOpticalSize;
|
|
112
|
-
/**
|
|
113
|
-
* @defaultValue `"outlined"`
|
|
114
|
-
*/
|
|
115
|
-
family?: MaterialSymbolFamily;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* @remarks \@since 6.0.0
|
|
119
|
-
*/
|
|
120
|
-
export type MaterialSymbolConfiguration = Required<MaterialSymbolCustomization>;
|
|
121
|
-
/**
|
|
122
|
-
* @remarks \@since 6.0.0
|
|
123
|
-
*/
|
|
124
|
-
export declare function useMaterialSymbolConfiguration(): MaterialSymbolConfiguration;
|
|
125
|
-
/**
|
|
126
|
-
* @remarks \@since 6.0.0
|
|
127
|
-
*/
|
|
128
|
-
export declare function useFontVariationSettings(options: MaterialSymbolCustomization & {
|
|
129
|
-
style?: CSSProperties;
|
|
130
|
-
}): {
|
|
131
|
-
style?: CSSProperties;
|
|
132
|
-
family: MaterialSymbolFamily;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* @remarks \@since 6.0.0
|
|
136
|
-
*/
|
|
137
|
-
export interface MaterialSymbolsProviderProps extends MaterialSymbolCustomization {
|
|
138
|
-
children: ReactNode;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* **Client Component**
|
|
142
|
-
*
|
|
143
|
-
* @remarks \@since 6.0.0
|
|
144
|
-
*/
|
|
145
|
-
export declare function MaterialSymbolsProvider(props: MaterialSymbolsProviderProps): ReactElement;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useContext, useMemo } from "react";
|
|
4
|
-
const context = /*#__PURE__*/ createContext({
|
|
5
|
-
fill: 0,
|
|
6
|
-
weight: 400,
|
|
7
|
-
grade: 0,
|
|
8
|
-
opticalSize: 24,
|
|
9
|
-
family: "outlined"
|
|
10
|
-
});
|
|
11
|
-
context.displayName = "MaterialSymbol";
|
|
12
|
-
const { Provider } = context;
|
|
13
|
-
/**
|
|
14
|
-
* @remarks \@since 6.0.0
|
|
15
|
-
*/ export function useMaterialSymbolConfiguration() {
|
|
16
|
-
return useContext(context);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @remarks \@since 6.0.0
|
|
20
|
-
*/ export function useFontVariationSettings(options) {
|
|
21
|
-
const configuration = useMaterialSymbolConfiguration();
|
|
22
|
-
let { style } = options;
|
|
23
|
-
const { fill = configuration.fill, grade = configuration.grade, opticalSize = configuration.opticalSize, weight = configuration.weight, family = configuration.family } = options;
|
|
24
|
-
if (!style?.fontVariationSettings && (fill !== configuration.fill || grade !== configuration.grade || opticalSize !== configuration.opticalSize || weight !== configuration.weight)) {
|
|
25
|
-
style = {
|
|
26
|
-
...style,
|
|
27
|
-
fontVariationSettings: `"FILL" ${fill}, "wght" ${weight}, "GRAD" ${grade}, "opsz" ${opticalSize}`
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
family,
|
|
32
|
-
style
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* **Client Component**
|
|
37
|
-
*
|
|
38
|
-
* @remarks \@since 6.0.0
|
|
39
|
-
*/ export function MaterialSymbolsProvider(props) {
|
|
40
|
-
const { fill = 0, weight = 400, grade = 0, family: type = "outlined", opticalSize = 48, children } = props;
|
|
41
|
-
const value = useMemo(()=>({
|
|
42
|
-
fill,
|
|
43
|
-
weight,
|
|
44
|
-
grade,
|
|
45
|
-
family: type,
|
|
46
|
-
opticalSize
|
|
47
|
-
}), [
|
|
48
|
-
fill,
|
|
49
|
-
grade,
|
|
50
|
-
opticalSize,
|
|
51
|
-
type,
|
|
52
|
-
weight
|
|
53
|
-
]);
|
|
54
|
-
return /*#__PURE__*/ _jsx(Provider, {
|
|
55
|
-
value: value,
|
|
56
|
-
children: children
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
//# sourceMappingURL=MaterialSymbolsProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/icon/MaterialSymbolsProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useMemo,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { type MaterialSymbolFamily } from \"./material.js\";\n\n/**\n * Fill gives you the ability to modify the default icon style. A single icon\n * can render both unfilled and filled states.\n *\n * To convey a state transition, use the fill axis for animation or\n * interaction. The values are 0 for default or 1 for completely filled. Along\n * with the weight axis, the fill also impacts the look of the icon.\n *\n * @remarks \\@since 6.0.0\n */\nexport type MaterialSymbolFill = 0 | 1;\n\n/**\n * Weight defines the symbol’s stroke weight, with a range of weights between\n * thin (100) and bold (700). Weight can also affect the overall size of the\n * symbol.\n *\n * @remarks \\@since 6.0.0\n */\nexport type MaterialSymbolWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;\n\n/**\n * Weight and grade affect a symbol’s thickness. Adjustments to grade are more\n * granular than adjustments to weight and have a small impact on the size of\n * the symbol.\n *\n * Grade is also available in some text fonts. You can match grade levels\n * between text and symbols for a harmonious visual effect. For example, if\n * the text font has a -25 grade value, the symbols can match it with a\n * suitable value, say -25.\n *\n * You can use grade for different needs:\n *\n * - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a\n * dark background, use a low grade.\n * - High emphasis (e.g. 200 grade): To highlight a symbol, increase the\n * positive grade.\n *\n * @remarks \\@since 6.0.0\n */\nexport type MaterialSymbolGrade = -25 | 0 | 200;\n\n/**\n * Optical Sizes range from 20dp to 48dp.\n *\n * For the image to look the same at different sizes, the stroke weight\n * (thickness) changes as the icon size scales. Optical Size offers a way to\n * automatically adjust the stroke weight when you increase or decrease the\n * symbol size.\n *\n * @remarks \\@since 6.0.0\n */\nexport type MaterialSymbolOpticalSize = 20 | 24 | 40 | 48;\n\n/**\n * The comments for each customizable part was copied from\n * https://fonts.google.com/icons?icon.set=Material+Symbols and clicking the\n * info icon next to each property.\n *\n * @see https://fonts.google.com/icons?icon.set=Material+Symbols\n * @remarks \\@since 6.0.0\n */\nexport interface MaterialSymbolCustomization {\n /**\n * Fill gives you the ability to modify the default icon style. A single icon\n * can render both unfilled and filled states.\n *\n * To convey a state transition, use the fill axis for animation or\n * interaction. The values are 0 for default or 1 for completely filled. Along\n * with the weight axis, the fill also impacts the look of the icon.\n *\n * @defaultValue `0`\n */\n fill?: MaterialSymbolFill;\n\n /**\n * Weight defines the symbol’s stroke weight, with a range of weights between\n * thin (100) and bold (700). Weight can also affect the overall size of the\n * symbol.\n *\n * @defaultValue `400`\n */\n weight?: MaterialSymbolWeight;\n\n /**\n * Weight and grade affect a symbol’s thickness. Adjustments to grade are more\n * granular than adjustments to weight and have a small impact on the size of\n * the symbol.\n *\n * Grade is also available in some text fonts. You can match grade levels\n * between text and symbols for a harmonious visual effect. For example, if\n * the text font has a -25 grade value, the symbols can match it with a\n * suitable value, say -25.\n *\n * You can use grade for different needs:\n *\n * - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a\n * dark background, use a low grade.\n * - High emphasis (e.g. 200 grade): To highlight a symbol, increase the\n * positive grade.\n *\n * @defaultValue `0`\n */\n grade?: MaterialSymbolGrade;\n\n /**\n * Optical Sizes range from 20dp to 48dp.\n *\n * For the image to look the same at different sizes, the stroke weight\n * (thickness) changes as the icon size scales. Optical Size offers a way to\n * automatically adjust the stroke weight when you increase or decrease the\n * symbol size.\n *\n * @defaultValue `48`\n */\n opticalSize?: MaterialSymbolOpticalSize;\n\n /**\n * @defaultValue `\"outlined\"`\n */\n family?: MaterialSymbolFamily;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type MaterialSymbolConfiguration = Required<MaterialSymbolCustomization>;\n\nconst context = createContext<MaterialSymbolConfiguration>({\n fill: 0,\n weight: 400,\n grade: 0,\n opticalSize: 24,\n family: \"outlined\",\n});\ncontext.displayName = \"MaterialSymbol\";\nconst { Provider } = context;\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function useMaterialSymbolConfiguration(): MaterialSymbolConfiguration {\n return useContext(context);\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function useFontVariationSettings(\n options: MaterialSymbolCustomization & { style?: CSSProperties }\n): { style?: CSSProperties; family: MaterialSymbolFamily } {\n const configuration = useMaterialSymbolConfiguration();\n let { style } = options;\n const {\n fill = configuration.fill,\n grade = configuration.grade,\n opticalSize = configuration.opticalSize,\n weight = configuration.weight,\n family = configuration.family,\n } = options;\n if (\n !style?.fontVariationSettings &&\n (fill !== configuration.fill ||\n grade !== configuration.grade ||\n opticalSize !== configuration.opticalSize ||\n weight !== configuration.weight)\n ) {\n style = {\n ...style,\n fontVariationSettings: `\"FILL\" ${fill}, \"wght\" ${weight}, \"GRAD\" ${grade}, \"opsz\" ${opticalSize}`,\n };\n }\n\n return { family, style };\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MaterialSymbolsProviderProps\n extends MaterialSymbolCustomization {\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @remarks \\@since 6.0.0\n */\nexport function MaterialSymbolsProvider(\n props: MaterialSymbolsProviderProps\n): ReactElement {\n const {\n fill = 0,\n weight = 400,\n grade = 0,\n family: type = \"outlined\",\n opticalSize = 48,\n children,\n } = props;\n const value = useMemo<MaterialSymbolConfiguration>(\n () => ({\n fill,\n weight,\n grade,\n family: type,\n opticalSize,\n }),\n [fill, grade, opticalSize, type, weight]\n );\n\n return <Provider value={value}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useMemo","context","fill","weight","grade","opticalSize","family","displayName","Provider","useMaterialSymbolConfiguration","useFontVariationSettings","options","configuration","style","fontVariationSettings","MaterialSymbolsProvider","props","type","children","value"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,OAAO,QAIF,QAAQ;AAmIf,MAAMC,wBAAUH,cAA2C;IACzDI,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,aAAa;IACbC,QAAQ;AACV;AACAL,QAAQM,WAAW,GAAG;AACtB,MAAM,EAAEC,QAAQ,EAAE,GAAGP;AAErB;;CAEC,GACD,OAAO,SAASQ;IACd,OAAOV,WAAWE;AACpB;AAEA;;CAEC,GACD,OAAO,SAASS,yBACdC,OAAgE;IAEhE,MAAMC,gBAAgBH;IACtB,IAAI,EAAEI,KAAK,EAAE,GAAGF;IAChB,MAAM,EACJT,OAAOU,cAAcV,IAAI,EACzBE,QAAQQ,cAAcR,KAAK,EAC3BC,cAAcO,cAAcP,WAAW,EACvCF,SAASS,cAAcT,MAAM,EAC7BG,SAASM,cAAcN,MAAM,EAC9B,GAAGK;IACJ,IACE,CAACE,OAAOC,yBACPZ,CAAAA,SAASU,cAAcV,IAAI,IAC1BE,UAAUQ,cAAcR,KAAK,IAC7BC,gBAAgBO,cAAcP,WAAW,IACzCF,WAAWS,cAAcT,MAAM,AAAD,GAChC;QACAU,QAAQ;YACN,GAAGA,KAAK;YACRC,uBAAuB,CAAC,OAAO,EAAEZ,KAAK,SAAS,EAAEC,OAAO,SAAS,EAAEC,MAAM,SAAS,EAAEC,YAAY,CAAC;QACnG;IACF;IAEA,OAAO;QAAEC;QAAQO;IAAM;AACzB;AAUA;;;;CAIC,GACD,OAAO,SAASE,wBACdC,KAAmC;IAEnC,MAAM,EACJd,OAAO,CAAC,EACRC,SAAS,GAAG,EACZC,QAAQ,CAAC,EACTE,QAAQW,OAAO,UAAU,EACzBZ,cAAc,EAAE,EAChBa,QAAQ,EACT,GAAGF;IACJ,MAAMG,QAAQnB,QACZ,IAAO,CAAA;YACLE;YACAC;YACAC;YACAE,QAAQW;YACRZ;QACF,CAAA,GACA;QAACH;QAAME;QAAOC;QAAaY;QAAMd;KAAO;IAG1C,qBAAO,KAACK;QAASW,OAAOA;kBAAQD;;AAClC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type ForwardRefExoticComponent, type ReactElement, type ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* @remarks \@since 6.0.0
|
|
4
|
-
*/
|
|
5
|
-
export type CustomLinkComponent = ForwardRefExoticComponent<{
|
|
6
|
-
href: string;
|
|
7
|
-
}> | ForwardRefExoticComponent<{
|
|
8
|
-
to: string;
|
|
9
|
-
}> | "a";
|
|
10
|
-
/**
|
|
11
|
-
* @remarks \@since 6.0.0
|
|
12
|
-
*/
|
|
13
|
-
export declare function useLink(): CustomLinkComponent;
|
|
14
|
-
/**
|
|
15
|
-
* @remarks \@since 6.0.0
|
|
16
|
-
*/
|
|
17
|
-
export interface LinkProviderProps {
|
|
18
|
-
/**
|
|
19
|
-
* @defaultValue `useLink() ?? Link`
|
|
20
|
-
*/
|
|
21
|
-
value?: CustomLinkComponent;
|
|
22
|
-
children: ReactNode;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* **Client Component**
|
|
26
|
-
*
|
|
27
|
-
* @remarks \@since 6.0.0
|
|
28
|
-
*/
|
|
29
|
-
export declare function LinkProvider(props: LinkProviderProps): ReactElement;
|