@ttoss/components 2.2.32 → 2.3.0

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-MUZOQ5WS.js";
2
+ import { NotificationCard } from "../chunk-Q4MJKM2X.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-MUZOQ5WS.js";
2
+ import { Icon, NotificationCard } from "../chunk-Q4MJKM2X.js";
3
3
 
4
4
  // src/components/NotificationsMenu/NotificationsMenu.tsx
5
5
  import { Box, Button, Card, Flex, IconButton, Text } from "@ttoss/ui";
@@ -127,8 +127,8 @@ var NotificationsMenu = ({
127
127
  top: "calc(100% + 8px)",
128
128
  left: openToLeft ? "auto" : 0,
129
129
  right: openToLeft ? 0 : "auto",
130
- width: ["90vw", "550px"],
131
- maxHeight: "400px",
130
+ width: notifications.length === 0 ? ["60vw", "300px"] : ["90vw", "600px"],
131
+ maxHeight: "550px",
132
132
  overflowY: "auto",
133
133
  zIndex: "modal",
134
134
  padding: 0,
@@ -174,12 +174,13 @@ var NotificationsMenu = ({
174
174
  onClick: onClearAll,
175
175
  children: [/* @__PURE__ */jsx(Icon, {
176
176
  icon: "delete",
177
- width: 18,
178
- height: 18
177
+ width: 16,
178
+ height: 16
179
179
  }), /* @__PURE__ */jsx(Text, {
180
180
  sx: {
181
181
  ml: -1,
182
- marginTop: -0.4
182
+ marginTop: -0.4,
183
+ fontSize: "sm"
183
184
  },
184
185
  children: "Limpar Tudo"
185
186
  })]
@@ -2125,19 +2125,34 @@ var NotificationCard = props => {
2125
2125
  display: "flex",
2126
2126
  justifyContent: "space-between",
2127
2127
  alignItems: "center",
2128
- fontSize: "xl"
2128
+ fontSize: ["md", "xl"],
2129
+ paddingY: ["1", "2", "4"],
2130
+ paddingX: ["2", "4", "8"]
2129
2131
  },
2130
2132
  children: [/* @__PURE__ */jsxs(Text, {
2131
2133
  sx: {
2132
2134
  display: "inline-flex",
2133
- alignItems: "center",
2134
- gap: "2"
2135
+ alignItems: "flex-start",
2136
+ gap: "2",
2137
+ flexDirection: "row",
2138
+ flexWrap: "wrap"
2135
2139
  },
2136
- children: [/* @__PURE__ */jsx2(Icon2, {
2137
- icon: icon[props.type]
2138
- }), props.title, props.tags && /* @__PURE__ */jsx2(Tag, {
2140
+ children: [/* @__PURE__ */jsxs(Box, {
2141
+ sx: {
2142
+ display: "flex",
2143
+ alignItems: "center",
2144
+ gap: "2"
2145
+ },
2146
+ children: [/* @__PURE__ */jsx2(Icon2, {
2147
+ icon: icon[props.type]
2148
+ }), props.title]
2149
+ }), props.tags && (Array.isArray(props.tags) ? props.tags.length > 0 : true) && (Array.isArray(props.tags) ? props.tags.map((tag, index) => {
2150
+ return /* @__PURE__ */jsx2(Tag, {
2151
+ children: tag
2152
+ }, index);
2153
+ }) : /* @__PURE__ */jsx2(Tag, {
2139
2154
  children: props.tags
2140
- })]
2155
+ }))]
2141
2156
  }), props.onClose && /* @__PURE__ */jsx2(Box, {
2142
2157
  sx: {
2143
2158
  marginLeft: "auto"
@@ -2151,7 +2166,9 @@ var NotificationCard = props => {
2151
2166
  ...sxMap[props.type].card,
2152
2167
  display: "flex",
2153
2168
  flexDirection: "column",
2154
- gap: "2"
2169
+ gap: "2",
2170
+ paddingY: ["1", "2", "4"],
2171
+ paddingX: ["2", "4", "8"]
2155
2172
  },
2156
2173
  children: [/* @__PURE__ */jsx2(Box, {
2157
2174
  sx: {
@@ -2166,7 +2183,12 @@ var NotificationCard = props => {
2166
2183
  sx: {
2167
2184
  flex: 1
2168
2185
  },
2169
- children: props.message
2186
+ children: /* @__PURE__ */jsx2(Text, {
2187
+ sx: {
2188
+ fontSize: ["sm", "md"]
2189
+ },
2190
+ children: props.message
2191
+ })
2170
2192
  })
2171
2193
  }), props.actions && props.actions.length > 0 && /* @__PURE__ */jsx2(Box, {
2172
2194
  sx: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "2.2.32",
3
+ "version": "2.3.0",
4
4
  "description": "React components for ttoss ecosystem.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -108,10 +108,10 @@
108
108
  "tsup": "^8.5.0",
109
109
  "tsx": "^4.19.2",
110
110
  "@ttoss/config": "^1.35.6",
111
- "@ttoss/react-hooks": "^2.1.2",
112
111
  "@ttoss/react-icons": "^0.4.15",
112
+ "@ttoss/test-utils": "^2.1.26",
113
113
  "@ttoss/ui": "^5.9.3",
114
- "@ttoss/test-utils": "^2.1.26"
114
+ "@ttoss/react-hooks": "^2.1.2"
115
115
  },
116
116
  "keywords": [
117
117
  "React",