-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into kien/pack-extensions
- Loading branch information
Showing
457 changed files
with
11,044 additions
and
9,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"thirdweb": patch | ||
--- | ||
|
||
Fix jsdoc for getClaimParams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
"format": "biome format ./src --write", | ||
"lint": "biome check ./src && knip && eslint ./src", | ||
"fix": "biome check ./src --fix && eslint ./src --fix", | ||
"typecheck": "tsc --noEmit", | ||
"gen:theme-typings": "chakra-cli tokens src/theme/index.ts", | ||
"postinstall": "pnpm run gen:theme-typings", | ||
"postbuild": "next-sitemap", | ||
|
@@ -68,15 +69,14 @@ | |
"ipaddr.js": "^2.2.0", | ||
"lottie-react": "^2.4.0", | ||
"lucide-react": "0.441.0", | ||
"next": "14.2.11", | ||
"next": "14.2.12", | ||
"next-plausible": "^3.12.0", | ||
"next-seo": "^6.5.0", | ||
"next-themes": "^0.3.0", | ||
"nextjs-toploader": "^1.6.12", | ||
"papaparse": "^5.4.1", | ||
"pluralize": "^8.0.0", | ||
"posthog-js": "1.161.5", | ||
"posthog-js-opensource": "npm:[email protected]", | ||
"posthog-js": "1.67.1", | ||
"prism-react-renderer": "^2.3.1", | ||
"prismjs": "^1.29.0", | ||
"qrcode": "^1.5.3", | ||
|
@@ -108,8 +108,8 @@ | |
"devDependencies": { | ||
"@chakra-ui/cli": "^2.4.1", | ||
"@chromatic-com/storybook": "2.0.2", | ||
"@next/bundle-analyzer": "14.2.11", | ||
"@next/eslint-plugin-next": "14.2.11", | ||
"@next/bundle-analyzer": "14.2.12", | ||
"@next/eslint-plugin-next": "14.2.12", | ||
"@playwright/test": "1.47.1", | ||
"@storybook/addon-essentials": "8.3.1", | ||
"@storybook/addon-interactions": "8.3.1", | ||
|
@@ -125,7 +125,7 @@ | |
"@types/papaparse": "^5.3.14", | ||
"@types/pluralize": "^0.0.33", | ||
"@types/qrcode": "^1.5.5", | ||
"@types/react": "^18.3.6", | ||
"@types/react": "^18.3.7", | ||
"@types/react-dom": "^18", | ||
"@types/react-table": "^7.7.20", | ||
"@types/spdx-correct": "^3.1.3", | ||
|
@@ -136,14 +136,12 @@ | |
"checkly": "^4.8.1", | ||
"eslint": "8.57.0", | ||
"eslint-config-biome": "1.8.3", | ||
"eslint-plugin-import": "^2.30.0", | ||
"eslint-plugin-promise": "^6.2.0", | ||
"eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725", | ||
"eslint-plugin-react-compiler": "0.0.0-experimental-ca16900-20240916", | ||
"eslint-plugin-storybook": "^0.8.0", | ||
"next-sitemap": "^4.2.3", | ||
"postcss": "8.4.47", | ||
"storybook": "8.3.1", | ||
"tailwindcss": "3.4.11", | ||
"tailwindcss": "3.4.12", | ||
"typescript": "5.6.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Label } from "@/components/ui/label"; | ||
import { ToolTipLabel } from "@/components/ui/tooltip"; | ||
import { AsteriskIcon, InfoIcon } from "lucide-react"; | ||
|
||
export function FormFieldSetup(props: { | ||
htmlFor: string; | ||
label: string; | ||
errorMessage: React.ReactNode | undefined; | ||
children: React.ReactNode; | ||
tooltip: React.ReactNode | undefined; | ||
isRequired: boolean; | ||
}) { | ||
return ( | ||
<div> | ||
<div className="mb-2 inline-flex gap-1 items-center"> | ||
<Label htmlFor={props.htmlFor}>{props.label}</Label> | ||
|
||
{props.isRequired && ( | ||
<AsteriskIcon className="text-destructive-text size-3.5" /> | ||
)} | ||
|
||
{props.tooltip && ( | ||
<ToolTipLabel label={props.tooltip}> | ||
<InfoIcon className="text-muted-foreground size-3.5" /> | ||
</ToolTipLabel> | ||
)} | ||
</div> | ||
{props.children} | ||
{props.errorMessage && ( | ||
<p className="text-destructive-text text-sm mt-1"> | ||
{props.errorMessage} | ||
</p> | ||
)} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
apps/dashboard/src/@/components/blocks/multi-select.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { useMemo, useState } from "react"; | ||
import { BadgeContainer, mobileViewport } from "../../../stories/utils"; | ||
import { MultiSelect } from "./multi-select"; | ||
|
||
const meta = { | ||
title: "blocks/MultiSelect", | ||
component: Story, | ||
parameters: { | ||
nextjs: { | ||
appDirectory: true, | ||
}, | ||
}, | ||
} satisfies Meta<typeof Story>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Desktop: Story = { | ||
args: {}, | ||
}; | ||
|
||
export const Mobile: Story = { | ||
args: {}, | ||
parameters: { | ||
viewport: mobileViewport("iphone14"), | ||
}, | ||
}; | ||
|
||
function createList(len: number) { | ||
return Array.from({ length: len }, (_, i) => ({ | ||
value: `${i}`, | ||
label: `Item ${i}`, | ||
})); | ||
} | ||
|
||
function Story() { | ||
return ( | ||
<div className="py-6 max-w-[600px] mx-auto w-full px-4 flex flex-col gap-6"> | ||
<VariantTest defaultValues={[]} storyLabel="5 items" listLen={5} /> | ||
<VariantTest defaultValues={[]} storyLabel="5000 items" listLen={5000} /> | ||
<VariantTest | ||
defaultValues={["1", "3", "5"]} | ||
storyLabel="20 items, 3 selected by default" | ||
listLen={20} | ||
/> | ||
<VariantTest | ||
defaultValues={["1", "2", "3", "4", "5", "6", "7"]} | ||
storyLabel="20 items, 7 selected, show max 3" | ||
listLen={20} | ||
maxCount={3} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
function VariantTest(props: { | ||
defaultValues: string[]; | ||
maxCount?: number; | ||
storyLabel: string; | ||
listLen: number; | ||
}) { | ||
const list = useMemo(() => createList(props.listLen), [props.listLen]); | ||
const [values, setValues] = useState<string[]>(props.defaultValues); | ||
|
||
return ( | ||
<BadgeContainer label={props.storyLabel}> | ||
<MultiSelect | ||
selectedValues={values} | ||
options={list} | ||
onSelectedValuesChange={(values) => { | ||
setValues(values); | ||
}} | ||
placeholder="Select items" | ||
maxCount={props.maxCount} | ||
/> | ||
</BadgeContainer> | ||
); | ||
} |
Oops, something went wrong.