tyrell-components 1.0.0-TC7 → 1.0.0-TC8
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/css/tyrell.css +22 -22
- package/dist/tyrell.css +22 -22
- package/dist/tyrell.js +1 -1
- package/lib/components/icon.d.ts +13 -2
- package/lib/components/icon.d.ts.map +1 -1
- package/lib/components/icon.js +22 -7
- package/lib/components/icon.js.map +1 -1
- package/lib/styles/icon.d.ts +1 -1
- package/lib/styles/icon.d.ts.map +1 -1
- package/lib/styles/icon.js +12 -2
- package/lib/styles/icon.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/lib/components/icon.d.ts
CHANGED
|
@@ -59,6 +59,15 @@ export declare class TyIcon extends TyComponent<IconState> implements TyIconElem
|
|
|
59
59
|
private _watchId;
|
|
60
60
|
/** Track currently rendered SVG to avoid unnecessary re-renders */
|
|
61
61
|
private _currentSvg;
|
|
62
|
+
/**
|
|
63
|
+
* Single shadow-DOM <slot> that holds either:
|
|
64
|
+
* - light-DOM children supplied by the user (server-side path: pasted SVG), or
|
|
65
|
+
* - fallback content driven by the registry (`name=`) or NOT_FOUND_ICON.
|
|
66
|
+
*
|
|
67
|
+
* Browser slot semantics handle precedence: when the host has assigned nodes,
|
|
68
|
+
* the slot's fallback content is hidden automatically — no detection logic needed.
|
|
69
|
+
*/
|
|
70
|
+
private _slot;
|
|
62
71
|
constructor();
|
|
63
72
|
/**
|
|
64
73
|
* Called when component connects to DOM
|
|
@@ -98,8 +107,10 @@ export declare class TyIcon extends TyComponent<IconState> implements TyIconElem
|
|
|
98
107
|
*/
|
|
99
108
|
protected render(): void;
|
|
100
109
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
110
|
+
* Update the slot's fallback content.
|
|
111
|
+
* If the user has slotted light-DOM children (e.g., raw <svg>), the browser
|
|
112
|
+
* shows those instead and the fallback stays hidden — but we still keep it
|
|
113
|
+
* up to date so removing the children reveals the right registry/fallback SVG.
|
|
103
114
|
*/
|
|
104
115
|
private renderSvg;
|
|
105
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAGlE,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAA;AAYzD;;GAEG;AACH,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;GASG;AACH,qBAAa,MAAO,SAAQ,WAAW,CAAC,SAAS,CAAE,YAAW,aAAa;IACzE,MAAM,CAAC,cAAc,UAAQ;IAK7B,SAAS,CAAC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;MAM1B;IAMD,OAAO,CAAC,QAAQ,CAAsB;IAEtC,mEAAmE;IACnE,OAAO,CAAC,WAAW,CAAa;;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAGlE,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAA;AAYzD;;GAEG;AACH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;;;OAQG;IACH,SAAS,CAAC,MAAM,IAAI,IAAI;IAkBxB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;CAWlB;AAQD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/lib/components/icon.js
CHANGED
|
@@ -34,10 +34,22 @@ export class TyIcon extends TyComponent {
|
|
|
34
34
|
this._watchId = null;
|
|
35
35
|
/** Track currently rendered SVG to avoid unnecessary re-renders */
|
|
36
36
|
this._currentSvg = '';
|
|
37
|
+
/**
|
|
38
|
+
* Single shadow-DOM <slot> that holds either:
|
|
39
|
+
* - light-DOM children supplied by the user (server-side path: pasted SVG), or
|
|
40
|
+
* - fallback content driven by the registry (`name=`) or NOT_FOUND_ICON.
|
|
41
|
+
*
|
|
42
|
+
* Browser slot semantics handle precedence: when the host has assigned nodes,
|
|
43
|
+
* the slot's fallback content is hidden automatically — no detection logic needed.
|
|
44
|
+
*/
|
|
45
|
+
this._slot = null;
|
|
37
46
|
// Apply styles to shadow root
|
|
38
47
|
ensureStyles(this.shadowRoot, { css: iconStyles, id: 'ty-icon' });
|
|
39
|
-
//
|
|
40
|
-
this.
|
|
48
|
+
// Build the slot once. Fallback content shows when no light-DOM children are slotted.
|
|
49
|
+
this._slot = document.createElement('slot');
|
|
50
|
+
this._slot.innerHTML = NOT_FOUND_ICON;
|
|
51
|
+
this._currentSvg = NOT_FOUND_ICON;
|
|
52
|
+
this.shadowRoot.appendChild(this._slot);
|
|
41
53
|
}
|
|
42
54
|
// observedAttributes auto-generated by TyComponent from properties config
|
|
43
55
|
// ============================================================================
|
|
@@ -197,17 +209,20 @@ export class TyIcon extends TyComponent {
|
|
|
197
209
|
this.renderSvg(NOT_FOUND_ICON);
|
|
198
210
|
}
|
|
199
211
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
212
|
+
* Update the slot's fallback content.
|
|
213
|
+
* If the user has slotted light-DOM children (e.g., raw <svg>), the browser
|
|
214
|
+
* shows those instead and the fallback stays hidden — but we still keep it
|
|
215
|
+
* up to date so removing the children reveals the right registry/fallback SVG.
|
|
202
216
|
*/
|
|
203
217
|
renderSvg(svg) {
|
|
204
218
|
// Only render if content actually changed
|
|
205
219
|
if (this._currentSvg === svg) {
|
|
206
220
|
return;
|
|
207
221
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
222
|
+
if (this._slot) {
|
|
223
|
+
this._slot.innerHTML = svg;
|
|
224
|
+
this._currentSvg = svg;
|
|
225
|
+
}
|
|
211
226
|
}
|
|
212
227
|
}
|
|
213
228
|
TyIcon.formAssociated = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/components/icon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAA;AAEzD,IAAI,cAAc,GAAG,CAAC,CAAA;AAEtB,4EAA4E;AAC5E,MAAM,cAAc,GAAG;;;;;OAKhB,CAAA;AAaP;;;;;;;;;GASG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAsB;
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/components/icon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAA;AAEzD,IAAI,cAAc,GAAG,CAAC,CAAA;AAEtB,4EAA4E;AAC5E,MAAM,cAAc,GAAG;;;;;OAKhB,CAAA;AAaP;;;;;;;;;GASG;AACH,MAAM,OA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AI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;IACnC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;AAC1C,CAAC;AAED,kCAAkC;AAClC,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/lib/styles/icon.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Icon Component Styles
|
|
3
3
|
* PORTED FROM: clj/ty/components/icon.css
|
|
4
4
|
*/
|
|
5
|
-
export declare const iconStyles = "\n:host {\n /* Display & Layout - CRITICAL: No containment to prevent paint deferral */\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n \n /* Dimensions with CSS variable support for flexibility */\n width: var(--ty-icon-size, 1em);\n height: var(--ty-icon-size, 1em);\n \n /* Enforce square aspect ratio */\n aspect-ratio: 1 / 1;\n \n \n /* Color & Transitions */\n color: inherit;\n transition: color var(--ty-transition-fast);\n \n /* Flex Behavior */\n flex-shrink: 0;\n \n /* Visibility - Force immediate rendering */\n visibility: visible !important;\n opacity: 1;\n \n /* ANTI-FLICKER: Force browser to paint immediately */\n will-change: contents;\n \n /* Prevent any sub-pixel rendering issues */\n transform: translateZ(0);\n -webkit-font-smoothing: antialiased;\n}\n\n/* The SVG element inside shadow DOM */\n:host svg {\n width: 100%;\n height: 100%;\n display: block;\n
|
|
5
|
+
export declare const iconStyles = "\n:host {\n /* Display & Layout - CRITICAL: No containment to prevent paint deferral */\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n \n /* Dimensions with CSS variable support for flexibility */\n width: var(--ty-icon-size, 1em);\n height: var(--ty-icon-size, 1em);\n \n /* Enforce square aspect ratio */\n aspect-ratio: 1 / 1;\n \n \n /* Color & Transitions */\n color: inherit;\n transition: color var(--ty-transition-fast);\n \n /* Flex Behavior */\n flex-shrink: 0;\n \n /* Visibility - Force immediate rendering */\n visibility: visible !important;\n opacity: 1;\n \n /* ANTI-FLICKER: Force browser to paint immediately */\n will-change: contents;\n \n /* Prevent any sub-pixel rendering issues */\n transform: translateZ(0);\n -webkit-font-smoothing: antialiased;\n}\n\n/* The SVG element inside shadow DOM (registry / fallback path) */\n:host svg {\n width: 100%;\n height: 100%;\n display: block;\n\n /* Force immediate SVG rendering */\n will-change: auto;\n transform: translateZ(0);\n}\n\n/* Slotted SVG (server-side path: <ty-icon><svg>...</svg></ty-icon>).\n ::slotted() targets light-DOM children so they fill the host the same way\n shadow-DOM SVG does. Color is inherited from :host via currentColor. */\n::slotted(svg),\n::slotted(img) {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n/* When used in slots, ensure proper display */\n:host([slot]) {\n display: inline-flex;\n}\n\n/* Size variants via CSS classes on the host */\n:host(.icon-xs) {\n width: 0.75em;\n height: 0.75em;\n}\n\n:host(.icon-sm) {\n width: 0.875em;\n height: 0.875em;\n}\n\n:host(.icon-md) {\n width: 1em;\n height: 1em;\n}\n\n:host(.icon-lg) {\n width: 1.25em;\n height: 1.25em;\n}\n\n:host(.icon-xl) {\n width: 1.5em;\n height: 1.5em;\n}\n\n:host(.icon-2xl) {\n width: 2em;\n height: 2em;\n}\n\n/* Fixed pixel sizes */\n:host(.icon-12) {\n width: 12px;\n height: 12px;\n}\n\n:host(.icon-14) {\n width: 14px;\n height: 14px;\n}\n\n:host(.icon-16) {\n width: 16px;\n height: 16px;\n}\n\n:host(.icon-18) {\n width: 18px;\n height: 18px;\n}\n\n:host(.icon-20) {\n width: 20px;\n height: 20px;\n}\n\n:host(.icon-24) {\n width: 24px;\n height: 24px;\n}\n\n:host(.icon-32) {\n width: 32px;\n height: 32px;\n}\n\n:host(.icon-48) {\n width: 48px;\n height: 48px;\n}\n\n:host(.icon-64) {\n width: 64px;\n height: 64px;\n}\n\n:host(.icon-80) {\n width: 80px;\n height: 80px;\n}\n\n:host(.icon-96) {\n width: 96px;\n height: 96px;\n}\n\n/* Spinning animation - default tempo */\n:host(.icon-spin) {\n animation: icon-spin 1s linear infinite;\n}\n\n/* Spinning animation - slow tempo */\n:host(.icon-spin.icon-tempo-slow) {\n animation: icon-spin 2s linear infinite;\n}\n\n/* Spinning animation - fast tempo */\n:host(.icon-spin.icon-tempo-fast) {\n animation: icon-spin 0.5s linear infinite;\n}\n\n@keyframes icon-spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Pulse animation - default tempo */\n:host(.icon-pulse) {\n animation: icon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/* Pulse animation - slow tempo */\n:host(.icon-pulse.icon-tempo-slow) {\n animation: icon-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/* Pulse animation - fast tempo */\n:host(.icon-pulse.icon-tempo-fast) {\n animation: icon-pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n@keyframes icon-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.5;\n }\n}\n\n/* Accessibility: ensure icons are not announced by screen readers by default */\n:host {\n -webkit-user-select: none;\n user-select: none;\n}\n\n/* Allow pointer events to pass through by default */\n:host(:not(.icon-clickable)) {\n pointer-events: none;\n}\n\n/* Clickable icons */\n:host(.icon-clickable) {\n cursor: pointer;\n pointer-events: auto;\n transition: color var(--ty-transition-fast), transform var(--ty-transition-fast);\n}\n\n:host(.icon-clickable:hover) {\n transform: scale(1.1);\n}\n\n:host(.icon-clickable:active) {\n transform: scale(0.95);\n}\n\n/* Disabled state */\n:host(.icon-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Block display variant */\n:host(.icon-block) {\n display: block;\n}\n";
|
|
6
6
|
//# sourceMappingURL=icon.d.ts.map
|
package/lib/styles/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/styles/icon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/styles/icon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU,stIA2OtB,CAAC"}
|
package/lib/styles/icon.js
CHANGED
|
@@ -37,17 +37,27 @@ export const iconStyles = `
|
|
|
37
37
|
-webkit-font-smoothing: antialiased;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/* The SVG element inside shadow DOM */
|
|
40
|
+
/* The SVG element inside shadow DOM (registry / fallback path) */
|
|
41
41
|
:host svg {
|
|
42
42
|
width: 100%;
|
|
43
43
|
height: 100%;
|
|
44
44
|
display: block;
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
/* Force immediate SVG rendering */
|
|
47
47
|
will-change: auto;
|
|
48
48
|
transform: translateZ(0);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/* Slotted SVG (server-side path: <ty-icon><svg>...</svg></ty-icon>).
|
|
52
|
+
::slotted() targets light-DOM children so they fill the host the same way
|
|
53
|
+
shadow-DOM SVG does. Color is inherited from :host via currentColor. */
|
|
54
|
+
::slotted(svg),
|
|
55
|
+
::slotted(img) {
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
display: block;
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
/* When used in slots, ensure proper display */
|
|
52
62
|
:host([slot]) {
|
|
53
63
|
display: inline-flex;
|
package/lib/styles/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/styles/icon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/styles/icon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2OzB,CAAC"}
|
package/lib/version.d.ts
CHANGED
package/lib/version.js
CHANGED