@ttoss/components 2.2.27 → 2.2.28

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.
@@ -1,3 +1,3 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { NotificationCard } from "../chunk-QIWMC6WC.js";
2
+ import { NotificationCard } from "../chunk-QNOMRVYN.js";
3
3
  export { NotificationCard };
@@ -1,5 +1,5 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { Icon, NotificationCard } from "../chunk-QIWMC6WC.js";
2
+ import { Icon, NotificationCard } from "../chunk-QNOMRVYN.js";
3
3
 
4
4
  // src/components/NotificationsMenu/NotificationsMenu.tsx
5
5
  import { Box, Button, Card, Flex, IconButton, Text } from "@ttoss/ui";
@@ -2109,6 +2109,11 @@ var NotificationCard = props => {
2109
2109
  info: "info",
2110
2110
  neutral: "info"
2111
2111
  };
2112
+ const hasCaption = Boolean(props.caption);
2113
+ const hasActions = Boolean(props.actions && props.actions.length > 0);
2114
+ const hasTitle = Boolean(props.title);
2115
+ const shouldCenterVertically = !hasCaption && !hasActions && !hasTitle;
2116
+ const shouldAddMinHeight = !hasCaption && !hasActions;
2112
2117
  return /* @__PURE__ */jsxs(Card, {
2113
2118
  sx: {
2114
2119
  ...sxMap[props.type].card,
@@ -2151,13 +2156,17 @@ var NotificationCard = props => {
2151
2156
  sx: {
2152
2157
  display: "flex",
2153
2158
  justifyContent: "space-between",
2154
- alignItems: "flex-end",
2159
+ alignItems: "flex-start",
2155
2160
  width: "100%",
2156
2161
  gap: "4"
2157
2162
  },
2158
2163
  children: /* @__PURE__ */jsx2(Box, {
2159
2164
  sx: {
2160
- flex: 1
2165
+ flex: 1,
2166
+ minHeight: shouldAddMinHeight ? "40px" : "auto",
2167
+ display: "flex",
2168
+ alignItems: shouldCenterVertically ? "center" : "flex-start",
2169
+ textAlign: "left"
2161
2170
  },
2162
2171
  children: props.message
2163
2172
  })
@@ -2180,12 +2189,12 @@ var NotificationCard = props => {
2180
2189
  children: action.label || "Acessar"
2181
2190
  }, index) : null;
2182
2191
  })
2183
- }), /* @__PURE__ */jsx2(Box, {
2192
+ }), props.caption && /* @__PURE__ */jsx2(Box, {
2184
2193
  sx: {
2185
2194
  whiteSpace: "nowrap",
2186
2195
  mt: 6
2187
2196
  },
2188
- children: props.caption && /* @__PURE__ */jsx2(Text, {
2197
+ children: /* @__PURE__ */jsx2(Text, {
2189
2198
  sx: {
2190
2199
  fontSize: "xs",
2191
2200
  color: "text.secondary"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "2.2.27",
3
+ "version": "2.2.28",
4
4
  "description": "React components for ttoss ecosystem.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -107,9 +107,9 @@
107
107
  "react": "^19.1.0",
108
108
  "tsup": "^8.5.0",
109
109
  "tsx": "^4.19.2",
110
- "@ttoss/config": "^1.35.6",
111
- "@ttoss/react-icons": "^0.4.15",
112
110
  "@ttoss/react-hooks": "^2.1.2",
111
+ "@ttoss/react-icons": "^0.4.15",
112
+ "@ttoss/config": "^1.35.6",
113
113
  "@ttoss/test-utils": "^2.1.26",
114
114
  "@ttoss/ui": "^5.9.2"
115
115
  },