@stratakit/mui 0.2.1 → 0.3.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.
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Tooltip from "@mui/material/Tooltip";
3
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
4
+ import { MuiButtonBase } from "./MuiButtonBase.js";
5
+ const MuiIconButton = forwardRef((props, forwardedRef) => {
6
+ const {
7
+ label,
8
+ ...rest
9
+ } = props;
10
+ if (label) {
11
+ return /* @__PURE__ */ jsx(Tooltip, {
12
+ title: label,
13
+ describeChild: false,
14
+ children: /* @__PURE__ */ jsx(MuiButtonBase, {
15
+ ...rest,
16
+ ref: forwardedRef
17
+ })
18
+ });
19
+ }
20
+ return /* @__PURE__ */ jsx(MuiButtonBase, {
21
+ ...rest,
22
+ ref: forwardedRef
23
+ });
24
+ });
25
+ export {
26
+ MuiIconButton
27
+ };
@@ -0,0 +1,2 @@
1
+ declare const MuiSnackbar: import("react").ForwardRefExoticComponent<Pick<import("@ariakit/react/role").RoleProps, "render"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "render"> & import("react").RefAttributes<HTMLElement | HTMLDivElement>>;
2
+ export { MuiSnackbar };
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Portal } from "@ariakit/react/portal";
3
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
4
+ const MuiSnackbar = forwardRef((props, forwardedRef) => {
5
+ return /* @__PURE__ */ jsx(Portal, {
6
+ ...props,
7
+ ref: forwardedRef
8
+ });
9
+ });
10
+ export {
11
+ MuiSnackbar
12
+ };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ declare const MuiTableHead: React.ForwardRefExoticComponent<Pick<import("@ariakit/react/role").RoleProps, "render"> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref">, "render"> & React.RefAttributes<HTMLElement | HTMLTableSectionElement>>;
3
+ declare const MuiTableCell: React.ForwardRefExoticComponent<Pick<import("@ariakit/react/role").RoleProps, "render"> & Omit<Omit<React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref">, "render"> & React.RefAttributes<HTMLElement | HTMLTableDataCellElement>>;
4
+ export { MuiTableHead, MuiTableCell };
@@ -0,0 +1,28 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Role } from "@ariakit/react/role";
4
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
5
+ const MuiTableHeadContext = React.createContext(false);
6
+ const MuiTableHead = forwardRef((props, forwardedRef) => {
7
+ return /* @__PURE__ */ jsx(MuiTableHeadContext.Provider, {
8
+ value: true,
9
+ children: /* @__PURE__ */ jsx(Role, {
10
+ render: /* @__PURE__ */ jsx("thead", {}),
11
+ ...props,
12
+ ref: forwardedRef
13
+ })
14
+ });
15
+ });
16
+ const MuiTableCell = forwardRef((props, forwardedRef) => {
17
+ const inHeader = React.useContext(MuiTableHeadContext);
18
+ const Component = inHeader ? "th" : "td";
19
+ return /* @__PURE__ */ jsx(Role, {
20
+ render: /* @__PURE__ */ jsx(Component, {}),
21
+ ...props,
22
+ ref: forwardedRef
23
+ });
24
+ });
25
+ export {
26
+ MuiTableCell,
27
+ MuiTableHead
28
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stratakit/mui",
3
3
  "type": "module",
4
- "version": "0.2.1",
4
+ "version": "0.3.0",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "types": "./dist/index.d.ts",
@@ -26,10 +26,10 @@
26
26
  ],
27
27
  "description": "StrataKit theme for Material UI",
28
28
  "author": "Bentley Systems",
29
- "homepage": "https://github.com/iTwin/design-system",
29
+ "homepage": "https://github.com/iTwin/stratakit",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/iTwin/design-system.git",
32
+ "url": "https://github.com/iTwin/stratakit.git",
33
33
  "directory": "packages/mui"
34
34
  },
35
35
  "keywords": [
@@ -45,17 +45,21 @@
45
45
  "design system"
46
46
  ],
47
47
  "dependencies": {
48
- "@stratakit/foundations": "^0.4.6",
49
- "@stratakit/icons": "^0.3.0",
48
+ "@ariakit/react": "^0.4.21",
49
+ "@emotion/cache": "^11.14.0",
50
+ "@emotion/react": "^11.14.0",
51
+ "@emotion/styled": "^11.14.1",
52
+ "@stratakit/foundations": "^0.4.7",
53
+ "@stratakit/icons": "^0.3.1",
50
54
  "classnames": "^2.5.1",
51
55
  "react-compiler-runtime": "^1.0.0"
52
56
  },
53
57
  "devDependencies": {
54
- "@types/react": "^19.2.7",
58
+ "@types/react": "^19.2.14",
55
59
  "@types/react-dom": "^19.2.3",
56
- "esbuild": "^0.27.0",
57
- "react": "^19.2.3",
58
- "react-dom": "^19.2.3",
60
+ "esbuild": "^0.27.3",
61
+ "react": "^19.2.4",
62
+ "react-dom": "^19.2.4",
59
63
  "typescript": "~5.9.3"
60
64
  },
61
65
  "peerDependencies": {