forked from qwikifiers/qwik-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'qwikifiers:main' into add-headless-checkbox
- Loading branch information
Showing
133 changed files
with
4,625 additions
and
3,238 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
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 @@ | ||
--- | ||
'@qwik-ui/styled': patch | ||
--- | ||
|
||
FEAT new styled select component |
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,96 @@ | ||
--- | ||
'@qwik-ui/styled': minor | ||
--- | ||
|
||
## tailwind.config.cjs | ||
|
||
Now uses tailwindcss-animate | ||
|
||
```ts | ||
plugins: [ | ||
require('tailwindcss-animate'), | ||
... | ||
], | ||
``` | ||
|
||
Instead of manually defined animations through a custom plugin like | ||
|
||
```ts | ||
plugins: [ | ||
plugin(function ({ addUtilities }) { | ||
addUtilities({ | ||
'.appear': { | ||
opacity: 1, | ||
}, | ||
'.disappear': { | ||
opacity: 0, | ||
}, | ||
}); | ||
}), | ||
]; | ||
``` | ||
|
||
## Modal refactor | ||
|
||
### Modal.Panel | ||
|
||
The Panel now uses tailwindcss-animate and comes built-in with 5 `position` variant props | ||
|
||
```tsx | ||
export const panelVariants = cva( | ||
[ | ||
'fixed w-full bg-background p-6 text-foreground transition-all backdrop:brightness-50 backdrop:backdrop-blur-sm', | ||
'data-[closing]:duration-300 data-[open]:duration-300 data-[open]:animate-in data-[closing]:animate-out', | ||
'backdrop:data-[closing]:duration-300 backdrop:data-[open]:duration-300 backdrop:data-[open]:animate-in backdrop:data-[closing]:animate-out backdrop:data-[closing]:fade-out backdrop:data-[open]:fade-in', | ||
], | ||
{ | ||
variants: { | ||
position: { | ||
center: | ||
'max-w-lg rounded-base shadow-lg data-[state=closed]:fade-out data-[state=open]:fade-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-bottom-2 backdrop:data-[closing]:fade-out backdrop:data-[open]:fade-in', | ||
top: 'inset-x-0 top-0 mt-0 rounded-b-base border-b data-[closing]:slide-out-to-top data-[open]:slide-in-from-top', | ||
bottom: | ||
'inset-x-0 bottom-0 mb-0 rounded-t-base border-t data-[closing]:slide-out-to-bottom data-[open]:slide-in-from-bottom', | ||
left: 'inset-y-0 left-0 ml-0 h-full max-w-sm rounded-r-base border-r data-[closing]:slide-out-to-left data-[open]:slide-in-from-left', | ||
right: | ||
'inset-y-0 right-0 mr-0 h-full max-w-sm rounded-l-base border-l data-[closing]:slide-out-to-right data-[open]:slide-in-from-right', | ||
}, | ||
}, | ||
defaultVariants: { | ||
position: 'center', | ||
}, | ||
}, | ||
); | ||
|
||
type PanelProps = PropsOf<typeof HeadlessModal.Panel> & | ||
VariantProps<typeof panelVariants>; | ||
|
||
const Panel = component$<PanelProps>(({ position, ...props }) => { | ||
return ( | ||
<HeadlessModal.Panel {...props} class={cn(panelVariants({ position }), props.class)}> | ||
<Slot /> | ||
</HeadlessModal.Panel> | ||
); | ||
}); | ||
``` | ||
|
||
over previous tailwind.config.js home-made plugin | ||
|
||
```tsx | ||
'.appear': { | ||
opacity: 1, | ||
}, | ||
'.disappear': { | ||
opacity: 0, | ||
}, | ||
``` | ||
|
||
to avoid re-inventing the wheel. | ||
|
||
### Modal.Title | ||
|
||
Title now holds `text-lg font-semibold` classes. | ||
|
||
### Modal.Description | ||
|
||
Description now holds `text-muted-foreground` class. |
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 @@ | ||
--- | ||
'@qwik-ui/styled': patch | ||
--- | ||
|
||
Styled button now uses `transition-all` for every variant shared class |
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 |
---|---|---|
|
@@ -75,4 +75,4 @@ Thumbs.db | |
|
||
# Verdaccio | ||
tmp | ||
.nx/cache | ||
|
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
.nx/cache | ||
coverage |
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
Binary file not shown.
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
Oops, something went wrong.