@scania/tegel 1.23.0-block-nesting-beta.1 → 1.23.0-config-for-china.beta.1
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/cjs/app-globals-e91e5f6c.js +152 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tds-block.cjs.entry.js +1 -1
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +21 -3
- package/dist/cjs/tds-icon.cjs.entry.js +1 -1
- package/dist/cjs/tds-link.cjs.entry.js +5 -3
- package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/tds-slider.cjs.entry.js +33 -7
- package/dist/cjs/tds-toggle.cjs.entry.js +1 -1
- package/dist/cjs/tegel.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/block/block.css +2 -2
- package/dist/collection/components/dropdown/dropdown.js +21 -3
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/iconsArray.js +20 -20
- package/dist/collection/components/link/link.css +7 -1
- package/dist/collection/components/link/link.js +22 -2
- package/dist/collection/components/popover-core/tds-popover-core.css +66 -139
- package/dist/collection/components/slider/slider.js +34 -8
- package/dist/collection/components/toggle/toggle.css +4 -2
- package/dist/collection/global/assets-loader.js +145 -0
- package/dist/components/index.js +146 -0
- package/dist/components/{p-3a32c37c.js → p-075f9f21.js} +1 -1
- package/dist/components/{p-e7868876.js → p-4030e9bc.js} +1 -1
- package/dist/components/{p-2523819c.js → p-4f1aa84f.js} +22 -4
- package/dist/components/{p-c48c68b3.js → p-8a2d7b2f.js} +1 -1
- package/dist/components/{p-50179eca.js → p-bbe665ac.js} +1 -1
- package/dist/components/{p-18c1245b.js → p-e323cd2a.js} +1 -1
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-banner.js +1 -1
- package/dist/components/tds-block.js +1 -1
- package/dist/components/tds-datetime.js +1 -1
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-folder-tabs.js +1 -1
- package/dist/components/tds-footer-group.js +1 -1
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown.js +3 -3
- package/dist/components/tds-header-hamburger.js +1 -1
- package/dist/components/tds-header-launcher-button.js +1 -1
- package/dist/components/tds-header-launcher.js +4 -4
- package/dist/components/tds-icon.js +1 -1
- package/dist/components/tds-inline-tabs.js +1 -1
- package/dist/components/tds-link.js +7 -4
- package/dist/components/tds-message.js +1 -1
- package/dist/components/tds-modal.js +1 -1
- package/dist/components/tds-navigation-tabs.js +1 -1
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu.js +1 -1
- package/dist/components/tds-side-menu-close-button.js +1 -1
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-slider.js +34 -8
- package/dist/components/tds-step.js +1 -1
- package/dist/components/tds-table-body-input-wrapper.js +1 -1
- package/dist/components/tds-table-footer.js +3 -3
- package/dist/components/tds-table-header-input-wrapper.js +1 -1
- package/dist/components/tds-table-toolbar.js +1 -1
- package/dist/components/tds-text-field.js +1 -1
- package/dist/components/tds-textarea.js +1 -1
- package/dist/components/tds-toast.js +1 -1
- package/dist/components/tds-toggle.js +1 -1
- package/dist/components/tds-tooltip.js +1 -1
- package/dist/esm/app-globals-e179c521.js +150 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/tds-block.entry.js +1 -1
- package/dist/esm/tds-dropdown_2.entry.js +21 -3
- package/dist/esm/tds-icon.entry.js +1 -1
- package/dist/esm/tds-link.entry.js +5 -3
- package/dist/esm/tds-popover-core.entry.js +1 -1
- package/dist/esm/tds-slider.entry.js +34 -8
- package/dist/esm/tds-toggle.entry.js +1 -1
- package/dist/esm/tegel.js +2 -2
- package/dist/tegel/p-14f12f43.entry.js +1 -0
- package/dist/tegel/p-2557b79b.entry.js +1 -0
- package/dist/tegel/p-754c7b2e.js +1 -0
- package/dist/tegel/{p-e0ce5daa.entry.js → p-868435cd.entry.js} +1 -1
- package/dist/tegel/p-9aefb942.entry.js +1 -0
- package/dist/tegel/p-e13935b6.entry.js +1 -0
- package/dist/tegel/p-e33d9693.entry.js +1 -0
- package/dist/tegel/p-e97a2700.entry.js +1 -0
- package/dist/tegel/tegel.css +3 -3
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +3 -0
- package/dist/types/components/link/link.d.ts +2 -0
- package/dist/types/components/slider/slider.d.ts +7 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/global/assets-loader.d.ts +1 -0
- package/dist/types/types/Icons.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/tegel/p-23ddcd21.entry.js +0 -1
- package/dist/tegel/p-2a2756ac.entry.js +0 -1
- package/dist/tegel/p-979f5255.entry.js +0 -1
- package/dist/tegel/p-c3513f1f.entry.js +0 -1
- package/dist/tegel/p-e1255160.js +0 -1
- package/dist/tegel/p-f91c6e9d.entry.js +0 -1
- package/dist/tegel/p-fe3cc93e.entry.js +0 -1
package/dist/components/index.js
CHANGED
|
@@ -1 +1,147 @@
|
|
|
1
1
|
export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-28ef5186.js';
|
|
2
|
+
|
|
3
|
+
function initializeAssets() {
|
|
4
|
+
const defaultCDN = 'https://cdn.digitaldesign.scania.com';
|
|
5
|
+
const assetSource = window.TEGEL_ASSET_SOURCE || defaultCDN;
|
|
6
|
+
const root = document.documentElement;
|
|
7
|
+
console.log('Asset Source in Stencil:', assetSource, '\nTEGEL_ASSET_SOURCE value:', window.TEGEL_ASSET_SOURCE, '\nUsing CDN:', assetSource === defaultCDN);
|
|
8
|
+
// Define all font-face declarations
|
|
9
|
+
const fontFaces = `
|
|
10
|
+
/* Scania Sans */
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: 'Scania Sans';
|
|
13
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCY-Bold.woff') format('woff');
|
|
14
|
+
font-weight: bold;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
unicode-range: U+0400-04FF;
|
|
17
|
+
}
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: 'Scania Sans';
|
|
20
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCY-Italic.woff') format('woff');
|
|
21
|
+
font-weight: normal;
|
|
22
|
+
font-style: italic;
|
|
23
|
+
unicode-range: U+0400-04FF;
|
|
24
|
+
}
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: 'Scania Sans';
|
|
27
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCY-Regular.woff') format('woff');
|
|
28
|
+
font-weight: normal;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
unicode-range: U+0400-04FF;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Scania Sans Condensed */
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: 'Scania Sans Condensed';
|
|
36
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYCondensed-Bold.woff') format('woff');
|
|
37
|
+
font-weight: bold;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
unicode-range: U+0400-04FF;
|
|
40
|
+
}
|
|
41
|
+
@font-face {
|
|
42
|
+
font-family: 'Scania Sans Condensed';
|
|
43
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYCondensed-Italic.woff') format('woff');
|
|
44
|
+
font-weight: normal;
|
|
45
|
+
font-style: italic;
|
|
46
|
+
unicode-range: U+0400-04FF;
|
|
47
|
+
}
|
|
48
|
+
@font-face {
|
|
49
|
+
font-family: 'Scania Sans Condensed';
|
|
50
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYCondensed-Regular.woff') format('woff');
|
|
51
|
+
font-weight: normal;
|
|
52
|
+
font-style: normal;
|
|
53
|
+
unicode-range: U+0400-04FF;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Scania Sans Headline */
|
|
57
|
+
@font-face {
|
|
58
|
+
font-family: 'Scania Sans Headline';
|
|
59
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYHeadline-Bold.woff') format('woff');
|
|
60
|
+
font-weight: bold;
|
|
61
|
+
font-style: normal;
|
|
62
|
+
unicode-range: U+0400-04FF;
|
|
63
|
+
}
|
|
64
|
+
@font-face {
|
|
65
|
+
font-family: 'Scania Sans Headline';
|
|
66
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYHeadline-Regular.woff') format('woff');
|
|
67
|
+
font-weight: normal;
|
|
68
|
+
font-style: normal;
|
|
69
|
+
unicode-range: U+0400-04FF;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Scania Sans Semi Condensed */
|
|
73
|
+
@font-face {
|
|
74
|
+
font-family: 'Scania Sans Semi Condensed';
|
|
75
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYSemiCondensed-Bold.woff') format('woff');
|
|
76
|
+
font-weight: bold;
|
|
77
|
+
font-style: normal;
|
|
78
|
+
unicode-range: U+0400-04FF;
|
|
79
|
+
}
|
|
80
|
+
@font-face {
|
|
81
|
+
font-family: 'Scania Sans Semi Condensed';
|
|
82
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYSemiCondensed-Italic.woff') format('woff');
|
|
83
|
+
font-weight: normal;
|
|
84
|
+
font-style: italic;
|
|
85
|
+
unicode-range: U+0400-04FF;
|
|
86
|
+
}
|
|
87
|
+
@font-face {
|
|
88
|
+
font-family: 'Scania Sans Semi Condensed';
|
|
89
|
+
src: url('${assetSource}/fonts/scania-sans/1.0.0/cyrillic/ScaniaSansCYSemiCondensed-Regular.woff') format('woff');
|
|
90
|
+
font-weight: normal;
|
|
91
|
+
font-style: normal;
|
|
92
|
+
unicode-range: U+0400-04FF;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
// Add font-face rules to document
|
|
96
|
+
const style = document.createElement('style');
|
|
97
|
+
style.textContent = fontFaces;
|
|
98
|
+
document.head.appendChild(style);
|
|
99
|
+
// Set font-family CSS variables
|
|
100
|
+
root.style.setProperty('--tds-font-family-primary', 'Scania Sans, Arial, sans-serif');
|
|
101
|
+
root.style.setProperty('--tds-font-family-condensed', 'Scania Sans Condensed, Arial Narrow, Arial, sans-serif');
|
|
102
|
+
root.style.setProperty('--tds-font-family-headline', 'Scania Sans Headline, Arial, sans-serif');
|
|
103
|
+
root.style.setProperty('--tds-font-family-semi-condensed', 'Scania Sans Semi Condensed, Arial, sans-serif');
|
|
104
|
+
// Set logotype variables
|
|
105
|
+
const logoPath = '/logos';
|
|
106
|
+
const logotypes = [
|
|
107
|
+
{ name: 'logotype', format: ['png', 'svg'] },
|
|
108
|
+
{ name: 'symbol', format: ['png', 'svg'] },
|
|
109
|
+
{ name: 'wordmark', format: ['png', 'svg'] },
|
|
110
|
+
{ name: 'wordmark-white', format: ['png', 'svg'] },
|
|
111
|
+
];
|
|
112
|
+
logotypes.forEach(({ name, format }) => {
|
|
113
|
+
format.forEach((ext) => {
|
|
114
|
+
root.style.setProperty(`--tds-logo-url-${name}-${ext}`, `url('${assetSource}${logoPath}/scania-${name}.${ext}')`);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
// Debug: Log all font-face rules
|
|
118
|
+
console.log('Font-face rules:', Array.from(document.styleSheets).flatMap((sheet) => {
|
|
119
|
+
try {
|
|
120
|
+
return Array.from(sheet.cssRules)
|
|
121
|
+
.filter((rule) => rule.type === CSSRule.FONT_FACE_RULE)
|
|
122
|
+
.map((rule) => rule.cssText);
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
// Handle cross-origin stylesheet errors
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
}));
|
|
129
|
+
// Verify settings
|
|
130
|
+
console.log('Asset initialization complete:', {
|
|
131
|
+
assetSource,
|
|
132
|
+
fontFamilyPrimary: getComputedStyle(document.documentElement)
|
|
133
|
+
.getPropertyValue('--tds-font-family-primary')
|
|
134
|
+
.trim(),
|
|
135
|
+
logoUrl: getComputedStyle(document.documentElement)
|
|
136
|
+
.getPropertyValue('--tds-logo-url-logotype-svg')
|
|
137
|
+
.trim(),
|
|
138
|
+
usingCDN: assetSource === defaultCDN,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// Initialize as early as possible
|
|
142
|
+
if (document.readyState === 'loading') {
|
|
143
|
+
document.addEventListener('DOMContentLoaded', initializeAssets);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
initializeAssets();
|
|
147
|
+
}
|