ywana-core8 0.1.75 → 0.1.76
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/ACCORDION_EVALUATION.md +583 -0
- package/CHECKBOX_EVALUATION.md +273 -0
- package/CHIP_EVALUATION.md +542 -0
- package/COLOR_EVALUATION.md +524 -0
- package/COMPONENTS_EVALUATION.md +477 -0
- package/FORM_EVALUATION.md +459 -0
- package/HEADER_EVALUATION.md +436 -0
- package/ICON_EVALUATION.md +254 -0
- package/LIST_EVALUATION.md +574 -0
- package/PROGRESS_EVALUATION.md +450 -0
- package/RADIO_EVALUATION.md +439 -0
- package/RADIO_VISUAL_FIX.md +183 -0
- package/SECTION_IMPROVEMENTS.md +153 -0
- package/SWITCH_EVALUATION.md +335 -0
- package/SWITCH_VISUAL_FIX.md +232 -0
- package/TAB_EVALUATION.md +626 -0
- package/TEXTFIELD_EVALUATION.md +747 -0
- package/TOOLTIP_FIX.md +157 -0
- package/TREE_EVALUATION.md +708 -0
- package/dist/index.cjs +7900 -1615
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6094 -1122
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +7929 -1645
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7900 -1615
- package/dist/index.umd.js.map +1 -1
- package/jest.config.js +24 -0
- package/package.json +10 -1
- package/src/html/accordion.css +208 -4
- package/src/html/accordion.example.js +390 -0
- package/src/html/accordion.js +284 -28
- package/src/html/accordion.unit.test.js +334 -0
- package/src/html/button.css +157 -16
- package/src/html/button.example.js +374 -0
- package/src/html/button.js +240 -60
- package/src/html/button.test.js +422 -0
- package/src/html/checkbox.css +74 -2
- package/src/html/checkbox.example.js +316 -0
- package/src/html/checkbox.js +113 -26
- package/src/html/checkbox.test.js +285 -0
- package/src/html/chip.css +230 -19
- package/src/html/chip.example.js +355 -0
- package/src/html/chip.js +321 -25
- package/src/html/chip.test.js +425 -0
- package/src/html/color.css +435 -6
- package/src/html/color.example.js +527 -0
- package/src/html/color.js +458 -9
- package/src/html/color.test.js +362 -4
- package/src/html/components.example.js +492 -0
- package/src/html/components_enhanced.test.js +581 -0
- package/src/html/form.css +70 -3
- package/src/html/form.example.js +385 -0
- package/src/html/form.js +232 -34
- package/src/html/form.test.js +369 -0
- package/src/html/header2.css +264 -0
- package/src/html/header2.example.js +411 -0
- package/src/html/header2.js +203 -0
- package/src/html/header2.test.js +377 -0
- package/src/html/icon.css +20 -2
- package/src/html/icon.example.js +268 -0
- package/src/html/icon.js +86 -16
- package/src/html/icon.test.js +231 -0
- package/src/html/index.js +1 -1
- package/src/html/list.css +393 -1
- package/src/html/list.example.js +404 -0
- package/src/html/list.js +583 -40
- package/src/html/list.test.js +383 -0
- package/src/html/progress.css +707 -17
- package/src/html/progress.example.js +424 -0
- package/src/html/progress.js +906 -9
- package/src/html/progress.test.js +313 -0
- package/src/html/property.css +399 -0
- package/src/html/property.example.js +553 -0
- package/src/html/property.js +393 -15
- package/src/html/property.test.js +351 -2
- package/src/html/radio-visual-test.js +289 -0
- package/src/html/radio.css +137 -11
- package/src/html/radio.example.js +389 -0
- package/src/html/radio.js +234 -10
- package/src/html/radio.test.js +318 -0
- package/src/html/section.example.js +99 -0
- package/src/html/section.js +40 -3
- package/src/html/section.test.js +131 -0
- package/src/html/selector.css +329 -3
- package/src/html/selector.js +369 -23
- package/src/html/switch-debug.js +197 -0
- package/src/html/switch-test-visual.js +294 -0
- package/src/html/switch.css +200 -0
- package/src/html/switch.example.js +461 -0
- package/src/html/switch.js +283 -23
- package/src/html/switch.test.js +355 -0
- package/src/html/tab.css +288 -0
- package/src/html/tab.example.js +446 -0
- package/src/html/tab.js +387 -22
- package/src/html/tab_enhanced.js +378 -0
- package/src/html/tab_enhanced.test.js +504 -0
- package/src/html/table2.css +576 -0
- package/src/html/table2.example.js +703 -0
- package/src/html/table2.js +1252 -0
- package/src/html/table2.migration.md +328 -0
- package/src/html/table2.test.js +582 -0
- package/src/html/text.css +375 -0
- package/src/html/text.js +311 -20
- package/src/html/textfield2.css +842 -0
- package/src/html/textfield2.example.js +499 -0
- package/src/html/textfield2.js +1130 -0
- package/src/html/textfield2.test.js +950 -0
- package/src/html/thumbnail.css +289 -2
- package/src/html/thumbnail.js +214 -9
- package/src/html/tokenfield.css +449 -1
- package/src/html/tokenfield.example.js +503 -0
- package/src/html/tokenfield.js +561 -56
- package/src/html/tokenfield.test.js +423 -0
- package/src/html/tooltip-positioning-demo.js +187 -0
- package/src/html/tooltip.css +25 -2
- package/src/html/tree.css +228 -0
- package/src/html/tree.example.js +475 -0
- package/src/html/tree.js +712 -28
- package/src/html/tree_enhanced.test.js +495 -0
- package/table2.test.js +454 -0
- package/src/html/button.tsx +0 -38
package/src/html/tokenfield.css
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
/* Original TokenField styles (preserved for compatibility) */
|
1
2
|
.tokenField {
|
2
3
|
min-height: 3.8;
|
3
4
|
position: relative;
|
@@ -5,8 +6,8 @@
|
|
5
6
|
display: flex;
|
6
7
|
align-items: center;
|
7
8
|
margin: 1rem 0 0 0;
|
8
|
-
display: flex;
|
9
9
|
flex-wrap: wrap;
|
10
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
10
11
|
}
|
11
12
|
|
12
13
|
.tokenField>label {
|
@@ -37,6 +38,9 @@
|
|
37
38
|
border-radius: .3rem !important;
|
38
39
|
margin: .2rem;
|
39
40
|
max-height: 2rem;
|
41
|
+
transition: all 0.2s ease;
|
42
|
+
outline: none;
|
43
|
+
cursor: default;
|
40
44
|
}
|
41
45
|
|
42
46
|
.token > div {
|
@@ -49,4 +53,448 @@
|
|
49
53
|
font-size: .8rem !important;
|
50
54
|
padding: 0 !important;
|
51
55
|
margin-left: .2rem;
|
56
|
+
}
|
57
|
+
|
58
|
+
/* Enhanced TokenField Styles - New functionality while maintaining compatibility */
|
59
|
+
|
60
|
+
/* Size variants */
|
61
|
+
.tokenField--small {
|
62
|
+
min-height: 3rem;
|
63
|
+
margin: 0.75rem 0 0 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
.tokenField--small > label {
|
67
|
+
font-size: 0.7rem;
|
68
|
+
top: -8px;
|
69
|
+
}
|
70
|
+
|
71
|
+
.tokenField--medium {
|
72
|
+
min-height: 3.8rem;
|
73
|
+
margin: 1rem 0 0 0;
|
74
|
+
}
|
75
|
+
|
76
|
+
.tokenField--large {
|
77
|
+
min-height: 4.5rem;
|
78
|
+
margin: 1.25rem 0 0 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
.tokenField--large > label {
|
82
|
+
font-size: 0.9rem;
|
83
|
+
top: -10px;
|
84
|
+
}
|
85
|
+
|
86
|
+
/* Variant styles */
|
87
|
+
.tokenField--outlined {
|
88
|
+
border: 1px solid var(--divider-color, #e0e0e0);
|
89
|
+
border-radius: 4px;
|
90
|
+
padding: 0.5rem;
|
91
|
+
margin: 0.5rem 0;
|
92
|
+
background-color: transparent;
|
93
|
+
}
|
94
|
+
|
95
|
+
.tokenField--outlined > label {
|
96
|
+
position: static;
|
97
|
+
margin-bottom: 0.5rem;
|
98
|
+
display: block;
|
99
|
+
}
|
100
|
+
|
101
|
+
.tokenField--filled {
|
102
|
+
background-color: var(--background-color-light, #f5f5f5);
|
103
|
+
border-radius: 4px 4px 0 0;
|
104
|
+
border-bottom: 2px solid var(--divider-color, #e0e0e0);
|
105
|
+
padding: 0.5rem;
|
106
|
+
}
|
107
|
+
|
108
|
+
/* State styles */
|
109
|
+
.tokenField--disabled {
|
110
|
+
opacity: 0.6;
|
111
|
+
pointer-events: none;
|
112
|
+
background-color: var(--background-color-light, #f5f5f5);
|
113
|
+
}
|
114
|
+
|
115
|
+
.tokenField--readonly {
|
116
|
+
background-color: var(--background-color-light, #f5f5f5);
|
117
|
+
}
|
118
|
+
|
119
|
+
.tokenField--focused {
|
120
|
+
border-bottom-color: var(--primary-color, #2196f3);
|
121
|
+
box-shadow: 0 1px 0 0 var(--primary-color, #2196f3);
|
122
|
+
}
|
123
|
+
|
124
|
+
.tokenField--outlined.tokenField--focused {
|
125
|
+
border-color: var(--primary-color, #2196f3);
|
126
|
+
box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
|
127
|
+
}
|
128
|
+
|
129
|
+
.tokenField--error {
|
130
|
+
border-bottom-color: var(--error-color, #f44336);
|
131
|
+
}
|
132
|
+
|
133
|
+
.tokenField--error > label {
|
134
|
+
color: var(--error-color, #f44336);
|
135
|
+
}
|
136
|
+
|
137
|
+
.tokenField--required .tokenField__required {
|
138
|
+
color: var(--error-color, #f44336);
|
139
|
+
margin-left: 0.25rem;
|
140
|
+
}
|
141
|
+
|
142
|
+
/* Tokens container */
|
143
|
+
.tokenField__tokens {
|
144
|
+
display: flex;
|
145
|
+
flex-wrap: wrap;
|
146
|
+
gap: 0.25rem;
|
147
|
+
align-items: center;
|
148
|
+
width: 100%;
|
149
|
+
}
|
150
|
+
|
151
|
+
/* Input container */
|
152
|
+
.tokenField__input-container {
|
153
|
+
display: flex;
|
154
|
+
align-items: center;
|
155
|
+
gap: 0.5rem;
|
156
|
+
flex: 1;
|
157
|
+
min-width: 120px;
|
158
|
+
}
|
159
|
+
|
160
|
+
.tokenField__input {
|
161
|
+
border: none;
|
162
|
+
outline: none;
|
163
|
+
background: transparent;
|
164
|
+
flex: 1;
|
165
|
+
min-width: 80px;
|
166
|
+
padding: 0.25rem 0;
|
167
|
+
font-size: 1rem;
|
168
|
+
color: inherit;
|
169
|
+
}
|
170
|
+
|
171
|
+
.tokenField__input::placeholder {
|
172
|
+
color: var(--text-color-light, #666);
|
173
|
+
opacity: 0.7;
|
174
|
+
}
|
175
|
+
|
176
|
+
.tokenField__input:disabled {
|
177
|
+
cursor: not-allowed;
|
178
|
+
opacity: 0.6;
|
179
|
+
}
|
180
|
+
|
181
|
+
/* Clear button */
|
182
|
+
.tokenField__clear {
|
183
|
+
display: flex;
|
184
|
+
align-items: center;
|
185
|
+
justify-content: center;
|
186
|
+
width: 1.5rem;
|
187
|
+
height: 1.5rem;
|
188
|
+
border: none;
|
189
|
+
background: none;
|
190
|
+
border-radius: 50%;
|
191
|
+
cursor: pointer;
|
192
|
+
color: var(--text-color-light, #666);
|
193
|
+
transition: background-color 0.2s ease;
|
194
|
+
flex-shrink: 0;
|
195
|
+
}
|
196
|
+
|
197
|
+
.tokenField__clear:hover:not(:disabled) {
|
198
|
+
background-color: var(--hover-color, rgba(0, 0, 0, 0.04));
|
199
|
+
}
|
200
|
+
|
201
|
+
.tokenField__clear:disabled {
|
202
|
+
cursor: not-allowed;
|
203
|
+
opacity: 0.6;
|
204
|
+
}
|
205
|
+
|
206
|
+
/* Token count */
|
207
|
+
.tokenField__count {
|
208
|
+
display: flex;
|
209
|
+
justify-content: space-between;
|
210
|
+
align-items: center;
|
211
|
+
margin-top: 0.25rem;
|
212
|
+
font-size: 0.8rem;
|
213
|
+
width: 100%;
|
214
|
+
}
|
215
|
+
|
216
|
+
/* Helper text */
|
217
|
+
.tokenField__helper {
|
218
|
+
margin-top: 0.25rem;
|
219
|
+
width: 100%;
|
220
|
+
}
|
221
|
+
|
222
|
+
.tokenField__helper--error {
|
223
|
+
color: var(--error-color, #f44336);
|
224
|
+
}
|
225
|
+
|
226
|
+
/* Token variants */
|
227
|
+
.token--small {
|
228
|
+
padding: 0.1rem 0.1rem 0.1rem 0.3rem;
|
229
|
+
font-size: 0.7rem;
|
230
|
+
max-height: 1.5rem;
|
231
|
+
margin: 0.1rem;
|
232
|
+
}
|
233
|
+
|
234
|
+
.token--small button {
|
235
|
+
width: 1.5rem;
|
236
|
+
height: 1.2rem;
|
237
|
+
font-size: 0.7rem !important;
|
238
|
+
}
|
239
|
+
|
240
|
+
.token--medium {
|
241
|
+
padding: .2rem .2rem .2rem .4rem;
|
242
|
+
max-height: 2rem;
|
243
|
+
margin: .2rem;
|
244
|
+
}
|
245
|
+
|
246
|
+
.token--large {
|
247
|
+
padding: 0.3rem 0.3rem 0.3rem 0.5rem;
|
248
|
+
font-size: 0.9rem;
|
249
|
+
max-height: 2.5rem;
|
250
|
+
margin: 0.25rem;
|
251
|
+
}
|
252
|
+
|
253
|
+
.token--large button {
|
254
|
+
width: 2.5rem;
|
255
|
+
height: 2rem;
|
256
|
+
font-size: 0.9rem !important;
|
257
|
+
}
|
258
|
+
|
259
|
+
.token--outlined {
|
260
|
+
background-color: transparent;
|
261
|
+
border: 1px solid var(--primary-color, #2196f3);
|
262
|
+
color: var(--primary-color, #2196f3);
|
263
|
+
}
|
264
|
+
|
265
|
+
.token--filled {
|
266
|
+
background-color: var(--primary-color, #2196f3);
|
267
|
+
color: white;
|
268
|
+
border: 1px solid var(--primary-color, #2196f3);
|
269
|
+
}
|
270
|
+
|
271
|
+
/* Token states */
|
272
|
+
.token--disabled {
|
273
|
+
opacity: 0.6;
|
274
|
+
cursor: not-allowed;
|
275
|
+
pointer-events: none;
|
276
|
+
}
|
277
|
+
|
278
|
+
.token--error {
|
279
|
+
background-color: var(--error-color, #f44336);
|
280
|
+
color: white;
|
281
|
+
border-color: var(--error-color, #f44336);
|
282
|
+
}
|
283
|
+
|
284
|
+
.token:hover:not(.token--disabled) {
|
285
|
+
transform: translateY(-1px);
|
286
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
287
|
+
}
|
288
|
+
|
289
|
+
.token:focus {
|
290
|
+
outline: 2px solid var(--primary-color, #2196f3);
|
291
|
+
outline-offset: 2px;
|
292
|
+
}
|
293
|
+
|
294
|
+
/* Token elements */
|
295
|
+
.token__icon {
|
296
|
+
flex-shrink: 0;
|
297
|
+
margin-right: 0.25rem;
|
298
|
+
}
|
299
|
+
|
300
|
+
.token__text {
|
301
|
+
flex: 1;
|
302
|
+
white-space: nowrap;
|
303
|
+
overflow: hidden;
|
304
|
+
text-overflow: ellipsis;
|
305
|
+
max-width: 150px;
|
306
|
+
}
|
307
|
+
|
308
|
+
.token__delete {
|
309
|
+
flex-shrink: 0;
|
310
|
+
cursor: pointer;
|
311
|
+
border-radius: 50%;
|
312
|
+
transition: background-color 0.2s ease;
|
313
|
+
}
|
314
|
+
|
315
|
+
.token__delete:hover:not([disabled]) {
|
316
|
+
background-color: rgba(255, 255, 255, 0.2);
|
317
|
+
}
|
318
|
+
|
319
|
+
.token__delete[disabled] {
|
320
|
+
cursor: not-allowed;
|
321
|
+
opacity: 0.6;
|
322
|
+
}
|
323
|
+
|
324
|
+
/* Responsive Design */
|
325
|
+
@media (max-width: 768px) {
|
326
|
+
.tokenField {
|
327
|
+
min-height: 3.5rem;
|
328
|
+
margin: 0.75rem 0 0 0;
|
329
|
+
}
|
330
|
+
|
331
|
+
.tokenField--small {
|
332
|
+
min-height: 2.5rem;
|
333
|
+
margin: 0.5rem 0 0 0;
|
334
|
+
}
|
335
|
+
|
336
|
+
.tokenField--large {
|
337
|
+
min-height: 4rem;
|
338
|
+
margin: 1rem 0 0 0;
|
339
|
+
}
|
340
|
+
|
341
|
+
.token {
|
342
|
+
padding: 0.15rem 0.15rem 0.15rem 0.3rem;
|
343
|
+
font-size: 0.75rem;
|
344
|
+
margin: 0.15rem;
|
345
|
+
max-height: 1.8rem;
|
346
|
+
}
|
347
|
+
|
348
|
+
.token button {
|
349
|
+
width: 1.5rem;
|
350
|
+
height: 1.4rem;
|
351
|
+
font-size: 0.7rem !important;
|
352
|
+
}
|
353
|
+
|
354
|
+
.token__text {
|
355
|
+
max-width: 100px;
|
356
|
+
}
|
357
|
+
|
358
|
+
.tokenField__input-container {
|
359
|
+
min-width: 100px;
|
360
|
+
}
|
361
|
+
|
362
|
+
.tokenField input,
|
363
|
+
.tokenField .dropdown,
|
364
|
+
.tokenField__input {
|
365
|
+
min-width: 2.5rem;
|
366
|
+
font-size: 0.9rem;
|
367
|
+
}
|
368
|
+
}
|
369
|
+
|
370
|
+
/* Dark Theme Support */
|
371
|
+
@media (prefers-color-scheme: dark) {
|
372
|
+
.tokenField {
|
373
|
+
border-bottom-color: var(--divider-color-dark, #616161);
|
374
|
+
}
|
375
|
+
|
376
|
+
.tokenField > label {
|
377
|
+
color: var(--primary-color-dark, #64b5f6);
|
378
|
+
}
|
379
|
+
|
380
|
+
.tokenField--outlined {
|
381
|
+
border-color: var(--divider-color-dark, #616161);
|
382
|
+
background-color: var(--background-color-dark, #303030);
|
383
|
+
}
|
384
|
+
|
385
|
+
.tokenField--filled {
|
386
|
+
background-color: var(--background-color-light-dark, #424242);
|
387
|
+
border-bottom-color: var(--divider-color-dark, #616161);
|
388
|
+
}
|
389
|
+
|
390
|
+
.tokenField--disabled,
|
391
|
+
.tokenField--readonly {
|
392
|
+
background-color: var(--background-color-light-dark, #424242);
|
393
|
+
}
|
394
|
+
|
395
|
+
.tokenField--focused {
|
396
|
+
border-bottom-color: var(--primary-color-dark, #64b5f6);
|
397
|
+
box-shadow: 0 1px 0 0 var(--primary-color-dark, #64b5f6);
|
398
|
+
}
|
399
|
+
|
400
|
+
.token {
|
401
|
+
border-color: var(--divider-color-dark, #616161);
|
402
|
+
background-color: rgba(255, 255, 255, 0.1);
|
403
|
+
color: var(--text-color-dark, #ffffff);
|
404
|
+
}
|
405
|
+
|
406
|
+
.token--outlined {
|
407
|
+
border-color: var(--primary-color-dark, #64b5f6);
|
408
|
+
color: var(--primary-color-dark, #64b5f6);
|
409
|
+
}
|
410
|
+
|
411
|
+
.token--filled {
|
412
|
+
background-color: var(--primary-color-dark, #64b5f6);
|
413
|
+
color: var(--text-color-dark, #000);
|
414
|
+
border-color: var(--primary-color-dark, #64b5f6);
|
415
|
+
}
|
416
|
+
|
417
|
+
.tokenField__input {
|
418
|
+
color: var(--text-color-dark, #ffffff);
|
419
|
+
}
|
420
|
+
|
421
|
+
.tokenField__input::placeholder {
|
422
|
+
color: var(--text-color-light-dark, #cccccc);
|
423
|
+
}
|
424
|
+
|
425
|
+
.tokenField__clear {
|
426
|
+
color: var(--text-color-light-dark, #cccccc);
|
427
|
+
}
|
428
|
+
|
429
|
+
.tokenField__clear:hover:not(:disabled) {
|
430
|
+
background-color: var(--hover-color-dark, rgba(255, 255, 255, 0.08));
|
431
|
+
}
|
432
|
+
}
|
433
|
+
|
434
|
+
/* High Contrast Mode */
|
435
|
+
@media (prefers-contrast: high) {
|
436
|
+
.tokenField {
|
437
|
+
border-bottom-width: 2px;
|
438
|
+
}
|
439
|
+
|
440
|
+
.tokenField--outlined {
|
441
|
+
border-width: 2px;
|
442
|
+
}
|
443
|
+
|
444
|
+
.tokenField--focused {
|
445
|
+
outline: 3px solid var(--primary-color, #2196f3);
|
446
|
+
outline-offset: 2px;
|
447
|
+
}
|
448
|
+
|
449
|
+
.token {
|
450
|
+
border-width: 2px;
|
451
|
+
font-weight: 600;
|
452
|
+
}
|
453
|
+
|
454
|
+
.token:focus {
|
455
|
+
outline-width: 3px;
|
456
|
+
}
|
457
|
+
}
|
458
|
+
|
459
|
+
/* Reduced Motion */
|
460
|
+
@media (prefers-reduced-motion: reduce) {
|
461
|
+
.tokenField,
|
462
|
+
.token,
|
463
|
+
.token__delete,
|
464
|
+
.tokenField__clear {
|
465
|
+
transition: none;
|
466
|
+
}
|
467
|
+
|
468
|
+
.token:hover:not(.token--disabled) {
|
469
|
+
transform: none;
|
470
|
+
}
|
471
|
+
}
|
472
|
+
|
473
|
+
/* Print Styles */
|
474
|
+
@media print {
|
475
|
+
.tokenField {
|
476
|
+
break-inside: avoid;
|
477
|
+
border: 1px solid black !important;
|
478
|
+
background: white !important;
|
479
|
+
box-shadow: none !important;
|
480
|
+
margin: 0.5rem 0 !important;
|
481
|
+
}
|
482
|
+
|
483
|
+
.token {
|
484
|
+
background: #f0f0f0 !important;
|
485
|
+
color: black !important;
|
486
|
+
border: 1px solid black !important;
|
487
|
+
}
|
488
|
+
|
489
|
+
.token button,
|
490
|
+
.token__delete,
|
491
|
+
.tokenField__clear {
|
492
|
+
display: none !important;
|
493
|
+
}
|
494
|
+
|
495
|
+
.tokenField input,
|
496
|
+
.tokenField .dropdown,
|
497
|
+
.tokenField__input {
|
498
|
+
color: black !important;
|
499
|
+
}
|
52
500
|
}
|