@vanduo-oss/framework 1.4.0 → 1.4.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/README.md +11 -9
- package/css/components/affix.css +11 -11
- package/css/components/alerts.css +55 -55
- package/css/components/avatar.css +62 -62
- package/css/components/badges.css +25 -25
- package/css/components/breadcrumbs.css +31 -31
- package/css/components/bubble.css +40 -40
- package/css/components/button-group.css +2 -2
- package/css/components/buttons.css +33 -33
- package/css/components/cards.css +76 -76
- package/css/components/chips.css +27 -27
- package/css/components/code-snippet.css +132 -132
- package/css/components/collapsible.css +60 -60
- package/css/components/collections.css +58 -58
- package/css/components/datepicker.css +52 -52
- package/css/components/doc-search.css +63 -63
- package/css/components/doc-tabs.css +1 -1
- package/css/components/draggable.css +69 -69
- package/css/components/dropdown.css +48 -48
- package/css/components/fab.css +60 -60
- package/css/components/flow.css +55 -55
- package/css/components/footer.css +52 -52
- package/css/components/forms.css +373 -373
- package/css/components/image-box.css +39 -39
- package/css/components/modals.css +47 -47
- package/css/components/music-player.css +150 -150
- package/css/components/navbar.css +71 -71
- package/css/components/pagination.css +50 -50
- package/css/components/preloader.css +18 -18
- package/css/components/progress.css +16 -16
- package/css/components/rating.css +18 -18
- package/css/components/ripple.css +10 -10
- package/css/components/sidenav.css +67 -67
- package/css/components/skeleton.css +13 -13
- package/css/components/spinner.css +30 -30
- package/css/components/spotlight.css +27 -27
- package/css/components/stepper.css +36 -36
- package/css/components/suggest.css +35 -35
- package/css/components/tabs.css +46 -46
- package/css/components/theme-customizer.css +73 -73
- package/css/components/timeline.css +43 -43
- package/css/components/timepicker.css +29 -29
- package/css/components/toast.css +27 -27
- package/css/components/tooltips.css +77 -77
- package/css/components/transfer.css +35 -35
- package/css/components/tree.css +25 -25
- package/css/components/waypoint.css +12 -12
- package/css/core/colors.css +610 -610
- package/css/core/grid.css +127 -127
- package/css/core/helpers.css +338 -338
- package/css/core/tokens.css +69 -81
- package/css/core/typography.css +91 -91
- package/css/effects/morph.css +17 -17
- package/css/effects/parallax.css +6 -6
- package/css/utilities/color-utilities.css +273 -273
- package/css/utilities/media.css +2 -2
- package/css/utilities/shadow.css +75 -75
- package/css/utilities/table.css +40 -40
- package/css/utilities/transitions.css +38 -38
- package/css/vanduo.css +1 -2
- package/dist/build-info.json +3 -3
- package/dist/vanduo.cjs.js +20 -20
- package/dist/vanduo.cjs.js.map +2 -2
- package/dist/vanduo.cjs.min.js +4 -4
- package/dist/vanduo.cjs.min.js.map +2 -2
- package/dist/vanduo.css +4030 -4127
- package/dist/vanduo.css.map +1 -1
- package/dist/vanduo.esm.js +20 -20
- package/dist/vanduo.esm.js.map +2 -2
- package/dist/vanduo.esm.min.js +4 -4
- package/dist/vanduo.esm.min.js.map +2 -2
- package/dist/vanduo.js +20 -20
- package/dist/vanduo.js.map +2 -2
- package/dist/vanduo.min.css +2 -2
- package/dist/vanduo.min.css.map +1 -1
- package/dist/vanduo.min.js +4 -4
- package/dist/vanduo.min.js.map +2 -2
- package/js/components/affix.js +2 -2
- package/js/components/image-box.js +2 -2
- package/js/components/morph.js +1 -1
- package/js/components/music-player.js +11 -11
- package/js/components/navbar.js +1 -1
- package/js/components/preloader.js +1 -1
- package/js/components/theme-customizer.js +4 -4
- package/js/components/vd-hex.js +8 -10
- package/package.json +1 -1
- package/css/core/vd-aliases.css +0 -108
package/js/components/affix.js
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
sentinel.style.cssText = 'display:block;height:1px;margin-bottom:-1px;visibility:hidden;pointer-events:none;';
|
|
52
52
|
el.parentNode.insertBefore(sentinel, el);
|
|
53
53
|
|
|
54
|
-
el.style.setProperty('--affix-top-offset', offset + 'px');
|
|
54
|
+
el.style.setProperty('--vd-affix-top-offset', offset + 'px');
|
|
55
55
|
|
|
56
56
|
function stick() {
|
|
57
57
|
if (isStuck) return;
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
() => { if (sentinel.parentNode) sentinel.parentNode.removeChild(sentinel); },
|
|
101
101
|
() => {
|
|
102
102
|
el.classList.remove('is-stuck');
|
|
103
|
-
el.style.removeProperty('--affix-top-offset');
|
|
103
|
+
el.style.removeProperty('--vd-affix-top-offset');
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
106
|
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
|
|
281
281
|
// Calculate scrollbar width and lock body scroll
|
|
282
282
|
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
283
|
-
document.body.style.setProperty('--scrollbar-width', `${scrollbarWidth}px`);
|
|
283
|
+
document.body.style.setProperty('--vd-scrollbar-width', `${scrollbarWidth}px`);
|
|
284
284
|
document.body.classList.add('body-image-box-open');
|
|
285
285
|
|
|
286
286
|
// Show backdrop
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
|
|
319
319
|
// Unlock body scroll
|
|
320
320
|
document.body.classList.remove('body-image-box-open');
|
|
321
|
-
document.body.style.removeProperty('--scrollbar-width');
|
|
321
|
+
document.body.style.removeProperty('--vd-scrollbar-width');
|
|
322
322
|
|
|
323
323
|
// Return focus to trigger
|
|
324
324
|
if (this.currentTrigger) {
|
package/js/components/morph.js
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
el.classList.add('is-morphing');
|
|
103
103
|
|
|
104
104
|
let duration = MORPH_DURATION_MS;
|
|
105
|
-
const custom = getComputedStyle(el).getPropertyValue('--morph-duration');
|
|
105
|
+
const custom = getComputedStyle(el).getPropertyValue('--vd-morph-duration');
|
|
106
106
|
if (custom) {
|
|
107
107
|
const parsed = parseFloat(custom);
|
|
108
108
|
if (!isNaN(parsed)) duration = parsed * (custom.indexOf('ms') !== -1 ? 1 : 1000);
|
|
@@ -101,13 +101,13 @@
|
|
|
101
101
|
const max = parseFloat(input.max) || 1;
|
|
102
102
|
const val = parseFloat(input.value) || 0;
|
|
103
103
|
const pct = ((val - min) / (max - min)) * 100;
|
|
104
|
-
input.style.setProperty('--fill', pct + '%');
|
|
104
|
+
input.style.setProperty('--vd-fill', pct + '%');
|
|
105
105
|
// Fallback inline gradient for browsers without ::-moz-range-progress
|
|
106
106
|
input.style.backgroundImage =
|
|
107
|
-
'linear-gradient(to right, var(--music-player-track-fill, currentColor) 0%, ' +
|
|
108
|
-
'var(--music-player-track-fill, currentColor) ' + pct + '%, ' +
|
|
109
|
-
'var(--music-player-track-bg, #ccc) ' + pct + '%, ' +
|
|
110
|
-
'var(--music-player-track-bg, #ccc) 100%)';
|
|
107
|
+
'linear-gradient(to right, var(--vd-music-player-track-fill, currentColor) 0%, ' +
|
|
108
|
+
'var(--vd-music-player-track-fill, currentColor) ' + pct + '%, ' +
|
|
109
|
+
'var(--vd-music-player-track-bg, #ccc) ' + pct + '%, ' +
|
|
110
|
+
'var(--vd-music-player-track-bg, #ccc) 100%)';
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/* ─── Phosphor icon helper (matches framework icon style) ─ */
|
|
@@ -911,8 +911,8 @@
|
|
|
911
911
|
'vd-music-player-floating-bottom-right',
|
|
912
912
|
'is-position-custom'
|
|
913
913
|
);
|
|
914
|
-
container.style.removeProperty('--music-player-floating-top');
|
|
915
|
-
container.style.removeProperty('--music-player-floating-left');
|
|
914
|
+
container.style.removeProperty('--vd-music-player-floating-top');
|
|
915
|
+
container.style.removeProperty('--vd-music-player-floating-left');
|
|
916
916
|
if (r && r.parent && r.parent.isConnected) {
|
|
917
917
|
r.parent.insertBefore(container, r.next);
|
|
918
918
|
}
|
|
@@ -1014,8 +1014,8 @@
|
|
|
1014
1014
|
*/
|
|
1015
1015
|
_setCornerPosition: function (container, which) {
|
|
1016
1016
|
container.classList.remove('is-position-custom', 'vd-music-player-floating-bottom-left', 'vd-music-player-floating-bottom-right');
|
|
1017
|
-
container.style.removeProperty('--music-player-floating-top');
|
|
1018
|
-
container.style.removeProperty('--music-player-floating-left');
|
|
1017
|
+
container.style.removeProperty('--vd-music-player-floating-top');
|
|
1018
|
+
container.style.removeProperty('--vd-music-player-floating-left');
|
|
1019
1019
|
if (which === 'bottom-left') {
|
|
1020
1020
|
container.classList.add('vd-music-player-floating-bottom-left');
|
|
1021
1021
|
} else {
|
|
@@ -1031,8 +1031,8 @@
|
|
|
1031
1031
|
_setCustomPositionFromRect: function (container, left, top) {
|
|
1032
1032
|
container.classList.remove('vd-music-player-floating-bottom-left', 'vd-music-player-floating-bottom-right');
|
|
1033
1033
|
container.classList.add('is-position-custom');
|
|
1034
|
-
container.style.setProperty('--music-player-floating-left', left + 'px');
|
|
1035
|
-
container.style.setProperty('--music-player-floating-top', top + 'px');
|
|
1034
|
+
container.style.setProperty('--vd-music-player-floating-left', left + 'px');
|
|
1035
|
+
container.style.setProperty('--vd-music-player-floating-top', top + 'px');
|
|
1036
1036
|
},
|
|
1037
1037
|
|
|
1038
1038
|
/**
|
package/js/components/navbar.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
getBreakpoint: function () {
|
|
21
21
|
const root = getComputedStyle(document.documentElement);
|
|
22
|
-
const breakpointValue = root.getPropertyValue('--breakpoint-lg').trim();
|
|
22
|
+
const breakpointValue = root.getPropertyValue('--vd-breakpoint-lg').trim();
|
|
23
23
|
|
|
24
24
|
// Parse the value (could be "992px" or just "992")
|
|
25
25
|
const parsed = parseInt(breakpointValue, 10);
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
// Update width
|
|
62
62
|
if (animate) {
|
|
63
|
-
el.style.transition = 'width var(--transition-duration-slow) var(--transition-ease)';
|
|
63
|
+
el.style.transition = 'width var(--vd-transition-duration-slow) var(--vd-transition-ease)';
|
|
64
64
|
} else {
|
|
65
65
|
el.style.transition = 'none';
|
|
66
66
|
setTimeout(() => {
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
|
|
261
261
|
this.state.radius = radius;
|
|
262
262
|
document.documentElement.setAttribute('data-radius', radius);
|
|
263
|
-
document.documentElement.style.setProperty('--radius-scale', radius);
|
|
263
|
+
document.documentElement.style.setProperty('--vd-radius-scale', radius);
|
|
264
264
|
this.savePreference(this.STORAGE_KEYS.RADIUS, radius);
|
|
265
265
|
|
|
266
266
|
this.dispatchEvent('radius-change', { radius: radius });
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
} else {
|
|
462
462
|
// Desktop: position directly below the trigger button, aligned to its right edge
|
|
463
463
|
const triggerRect = anchorTrigger.getBoundingClientRect();
|
|
464
|
-
const panelWidth = 320; // --customizer-width
|
|
464
|
+
const panelWidth = 320; // --vd-customizer-width
|
|
465
465
|
const panelTop = triggerRect.bottom + 8;
|
|
466
466
|
|
|
467
467
|
// Calculate right position: align panel's right edge with trigger's right edge
|
|
@@ -572,13 +572,13 @@
|
|
|
572
572
|
// Generate primary color swatches
|
|
573
573
|
let primarySwatches = '';
|
|
574
574
|
for (const [key, value] of Object.entries(this.PRIMARY_COLORS)) {
|
|
575
|
-
primarySwatches += `<button class="tc-color-swatch${key === this.state.primary ? ' is-active' : ''}" data-color="${esc(key)}" style="--swatch-color: ${safeColor(value.color)}" title="${esc(value.name)}"></button>`;
|
|
575
|
+
primarySwatches += `<button class="tc-color-swatch${key === this.state.primary ? ' is-active' : ''}" data-color="${esc(key)}" style="--vd-swatch-color: ${safeColor(value.color)}" title="${esc(value.name)}"></button>`;
|
|
576
576
|
}
|
|
577
577
|
|
|
578
578
|
// Generate neutral color swatches
|
|
579
579
|
let neutralSwatches = '';
|
|
580
580
|
for (const [key, value] of Object.entries(this.NEUTRAL_COLORS)) {
|
|
581
|
-
neutralSwatches += `<button class="tc-neutral-swatch${key === this.state.neutral ? ' is-active' : ''}" data-neutral="${esc(key)}" style="--swatch-color: ${safeColor(value.color)}" title="${esc(value.name)}"><span>${esc(value.name)}</span></button>`;
|
|
581
|
+
neutralSwatches += `<button class="tc-neutral-swatch${key === this.state.neutral ? ' is-active' : ''}" data-neutral="${esc(key)}" style="--vd-swatch-color: ${safeColor(value.color)}" title="${esc(value.name)}"><span>${esc(value.name)}</span></button>`;
|
|
582
582
|
}
|
|
583
583
|
|
|
584
584
|
// Generate radius buttons
|
package/js/components/vd-hex.js
CHANGED
|
@@ -90,19 +90,17 @@ export class VdHexGrid {
|
|
|
90
90
|
const root = document.documentElement;
|
|
91
91
|
const style = getComputedStyle(root);
|
|
92
92
|
|
|
93
|
-
const readToken = (
|
|
94
|
-
return style.getPropertyValue(
|
|
95
|
-
|| style.getPropertyValue(fallback).trim()
|
|
96
|
-
|| defaultValue;
|
|
93
|
+
const readToken = (token, defaultValue) => {
|
|
94
|
+
return style.getPropertyValue(token).trim() || defaultValue;
|
|
97
95
|
};
|
|
98
96
|
|
|
99
97
|
return {
|
|
100
|
-
bgPrimary: readToken('--vd-bg-primary', '
|
|
101
|
-
bgSecondary: readToken('--vd-bg-secondary', '
|
|
102
|
-
borderColor: readToken('--vd-border-color', '
|
|
103
|
-
colorPrimary: readToken('--vd-color-primary', '
|
|
104
|
-
textColor: readToken('--vd-text-primary', '
|
|
105
|
-
textMuted: readToken('--vd-text-muted', '
|
|
98
|
+
bgPrimary: readToken('--vd-bg-primary', '#ffffff'),
|
|
99
|
+
bgSecondary: readToken('--vd-bg-secondary', '#f5f5f5'),
|
|
100
|
+
borderColor: readToken('--vd-border-color', '#e0e0e0'),
|
|
101
|
+
colorPrimary: readToken('--vd-color-primary', '#3b82f6'),
|
|
102
|
+
textColor: readToken('--vd-text-primary', '#1f2937'),
|
|
103
|
+
textMuted: readToken('--vd-text-muted', '#6b7280')
|
|
106
104
|
};
|
|
107
105
|
}
|
|
108
106
|
|
package/package.json
CHANGED
package/css/core/vd-aliases.css
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vanduo Framework - Semantic Compatibility Aliases
|
|
3
|
-
* Maps legacy unprefixed semantic tokens to the canonical `--vd-*` API.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
:root {
|
|
7
|
-
/* Colors */
|
|
8
|
-
--color-primary: var(--vd-color-primary);
|
|
9
|
-
--color-primary-light: var(--vd-color-primary-light);
|
|
10
|
-
--color-primary-dark: var(--vd-color-primary-dark);
|
|
11
|
-
--color-primary-hover: var(--vd-color-primary-hover);
|
|
12
|
-
--color-primary-active: var(--vd-color-primary-active);
|
|
13
|
-
--color-primary-rgb: var(--vd-color-primary-rgb);
|
|
14
|
-
--color-primary-alpha-5: var(--vd-color-primary-alpha-5);
|
|
15
|
-
--color-primary-alpha-08: var(--vd-color-primary-alpha-08);
|
|
16
|
-
--color-primary-alpha-10: var(--vd-color-primary-alpha-10);
|
|
17
|
-
--color-primary-alpha-15: var(--vd-color-primary-alpha-15);
|
|
18
|
-
--color-primary-alpha-20: var(--vd-color-primary-alpha-20);
|
|
19
|
-
--color-primary-alpha-30: var(--vd-color-primary-alpha-30);
|
|
20
|
-
--color-primary-alpha-40: var(--vd-color-primary-alpha-40);
|
|
21
|
-
--color-primary-alpha-50: var(--vd-color-primary-alpha-50);
|
|
22
|
-
|
|
23
|
-
--color-secondary: var(--vd-color-secondary);
|
|
24
|
-
--color-secondary-light: var(--vd-color-secondary-light);
|
|
25
|
-
--color-secondary-dark: var(--vd-color-secondary-dark);
|
|
26
|
-
--color-secondary-hover: var(--vd-color-secondary-hover);
|
|
27
|
-
--color-secondary-active: var(--vd-color-secondary-active);
|
|
28
|
-
--color-secondary-alpha-10: var(--vd-color-secondary-alpha-10);
|
|
29
|
-
--color-secondary-alpha-20: var(--vd-color-secondary-alpha-20);
|
|
30
|
-
|
|
31
|
-
--color-accent: var(--vd-color-accent);
|
|
32
|
-
--color-accent-light: var(--vd-color-accent-light);
|
|
33
|
-
--color-accent-dark: var(--vd-color-accent-dark);
|
|
34
|
-
|
|
35
|
-
--color-success: var(--vd-color-success);
|
|
36
|
-
--color-success-light: var(--vd-color-success-light);
|
|
37
|
-
--color-success-dark: var(--vd-color-success-dark);
|
|
38
|
-
--color-success-hover: var(--vd-color-success-hover);
|
|
39
|
-
--color-success-active: var(--vd-color-success-active);
|
|
40
|
-
--color-success-alpha-10: var(--vd-color-success-alpha-10);
|
|
41
|
-
--color-success-alpha-20: var(--vd-color-success-alpha-20);
|
|
42
|
-
|
|
43
|
-
--color-warning: var(--vd-color-warning);
|
|
44
|
-
--color-warning-light: var(--vd-color-warning-light);
|
|
45
|
-
--color-warning-dark: var(--vd-color-warning-dark);
|
|
46
|
-
--color-warning-hover: var(--vd-color-warning-hover);
|
|
47
|
-
--color-warning-active: var(--vd-color-warning-active);
|
|
48
|
-
--color-warning-alpha-10: var(--vd-color-warning-alpha-10);
|
|
49
|
-
--color-warning-alpha-20: var(--vd-color-warning-alpha-20);
|
|
50
|
-
--color-warning-alpha-30: var(--vd-color-warning-alpha-30);
|
|
51
|
-
|
|
52
|
-
--color-error: var(--vd-color-error);
|
|
53
|
-
--color-error-light: var(--vd-color-error-light);
|
|
54
|
-
--color-error-dark: var(--vd-color-error-dark);
|
|
55
|
-
--color-error-hover: var(--vd-color-error-hover);
|
|
56
|
-
--color-error-active: var(--vd-color-error-active);
|
|
57
|
-
--color-error-alpha-10: var(--vd-color-error-alpha-10);
|
|
58
|
-
--color-error-alpha-20: var(--vd-color-error-alpha-20);
|
|
59
|
-
|
|
60
|
-
--color-danger: var(--vd-color-danger);
|
|
61
|
-
--color-danger-light: var(--vd-color-danger-light);
|
|
62
|
-
--color-danger-dark: var(--vd-color-danger-dark);
|
|
63
|
-
--color-danger-hover: var(--vd-color-danger-hover);
|
|
64
|
-
--color-danger-active: var(--vd-color-danger-active);
|
|
65
|
-
|
|
66
|
-
--color-info: var(--vd-color-info);
|
|
67
|
-
--color-info-light: var(--vd-color-info-light);
|
|
68
|
-
--color-info-dark: var(--vd-color-info-dark);
|
|
69
|
-
--color-info-hover: var(--vd-color-info-hover);
|
|
70
|
-
--color-info-active: var(--vd-color-info-active);
|
|
71
|
-
--color-info-alpha-10: var(--vd-color-info-alpha-10);
|
|
72
|
-
--color-info-alpha-20: var(--vd-color-info-alpha-20);
|
|
73
|
-
|
|
74
|
-
--color-white: var(--vd-color-white);
|
|
75
|
-
--color-black: var(--vd-color-black);
|
|
76
|
-
--color-gray-50: var(--vd-color-gray-50);
|
|
77
|
-
--color-gray-100: var(--vd-color-gray-100);
|
|
78
|
-
--color-gray-200: var(--vd-color-gray-200);
|
|
79
|
-
--color-gray-300: var(--vd-color-gray-300);
|
|
80
|
-
--color-gray-400: var(--vd-color-gray-400);
|
|
81
|
-
--color-gray-500: var(--vd-color-gray-500);
|
|
82
|
-
--color-gray-600: var(--vd-color-gray-600);
|
|
83
|
-
--color-gray-700: var(--vd-color-gray-700);
|
|
84
|
-
--color-gray-800: var(--vd-color-gray-800);
|
|
85
|
-
--color-gray-900: var(--vd-color-gray-900);
|
|
86
|
-
|
|
87
|
-
/* Backgrounds */
|
|
88
|
-
--bg-primary: var(--vd-bg-primary);
|
|
89
|
-
--bg-secondary: var(--vd-bg-secondary);
|
|
90
|
-
--bg-tertiary: var(--vd-bg-tertiary);
|
|
91
|
-
--bg-dark: var(--vd-bg-dark);
|
|
92
|
-
--bg-darker: var(--vd-bg-darker);
|
|
93
|
-
|
|
94
|
-
/* Text */
|
|
95
|
-
--text-primary: var(--vd-text-primary);
|
|
96
|
-
--text-secondary: var(--vd-text-secondary);
|
|
97
|
-
--text-tertiary: var(--vd-text-tertiary);
|
|
98
|
-
--text-muted: var(--vd-text-muted);
|
|
99
|
-
--text-light: var(--vd-text-light);
|
|
100
|
-
--text-disabled: var(--vd-text-disabled);
|
|
101
|
-
--text-on-primary: var(--vd-text-on-primary);
|
|
102
|
-
--text-inverse: var(--vd-text-inverse);
|
|
103
|
-
|
|
104
|
-
/* Borders */
|
|
105
|
-
--border-color: var(--vd-border-color);
|
|
106
|
-
--border-color-light: var(--vd-border-color-light);
|
|
107
|
-
--border-color-dark: var(--vd-border-color-dark);
|
|
108
|
-
}
|