@ttoss/ui 1.30.8 → 1.30.10
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/esm/index.js +32 -4
- package/dist/index.js +32 -4
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -417,10 +417,24 @@ var BruttalTheme = {
|
|
|
417
417
|
},
|
|
418
418
|
forms: {
|
|
419
419
|
label: {
|
|
420
|
-
"&:has(+ div > input
|
|
420
|
+
"&:has(+ div > input.error)": {
|
|
421
421
|
"span > iconify-icon": {
|
|
422
422
|
color: "danger"
|
|
423
423
|
}
|
|
424
|
+
},
|
|
425
|
+
'&:has(input[type="checkbox"]:disabled)': {
|
|
426
|
+
color: "onMuted"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
checkbox: {
|
|
430
|
+
"input:not(:checked) ~ &": {
|
|
431
|
+
color: "primary"
|
|
432
|
+
},
|
|
433
|
+
"input:disabled ~ &": {
|
|
434
|
+
color: "muted"
|
|
435
|
+
},
|
|
436
|
+
"input:disabled ~ & path": {
|
|
437
|
+
backgroundColor: "onMuted"
|
|
424
438
|
}
|
|
425
439
|
},
|
|
426
440
|
input: {
|
|
@@ -576,7 +590,9 @@ var defaultIconSizeCustomisations = Object.freeze({
|
|
|
576
590
|
height: null
|
|
577
591
|
});
|
|
578
592
|
var defaultIconCustomisations = Object.freeze({
|
|
593
|
+
// Dimensions
|
|
579
594
|
...defaultIconSizeCustomisations,
|
|
595
|
+
// Transformations
|
|
580
596
|
...defaultIconTransformations
|
|
581
597
|
});
|
|
582
598
|
function rotateFromString(value, defaultValue = 0) {
|
|
@@ -664,6 +680,7 @@ var stringToIcon = (value, validate, allowSimpleName, provider = "") => {
|
|
|
664
680
|
const name2 = colonSeparated.pop();
|
|
665
681
|
const prefix = colonSeparated.pop();
|
|
666
682
|
const result = {
|
|
683
|
+
// Allow provider without '@': "provider:prefix:name"
|
|
667
684
|
provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
|
|
668
685
|
prefix,
|
|
669
686
|
name: name2
|
|
@@ -2187,7 +2204,7 @@ for (const prefix in propsToAddTo) {
|
|
|
2187
2204
|
}
|
|
2188
2205
|
}
|
|
2189
2206
|
function fixSize(value) {
|
|
2190
|
-
return value + (value.match(/^[-0-9.]+$/) ? "px" : "");
|
|
2207
|
+
return value ? value + (value.match(/^[-0-9.]+$/) ? "px" : "") : "inherit";
|
|
2191
2208
|
}
|
|
2192
2209
|
function renderSPAN(data, icon, useMask) {
|
|
2193
2210
|
const node = document.createElement("span");
|
|
@@ -2216,7 +2233,18 @@ function renderSPAN(data, icon, useMask) {
|
|
|
2216
2233
|
}
|
|
2217
2234
|
function renderSVG(data) {
|
|
2218
2235
|
const node = document.createElement("span");
|
|
2219
|
-
|
|
2236
|
+
const attr = data.attributes;
|
|
2237
|
+
let style = "";
|
|
2238
|
+
if (!attr.width) {
|
|
2239
|
+
style = "width: inherit;";
|
|
2240
|
+
}
|
|
2241
|
+
if (!attr.height) {
|
|
2242
|
+
style += "height: inherit;";
|
|
2243
|
+
}
|
|
2244
|
+
if (style) {
|
|
2245
|
+
attr.style = style;
|
|
2246
|
+
}
|
|
2247
|
+
node.innerHTML = iconToHTML(data.body, attr);
|
|
2220
2248
|
return node.firstChild;
|
|
2221
2249
|
}
|
|
2222
2250
|
function renderIcon(parent, state) {
|
|
@@ -2777,6 +2805,6 @@ iconify-icon/dist/iconify-icon.mjs:
|
|
|
2777
2805
|
* Licensed under MIT.
|
|
2778
2806
|
*
|
|
2779
2807
|
* @license MIT
|
|
2780
|
-
* @version 1.0.
|
|
2808
|
+
* @version 1.0.7
|
|
2781
2809
|
*)
|
|
2782
2810
|
*/
|
package/dist/index.js
CHANGED
|
@@ -455,10 +455,24 @@ var BruttalTheme = {
|
|
|
455
455
|
},
|
|
456
456
|
forms: {
|
|
457
457
|
label: {
|
|
458
|
-
"&:has(+ div > input
|
|
458
|
+
"&:has(+ div > input.error)": {
|
|
459
459
|
"span > iconify-icon": {
|
|
460
460
|
color: "danger"
|
|
461
461
|
}
|
|
462
|
+
},
|
|
463
|
+
'&:has(input[type="checkbox"]:disabled)': {
|
|
464
|
+
color: "onMuted"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
checkbox: {
|
|
468
|
+
"input:not(:checked) ~ &": {
|
|
469
|
+
color: "primary"
|
|
470
|
+
},
|
|
471
|
+
"input:disabled ~ &": {
|
|
472
|
+
color: "muted"
|
|
473
|
+
},
|
|
474
|
+
"input:disabled ~ & path": {
|
|
475
|
+
backgroundColor: "onMuted"
|
|
462
476
|
}
|
|
463
477
|
},
|
|
464
478
|
input: {
|
|
@@ -612,7 +626,9 @@ var defaultIconSizeCustomisations = Object.freeze({
|
|
|
612
626
|
height: null
|
|
613
627
|
});
|
|
614
628
|
var defaultIconCustomisations = Object.freeze({
|
|
629
|
+
// Dimensions
|
|
615
630
|
...defaultIconSizeCustomisations,
|
|
631
|
+
// Transformations
|
|
616
632
|
...defaultIconTransformations
|
|
617
633
|
});
|
|
618
634
|
function rotateFromString(value, defaultValue = 0) {
|
|
@@ -700,6 +716,7 @@ var stringToIcon = (value, validate, allowSimpleName, provider = "") => {
|
|
|
700
716
|
const name2 = colonSeparated.pop();
|
|
701
717
|
const prefix = colonSeparated.pop();
|
|
702
718
|
const result = {
|
|
719
|
+
// Allow provider without '@': "provider:prefix:name"
|
|
703
720
|
provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
|
|
704
721
|
prefix,
|
|
705
722
|
name: name2
|
|
@@ -2223,7 +2240,7 @@ for (const prefix in propsToAddTo) {
|
|
|
2223
2240
|
}
|
|
2224
2241
|
}
|
|
2225
2242
|
function fixSize(value) {
|
|
2226
|
-
return value + (value.match(/^[-0-9.]+$/) ? "px" : "");
|
|
2243
|
+
return value ? value + (value.match(/^[-0-9.]+$/) ? "px" : "") : "inherit";
|
|
2227
2244
|
}
|
|
2228
2245
|
function renderSPAN(data, icon, useMask) {
|
|
2229
2246
|
const node = document.createElement("span");
|
|
@@ -2252,7 +2269,18 @@ function renderSPAN(data, icon, useMask) {
|
|
|
2252
2269
|
}
|
|
2253
2270
|
function renderSVG(data) {
|
|
2254
2271
|
const node = document.createElement("span");
|
|
2255
|
-
|
|
2272
|
+
const attr = data.attributes;
|
|
2273
|
+
let style = "";
|
|
2274
|
+
if (!attr.width) {
|
|
2275
|
+
style = "width: inherit;";
|
|
2276
|
+
}
|
|
2277
|
+
if (!attr.height) {
|
|
2278
|
+
style += "height: inherit;";
|
|
2279
|
+
}
|
|
2280
|
+
if (style) {
|
|
2281
|
+
attr.style = style;
|
|
2282
|
+
}
|
|
2283
|
+
node.innerHTML = iconToHTML(data.body, attr);
|
|
2256
2284
|
return node.firstChild;
|
|
2257
2285
|
}
|
|
2258
2286
|
function renderIcon(parent, state) {
|
|
@@ -2812,6 +2840,6 @@ iconify-icon/dist/iconify-icon.mjs:
|
|
|
2812
2840
|
* Licensed under MIT.
|
|
2813
2841
|
*
|
|
2814
2842
|
* @license MIT
|
|
2815
|
-
* @version 1.0.
|
|
2843
|
+
* @version 1.0.7
|
|
2816
2844
|
*)
|
|
2817
2845
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.10",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@iconify-icon/react": "^1.0.5",
|
|
33
33
|
"@ttoss/config": "^1.28.3",
|
|
34
34
|
"@ttoss/test-utils": "^1.20.5",
|
|
35
|
-
"@ttoss/theme": "^1.2.
|
|
35
|
+
"@ttoss/theme": "^1.2.9",
|
|
36
36
|
"@types/jest": "^29.4.0",
|
|
37
37
|
"jest": "^29.5.0",
|
|
38
38
|
"tsup": "^6.6.3"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5a7f5a875b4474af9c78bbec65355cde6e6a7c81"
|
|
49
49
|
}
|