* feat(cli): add support for custom Tailwind prefix
* fix(cli): add tw prefix on classes applied in the css file
* feat(cli): add support for custom tailwind prefix
* chore: add changeset
* style(shadcn-ui): code format
---------
Co-authored-by: shadcn <m@shadcn.com>
This PR replaces the maximum id from `Number.MAX_VALUE` to `Number.MAX_SAFE_INTEGER` in `use-toast.ts`. Considering how JS stores numbers, it's unsafe to plus one if the number is larger than `Number.MAX_SAFE_INTEGER`. Here is an example:
```js
> let num
> num = Number.MAX_VALUE - 1
> num + 1 === num
true
> num = Number.MAX_SAFE_INTEGER - 1
> num + 1 === num
false
```
- The latest version of Astro generates `tailwind.config.mjs` file instead of `tailwind.config.cjs`.
- The `index.astro` file is located in `/src/pages`.
* feat: added toggle-group component
* fix(components): ran build:registry script
* fix(components): fixed colors in toggle-group
- Dark mode border color is now consistent with the toggle component
* fix(components): fixed component.json toggle-group
- Added the content field to `components.json` for toggle-group
- Ran build:registry again
* feat(toggle-group): simplify implementation
---------
Co-authored-by: shadcn <m@shadcn.com>
In order to have a smooth opening of the accordion, moving the `AccordionContent` `className` overwrite to the children wrapper component allow Radix to calculate correctly the animation and execute a smooth animation in case of `className` on the `AccordionContent` component.
Possibly related to https://github.com/shadcn-ui/ui/issues/944
This pull request resolves#1686.
## Rationale for this PR
This PR affects the code for `RadioGroupItem` in both styles by removing the `children` prop from the component. The children prop is automatically passed in by the use of the spread operator (`...props`) and is redundant because it is never used in the component.
This PR shouldn't affect tests, representation, etc. and is merely a cosmetic change. There is no urgent need to merge this.
* refactor(icon.tsx): twitter icon updated to latest version X icon
* refactor(icon.tsx): twitter icon updated to latest version X icon
* refactor(icons.tsx): added the same changes to the icon for X twitter icon
* refactor(icons.tsx): change the formating of the code
---------
Co-authored-by: shadcn <m@shadcn.com>
showOutsideDays=false will shift the missing days of a month to the start of the row (cause of 'flex' in classnames: row), to fix it, we can use the same height and width in a cell as in a day
Co-authored-by: shadcn <m@shadcn.com>
When I tried it after the attached issue, I realized;
For someone who's absolutely copying and pasting form the guide, this would give an error, as useForm is not imported in the guide. So I fixed that.
Related issue: https://github.com/shadcn-ui/ui/issues/1482Fix#1482
Fixes#1595, #1644
This PR changes the components that use the `DialogPortal` element to be aliases rather than components that pass a className prop.
The `DialogPortalProps` type from `@radix/react-dialog` recently had a patch update that probably should have been a minor or maybe a major update which is causing a few people to see the error `Property 'className' does not exist on type 'DialogPortalProps'`.
Since the `DialogPortal` component doesn't actually output any DOM elements, it never technically supported the `className` prop and the fact that it surfaced that prop was really a bug.
The `AlertDialog` and `Dialog` components were updated in #1603, but the `Sheet` component still references `className` which is resolved in this PR.
Fixes#659Fixes#633
Create Next App is using `tailwind.config.ts` in the TypeScript template. Since this is a very common use case it would be nice to preserve the type safety of the file.
I added new templates for TypeScript files. I see there is an issue #1073 which asks for ESM support as well. This is not included in this PR.
I also fixed the type error in the keyframes that is also handled in #636
This is a small update to the installation instructions for some of the frameworks to make the instructions on editing the tsconfig file consistant across the frameworks, and remove some potentially confusing wording (if people read too fast...like me).
Mainly applying the gatsby tsconfig instructions to vite and astro, as it is the most clear.
Additionally changed the wording from:
```
Add the code below to the compilerOptions...
```
to:
```
Add the following code to the compilerOptions...
```
to avoid people easily misreading it as "add the code **below the** compilerOptions".
- Remove unused import from Alert Default example
- Remove unused imports from Alert Destructive example
- Remove unused imports from Dropdown Menu Radio Group example