@ivy-interactive/ivy-design-system 1.1.27 → 1.1.29

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.
@@ -17,7 +17,7 @@ namespace Ivy.Themes
17
17
  /// Provides compile-time access to all design tokens
18
18
  /// </summary>
19
19
  /// <remarks>
20
- /// Generated on: 2026-04-07T08:39:46.646Z
20
+ /// Generated on: 2026-04-10T08:58:36.546Z
21
21
  /// Total tokens: 8
22
22
  /// </remarks>
23
23
  public static class IvyFrameworkBorderRadiusTokens
@@ -17,8 +17,8 @@ namespace Ivy.Themes
17
17
  /// Provides compile-time access to all design tokens
18
18
  /// </summary>
19
19
  /// <remarks>
20
- /// Generated on: 2026-04-07T08:39:46.646Z
21
- /// Total tokens: 34
20
+ /// Generated on: 2026-04-10T08:58:36.546Z
21
+ /// Total tokens: 36
22
22
  /// </remarks>
23
23
  public static class IvyFrameworkChromaticTokens
24
24
  {
@@ -129,6 +129,12 @@ namespace Ivy.Themes
129
129
 
130
130
  /// <summary>rose-foreground</summary>
131
131
  public static readonly string RoseForeground = "#ffffff";
132
+
133
+ /// <summary>ivy-green</summary>
134
+ public static readonly string IvyGreen = "#00cc92";
135
+
136
+ /// <summary>ivy-green-foreground</summary>
137
+ public static readonly string IvyGreenForeground = "#000000";
132
138
  }
133
139
 
134
140
  /// <summary>
@@ -217,7 +223,9 @@ namespace Ivy.Themes
217
223
  "pink",
218
224
  "pink-foreground",
219
225
  "rose",
220
- "rose-foreground"
226
+ "rose-foreground",
227
+ "ivy-green",
228
+ "ivy-green-foreground"
221
229
  };
222
230
  }
223
231
 
@@ -17,7 +17,7 @@ namespace Ivy.Themes
17
17
  /// Provides compile-time access to all design tokens
18
18
  /// </summary>
19
19
  /// <remarks>
20
- /// Generated on: 2026-04-07T08:39:46.647Z
20
+ /// Generated on: 2026-04-10T08:58:36.548Z
21
21
  /// Total tokens: 25
22
22
  /// </remarks>
23
23
  public static class IvyFrameworkDarkThemeTokens
@@ -98,7 +98,7 @@ namespace Ivy.Themes
98
98
  public static readonly string CardForeground = "#f8f8f8";
99
99
 
100
100
  /// <summary>popover</summary>
101
- public static readonly string Popover = "#000000";
101
+ public static readonly string Popover = "#171717";
102
102
 
103
103
  /// <summary>popover-foreground</summary>
104
104
  public static readonly string PopoverForeground = "#f8f8f8";
@@ -17,7 +17,7 @@ namespace Ivy.Themes
17
17
  /// Provides compile-time access to all design tokens
18
18
  /// </summary>
19
19
  /// <remarks>
20
- /// Generated on: 2026-04-07T08:39:46.647Z
20
+ /// Generated on: 2026-04-10T08:58:36.547Z
21
21
  /// Total tokens: 25
22
22
  /// </remarks>
23
23
  public static class IvyFrameworkLightThemeTokens
@@ -17,7 +17,7 @@ namespace Ivy.Themes
17
17
  /// Provides compile-time access to all design tokens
18
18
  /// </summary>
19
19
  /// <remarks>
20
- /// Generated on: 2026-04-07T08:39:46.645Z
20
+ /// Generated on: 2026-04-10T08:58:36.545Z
21
21
  /// Total tokens: 14
22
22
  /// </remarks>
23
23
  public static class IvyFrameworkNeutralTokens
@@ -17,7 +17,7 @@ namespace Ivy.Themes
17
17
  /// Provides compile-time access to all design tokens
18
18
  /// </summary>
19
19
  /// <remarks>
20
- /// Generated on: 2026-04-07T08:39:46.647Z
20
+ /// Generated on: 2026-04-10T08:58:36.546Z
21
21
  /// Total tokens: 8
22
22
  /// </remarks>
23
23
  public static class IvyFrameworkPaddingTokens
@@ -0,0 +1,138 @@
1
+ //------------------------------------------------------------------------------
2
+ // <auto-generated>
3
+ // This code was generated by Ivy Design System build script.
4
+ // Changes to this file may cause incorrect behavior and will be lost if
5
+ // the code is regenerated.
6
+ // </auto-generated>
7
+ //------------------------------------------------------------------------------
8
+
9
+ #nullable enable
10
+
11
+ using System.Linq;
12
+
13
+ namespace Ivy.Themes
14
+ {
15
+ /// <summary>
16
+ /// Design System tokens generated from Ivy Design System
17
+ /// Provides compile-time access to all design tokens
18
+ /// </summary>
19
+ /// <remarks>
20
+ /// Generated on: 2026-04-10T08:58:36.547Z
21
+ /// Total tokens: 7
22
+ /// </remarks>
23
+ public static class IvyFrameworkShadowTokens
24
+ {
25
+
26
+ /// <summary>
27
+ /// Design tokens for shadow
28
+ /// </summary>
29
+ public static class Shadow
30
+ {
31
+ /// <summary>none</summary>
32
+ public static readonly string None = "none";
33
+
34
+ /// <summary>sm</summary>
35
+ public static readonly string Sm = "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
36
+
37
+ /// <summary>md</summary>
38
+ public static readonly string Md = "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)";
39
+
40
+ /// <summary>lg</summary>
41
+ public static readonly string Lg = "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)";
42
+
43
+ /// <summary>xl</summary>
44
+ public static readonly string Xl = "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)";
45
+
46
+ /// <summary>2xl</summary>
47
+ public static readonly string _2xl = "0 25px 50px -12px rgba(0, 0, 0, 0.25)";
48
+
49
+ /// <summary>inner</summary>
50
+ public static readonly string Inner = "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)";
51
+ }
52
+
53
+ /// <summary>
54
+ /// Generates CSS custom properties for all design tokens
55
+ /// </summary>
56
+ /// <param name="selector">CSS selector (default: ":root")</param>
57
+ /// <returns>CSS string with all custom properties</returns>
58
+ public static string GenerateCSS(string selector = ":root")
59
+ {
60
+ var css = new System.Text.StringBuilder();
61
+ css.AppendLine($"{selector} {{");
62
+
63
+ // Shadow tokens
64
+ foreach (var field in typeof(Shadow).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
65
+ {
66
+ if (field.FieldType == typeof(string))
67
+ {
68
+ var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
69
+ var value = field.GetValue(null);
70
+ css.AppendLine($" --{name}: {value};");
71
+ }
72
+ }
73
+
74
+ css.AppendLine("}");
75
+ return css.ToString();
76
+ }
77
+
78
+ /// <summary>
79
+ /// Gets a token value by its CSS variable name
80
+ /// </summary>
81
+ /// <param name="tokenName">Token name in kebab-case (e.g., "color-brand-primary")</param>
82
+ /// <returns>Token value or null if not found</returns>
83
+ public static string? GetToken(string tokenName)
84
+ {
85
+ var propertyName = string.Concat(tokenName.Split('-').Select(s =>
86
+ char.ToUpper(s[0]) + s.Substring(1)));
87
+
88
+ var category = tokenName.Split('-')[0];
89
+ var categoryClassName = char.ToUpper(category[0]) + category.Substring(1);
90
+
91
+ var type = typeof(IvyFrameworkShadowTokens).GetNestedType(categoryClassName);
92
+ if (type == null) return null;
93
+
94
+ var field = type.GetField(propertyName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
95
+ return field?.GetValue(null) as string;
96
+ }
97
+
98
+ /// <summary>
99
+ /// Gets all token names
100
+ /// </summary>
101
+ /// <returns>Array of all token names in kebab-case</returns>
102
+ public static string[] GetAllTokenNames()
103
+ {
104
+ return new string[]
105
+ {
106
+ "none",
107
+ "sm",
108
+ "md",
109
+ "lg",
110
+ "xl",
111
+ "2xl",
112
+ "inner"
113
+ };
114
+ }
115
+
116
+ /// <summary>
117
+ /// Gets all token values as a dictionary
118
+ /// </summary>
119
+ /// <returns>Dictionary of token name -> value</returns>
120
+ public static System.Collections.Generic.Dictionary<string, string> GetAllTokens()
121
+ {
122
+ var tokens = new System.Collections.Generic.Dictionary<string, string>();
123
+
124
+ // Shadow tokens
125
+ foreach (var field in typeof(Shadow).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
126
+ {
127
+ if (field.FieldType == typeof(string))
128
+ {
129
+ var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
130
+ var value = field.GetValue(null) as string;
131
+ if (value != null) tokens[name] = value;
132
+ }
133
+ }
134
+
135
+ return tokens;
136
+ }
137
+ }
138
+ }