@moderneinc/design-system-components 7.7.0 → 7.8.0-next.c8bbf3
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/README.md +21 -0
- package/dist/DataGrid/DataGrid.d.ts +2 -2
- package/dist/InputField/InputField.d.ts +3 -3
- package/dist/ModActionsCell/ModActionsCell.d.ts +2 -2
- package/dist/PageContent/PageContent.d.ts +7 -1
- package/dist/Tabs/Tabs.d.ts +3 -2
- package/dist/Toolbar/Toolbar.d.ts +7 -1
- package/dist/Tooltip/Tooltip.d.ts +2 -2
- package/dist/Tree/Tree.d.ts +11 -0
- package/dist/TypologyControl/TypologyControl.d.ts +1 -1
- package/dist/index.d.ts +55 -13
- package/dist/index.esm.js +814 -90
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +811 -85
- package/dist/index.js.map +1 -1
- package/dist/utils/OverflowActions.d.ts +14 -0
- package/dist/utils/responsive.d.ts +26 -0
- package/package.json +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
import { ModButton } from '../Button/Button';
|
|
3
|
+
export type ModAction = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
variant?: ComponentProps<typeof ModButton>['variant'];
|
|
10
|
+
};
|
|
11
|
+
/** Renders actions as a button row; below `md`, all but the first move into a "More actions" menu. */
|
|
12
|
+
export declare function OverflowActions({ actions }: {
|
|
13
|
+
actions?: ModAction[];
|
|
14
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CSSObject, Theme } from '@mui/material/styles';
|
|
2
|
+
export declare const TOUCH_TARGET: 44;
|
|
3
|
+
/** Fills the container with the margin box under either box-sizing; later values win where supported. */
|
|
4
|
+
export declare const FILL_AVAILABLE: string[];
|
|
5
|
+
/** True below `md`. Takes the desktop branch during SSR so the first desktop paint is unchanged. */
|
|
6
|
+
export declare function useIsCompact(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Grows a control's hit area to 44×44 below `md` without changing how it looks.
|
|
9
|
+
*
|
|
10
|
+
* The host must already be positioned (ButtonBase is) and must not use `pseudo` itself; pass
|
|
11
|
+
* `'before'` when `::after` is taken. Nesting the media query under the pseudo selector keeps
|
|
12
|
+
* this from overwriting a `down('md')` block on the host.
|
|
13
|
+
*/
|
|
14
|
+
export declare function touchTarget(theme: Theme, { pseudo }?: {
|
|
15
|
+
pseudo?: 'before' | 'after';
|
|
16
|
+
}): CSSObject;
|
|
17
|
+
/**
|
|
18
|
+
* Grows the hidden native `<input>` of a Checkbox, Radio or Switch to 44×44 below `md`.
|
|
19
|
+
*
|
|
20
|
+
* SwitchBase overlays an invisible input on the control and taps land on it; a pseudo-element on
|
|
21
|
+
* the wrapping span would hit-test as the span and not toggle. Spread into the input's styles.
|
|
22
|
+
* `heightOnly` keeps MUI's horizontal geometry (Switch already stretches its input over the track).
|
|
23
|
+
*/
|
|
24
|
+
export declare function inputTouchTarget(theme: Theme, { heightOnly }?: {
|
|
25
|
+
heightOnly?: boolean;
|
|
26
|
+
}): CSSObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moderneinc/design-system-components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0-next.c8bbf3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Styled MUI components for Moderne applications",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"url": "git+https://github.com/moderneinc/design-system.git"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@moderneinc/design-system-tokens": "
|
|
49
|
+
"@moderneinc/design-system-tokens": "7.8.0-next.c8bbf3",
|
|
50
50
|
"lucide-react": "1.64.0"
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false,
|