hans-ui-design-lib 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -49,9 +49,7 @@ import { HansButton } from 'hans-ui-design-lib';
49
49
  <HansButton label="Button"></HansButton>;
50
50
  ```
51
51
 
52
- The current 5 theme combinations are still fully supported and remain the default preset system.
53
-
54
- If your project needs a custom semantic palette, you can override the active combination at runtime:
52
+ The current 5 theme combinations are fully supported and represent the default preset system. But if your project needs a custom semantic palette, you can override the active combination at runtime:
55
53
 
56
54
  ```tsx
57
55
  import { HansButton, setHansTheme } from 'hans-ui-design-lib';
@@ -67,6 +65,31 @@ setHansTheme({
67
65
  default: '#e11d48',
68
66
  neutral: '#fecdd3',
69
67
  },
68
+ success: {
69
+ strong: '#166534',
70
+ default: '#22c55e',
71
+ neutral: '#bbf7d0',
72
+ },
73
+ danger: {
74
+ strong: '#991b1b',
75
+ default: '#ef4444',
76
+ neutral: '#fecaca',
77
+ },
78
+ warning: {
79
+ strong: '#92400e',
80
+ default: '#f59e0b',
81
+ neutral: '#fde68a',
82
+ },
83
+ info: {
84
+ strong: '#155e75',
85
+ default: '#06b6d4',
86
+ neutral: '#cffafe',
87
+ },
88
+ base: {
89
+ strong: '#334155',
90
+ default: '#64748b',
91
+ neutral: '#cbd5e1',
92
+ },
70
93
  backgroundColor: '#f8fafc',
71
94
  textColor: '#0f172a',
72
95
  });
@@ -74,7 +97,7 @@ setHansTheme({
74
97
  <HansButton label="Button"></HansButton>;
75
98
  ```
76
99
 
77
- Only the tokens you provide are overridden. The others keep following the current `data-theme` fallback.
100
+ The dynamic object must include the same 23 color slots used by the built-in combinations. You can see more details about the palette customization in our Color System documentation session.
78
101
 
79
102
  ### Others:
80
103
 
@@ -99,7 +122,7 @@ If you're using other Technologies like Angular for example, you don't have to i
99
122
  </html>
100
123
  ```
101
124
 
102
- If you're using a technology like Angular, probably you're gonna have to declare CUSTOM_ELEMENTS_SCHEMA like this in your component:
125
+ If you're using a technology like Angular, probably you're gonna have to declare `CUSTOM_ELEMENTS_SCHEMA` like this in your component:
103
126
 
104
127
  ```ts
105
128
  import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@@ -132,6 +155,31 @@ You can also override the active combination dynamically in CDN/web component us
132
155
  default: '#e11d48',
133
156
  neutral: '#fecdd3',
134
157
  },
158
+ success: {
159
+ strong: '#166534',
160
+ default: '#22c55e',
161
+ neutral: '#bbf7d0',
162
+ },
163
+ danger: {
164
+ strong: '#991b1b',
165
+ default: '#ef4444',
166
+ neutral: '#fecaca',
167
+ },
168
+ warning: {
169
+ strong: '#92400e',
170
+ default: '#f59e0b',
171
+ neutral: '#fde68a',
172
+ },
173
+ info: {
174
+ strong: '#155e75',
175
+ default: '#06b6d4',
176
+ neutral: '#cffafe',
177
+ },
178
+ base: {
179
+ strong: '#334155',
180
+ default: '#64748b',
181
+ neutral: '#cbd5e1',
182
+ },
135
183
  backgroundColor: '#f8fafc',
136
184
  textColor: '#0f172a',
137
185
  });