@pagamio/frontend-commons-lib 0.8.361 → 0.8.363

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.
@@ -5,6 +5,6 @@ const AppLayoutContent = ({ children, isSidebarHidden = false }) => {
5
5
  const sidebar = useAppSidebarContext();
6
6
  const sidebarStateClassName = sidebar.desktop.isCollapsed ? 'lg:ml-16' : 'lg:ml-64';
7
7
  const sidebarClassName = isSidebarHidden ? 'ml' : sidebarStateClassName;
8
- return (_jsx("div", { id: "main-content", className: twMerge('relative h-full w-full overflow-y-auto', sidebarClassName), children: _jsx("div", { className: "m-4", children: children }) }));
8
+ return (_jsx("div", { id: "main-content", className: twMerge('relative h-[calc(100vh-4rem)] w-full overflow-y-auto', sidebarClassName), children: _jsx("div", { className: "m-4", children: children }) }));
9
9
  };
10
10
  export default AppLayoutContent;
@@ -111,7 +111,11 @@ const DateRangePickerWithPresets = ({ value, onChange, selectedPreset = 'last_7_
111
111
  setPrimaryColor(getPrimaryColorFromTheme());
112
112
  }, []);
113
113
  const rangeColors = useMemo(() => [primaryColor], [primaryColor]);
114
- // Display text for the trigger button
114
+ // Display text for the trigger button. With no selected range we show the
115
+ // placeholder, NOT a preset label — a relative preset like "Last 7 Days"
116
+ // names a concrete range, so it must only label the trigger when a range is
117
+ // actually applied. `all_time` is the one preset that legitimately has no
118
+ // range, so it keeps its label.
115
119
  const displayText = useMemo(() => {
116
120
  if (value?.from) {
117
121
  if (value.to) {
@@ -122,11 +126,6 @@ const DateRangePickerWithPresets = ({ value, onChange, selectedPreset = 'last_7_
122
126
  if (selectedPreset === ALL_TIME_PRESET_VALUE) {
123
127
  return ALL_TIME_PRESET_LABEL;
124
128
  }
125
- if (selectedPreset && selectedPreset !== 'custom') {
126
- const match = PRESET_RANGES.find((p) => p.value === selectedPreset);
127
- if (match)
128
- return match.label;
129
- }
130
129
  return placeholder;
131
130
  }, [value, dateFormat, placeholder, selectedPreset]);
132
131
  // Convert { from, to } to react-date-range format
package/lib/styles.css CHANGED
@@ -1269,6 +1269,9 @@ video {
1269
1269
  .h-\[60vh\] {
1270
1270
  height: 60vh;
1271
1271
  }
1272
+ .h-\[calc\(100vh-4rem\)\] {
1273
+ height: calc(100vh - 4rem);
1274
+ }
1272
1275
  .h-\[calc\(100vh-64px\)\] {
1273
1276
  height: calc(100vh - 64px);
1274
1277
  }
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.361",
4
+ "version": "0.8.363",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": false