Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: minor optimization regarding core dependencies #702

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/with-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"webpack-cli": "5.1.4",
"webpack-config-utils": "2.3.1",
"webpack-dev-server": "5.1.0",
"webpack": "5.94.0"
"webpack": "5.95.0"
}
}
9 changes: 2 additions & 7 deletions packages/ui-private/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"build:check": "tsc",
"build:js": "vite build",
Expand Down Expand Up @@ -44,10 +42,7 @@
},
"dependencies": {
"@floating-ui/react": "0.26.24",
"@versini/ui-hooks": "workspace:../ui-hooks",
"clsx": "2.1.1"
},
"sideEffects": [
"**/*.css"
]
"sideEffects": ["**/*.css"]
}
6 changes: 3 additions & 3 deletions packages/ui-private/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
FloatingPortal,
useMergeRefs,
} from "@floating-ui/react";
import { useUniqueId } from "@versini/ui-hooks";
import clsx from "clsx";
import { useId } from "react";
import * as React from "react";

import { ModalContext } from "./ModalContext";
Expand Down Expand Up @@ -68,7 +68,7 @@ export const ModalHeading = React.forwardRef<
React.HTMLProps<HTMLHeadingElement>
>(function ModalHeading({ children, ...props }, ref) {
const { setLabelId } = useModalContext();
const id = useUniqueId();
const id = useId();

// Only sets `aria-labelledby` on the Modal root element
// if this component is mounted inside it.
Expand All @@ -89,7 +89,7 @@ export const ModalDescription = React.forwardRef<
React.HTMLProps<HTMLParagraphElement>
>(function ModalDescription({ children, ...props }, ref) {
const { setDescriptionId } = useModalContext();
const id = useUniqueId();
const id = useId();

// Only sets `aria-describedby` on the Modal root element
// if this component is mounted inside it.
Expand Down
9 changes: 2 additions & 7 deletions packages/ui-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"build:check": "tsc",
"build:js": "vite build",
Expand All @@ -42,7 +40,6 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@versini/ui-button": "workspace:../ui-button",
"@versini/ui-styles": "workspace:../ui-styles",
"react": "18.3.1",
"react-dom": "18.3.1"
Expand All @@ -52,7 +49,5 @@
"clsx": "2.1.1",
"tailwindcss": "3.4.13"
},
"sideEffects": [
"**/*.css"
]
"sideEffects": ["**/*.css"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render } from "@testing-library/react";
import { Button } from "@versini/ui-button";

import { Flexgrid, FlexgridItem } from "../..";
import {
Expand All @@ -15,7 +14,7 @@ describe("FlexgridItem (exceptions)", () => {
it("should render default content even without a Flexgrid parent", () => {
const { getByTestId } = render(
<FlexgridItem data-testid="gridcell-1">
<Button>item 1</Button>
<button>item 1</button>
</FlexgridItem>,
);
const gridCellRoot = getByTestId("gridcell-1");
Expand All @@ -33,7 +32,7 @@ describe("FlexgridItem default rules", () => {
const { getByTestId } = render(
<Flexgrid>
<FlexgridItem data-testid="gridcell-1">
<Button>item 1</Button>
<button>item 1</button>
</FlexgridItem>
</Flexgrid>,
);
Expand All @@ -51,7 +50,7 @@ describe("FlexgridItem props", () => {
const { getByTestId } = render(
<Flexgrid>
<FlexgridItem data-testid="gridcell-1" span={4}>
<Button>item 1</Button>
<button>item 1</button>
</FlexgridItem>
</Flexgrid>,
);
Expand All @@ -67,7 +66,7 @@ describe("FlexgridItem props", () => {
const { getByTestId } = render(
<Flexgrid>
<FlexgridItem data-testid="gridcell-1" span="auto">
<Button>item 1</Button>
<button>item 1</button>
</FlexgridItem>
</Flexgrid>,
);
Expand Down Expand Up @@ -107,7 +106,7 @@ describe("FlexgridItem props", () => {
const { getByTestId } = render(
<Flexgrid>
<FlexgridItem data-testid="gridcell-1" span={{ [breakpoint]: span }}>
<Button>item 1</Button>
<button>item 1</button>
</FlexgridItem>
</Flexgrid>,
);
Expand Down
Loading
Loading