@lmvz-ds/components 0.19.0 → 0.20.0
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/CHANGELOG.md +10 -0
- package/assets/icons/checkmark.svg +4 -0
- package/cjs/{aria-loader-CfFuAbJn.js → aria-loader-Cec1zR2g.js} +1 -1
- package/cjs/icons-BQASWgk-.js +80 -0
- package/cjs/{index--7IqZZqn.js → index-3g9Z9sfF.js} +765 -2854
- package/cjs/index.cjs.js +4 -3
- package/cjs/lmvz-button.cjs.entry.js +3 -3
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +113 -0
- package/cjs/lmvz-chip.cjs.entry.js +3 -3
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +3 -3
- package/cjs/lmvz-icon.cjs.entry.js +9 -7
- package/cjs/lmvz-input.cjs.entry.js +4 -4
- package/cjs/lmvz-menuitem.cjs.entry.js +4 -4
- package/cjs/lmvz-select.cjs.entry.js +3 -3
- package/cjs/loader.cjs.js +1 -1
- package/cjs/{logger-Bn2yoZGP.js → logger-DsM6xg6V.js} +3063 -833
- package/cjs/{reactive-controller-host-Bi9eu2bV.js → reactive-controller-host-BA4ZhjKA.js} +1 -1
- package/cjs/{icons-Tg7ySOh-.js → svg-BMBduILB.js} +31 -85
- package/collection/assets/icons/checkmark.svg +4 -0
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-button/lmvz-button.css +1 -2
- package/collection/components/lmvz-card/lmvz-card.css +1 -2
- package/collection/components/lmvz-checkbox/lmvz-checkbox.css +207 -0
- package/collection/components/lmvz-checkbox/lmvz-checkbox.js +424 -0
- package/collection/components/lmvz-chip/lmvz-chip.js +1 -1
- package/collection/components/lmvz-header/lmvz-header.js +1 -1
- package/collection/components/lmvz-icon/lmvz-icon.js +5 -5
- package/collection/components/lmvz-input/lmvz-input.js +2 -2
- package/collection/components/lmvz-menuitem/lmvz-menuitem.css +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -1
- package/collection/components/lmvz-select/lmvz-select.js +1 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/collection/utils/icons/icons.js +2 -13
- package/collection/utils/icons/icons.unit.js +3 -15
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -0
- package/components/index.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.d.ts +11 -0
- package/components/lmvz-checkbox.d.ts.bak +11 -0
- package/components/lmvz-checkbox.js +1 -0
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/p-0s99QfRy.js +12 -0
- package/components/{p-DbeHBSOe.js → p-BuFx0tTm.js} +1 -1
- package/components/p-CGmJG63p.js +1 -0
- package/components/p-CcxjkCOx.js +1 -0
- package/esm/{aria-loader-CES8Ae1e.js → aria-loader-BVolm0lC.js} +1 -1
- package/esm/icons-CmuFKDRz.js +75 -0
- package/esm/{index-BvxaUA12.js → index-Dh_9sN0q.js} +389 -2478
- package/esm/index.js +4 -3
- package/esm/lmvz-button.entry.js +3 -3
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +111 -0
- package/esm/lmvz-chip.entry.js +3 -3
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-header_2.entry.js +3 -3
- package/esm/lmvz-icon.entry.js +9 -7
- package/esm/lmvz-input.entry.js +4 -4
- package/esm/lmvz-menuitem.entry.js +4 -4
- package/esm/lmvz-select.entry.js +3 -3
- package/esm/loader.js +1 -1
- package/esm/{logger-0bL3pydp.js → logger-CGmJG63p.js} +2870 -765
- package/esm/{reactive-controller-host-J2thAxVH.js → reactive-controller-host-DHcPpJW7.js} +1 -1
- package/esm/{icons-Bj4dF1-I.js → svg-B2YoIRuh.js} +29 -80
- package/hydrate/index.js +2441 -165
- package/hydrate/index.mjs +2441 -165
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-ec96c6b6.entry.js → p-0f7a4236.entry.js} +1 -1
- package/lmvz-components/p-0s99QfRy.js +12 -0
- package/lmvz-components/p-2f83d7a2.entry.js +1 -0
- package/lmvz-components/{p-6e8acbd9.entry.js → p-32171f4f.entry.js} +1 -1
- package/lmvz-components/{p-9212bd23.entry.js → p-400b2318.entry.js} +1 -1
- package/lmvz-components/{p-9626e951.entry.js → p-851969bd.entry.js} +1 -1
- package/lmvz-components/p-9f9d845d.entry.js +1 -0
- package/lmvz-components/p-CFsC37ww.js +1 -0
- package/lmvz-components/p-CGmJG63p.js +1 -0
- package/lmvz-components/p-CcxjkCOx.js +1 -0
- package/lmvz-components/{p-BxHnZA0M.js → p-GdMr6Qlp.js} +1 -1
- package/lmvz-components/p-a12f95da.entry.js +1 -0
- package/lmvz-components/{p-e1b847d2.entry.js → p-ab4437dc.entry.js} +1 -1
- package/lmvz-components/{p-7a6bec13.entry.js → p-d0a0e206.entry.js} +1 -1
- package/lmvz-components/{p-DYaffOLo.js → p-dhVSUYqd.js} +1 -1
- package/manifest.json +410 -1
- package/package.json +5 -1
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +39 -0
- package/types/components.d.ts +151 -0
- package/types/utils/icons/icons.d.ts +0 -1
- package/components/p-DXOTa5VF.js +0 -12
- package/components/p-fiRXhuXK.js +0 -1
- package/lmvz-components/p-0bL3pydp.js +0 -1
- package/lmvz-components/p-40569208.entry.js +0 -1
- package/lmvz-components/p-49ab22bd.entry.js +0 -1
- package/lmvz-components/p-Bu4Z_PMf.js +0 -1
- package/lmvz-components/p-DHZwxmLb.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
|
|
3
|
+
<path d="M3.75 12.5625L8.83079 17.625L20.4375 6.375" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -43,7 +43,7 @@ async function fetchRuntime() {
|
|
|
43
43
|
if (state.runtime)
|
|
44
44
|
return state.runtime;
|
|
45
45
|
if (!state.loadPromise) {
|
|
46
|
-
state.loadPromise = Promise.resolve().then(function () { return require('./index
|
|
46
|
+
state.loadPromise = Promise.resolve().then(function () { return require('./index-3g9Z9sfF.js'); }).catch(() => null);
|
|
47
47
|
}
|
|
48
48
|
const runtime = await state.loadPromise;
|
|
49
49
|
if (runtime) {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var svg = require('./svg-BMBduILB.js');
|
|
4
|
+
|
|
5
|
+
const IconProviderRegistryKey = Symbol.for('LMVZ__iconProviderRegistry');
|
|
6
|
+
const inMemoryRegistry = {};
|
|
7
|
+
function getRegistry() {
|
|
8
|
+
if (typeof window === 'undefined') {
|
|
9
|
+
return inMemoryRegistry;
|
|
10
|
+
}
|
|
11
|
+
return window[IconProviderRegistryKey] ?? (window[IconProviderRegistryKey] = {});
|
|
12
|
+
}
|
|
13
|
+
function registerIconProvider(id, provider) {
|
|
14
|
+
const registry = getRegistry();
|
|
15
|
+
const providerName = id;
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(registry, providerName)) {
|
|
17
|
+
console.warn(`Icon provider with name "${providerName}" is already registered. Overwriting existing provider.`);
|
|
18
|
+
}
|
|
19
|
+
registry[providerName] = provider;
|
|
20
|
+
}
|
|
21
|
+
function getRegisteredIconProvider(id) {
|
|
22
|
+
const registry = getRegistry();
|
|
23
|
+
if (id) {
|
|
24
|
+
return registry[id];
|
|
25
|
+
}
|
|
26
|
+
const providerNames = Object.keys(registry);
|
|
27
|
+
if (providerNames.length === 0) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
if (providerNames.length > 1) {
|
|
31
|
+
console.warn(`Multiple icon providers registered (${providerNames.join(', ')}). Using the first one: "${providerNames[0]}".`);
|
|
32
|
+
}
|
|
33
|
+
const firstProviderName = providerNames[0];
|
|
34
|
+
if (!firstProviderName) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
return registry[firstProviderName];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function resolveIconSvg(options) {
|
|
41
|
+
const { icon, iconset } = options;
|
|
42
|
+
const iconSvg = await (async () => {
|
|
43
|
+
const provider = getRegisteredIconProvider(iconset);
|
|
44
|
+
if (!provider) {
|
|
45
|
+
console.warn(`No icon provider registered. Unable to resolve icon "${icon}"${iconset ? ` from set "${iconset}"` : ''}. Using default icon.`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const resolved = await Promise.resolve(provider.resolve(icon));
|
|
50
|
+
if (!resolved?.svg) {
|
|
51
|
+
console.warn(`Icon "${icon}"${iconset ? ` from set "${iconset}"` : ''} not found in provider. Using default icon.`);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const validated = svg.toValidSvgStringWithFallback(resolved.svg);
|
|
55
|
+
if (validated) {
|
|
56
|
+
return validated;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
console.error(`Error resolving icon "${icon}" with provider:`, error);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
return;
|
|
64
|
+
})();
|
|
65
|
+
if (iconSvg)
|
|
66
|
+
return iconSvg;
|
|
67
|
+
console.error(`Icon "${icon}" not found${iconset ? ` in set "${iconset}"` : ''}. Using default icon.`);
|
|
68
|
+
return svg.emptyDefaultSvg();
|
|
69
|
+
}
|
|
70
|
+
function typedIconFromSet(iconset, icon) {
|
|
71
|
+
return {
|
|
72
|
+
iconset,
|
|
73
|
+
icon,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
exports.getRegisteredIconProvider = getRegisteredIconProvider;
|
|
78
|
+
exports.registerIconProvider = registerIconProvider;
|
|
79
|
+
exports.resolveIconSvg = resolveIconSvg;
|
|
80
|
+
exports.typedIconFromSet = typedIconFromSet;
|