@ttoss/components 2.8.0 → 2.9.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.
@@ -14,10 +14,10 @@ type SpotlightCardProps = {
14
14
  /**
15
15
  * Visual variant of the card.
16
16
  * - 'accent': (Default) Highlighted background (Action Accent) with shine animation.
17
- * - 'dark': Dark background (Action Primary).
17
+ * - 'primary': Primary background (Action Primary).
18
18
  * @default 'accent'
19
19
  */
20
- variant?: 'accent' | 'dark';
20
+ variant?: 'accent' | 'primary';
21
21
  };
22
22
  declare const SpotlightCard: {
23
23
  ({ icon, title, subtitle, description, firstButton, secondButton, variant, }: SpotlightCardProps): react_jsx_runtime.JSX.Element;
@@ -3,7 +3,7 @@ import { Icon } from "../chunk-2R7AUPJL.js";
3
3
  import { __name } from "../chunk-V4MHYKRI.js";
4
4
 
5
5
  // src/components/SpotlightCard/SpotlightCard.tsx
6
- import { Box, Button, Card, Flex, Text } from "@ttoss/ui";
6
+ import { Box, Button, Card, Flex, keyframes, Text } from "@ttoss/ui";
7
7
  import * as React from "react";
8
8
  var SpotlightCard = /* @__PURE__ */__name(({
9
9
  icon,
@@ -14,21 +14,17 @@ var SpotlightCard = /* @__PURE__ */__name(({
14
14
  secondButton,
15
15
  variant = "accent"
16
16
  }) => {
17
- React.useEffect(() => {
18
- const styleId = "oca-spotlight-animations-v2";
19
- if (!document.getElementById(styleId)) {
20
- const style = document.createElement("style");
21
- style.id = styleId;
22
- style.innerHTML = `
23
- @keyframes ocaGradientFlow {
24
- 0% { background-position: 0% 50%; }
25
- 50% { background-position: 100% 50%; }
26
- 100% { background-position: 0% 50%; }
27
- }
28
- `;
29
- document.head.appendChild(style);
17
+ const gradientFlow = keyframes({
18
+ "0%": {
19
+ backgroundPosition: "0% 50%"
20
+ },
21
+ "50%": {
22
+ backgroundPosition: "100% 50%"
23
+ },
24
+ "100%": {
25
+ backgroundPosition: "0% 50%"
30
26
  }
31
- }, []);
27
+ });
32
28
  const hasButtons = !!firstButton || !!secondButton;
33
29
  const isAccent = variant === "accent";
34
30
  const textColorToken = isAccent ? "action.text.accent.default" : "action.text.primary.default";
@@ -89,7 +85,7 @@ var SpotlightCard = /* @__PURE__ */__name(({
89
85
  return `linear-gradient(270deg, ${bgStart}, ${bgMiddle}, ${bgStart})`;
90
86
  }, "background"),
91
87
  backgroundSize: isAccent ? "200% 100%, auto" : "400% 400%",
92
- animation: "ocaGradientFlow 6s ease infinite",
88
+ animation: `${gradientFlow} 6s ease infinite`,
93
89
  width: "100%",
94
90
  minHeight: "104px",
95
91
  borderRadius: "xl",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "2.8.0",
3
+ "version": "2.9.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/react-i18n": "^2.0.24",
114
- "@ttoss/ui": "^6.0.4"
113
+ "@ttoss/ui": "^6.0.4",
114
+ "@ttoss/react-i18n": "^2.0.24"
115
115
  },
116
116
  "devDependencies": {
117
117
  "@types/jest": "^30.0.0",
@@ -121,10 +121,10 @@
121
121
  "tsup": "^8.5.1",
122
122
  "tsx": "^4.19.2",
123
123
  "@ttoss/config": "^1.35.12",
124
- "@ttoss/react-i18n": "^2.0.24",
124
+ "@ttoss/i18n-cli": "^0.7.38",
125
125
  "@ttoss/react-hooks": "^2.1.10",
126
+ "@ttoss/react-i18n": "^2.0.24",
126
127
  "@ttoss/react-icons": "^0.5.5",
127
- "@ttoss/i18n-cli": "^0.7.38",
128
128
  "@ttoss/test-utils": "^4.0.1",
129
129
  "@ttoss/ui": "^6.0.4"
130
130
  },