@ivy-interactive/ivy-design-system 1.1.19 → 1.1.21
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.
- package/dist/csharp/IvyFrameworkBorderRadiusTokens.cs +142 -0
- package/dist/csharp/IvyFrameworkChromaticTokens.cs +1 -1
- package/dist/csharp/IvyFrameworkDarkThemeTokens.cs +3 -61
- package/dist/csharp/IvyFrameworkLightThemeTokens.cs +3 -61
- package/dist/csharp/IvyFrameworkNeutralTokens.cs +1 -1
- package/dist/csharp/IvyFrameworkPaddingTokens.cs +142 -0
- package/dist/csharp/IvyFrameworkSourceTokens.cs +1 -1
- package/dist/csharp/IvyWebDarkThemeTokens.cs +1 -1
- package/dist/csharp/IvyWebLightThemeTokens.cs +1 -1
- package/dist/csharp/IvyWebSourceTokens.cs +1 -1
- package/dist/css/ivy-framework-border-radius.css +12 -0
- package/dist/css/ivy-framework-dark-flat.css +0 -8
- package/dist/css/ivy-framework-dark.css +0 -8
- package/dist/css/ivy-framework-light.css +0 -8
- package/dist/css/ivy-framework-padding.css +12 -0
- package/dist/tokens/index.json +72 -68
- package/package.json +1 -1
|
@@ -0,0 +1,142 @@
|
|
|
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-02-02T14:08:03.893Z
|
|
21
|
+
/// Total tokens: 8
|
|
22
|
+
/// </remarks>
|
|
23
|
+
public static class IvyFrameworkBorderRadiusTokens
|
|
24
|
+
{
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
/// Design tokens for border-radius
|
|
28
|
+
/// </summary>
|
|
29
|
+
public static class BorderRadius
|
|
30
|
+
{
|
|
31
|
+
/// <summary>none</summary>
|
|
32
|
+
public static readonly string None = "0rem";
|
|
33
|
+
|
|
34
|
+
/// <summary>sm</summary>
|
|
35
|
+
public static readonly string Sm = "0.25rem";
|
|
36
|
+
|
|
37
|
+
/// <summary>md</summary>
|
|
38
|
+
public static readonly string Md = "0.5rem";
|
|
39
|
+
|
|
40
|
+
/// <summary>lg</summary>
|
|
41
|
+
public static readonly string Lg = "0.75rem";
|
|
42
|
+
|
|
43
|
+
/// <summary>xl</summary>
|
|
44
|
+
public static readonly string Xl = "1rem";
|
|
45
|
+
|
|
46
|
+
/// <summary>2xl</summary>
|
|
47
|
+
public static readonly string _2xl = "1.5rem";
|
|
48
|
+
|
|
49
|
+
/// <summary>3xl</summary>
|
|
50
|
+
public static readonly string _3xl = "2rem";
|
|
51
|
+
|
|
52
|
+
/// <summary>full</summary>
|
|
53
|
+
public static readonly string Full = "9999px";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// <summary>
|
|
57
|
+
/// Generates CSS custom properties for all design tokens
|
|
58
|
+
/// </summary>
|
|
59
|
+
/// <param name="selector">CSS selector (default: ":root")</param>
|
|
60
|
+
/// <returns>CSS string with all custom properties</returns>
|
|
61
|
+
public static string GenerateCSS(string selector = ":root")
|
|
62
|
+
{
|
|
63
|
+
var css = new System.Text.StringBuilder();
|
|
64
|
+
css.AppendLine($"{selector} {{");
|
|
65
|
+
|
|
66
|
+
// BorderRadius tokens
|
|
67
|
+
foreach (var field in typeof(BorderRadius).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
68
|
+
{
|
|
69
|
+
if (field.FieldType == typeof(string))
|
|
70
|
+
{
|
|
71
|
+
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
72
|
+
var value = field.GetValue(null);
|
|
73
|
+
css.AppendLine($" --{name}: {value};");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
css.AppendLine("}");
|
|
78
|
+
return css.ToString();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/// <summary>
|
|
82
|
+
/// Gets a token value by its CSS variable name
|
|
83
|
+
/// </summary>
|
|
84
|
+
/// <param name="tokenName">Token name in kebab-case (e.g., "color-brand-primary")</param>
|
|
85
|
+
/// <returns>Token value or null if not found</returns>
|
|
86
|
+
public static string? GetToken(string tokenName)
|
|
87
|
+
{
|
|
88
|
+
var propertyName = string.Concat(tokenName.Split('-').Select(s =>
|
|
89
|
+
char.ToUpper(s[0]) + s.Substring(1)));
|
|
90
|
+
|
|
91
|
+
var category = tokenName.Split('-')[0];
|
|
92
|
+
var categoryClassName = char.ToUpper(category[0]) + category.Substring(1);
|
|
93
|
+
|
|
94
|
+
var type = typeof(IvyFrameworkBorderRadiusTokens).GetNestedType(categoryClassName);
|
|
95
|
+
if (type == null) return null;
|
|
96
|
+
|
|
97
|
+
var field = type.GetField(propertyName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
|
|
98
|
+
return field?.GetValue(null) as string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/// <summary>
|
|
102
|
+
/// Gets all token names
|
|
103
|
+
/// </summary>
|
|
104
|
+
/// <returns>Array of all token names in kebab-case</returns>
|
|
105
|
+
public static string[] GetAllTokenNames()
|
|
106
|
+
{
|
|
107
|
+
return new string[]
|
|
108
|
+
{
|
|
109
|
+
"none",
|
|
110
|
+
"sm",
|
|
111
|
+
"md",
|
|
112
|
+
"lg",
|
|
113
|
+
"xl",
|
|
114
|
+
"2xl",
|
|
115
|
+
"3xl",
|
|
116
|
+
"full"
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
/// Gets all token values as a dictionary
|
|
122
|
+
/// </summary>
|
|
123
|
+
/// <returns>Dictionary of token name -> value</returns>
|
|
124
|
+
public static System.Collections.Generic.Dictionary<string, string> GetAllTokens()
|
|
125
|
+
{
|
|
126
|
+
var tokens = new System.Collections.Generic.Dictionary<string, string>();
|
|
127
|
+
|
|
128
|
+
// BorderRadius tokens
|
|
129
|
+
foreach (var field in typeof(BorderRadius).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
130
|
+
{
|
|
131
|
+
if (field.FieldType == typeof(string))
|
|
132
|
+
{
|
|
133
|
+
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
134
|
+
var value = field.GetValue(null) as string;
|
|
135
|
+
if (value != null) tokens[name] = value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return tokens;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -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-02-
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.893Z
|
|
21
21
|
/// Total tokens: 34
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyFrameworkChromaticTokens
|
|
@@ -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-02-
|
|
21
|
-
/// Total tokens:
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.895Z
|
|
21
|
+
/// Total tokens: 25
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyFrameworkDarkThemeTokens
|
|
24
24
|
{
|
|
@@ -104,36 +104,6 @@ namespace Ivy.Themes
|
|
|
104
104
|
public static readonly string PopoverForeground = "#f8f8f8";
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
/// <summary>
|
|
108
|
-
/// Design tokens for border-radius
|
|
109
|
-
/// </summary>
|
|
110
|
-
public static class BorderRadius
|
|
111
|
-
{
|
|
112
|
-
/// <summary>none</summary>
|
|
113
|
-
public static readonly string None = "0rem";
|
|
114
|
-
|
|
115
|
-
/// <summary>sm</summary>
|
|
116
|
-
public static readonly string Sm = "0.25rem";
|
|
117
|
-
|
|
118
|
-
/// <summary>md</summary>
|
|
119
|
-
public static readonly string Md = "0.5rem";
|
|
120
|
-
|
|
121
|
-
/// <summary>lg</summary>
|
|
122
|
-
public static readonly string Lg = "0.75rem";
|
|
123
|
-
|
|
124
|
-
/// <summary>xl</summary>
|
|
125
|
-
public static readonly string Xl = "1rem";
|
|
126
|
-
|
|
127
|
-
/// <summary>2xl</summary>
|
|
128
|
-
public static readonly string _2xl = "1.5rem";
|
|
129
|
-
|
|
130
|
-
/// <summary>3xl</summary>
|
|
131
|
-
public static readonly string _3xl = "2rem";
|
|
132
|
-
|
|
133
|
-
/// <summary>full</summary>
|
|
134
|
-
public static readonly string Full = "9999px";
|
|
135
|
-
}
|
|
136
|
-
|
|
137
107
|
/// <summary>
|
|
138
108
|
/// Generates CSS custom properties for all design tokens
|
|
139
109
|
/// </summary>
|
|
@@ -154,16 +124,6 @@ namespace Ivy.Themes
|
|
|
154
124
|
css.AppendLine($" --{name}: {value};");
|
|
155
125
|
}
|
|
156
126
|
}
|
|
157
|
-
// BorderRadius tokens
|
|
158
|
-
foreach (var field in typeof(BorderRadius).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
159
|
-
{
|
|
160
|
-
if (field.FieldType == typeof(string))
|
|
161
|
-
{
|
|
162
|
-
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
163
|
-
var value = field.GetValue(null);
|
|
164
|
-
css.AppendLine($" --{name}: {value};");
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
127
|
|
|
168
128
|
css.AppendLine("}");
|
|
169
129
|
return css.ToString();
|
|
@@ -221,15 +181,7 @@ namespace Ivy.Themes
|
|
|
221
181
|
"card",
|
|
222
182
|
"card-foreground",
|
|
223
183
|
"popover",
|
|
224
|
-
"popover-foreground"
|
|
225
|
-
"none",
|
|
226
|
-
"sm",
|
|
227
|
-
"md",
|
|
228
|
-
"lg",
|
|
229
|
-
"xl",
|
|
230
|
-
"2xl",
|
|
231
|
-
"3xl",
|
|
232
|
-
"full"
|
|
184
|
+
"popover-foreground"
|
|
233
185
|
};
|
|
234
186
|
}
|
|
235
187
|
|
|
@@ -251,16 +203,6 @@ namespace Ivy.Themes
|
|
|
251
203
|
if (value != null) tokens[name] = value;
|
|
252
204
|
}
|
|
253
205
|
}
|
|
254
|
-
// BorderRadius tokens
|
|
255
|
-
foreach (var field in typeof(BorderRadius).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
256
|
-
{
|
|
257
|
-
if (field.FieldType == typeof(string))
|
|
258
|
-
{
|
|
259
|
-
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
260
|
-
var value = field.GetValue(null) as string;
|
|
261
|
-
if (value != null) tokens[name] = value;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
206
|
|
|
265
207
|
return tokens;
|
|
266
208
|
}
|
|
@@ -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-02-
|
|
21
|
-
/// Total tokens:
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.894Z
|
|
21
|
+
/// Total tokens: 25
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyFrameworkLightThemeTokens
|
|
24
24
|
{
|
|
@@ -104,36 +104,6 @@ namespace Ivy.Themes
|
|
|
104
104
|
public static readonly string PopoverForeground = "#000000";
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
/// <summary>
|
|
108
|
-
/// Design tokens for border-radius
|
|
109
|
-
/// </summary>
|
|
110
|
-
public static class BorderRadius
|
|
111
|
-
{
|
|
112
|
-
/// <summary>none</summary>
|
|
113
|
-
public static readonly string None = "0rem";
|
|
114
|
-
|
|
115
|
-
/// <summary>sm</summary>
|
|
116
|
-
public static readonly string Sm = "0.25rem";
|
|
117
|
-
|
|
118
|
-
/// <summary>md</summary>
|
|
119
|
-
public static readonly string Md = "0.5rem";
|
|
120
|
-
|
|
121
|
-
/// <summary>lg</summary>
|
|
122
|
-
public static readonly string Lg = "0.75rem";
|
|
123
|
-
|
|
124
|
-
/// <summary>xl</summary>
|
|
125
|
-
public static readonly string Xl = "1rem";
|
|
126
|
-
|
|
127
|
-
/// <summary>2xl</summary>
|
|
128
|
-
public static readonly string _2xl = "1.5rem";
|
|
129
|
-
|
|
130
|
-
/// <summary>3xl</summary>
|
|
131
|
-
public static readonly string _3xl = "2rem";
|
|
132
|
-
|
|
133
|
-
/// <summary>full</summary>
|
|
134
|
-
public static readonly string Full = "9999px";
|
|
135
|
-
}
|
|
136
|
-
|
|
137
107
|
/// <summary>
|
|
138
108
|
/// Generates CSS custom properties for all design tokens
|
|
139
109
|
/// </summary>
|
|
@@ -154,16 +124,6 @@ namespace Ivy.Themes
|
|
|
154
124
|
css.AppendLine($" --{name}: {value};");
|
|
155
125
|
}
|
|
156
126
|
}
|
|
157
|
-
// BorderRadius tokens
|
|
158
|
-
foreach (var field in typeof(BorderRadius).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
159
|
-
{
|
|
160
|
-
if (field.FieldType == typeof(string))
|
|
161
|
-
{
|
|
162
|
-
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
163
|
-
var value = field.GetValue(null);
|
|
164
|
-
css.AppendLine($" --{name}: {value};");
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
127
|
|
|
168
128
|
css.AppendLine("}");
|
|
169
129
|
return css.ToString();
|
|
@@ -221,15 +181,7 @@ namespace Ivy.Themes
|
|
|
221
181
|
"card",
|
|
222
182
|
"card-foreground",
|
|
223
183
|
"popover",
|
|
224
|
-
"popover-foreground"
|
|
225
|
-
"none",
|
|
226
|
-
"sm",
|
|
227
|
-
"md",
|
|
228
|
-
"lg",
|
|
229
|
-
"xl",
|
|
230
|
-
"2xl",
|
|
231
|
-
"3xl",
|
|
232
|
-
"full"
|
|
184
|
+
"popover-foreground"
|
|
233
185
|
};
|
|
234
186
|
}
|
|
235
187
|
|
|
@@ -251,16 +203,6 @@ namespace Ivy.Themes
|
|
|
251
203
|
if (value != null) tokens[name] = value;
|
|
252
204
|
}
|
|
253
205
|
}
|
|
254
|
-
// BorderRadius tokens
|
|
255
|
-
foreach (var field in typeof(BorderRadius).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
256
|
-
{
|
|
257
|
-
if (field.FieldType == typeof(string))
|
|
258
|
-
{
|
|
259
|
-
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
260
|
-
var value = field.GetValue(null) as string;
|
|
261
|
-
if (value != null) tokens[name] = value;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
206
|
|
|
265
207
|
return tokens;
|
|
266
208
|
}
|
|
@@ -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-02-
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.892Z
|
|
21
21
|
/// Total tokens: 14
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyFrameworkNeutralTokens
|
|
@@ -0,0 +1,142 @@
|
|
|
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-02-02T14:08:03.894Z
|
|
21
|
+
/// Total tokens: 8
|
|
22
|
+
/// </remarks>
|
|
23
|
+
public static class IvyFrameworkPaddingTokens
|
|
24
|
+
{
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
/// Design tokens for padding
|
|
28
|
+
/// </summary>
|
|
29
|
+
public static class Padding
|
|
30
|
+
{
|
|
31
|
+
/// <summary>none</summary>
|
|
32
|
+
public static readonly string None = "0rem";
|
|
33
|
+
|
|
34
|
+
/// <summary>xs</summary>
|
|
35
|
+
public static readonly string Xs = "0.25rem";
|
|
36
|
+
|
|
37
|
+
/// <summary>sm</summary>
|
|
38
|
+
public static readonly string Sm = "0.5rem";
|
|
39
|
+
|
|
40
|
+
/// <summary>md</summary>
|
|
41
|
+
public static readonly string Md = "1rem";
|
|
42
|
+
|
|
43
|
+
/// <summary>lg</summary>
|
|
44
|
+
public static readonly string Lg = "1.5rem";
|
|
45
|
+
|
|
46
|
+
/// <summary>xl</summary>
|
|
47
|
+
public static readonly string Xl = "2rem";
|
|
48
|
+
|
|
49
|
+
/// <summary>2xl</summary>
|
|
50
|
+
public static readonly string _2xl = "3rem";
|
|
51
|
+
|
|
52
|
+
/// <summary>3xl</summary>
|
|
53
|
+
public static readonly string _3xl = "4rem";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// <summary>
|
|
57
|
+
/// Generates CSS custom properties for all design tokens
|
|
58
|
+
/// </summary>
|
|
59
|
+
/// <param name="selector">CSS selector (default: ":root")</param>
|
|
60
|
+
/// <returns>CSS string with all custom properties</returns>
|
|
61
|
+
public static string GenerateCSS(string selector = ":root")
|
|
62
|
+
{
|
|
63
|
+
var css = new System.Text.StringBuilder();
|
|
64
|
+
css.AppendLine($"{selector} {{");
|
|
65
|
+
|
|
66
|
+
// Padding tokens
|
|
67
|
+
foreach (var field in typeof(Padding).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
68
|
+
{
|
|
69
|
+
if (field.FieldType == typeof(string))
|
|
70
|
+
{
|
|
71
|
+
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
72
|
+
var value = field.GetValue(null);
|
|
73
|
+
css.AppendLine($" --{name}: {value};");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
css.AppendLine("}");
|
|
78
|
+
return css.ToString();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/// <summary>
|
|
82
|
+
/// Gets a token value by its CSS variable name
|
|
83
|
+
/// </summary>
|
|
84
|
+
/// <param name="tokenName">Token name in kebab-case (e.g., "color-brand-primary")</param>
|
|
85
|
+
/// <returns>Token value or null if not found</returns>
|
|
86
|
+
public static string? GetToken(string tokenName)
|
|
87
|
+
{
|
|
88
|
+
var propertyName = string.Concat(tokenName.Split('-').Select(s =>
|
|
89
|
+
char.ToUpper(s[0]) + s.Substring(1)));
|
|
90
|
+
|
|
91
|
+
var category = tokenName.Split('-')[0];
|
|
92
|
+
var categoryClassName = char.ToUpper(category[0]) + category.Substring(1);
|
|
93
|
+
|
|
94
|
+
var type = typeof(IvyFrameworkPaddingTokens).GetNestedType(categoryClassName);
|
|
95
|
+
if (type == null) return null;
|
|
96
|
+
|
|
97
|
+
var field = type.GetField(propertyName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
|
|
98
|
+
return field?.GetValue(null) as string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/// <summary>
|
|
102
|
+
/// Gets all token names
|
|
103
|
+
/// </summary>
|
|
104
|
+
/// <returns>Array of all token names in kebab-case</returns>
|
|
105
|
+
public static string[] GetAllTokenNames()
|
|
106
|
+
{
|
|
107
|
+
return new string[]
|
|
108
|
+
{
|
|
109
|
+
"none",
|
|
110
|
+
"xs",
|
|
111
|
+
"sm",
|
|
112
|
+
"md",
|
|
113
|
+
"lg",
|
|
114
|
+
"xl",
|
|
115
|
+
"2xl",
|
|
116
|
+
"3xl"
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
/// Gets all token values as a dictionary
|
|
122
|
+
/// </summary>
|
|
123
|
+
/// <returns>Dictionary of token name -> value</returns>
|
|
124
|
+
public static System.Collections.Generic.Dictionary<string, string> GetAllTokens()
|
|
125
|
+
{
|
|
126
|
+
var tokens = new System.Collections.Generic.Dictionary<string, string>();
|
|
127
|
+
|
|
128
|
+
// Padding tokens
|
|
129
|
+
foreach (var field in typeof(Padding).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
|
130
|
+
{
|
|
131
|
+
if (field.FieldType == typeof(string))
|
|
132
|
+
{
|
|
133
|
+
var name = string.Concat(field.Name.Select((x, i) => i > 0 && char.IsUpper(x) ? "-" + x.ToString() : x.ToString())).ToLower();
|
|
134
|
+
var value = field.GetValue(null) as string;
|
|
135
|
+
if (value != null) tokens[name] = value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return tokens;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -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-02-
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.891Z
|
|
21
21
|
/// Total tokens: 59
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyFrameworkSourceTokens
|
|
@@ -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-02-
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.896Z
|
|
21
21
|
/// Total tokens: 24
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyWebDarkThemeTokens
|
|
@@ -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-02-
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.896Z
|
|
21
21
|
/// Total tokens: 24
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyWebLightThemeTokens
|
|
@@ -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-02-
|
|
20
|
+
/// Generated on: 2026-02-02T14:08:03.895Z
|
|
21
21
|
/// Total tokens: 25
|
|
22
22
|
/// </remarks>
|
|
23
23
|
public static class IvyWebSourceTokens
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@layer base {
|
|
2
|
+
:root {
|
|
3
|
+
--border-radius-none: 0rem;
|
|
4
|
+
--border-radius-sm: 0.25rem;
|
|
5
|
+
--border-radius-md: 0.5rem;
|
|
6
|
+
--border-radius-lg: 0.75rem;
|
|
7
|
+
--border-radius-xl: 1rem;
|
|
8
|
+
--border-radius-2xl: 1.5rem;
|
|
9
|
+
--border-radius-3xl: 2rem;
|
|
10
|
+
--border-radius-full: 9999px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -25,13 +25,5 @@
|
|
|
25
25
|
--card-foreground: #f8f8f8;
|
|
26
26
|
--popover: #000000;
|
|
27
27
|
--popover-foreground: #f8f8f8;
|
|
28
|
-
--radius-none: 0rem;
|
|
29
|
-
--radius-sm: 0.25rem;
|
|
30
|
-
--radius: 0.5rem;
|
|
31
|
-
--radius-lg: 0.75rem;
|
|
32
|
-
--radius-xl: 1rem;
|
|
33
|
-
--radius-2xl: 1.5rem;
|
|
34
|
-
--radius-3xl: 2rem;
|
|
35
|
-
--radius-full: 9999px;
|
|
36
28
|
}
|
|
37
29
|
}
|
|
@@ -25,13 +25,5 @@
|
|
|
25
25
|
--color-card-foreground: #f8f8f8;
|
|
26
26
|
--color-popover: #000000;
|
|
27
27
|
--color-popover-foreground: #f8f8f8;
|
|
28
|
-
--border-radius-none: 0rem;
|
|
29
|
-
--border-radius-sm: 0.25rem;
|
|
30
|
-
--border-radius-md: 0.5rem;
|
|
31
|
-
--border-radius-lg: 0.75rem;
|
|
32
|
-
--border-radius-xl: 1rem;
|
|
33
|
-
--border-radius-2xl: 1.5rem;
|
|
34
|
-
--border-radius-3xl: 2rem;
|
|
35
|
-
--border-radius-full: 9999px;
|
|
36
28
|
}
|
|
37
29
|
}
|
|
@@ -25,13 +25,5 @@
|
|
|
25
25
|
--color-card-foreground: #262626;
|
|
26
26
|
--color-popover: #ffffff;
|
|
27
27
|
--color-popover-foreground: #000000;
|
|
28
|
-
--border-radius-none: 0rem;
|
|
29
|
-
--border-radius-sm: 0.25rem;
|
|
30
|
-
--border-radius-md: 0.5rem;
|
|
31
|
-
--border-radius-lg: 0.75rem;
|
|
32
|
-
--border-radius-xl: 1rem;
|
|
33
|
-
--border-radius-2xl: 1.5rem;
|
|
34
|
-
--border-radius-3xl: 2rem;
|
|
35
|
-
--border-radius-full: 9999px;
|
|
36
28
|
}
|
|
37
29
|
}
|
package/dist/tokens/index.json
CHANGED
|
@@ -345,40 +345,6 @@
|
|
|
345
345
|
"value": "{ivy-framework.source.color.black}",
|
|
346
346
|
"type": "color"
|
|
347
347
|
}
|
|
348
|
-
},
|
|
349
|
-
"border-radius": {
|
|
350
|
-
"none": {
|
|
351
|
-
"value": "{ivy-framework.source.sizing.0}",
|
|
352
|
-
"type": "borderRadius"
|
|
353
|
-
},
|
|
354
|
-
"sm": {
|
|
355
|
-
"value": "{ivy-framework.source.sizing.1}",
|
|
356
|
-
"type": "borderRadius"
|
|
357
|
-
},
|
|
358
|
-
"md": {
|
|
359
|
-
"value": "{ivy-framework.source.sizing.2}",
|
|
360
|
-
"type": "borderRadius"
|
|
361
|
-
},
|
|
362
|
-
"lg": {
|
|
363
|
-
"value": "{ivy-framework.source.sizing.3}",
|
|
364
|
-
"type": "borderRadius"
|
|
365
|
-
},
|
|
366
|
-
"xl": {
|
|
367
|
-
"value": "{ivy-framework.source.sizing.4}",
|
|
368
|
-
"type": "borderRadius"
|
|
369
|
-
},
|
|
370
|
-
"2xl": {
|
|
371
|
-
"value": "{ivy-framework.source.sizing.6}",
|
|
372
|
-
"type": "borderRadius"
|
|
373
|
-
},
|
|
374
|
-
"3xl": {
|
|
375
|
-
"value": "{ivy-framework.source.sizing.8}",
|
|
376
|
-
"type": "borderRadius"
|
|
377
|
-
},
|
|
378
|
-
"full": {
|
|
379
|
-
"value": "{ivy-framework.source.sizing.full}",
|
|
380
|
-
"type": "borderRadius"
|
|
381
|
-
}
|
|
382
348
|
}
|
|
383
349
|
},
|
|
384
350
|
"dark": {
|
|
@@ -483,40 +449,6 @@
|
|
|
483
449
|
"value": "{ivy-framework.source.color.muted-light}",
|
|
484
450
|
"type": "color"
|
|
485
451
|
}
|
|
486
|
-
},
|
|
487
|
-
"border-radius": {
|
|
488
|
-
"none": {
|
|
489
|
-
"value": "{ivy-framework.source.sizing.0}",
|
|
490
|
-
"type": "borderRadius"
|
|
491
|
-
},
|
|
492
|
-
"sm": {
|
|
493
|
-
"value": "{ivy-framework.source.sizing.1}",
|
|
494
|
-
"type": "borderRadius"
|
|
495
|
-
},
|
|
496
|
-
"md": {
|
|
497
|
-
"value": "{ivy-framework.source.sizing.2}",
|
|
498
|
-
"type": "borderRadius"
|
|
499
|
-
},
|
|
500
|
-
"lg": {
|
|
501
|
-
"value": "{ivy-framework.source.sizing.3}",
|
|
502
|
-
"type": "borderRadius"
|
|
503
|
-
},
|
|
504
|
-
"xl": {
|
|
505
|
-
"value": "{ivy-framework.source.sizing.4}",
|
|
506
|
-
"type": "borderRadius"
|
|
507
|
-
},
|
|
508
|
-
"2xl": {
|
|
509
|
-
"value": "{ivy-framework.source.sizing.6}",
|
|
510
|
-
"type": "borderRadius"
|
|
511
|
-
},
|
|
512
|
-
"3xl": {
|
|
513
|
-
"value": "{ivy-framework.source.sizing.8}",
|
|
514
|
-
"type": "borderRadius"
|
|
515
|
-
},
|
|
516
|
-
"full": {
|
|
517
|
-
"value": "{ivy-framework.source.sizing.full}",
|
|
518
|
-
"type": "borderRadius"
|
|
519
|
-
}
|
|
520
452
|
}
|
|
521
453
|
}
|
|
522
454
|
},
|
|
@@ -719,6 +651,78 @@
|
|
|
719
651
|
"type": "color"
|
|
720
652
|
}
|
|
721
653
|
}
|
|
654
|
+
},
|
|
655
|
+
"border-radius": {
|
|
656
|
+
"border-radius": {
|
|
657
|
+
"none": {
|
|
658
|
+
"value": "{ivy-framework.source.sizing.0}",
|
|
659
|
+
"type": "borderRadius"
|
|
660
|
+
},
|
|
661
|
+
"sm": {
|
|
662
|
+
"value": "{ivy-framework.source.sizing.1}",
|
|
663
|
+
"type": "borderRadius"
|
|
664
|
+
},
|
|
665
|
+
"md": {
|
|
666
|
+
"value": "{ivy-framework.source.sizing.2}",
|
|
667
|
+
"type": "borderRadius"
|
|
668
|
+
},
|
|
669
|
+
"lg": {
|
|
670
|
+
"value": "{ivy-framework.source.sizing.3}",
|
|
671
|
+
"type": "borderRadius"
|
|
672
|
+
},
|
|
673
|
+
"xl": {
|
|
674
|
+
"value": "{ivy-framework.source.sizing.4}",
|
|
675
|
+
"type": "borderRadius"
|
|
676
|
+
},
|
|
677
|
+
"2xl": {
|
|
678
|
+
"value": "{ivy-framework.source.sizing.6}",
|
|
679
|
+
"type": "borderRadius"
|
|
680
|
+
},
|
|
681
|
+
"3xl": {
|
|
682
|
+
"value": "{ivy-framework.source.sizing.8}",
|
|
683
|
+
"type": "borderRadius"
|
|
684
|
+
},
|
|
685
|
+
"full": {
|
|
686
|
+
"value": "{ivy-framework.source.sizing.full}",
|
|
687
|
+
"type": "borderRadius"
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"padding": {
|
|
692
|
+
"padding": {
|
|
693
|
+
"none": {
|
|
694
|
+
"value": "{ivy-framework.source.sizing.0}",
|
|
695
|
+
"type": "spacing"
|
|
696
|
+
},
|
|
697
|
+
"xs": {
|
|
698
|
+
"value": "{ivy-framework.source.sizing.1}",
|
|
699
|
+
"type": "spacing"
|
|
700
|
+
},
|
|
701
|
+
"sm": {
|
|
702
|
+
"value": "{ivy-framework.source.sizing.2}",
|
|
703
|
+
"type": "spacing"
|
|
704
|
+
},
|
|
705
|
+
"md": {
|
|
706
|
+
"value": "{ivy-framework.source.sizing.4}",
|
|
707
|
+
"type": "spacing"
|
|
708
|
+
},
|
|
709
|
+
"lg": {
|
|
710
|
+
"value": "{ivy-framework.source.sizing.6}",
|
|
711
|
+
"type": "spacing"
|
|
712
|
+
},
|
|
713
|
+
"xl": {
|
|
714
|
+
"value": "{ivy-framework.source.sizing.8}",
|
|
715
|
+
"type": "spacing"
|
|
716
|
+
},
|
|
717
|
+
"2xl": {
|
|
718
|
+
"value": "{ivy-framework.source.sizing.12}",
|
|
719
|
+
"type": "spacing"
|
|
720
|
+
},
|
|
721
|
+
"3xl": {
|
|
722
|
+
"value": "{ivy-framework.source.sizing.16}",
|
|
723
|
+
"type": "spacing"
|
|
724
|
+
}
|
|
725
|
+
}
|
|
722
726
|
}
|
|
723
727
|
},
|
|
724
728
|
"ivy-web": {
|