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

Changed buttons #12

Merged
merged 35 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
281da14
Changed buttons and prevent scroll
jordythevulder Dec 17, 2024
2bf6747
Update demo
jordythevulder Dec 17, 2024
4b2b795
Changed readme with overflow clip
jordythevulder Dec 19, 2024
6421ac0
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/bla…
jordythevulder Dec 19, 2024
2968649
Finetuned styling and added muted variant
jordythevulder Dec 19, 2024
490c4a5
Update demo
jordythevulder Dec 19, 2024
0c628c4
Changed overflow hidden to clip comment
jordythevulder Dec 19, 2024
54cca17
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/bla…
jordythevulder Dec 19, 2024
5b7b661
Changed comment within muted button
jordythevulder Dec 19, 2024
d9caf64
Merge branch 'master' of github.com:rapidez/blade-components into fea…
jordythevulder Jan 13, 2025
ec3dc20
Removed inactive color variant
jordythevulder Jan 13, 2025
0330e9f
Update demo
jordythevulder Jan 13, 2025
22745f3
Updated readme and added base classes on buttons
jordythevulder Jan 13, 2025
48b583f
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/bla…
jordythevulder Jan 13, 2025
4661911
Update demo
jordythevulder Jan 13, 2025
8950fdd
erge branch 'master' of github.com:rapidez/blade-components into feat…
jordythevulder Jan 14, 2025
7b3e1c6
Changed border colors to have more contrast
jordythevulder Jan 14, 2025
4caf8db
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/bla…
jordythevulder Jan 14, 2025
7770c69
Update demo
jordythevulder Jan 14, 2025
f47f833
Removed slideover duplicate
jordythevulder Jan 14, 2025
ee6a873
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/bla…
jordythevulder Jan 14, 2025
403b161
Renamed base to tag and button to base
jordythevulder Jan 14, 2025
2fb7309
Update demo
jordythevulder Jan 14, 2025
8868ed1
Removed muted variant and remove border changes
jordythevulder Jan 15, 2025
ce4a1a9
Removed border contrast
jordythevulder Jan 15, 2025
c345483
Update demo
jordythevulder Jan 15, 2025
5d64d97
Small content tweaks
jordythevulder Jan 21, 2025
58d0eae
Resolved Merge conflict
jordythevulder Jan 28, 2025
d06c67d
Update demo
jordythevulder Jan 28, 2025
ace2c37
Changed back preview image with default button variant
jordythevulder Jan 28, 2025
8f2e470
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/bla…
jordythevulder Jan 28, 2025
515a440
Update demo
jordythevulder Jan 28, 2025
e842383
Merge branch 'master' of github.com:rapidez/blade-components into fea…
jordythevulder Jan 28, 2025
9e8a0bb
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/bla…
jordythevulder Jan 28, 2025
96f4727
Removed muted
jordythevulder Jan 28, 2025
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ The base button doesn't have any styling; here, we only use the `x-rapidez::tag`
- [Outline](https://github.com/rapidez/blade-components/blob/master/resources/views/components/button/outline.blade.php)
- [Conversion](https://github.com/rapidez/blade-components/blob/master/resources/views/components/button/conversion.blade.php)
- [Slider](https://github.com/rapidez/blade-components/blob/master/resources/views/components/button/slider.blade.php)
- [Muted](https://github.com/rapidez/blade-components/blob/master/resources/views/components/button/muted.blade.php)
jordythevulder marked this conversation as resolved.
Show resolved Hide resolved


## Installation

Expand Down Expand Up @@ -63,8 +65,8 @@ colors: {
muted: color('--foreground-muted', colors.slate[600]),
},
border: {
emphasis: color('--border-emphasis', colors.slate[500]),
DEFAULT: color('--border', colors.slate[200]),
emphasis: color('--border-emphasis', colors.slate[400]),
DEFAULT: color('--border', colors.slate[300]),
jordythevulder marked this conversation as resolved.
Show resolved Hide resolved
muted: color('--border-muted', colors.slate[100]),
},
background: {
Expand Down Expand Up @@ -160,7 +162,7 @@ Just like any other Blade component, check out the [Laravel Blade docs](https://
Make sure to add this class to your body tag to prevent scrolling when the slideover is open:

```html
<body class="has-[.slideover-checkbox:checked]:overflow-hidden">
<body class="has-[.prevent-scroll:checked]:overflow-clip">
```

#### Tag
Expand Down
46 changes: 23 additions & 23 deletions demo/components.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/views/components-preview.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function color(variable, fallback) {

<h2 class="font-bold text-lg">Button components</h2>
<div class="grid grid-cols-5 gap-5">
<x-rapidez::button>Button</x-rapidez::button>
royduin marked this conversation as resolved.
Show resolved Hide resolved
<x-rapidez::button.muted>Muted</x-rapidez::button.muted>
<x-rapidez::button.primary>Primary</x-rapidez::button.primary>
<x-rapidez::button.secondary>Secondary</x-rapidez::button.secondary>
<x-rapidez::button.outline>Outline</x-rapidez::button.outline>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/button/button.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<x-rapidez::button>Something</x-rapidez::button>
```
--}}
<x-rapidez::button.base {{ $attributes->twMerge('relative inline-flex items-center justify-center text transition bg text-base font-medium rounded min-h-12 py-1.5 px-5 hover:bg-opacity-80 border-b border-b-black/15 disabled:text-muted disabled:bg-muted disabled:cursor-not-allowed') }}>
<x-rapidez::button.base {{ $attributes->twMerge('inline-flex items-center justify-center transition font-medium text-base rounded min-h-12 py-1.5 px-5 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer gap-x-1.5') }}>
{{ $slot }}
</x-rapidez::button.base>
4 changes: 2 additions & 2 deletions resources/views/components/button/conversion.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<x-rapidez::button.conversion>Something</x-rapidez::button.conversion>
```
--}}
<x-rapidez::button {{ $attributes->twMerge('bg-conversion text-conversion-text') }}>
<x-rapidez::button {{ $attributes->twMerge('bg-conversion hover:bg-opacity-80 text-conversion-text border-b border-b-black/20') }}>
{{ $slot }}
</x-rapidez::button>
</x-rapidez::button>
10 changes: 10 additions & 0 deletions resources/views/components/button/muted.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{--
The muted button is a variant used for basic use cases.
Example:
```
<x-rapidez::button.muted>Something</x-rapidez::button.muted>
```
--}}
<x-rapidez::button {{ $attributes->twMerge('bg text-muted hover:text hover:bg-emphasis border-b border-b-black/10') }}>
{{ $slot }}
</x-rapidez::button>
2 changes: 1 addition & 1 deletion resources/views/components/button/outline.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
--}}
<x-rapidez::button {{ $attributes->twMerge('bg-transparent border text-default hover:border-emphasis') }}>
{{ $slot }}
</x-rapidez::button>
</x-rapidez::button>
2 changes: 1 addition & 1 deletion resources/views/components/button/primary.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<x-rapidez::button.primary>Something</x-rapidez::button.primary>
```
--}}
<x-rapidez::button {{ $attributes->twMerge('bg-primary text-primary-text') }}>
<x-rapidez::button {{ $attributes->twMerge('bg-primary text-primary-text border-b border-b-black/20 hover:bg-opacity-80') }}>
{{ $slot }}
</x-rapidez::button>
2 changes: 1 addition & 1 deletion resources/views/components/button/secondary.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<x-rapidez::button.secondary>Something</x-rapidez::button.secondary>
```
--}}
<x-rapidez::button {{ $attributes->twMerge('bg-secondary text-secondary-text') }}>
<x-rapidez::button {{ $attributes->twMerge('bg-secondary text-secondary-text border-b border-b-black/20 hover:bg-opacity-80') }}>
{{ $slot }}
</x-rapidez::button>
2 changes: 1 addition & 1 deletion resources/views/components/button/slider.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<x-rapidez::button.slider>Icon</x-rapidez::button.slider>
```
--}}
<x-rapidez::button {{ $attributes->twMerge('inline-flex bg-white p-0 rounded-full size-14 items-center justify-center shadow text-default border') }}>
<x-rapidez::button {{ $attributes->twMerge('bg-white p-0 rounded-full size-12 border hover:border-emphasis') }}>
{{ $slot }}
</x-rapidez::button>
2 changes: 1 addition & 1 deletion resources/views/components/input/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
</label>
```
--}}
<input {{ $attributes->twMerge('w-full py-3 px-5 border border-default rounded-md outline-0 ring-0 text-sm transition-colors focus:ring-transparent focus:border-emphasis disabled:cursor-not-allowed disabled:bg-muted disabled:border-muted placeholder:text-inactive [&::-webkit-inner-spin-button]:appearance-none [&:user-invalid:not(:placeholder-shown)]:border-red-500') }} />
<input {{ $attributes->twMerge('w-full py-3 px-5 border border-default rounded-md outline-0 ring-0 text-sm transition-colors focus:ring-transparent focus:border-emphasis disabled:cursor-not-allowed disabled:bg-emphasis disabled:border-emphasis placeholder:text-muted [&::-webkit-inner-spin-button]:appearance-none [&:user-invalid:not(:placeholder-shown)]:border-red-500') }} />
2 changes: 1 addition & 1 deletion resources/views/components/input/select/select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</label>
```
--}}
<select {{ $attributes->twMerge('w-full py-3 px-5 border border-default rounded-md outline-0 ring-0 text-sm transition-colors focus:ring-transparent focus:border-emphasis disabled:cursor-not-allowed disabled:bg-muted disabled:border-muted placeholder:text-muted') }}>
<select {{ $attributes->twMerge('w-full py-3 px-5 border border-default rounded-md outline-0 ring-0 text-sm transition-colors focus:ring-transparent focus:border-emphasis disabled:cursor-not-allowed disabled:bg-emphasis disabled:border-emphasis placeholder:text-muted') }}>
{{ $slot }}
</select>
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
</label>
```
--}}
<textarea {{ $attributes->twMerge('w-full py-3 px-5 border border-default rounded-md outline-0 ring-0 text-sm transition-colors focus:ring-transparent focus:border-emphasis disabled:cursor-not-allowed disabled:bg-muted disabled:border-muted placeholder:text-muted') }}>{{ $slot }}</textarea>
<textarea {{ $attributes->twMerge('w-full py-3 px-5 border border-default rounded-md outline-0 ring-0 text-sm transition-colors focus:ring-transparent focus:border-emphasis disabled:cursor-not-allowed disabled:bg-emphasis disabled:border-emphasis placeholder:text-muted') }}>{{ $slot }}</textarea>
4 changes: 2 additions & 2 deletions resources/views/components/slideover/slideover.blade.php
jordythevulder marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
## Body Class
Add this class to prevent scrolling when slideover is open:
```html
<body class="has-[.slideover-checkbox:checked]:overflow-hidden">
<body class="has-[.prevent-scroll:checked]:overflow-clip">
```

## Nesting Slideovers
Expand Down Expand Up @@ -77,7 +77,7 @@
<x-rapidez::tag :is="$tag">
<input id="{{ 'close-' . $id }}" class="hidden" type="reset">
@if (!$hasParent)
<input @checked($open) id="{{ $id }}" class="peer hidden slideover-checkbox" type="checkbox">
<input @checked($open) id="{{ $id }}" class="peer hidden prevent-scroll" type="checkbox">
<label
for="{{ $closeId }}"
class="pointer-events-none fixed inset-0 z-40 cursor-pointer bg-black/40 opacity-0 transition peer-checked:pointer-events-auto peer-checked:opacity-100"
Expand Down
Loading