@pagamio/frontend-commons-lib 0.8.321 → 0.8.323

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.
@@ -31,7 +31,7 @@ const FilterComponent = ({ filters, selectedFilters, showApplyFilterButton = tru
31
31
  resetFilters();
32
32
  }
33
33
  };
34
- return (_jsxs(FilterWrapper, { isNarrow: isNarrow, children: [_jsxs("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: [showSearch && (_jsxs("div", { className: "relative w-full sm:w-[300px]", children: [_jsx(IconSearch, { size: 16, className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { type: "text", placeholder: searctInputPlaceHolder, value: searchQuery, onChange: onSearch, onKeyDown: handleSearchKeyDown, "aria-label": "Search", className: cn('h-9 w-full rounded-md border border-border bg-background pl-9 pr-3 text-sm text-foreground', 'placeholder:text-muted-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:cursor-not-allowed disabled:opacity-50') })] })), filters.map((filter) => {
34
+ return (_jsxs(FilterWrapper, { isNarrow: isNarrow, children: [_jsxs("div", { className: "flex flex-1 flex-wrap items-center gap-2 min-w-0", children: [showSearch && (_jsxs("div", { className: "relative w-full sm:flex-1 sm:min-w-[200px] sm:max-w-[340px] min-w-0", children: [_jsx(IconSearch, { size: 16, className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { type: "text", placeholder: searctInputPlaceHolder, value: searchQuery, onChange: onSearch, onKeyDown: handleSearchKeyDown, "aria-label": "Search", className: cn('h-9 w-full rounded-md border border-border bg-background pl-9 pr-3 text-sm text-foreground', 'placeholder:text-muted-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:cursor-not-allowed disabled:opacity-50') })] })), filters.map((filter) => {
35
35
  const { name, type, options } = filter;
36
36
  const value = selectedFilters[name];
37
37
  const renderFilterInput = () => {
@@ -70,7 +70,10 @@ const FilterComponent = ({ filters, selectedFilters, showApplyFilterButton = tru
70
70
  const currentValue = value || '';
71
71
  return (_jsxs(Select, { value: currentValue || undefined, onValueChange: (val) => handleFilterChange(name, val === '__clear__' ? '' : val), children: [_jsx(SelectTrigger, { className: "h-9 w-full border-border bg-background text-sm text-foreground", "aria-label": filter.placeholder ?? name, children: _jsx(SelectValue, { placeholder: filter.placeholder ?? `Select ${name}` }) }), _jsxs(SelectContent, { children: [currentValue && (_jsx(SelectItem, { value: "__clear__", className: "text-muted-foreground", children: filter.placeholder ?? 'All' })), (options ?? []).map((opt) => (_jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)))] })] }));
72
72
  };
73
- return (_jsx("div", { className: "w-full sm:w-[240px]", children: renderFilterInput() }, name));
73
+ return (
74
+ // Fluid width: full width on mobile, fluid 180–260px on wider
75
+ // viewports so filters share the row evenly and shrink under pressure.
76
+ _jsx("div", { className: "w-full sm:flex-1 sm:min-w-[180px] sm:max-w-[260px] min-w-0", children: renderFilterInput() }, name));
74
77
  }), showApplyFilterButton && shouldShowActionButtons && (_jsx(Button, { onClick: handleApplyFilters, variant: "primary", className: "w-full sm:w-auto", style: { height: 36 }, tabIndex: 0, "aria-label": "Apply Filters", children: "Apply Filters" })), showClearFilters && shouldShowActionButtons && (_jsx(Button, { onClick: resetFilters, variant: "outline-primary", className: "w-full sm:w-auto", style: { height: 36 }, tabIndex: 0, "aria-label": "Clear Filters", children: "Clear Filters" }))] }), _jsx("div", { className: "ml-auto flex flex-wrap items-center justify-end gap-2", children: children })] }));
75
78
  };
76
79
  export default FilterComponent;
@@ -1,5 +1,10 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { MultiSelect } from '../../../../components';
4
- const MultiSelectInputComponent = React.forwardRef(({ field, error, options, ...props }, ref) => (_jsxs(_Fragment, { children: [_jsx("label", { htmlFor: field.name, className: "block text-sm font-medium text-foreground", children: field.label }), _jsx(MultiSelect, { className: "w-full border-input pb-5 disabled:text-muted-foreground disabled:bg-muted disabled:cursor-not-allowed", options: (options ?? []), value: props.value, defaultValue: props.value, disabled: field.disabled, onChange: props.onChange, tagPosition: "bottom" }), error && _jsx("p", { className: "mt-2 text-sm text-red-500", children: error.message })] })));
4
+ const MultiSelectInputComponent = React.forwardRef(({ field, error, options, ...props }, ref) => (_jsxs(_Fragment, { children: [_jsx("label", { htmlFor: field.name, className: "block text-sm font-medium text-foreground", children: field.label }), _jsx(MultiSelect, { className: "w-full border-input disabled:text-muted-foreground disabled:bg-muted disabled:cursor-not-allowed", options: (options ?? []), value: props.value, defaultValue: props.value, disabled: field.disabled, onChange: props.onChange,
5
+ // Render selected tags inside the input itself rather than as a
6
+ // separate row below — matches how every other select-style input
7
+ // in the app surfaces selections, and stops the field from looking
8
+ // empty when items are already chosen.
9
+ tagPosition: "inside" }), error && _jsx("p", { className: "mt-2 text-sm text-red-500", children: error.message })] })));
5
10
  export default MultiSelectInputComponent;
package/lib/styles.css CHANGED
@@ -2942,9 +2942,6 @@ video {
2942
2942
  .pb-4 {
2943
2943
  padding-bottom: 1rem;
2944
2944
  }
2945
- .pb-5 {
2946
- padding-bottom: 1.25rem;
2947
- }
2948
2945
  .pl-10 {
2949
2946
  padding-left: 2.5rem;
2950
2947
  }
@@ -6417,14 +6414,6 @@ video {
6417
6414
  width: 1.75rem;
6418
6415
  }
6419
6416
 
6420
- .sm\:w-\[240px\] {
6421
- width: 240px;
6422
- }
6423
-
6424
- .sm\:w-\[300px\] {
6425
- width: 300px;
6426
- }
6427
-
6428
6417
  .sm\:w-\[400px\] {
6429
6418
  width: 400px;
6430
6419
  }
@@ -6433,10 +6422,30 @@ video {
6433
6422
  width: auto;
6434
6423
  }
6435
6424
 
6425
+ .sm\:min-w-\[180px\] {
6426
+ min-width: 180px;
6427
+ }
6428
+
6429
+ .sm\:min-w-\[200px\] {
6430
+ min-width: 200px;
6431
+ }
6432
+
6433
+ .sm\:max-w-\[260px\] {
6434
+ max-width: 260px;
6435
+ }
6436
+
6437
+ .sm\:max-w-\[340px\] {
6438
+ max-width: 340px;
6439
+ }
6440
+
6436
6441
  .sm\:max-w-sm {
6437
6442
  max-width: 24rem;
6438
6443
  }
6439
6444
 
6445
+ .sm\:flex-1 {
6446
+ flex: 1 1 0%;
6447
+ }
6448
+
6440
6449
  .sm\:translate-x-0 {
6441
6450
  --tw-translate-x: 0px;
6442
6451
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pagamio/frontend-commons-lib",
3
3
  "description": "Pagamio library for Frontend reusable components like the form engine and table container",
4
- "version": "0.8.321",
4
+ "version": "0.8.323",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": false