Skip to content

Commit

Permalink
chore(packages): publish packages (#163)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and DuCanhGH committed Sep 18, 2024
1 parent f3766a5 commit 89db47a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 16 deletions.
9 changes: 0 additions & 9 deletions .changeset/olive-bobcats-clean.md

This file was deleted.

2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
Expand Down
25 changes: 21 additions & 4 deletions docs/src/components/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
import { clsx } from "@/utils/clsx";
import { type ReactElement, useId, useState } from "react";

export const Tabs = ({ titles, children }: { titles: string[]; children: ReactElement | ReactElement[] }) => {
export const Tabs = ({
titles,
children,
}: {
titles: string[];
children: ReactElement | ReactElement[];
}) => {
const [currentIndex, setCurrentIndex] = useState(0);
const id = useId();
const codes = Array.isArray(children) ? children : [children];
Expand All @@ -12,7 +18,12 @@ export const Tabs = ({ titles, children }: { titles: string[]; children: ReactEl
return (
<div className="my-3 flex w-full flex-col rounded-xl border border-neutral-300 bg-white dark:border-neutral-800 dark:bg-neutral-950">
<div className="relative w-full rounded-t-xl bg-white dark:bg-black">
<div role="tablist" aria-orientation="horizontal" className="flex w-full overflow-auto rounded-t-xl">
{/* biome-ignore lint/a11y/useSemanticElements: no semantic element for `tablist` afaik */}
<div
role="tablist"
aria-orientation="horizontal"
className="flex w-full overflow-auto rounded-t-xl"
>
{titles.map((tab, idx) => {
const isActive = idx === currentIndex;
return (
Expand All @@ -24,7 +35,9 @@ export const Tabs = ({ titles, children }: { titles: string[]; children: ReactEl
role="tab"
className={clsx(
"relative min-w-max border-r border-neutral-300 px-4 py-2 dark:border-neutral-800",
isActive ? "bg-white text-black dark:bg-neutral-950 dark:text-white" : "text-neutral-600 dark:text-neutral-400",
isActive
? "bg-white text-black dark:bg-neutral-950 dark:text-white"
: "text-neutral-600 dark:text-neutral-400"
)}
onClick={() => setCurrentIndex(idx)}
aria-controls={`${id}-${idx}-code`}
Expand All @@ -41,7 +54,10 @@ export const Tabs = ({ titles, children }: { titles: string[]; children: ReactEl
);
})}
</div>
<div className="pointer-events-none absolute bottom-0 left-0 z-[1] h-[1px] w-full bg-neutral-300 dark:bg-neutral-800" aria-hidden="true" />
<div
className="pointer-events-none absolute bottom-0 left-0 z-[1] h-[1px] w-full bg-neutral-300 dark:bg-neutral-800"
aria-hidden="true"
/>
</div>
<div className="margin-0 overflow-auto p-4">
{codes.map((code, idx) => {
Expand All @@ -51,6 +67,7 @@ export const Tabs = ({ titles, children }: { titles: string[]; children: ReactEl
// Key is stable
key={`code-${idx}`}
id={`${id}-${idx}-code`}
// biome-ignore lint/a11y/useSemanticElements: no semantic element for `tabpanel` afaik
role="tabpanel"
className={clsx("whitespace-normal", !isActive && "hidden")}
aria-labelledby={`${id}-${idx}-button`}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"format:write": "pnpm format --write",
"lint": "biome lint --max-diagnostics=100 --log-kind=compact .",
"lint:fix": "pnpm lint --apply",
"publish-packages": "pnpm typecheck && pnpm lint && pnpm build && changeset publish",
"publish-packages": "pnpm typecheck && pnpm build && changeset publish",
"test": "FORCE_COLOR=1 turbo run test --filter='./packages/*'",
"typecheck": "FORCE_COLOR=1 turbo run typecheck"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/next-pwa/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @ducanh2912/next-pwa

## 10.2.9

### Patch Changes

- [`f3766a5`](https://github.com/DuCanhGH/next-pwa/commit/f3766a53f924568a51480d0883dd4515994087f1) Thanks [@DuCanhGH](https://github.com/DuCanhGH)! - chore(deps): updated all dependencies

- Monthly dependencies maintenance

- Not so monthly this time...

## 10.2.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/next-pwa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ducanh2912/next-pwa",
"version": "10.2.8",
"version": "10.2.9",
"type": "module",
"private": false,
"description": "PWA for Next.js, powered by Workbox.",
Expand Down

0 comments on commit 89db47a

Please sign in to comment.