nitro-web 0.0.67 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,13 +27,11 @@ type FiltersProps = {
|
|
|
27
27
|
Select?: typeof Select
|
|
28
28
|
FilterIcon?: typeof ListFilterIcon
|
|
29
29
|
}
|
|
30
|
-
dropdownProps?: Partial<React.ComponentProps<typeof Dropdown>>
|
|
31
30
|
buttonProps?: Partial<React.ComponentProps<typeof Button>>
|
|
32
|
-
buttonClassName?: string
|
|
33
31
|
buttonText?: string
|
|
34
32
|
buttonCounterClassName?: string
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
dropdownProps?: Partial<React.ComponentProps<typeof Dropdown>>
|
|
34
|
+
dropdownFiltersClassName?: string
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
export type FiltersHandleType = {
|
|
@@ -46,14 +44,12 @@ export const Filters = forwardRef<FiltersHandleType, FiltersProps>(({
|
|
|
46
44
|
filters,
|
|
47
45
|
setState: setState2,
|
|
48
46
|
state: state2,
|
|
49
|
-
|
|
47
|
+
buttonProps,
|
|
50
48
|
buttonCounterClassName,
|
|
51
|
-
buttonProps,
|
|
52
49
|
buttonText,
|
|
53
50
|
dropdownProps,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
menuClassName,
|
|
51
|
+
dropdownFiltersClassName,
|
|
52
|
+
elements,
|
|
57
53
|
}, ref) => {
|
|
58
54
|
const location = useLocation()
|
|
59
55
|
const navigate = useNavigate()
|
|
@@ -126,7 +122,8 @@ export const Filters = forwardRef<FiltersHandleType, FiltersProps>(({
|
|
|
126
122
|
dir="bottom-right"
|
|
127
123
|
allowOverflow={true}
|
|
128
124
|
// menuIsOpen={true}
|
|
129
|
-
|
|
125
|
+
{...dropdownProps}
|
|
126
|
+
menuClassName={twMerge(`!rounded-lg min-w-[330px] ${dropdownProps?.menuClassName || ''}`)}
|
|
130
127
|
menuContent={
|
|
131
128
|
<div>
|
|
132
129
|
<div class="flex justify-between items-center border-b p-4 py-3.5">
|
|
@@ -137,7 +134,7 @@ export const Filters = forwardRef<FiltersHandleType, FiltersProps>(({
|
|
|
137
134
|
This div shouldnt produce a page scrollbar when the dropdown is closed.
|
|
138
135
|
But should be visibile if allowedOverflow is true.
|
|
139
136
|
</div> */}
|
|
140
|
-
<div class={twMerge(`flex flex-wrap gap-4 px-4 py-4 pb-6 ${
|
|
137
|
+
<div class={twMerge(`flex flex-wrap gap-4 px-4 py-4 pb-6 ${dropdownFiltersClassName || ''}`)}>
|
|
141
138
|
{
|
|
142
139
|
filters?.map(({label, rowClassName, ...filter}, i) => (
|
|
143
140
|
<div key={i} class={twMerge(`w-full ${rowClassName||''}`)}>
|
|
@@ -170,13 +167,12 @@ export const Filters = forwardRef<FiltersHandleType, FiltersProps>(({
|
|
|
170
167
|
</div>
|
|
171
168
|
</div>
|
|
172
169
|
}
|
|
173
|
-
{...dropdownProps}
|
|
174
170
|
>
|
|
175
171
|
<Elements.Button
|
|
176
172
|
color="white"
|
|
177
173
|
IconLeft={<Elements.FilterIcon size={16} />}
|
|
178
|
-
className={twMerge(`flex gap-x-2.5 ${buttonClassName || ''}`)}
|
|
179
174
|
{...buttonProps}
|
|
175
|
+
className={twMerge(`flex gap-x-2.5 ${buttonProps?.className || ''}`)}
|
|
180
176
|
>
|
|
181
177
|
<span class="flex items-center gap-x-2.5">
|
|
182
178
|
{ buttonText || 'Filter By' }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.68",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
|