@ttoss/components 2.9.0 → 2.10.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.
@@ -6,21 +6,21 @@ import * as React from 'react';
6
6
  type ButtonPropType = ButtonProps | React.ReactNode;
7
7
  type SpotlightCardProps = {
8
8
  icon: IconType;
9
- title: string;
10
- subtitle?: string;
9
+ /**
10
+ * Title of the card. Pass a ReactNode for styling.
11
+ */
12
+ title: string | React.ReactNode;
13
+ /**
14
+ * Badge text. Renders as a badge/tag next to the title.
15
+ */
16
+ badge?: string | React.ReactNode;
11
17
  description: string;
12
18
  firstButton?: ButtonPropType;
13
19
  secondButton?: ButtonPropType;
14
- /**
15
- * Visual variant of the card.
16
- * - 'accent': (Default) Highlighted background (Action Accent) with shine animation.
17
- * - 'primary': Primary background (Action Primary).
18
- * @default 'accent'
19
- */
20
20
  variant?: 'accent' | 'primary';
21
21
  };
22
22
  declare const SpotlightCard: {
23
- ({ icon, title, subtitle, description, firstButton, secondButton, variant, }: SpotlightCardProps): react_jsx_runtime.JSX.Element;
23
+ ({ icon, title, badge, description, firstButton, secondButton, variant, }: SpotlightCardProps): react_jsx_runtime.JSX.Element;
24
24
  displayName: string;
25
25
  };
26
26
 
@@ -8,7 +8,7 @@ import * as React from "react";
8
8
  var SpotlightCard = /* @__PURE__ */__name(({
9
9
  icon,
10
10
  title,
11
- subtitle,
11
+ badge,
12
12
  description,
13
13
  firstButton,
14
14
  secondButton,
@@ -30,6 +30,8 @@ var SpotlightCard = /* @__PURE__ */__name(({
30
30
  const textColorToken = isAccent ? "action.text.accent.default" : "action.text.primary.default";
31
31
  const iconColorToken = isAccent ? "action.text.accent.default" : "display.text.accent.default";
32
32
  const iconBgToken = isAccent ? "rgba(255,255,255,0.3)" : "action.background.secondary.default";
33
+ const badgeBgToken = isAccent ? "action.background.primary.default" : "action.background.accent.default";
34
+ const badgeTextToken = isAccent ? "action.text.primary.default" : "action.text.accent.default";
33
35
  const btnPrimaryVariant = isAccent ? "primary" : "accent";
34
36
  const btnPrimaryColorToken = isAccent ? "action.text.primary.default" : "action.text.accent.default";
35
37
  const btnSecondaryColorToken = textColorToken;
@@ -109,8 +111,8 @@ var SpotlightCard = /* @__PURE__ */__name(({
109
111
  }
110
112
  }, /* @__PURE__ */React.createElement(Box, {
111
113
  sx: {
112
- width: 58,
113
- height: 58,
114
+ width: 64,
115
+ height: 64,
114
116
  borderRadius: "2xl",
115
117
  backgroundColor: iconBgToken,
116
118
  display: "flex",
@@ -121,7 +123,7 @@ var SpotlightCard = /* @__PURE__ */__name(({
121
123
  }
122
124
  }, /* @__PURE__ */React.createElement(Icon, {
123
125
  icon,
124
- width: 28
126
+ width: 32
125
127
  })), /* @__PURE__ */React.createElement(Box, {
126
128
  sx: {
127
129
  minWidth: 0
@@ -129,40 +131,43 @@ var SpotlightCard = /* @__PURE__ */__name(({
129
131
  }, /* @__PURE__ */React.createElement(Text, {
130
132
  as: "div",
131
133
  sx: {
132
- fontFamily: "heading",
133
- fontWeight: 800,
134
- fontSize: "24px",
135
- lineHeight: 1.2,
134
+ fontFamily: "mono",
135
+ // Tamanho da fonte aumentado para dar mais presença ao OneClick
136
+ fontSize: "32px",
137
+ lineHeight: 1.1,
136
138
  color: "inherit",
137
139
  whiteSpace: "nowrap",
138
140
  display: "flex",
139
- alignItems: "baseline",
140
- gap: "2"
141
- }
142
- }, /* @__PURE__ */React.createElement("span", {
143
- style: {
144
- fontWeight: 800,
145
- letterSpacing: "-0.5px",
146
- verticalAlign: "middle",
147
- lineHeight: 1.1
141
+ alignItems: "center",
142
+ gap: "3"
148
143
  }
149
- }, title), subtitle && /* @__PURE__ */React.createElement("span", {
150
- style: {
151
- fontWeight: 300,
152
- fontSize: "20px",
153
- opacity: 0.8,
154
- marginLeft: 6,
155
- verticalAlign: "baseline",
156
- lineHeight: 1.1
144
+ }, title, badge && /* @__PURE__ */React.createElement(Box, {
145
+ as: "span",
146
+ sx: {
147
+ backgroundColor: badgeBgToken,
148
+ color: badgeTextToken,
149
+ fontFamily: "mono",
150
+ fontWeight: "bold",
151
+ fontSize: "11px",
152
+ lineHeight: 1,
153
+ paddingX: "6px",
154
+ paddingY: "3px",
155
+ borderRadius: "md",
156
+ textTransform: "uppercase",
157
+ letterSpacing: "0.05em",
158
+ display: "inline-flex",
159
+ alignItems: "center",
160
+ boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
161
+ transform: "translateY(3px)"
157
162
  }
158
- }, subtitle)), /* @__PURE__ */React.createElement(Text, {
163
+ }, badge)), /* @__PURE__ */React.createElement(Text, {
159
164
  as: "div",
160
165
  sx: {
161
166
  fontFamily: "body",
162
167
  fontWeight: 400,
163
- fontSize: "15px",
168
+ fontSize: "16px",
164
169
  color: "inherit",
165
- opacity: 0.85,
170
+ opacity: 0.9,
166
171
  mt: "1",
167
172
  overflow: "hidden",
168
173
  textOverflow: "ellipsis",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "React components for ttoss ecosystem.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -110,8 +110,8 @@
110
110
  "peerDependencies": {
111
111
  "react": ">=16.8.0",
112
112
  "@ttoss/react-hooks": "^2.1.10",
113
- "@ttoss/ui": "^6.0.4",
114
- "@ttoss/react-i18n": "^2.0.24"
113
+ "@ttoss/react-i18n": "^2.0.24",
114
+ "@ttoss/ui": "^6.0.4"
115
115
  },
116
116
  "devDependencies": {
117
117
  "@types/jest": "^30.0.0",
@@ -120,12 +120,12 @@
120
120
  "react": "^19.2.0",
121
121
  "tsup": "^8.5.1",
122
122
  "tsx": "^4.19.2",
123
+ "@ttoss/react-i18n": "^2.0.24",
123
124
  "@ttoss/config": "^1.35.12",
124
125
  "@ttoss/i18n-cli": "^0.7.38",
125
126
  "@ttoss/react-hooks": "^2.1.10",
126
- "@ttoss/react-i18n": "^2.0.24",
127
- "@ttoss/react-icons": "^0.5.5",
128
127
  "@ttoss/test-utils": "^4.0.1",
128
+ "@ttoss/react-icons": "^0.5.5",
129
129
  "@ttoss/ui": "^6.0.4"
130
130
  },
131
131
  "keywords": [