tyrell-components 1.0.0-TC7
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/LICENSE +21 -0
- package/README.md +221 -0
- package/css/tyrell.css +1783 -0
- package/dist/tyrell.css +1783 -0
- package/dist/tyrell.js +2 -0
- package/lib/base/ty-component.d.ts +133 -0
- package/lib/base/ty-component.d.ts.map +1 -0
- package/lib/base/ty-component.js +297 -0
- package/lib/base/ty-component.js.map +1 -0
- package/lib/components/button.d.ts +126 -0
- package/lib/components/button.d.ts.map +1 -0
- package/lib/components/button.js +244 -0
- package/lib/components/button.js.map +1 -0
- package/lib/components/calendar-month.d.ts +132 -0
- package/lib/components/calendar-month.d.ts.map +1 -0
- package/lib/components/calendar-month.js +440 -0
- package/lib/components/calendar-month.js.map +1 -0
- package/lib/components/calendar-navigation.d.ts +137 -0
- package/lib/components/calendar-navigation.d.ts.map +1 -0
- package/lib/components/calendar-navigation.js +366 -0
- package/lib/components/calendar-navigation.js.map +1 -0
- package/lib/components/calendar.d.ts +166 -0
- package/lib/components/calendar.d.ts.map +1 -0
- package/lib/components/calendar.js +774 -0
- package/lib/components/calendar.js.map +1 -0
- package/lib/components/checkbox.d.ts +189 -0
- package/lib/components/checkbox.d.ts.map +1 -0
- package/lib/components/checkbox.js +400 -0
- package/lib/components/checkbox.js.map +1 -0
- package/lib/components/copy.d.ts +180 -0
- package/lib/components/copy.d.ts.map +1 -0
- package/lib/components/copy.js +393 -0
- package/lib/components/copy.js.map +1 -0
- package/lib/components/date-picker.d.ts +379 -0
- package/lib/components/date-picker.d.ts.map +1 -0
- package/lib/components/date-picker.js +1586 -0
- package/lib/components/date-picker.js.map +1 -0
- package/lib/components/dropdown.d.ts +402 -0
- package/lib/components/dropdown.d.ts.map +1 -0
- package/lib/components/dropdown.js +1564 -0
- package/lib/components/dropdown.js.map +1 -0
- package/lib/components/icon.d.ts +107 -0
- package/lib/components/icon.d.ts.map +1 -0
- package/lib/components/icon.js +230 -0
- package/lib/components/icon.js.map +1 -0
- package/lib/components/input.d.ts +270 -0
- package/lib/components/input.d.ts.map +1 -0
- package/lib/components/input.js +721 -0
- package/lib/components/input.js.map +1 -0
- package/lib/components/modal.d.ts +58 -0
- package/lib/components/modal.d.ts.map +1 -0
- package/lib/components/modal.js +473 -0
- package/lib/components/modal.js.map +1 -0
- package/lib/components/multiselect.d.ts +397 -0
- package/lib/components/multiselect.d.ts.map +1 -0
- package/lib/components/multiselect.js +1580 -0
- package/lib/components/multiselect.js.map +1 -0
- package/lib/components/option.d.ts +66 -0
- package/lib/components/option.d.ts.map +1 -0
- package/lib/components/option.js +314 -0
- package/lib/components/option.js.map +1 -0
- package/lib/components/popup.d.ts +43 -0
- package/lib/components/popup.d.ts.map +1 -0
- package/lib/components/popup.js +380 -0
- package/lib/components/popup.js.map +1 -0
- package/lib/components/radio.d.ts +198 -0
- package/lib/components/radio.d.ts.map +1 -0
- package/lib/components/radio.js +437 -0
- package/lib/components/radio.js.map +1 -0
- package/lib/components/resize-observer.d.ts +48 -0
- package/lib/components/resize-observer.d.ts.map +1 -0
- package/lib/components/resize-observer.js +108 -0
- package/lib/components/resize-observer.js.map +1 -0
- package/lib/components/scroll-container.d.ts +51 -0
- package/lib/components/scroll-container.d.ts.map +1 -0
- package/lib/components/scroll-container.js +239 -0
- package/lib/components/scroll-container.js.map +1 -0
- package/lib/components/step.d.ts +26 -0
- package/lib/components/step.d.ts.map +1 -0
- package/lib/components/step.js +75 -0
- package/lib/components/step.js.map +1 -0
- package/lib/components/switch.d.ts +111 -0
- package/lib/components/switch.d.ts.map +1 -0
- package/lib/components/switch.js +240 -0
- package/lib/components/switch.js.map +1 -0
- package/lib/components/tab.d.ts +23 -0
- package/lib/components/tab.d.ts.map +1 -0
- package/lib/components/tab.js +76 -0
- package/lib/components/tab.js.map +1 -0
- package/lib/components/tabs.d.ts +93 -0
- package/lib/components/tabs.d.ts.map +1 -0
- package/lib/components/tabs.js +653 -0
- package/lib/components/tabs.js.map +1 -0
- package/lib/components/tag.d.ts +144 -0
- package/lib/components/tag.d.ts.map +1 -0
- package/lib/components/tag.js +314 -0
- package/lib/components/tag.js.map +1 -0
- package/lib/components/textarea.d.ts +241 -0
- package/lib/components/textarea.d.ts.map +1 -0
- package/lib/components/textarea.js +585 -0
- package/lib/components/textarea.js.map +1 -0
- package/lib/components/tooltip.d.ts +40 -0
- package/lib/components/tooltip.d.ts.map +1 -0
- package/lib/components/tooltip.js +439 -0
- package/lib/components/tooltip.js.map +1 -0
- package/lib/components/wizard.d.ts +86 -0
- package/lib/components/wizard.d.ts.map +1 -0
- package/lib/components/wizard.js +636 -0
- package/lib/components/wizard.js.map +1 -0
- package/lib/icons/fontawesome/brands.d.ts +557 -0
- package/lib/icons/fontawesome/brands.d.ts.map +1 -0
- package/lib/icons/fontawesome/brands.js +557 -0
- package/lib/icons/fontawesome/brands.js.map +1 -0
- package/lib/icons/fontawesome/regular.d.ts +281 -0
- package/lib/icons/fontawesome/regular.d.ts.map +1 -0
- package/lib/icons/fontawesome/regular.js +281 -0
- package/lib/icons/fontawesome/regular.js.map +1 -0
- package/lib/icons/fontawesome/solid.d.ts +1992 -0
- package/lib/icons/fontawesome/solid.d.ts.map +1 -0
- package/lib/icons/fontawesome/solid.js +1992 -0
- package/lib/icons/fontawesome/solid.js.map +1 -0
- package/lib/icons/heroicons/micro.d.ts +324 -0
- package/lib/icons/heroicons/micro.d.ts.map +1 -0
- package/lib/icons/heroicons/micro.js +1032 -0
- package/lib/icons/heroicons/micro.js.map +1 -0
- package/lib/icons/heroicons/mini.d.ts +332 -0
- package/lib/icons/heroicons/mini.d.ts.map +1 -0
- package/lib/icons/heroicons/mini.js +1038 -0
- package/lib/icons/heroicons/mini.js.map +1 -0
- package/lib/icons/heroicons/outline.d.ts +332 -0
- package/lib/icons/heroicons/outline.d.ts.map +1 -0
- package/lib/icons/heroicons/outline.js +993 -0
- package/lib/icons/heroicons/outline.js.map +1 -0
- package/lib/icons/heroicons/solid.d.ts +332 -0
- package/lib/icons/heroicons/solid.d.ts.map +1 -0
- package/lib/icons/heroicons/solid.js +1063 -0
- package/lib/icons/heroicons/solid.js.map +1 -0
- package/lib/icons/lucide.d.ts +1872 -0
- package/lib/icons/lucide.d.ts.map +1 -0
- package/lib/icons/lucide.js +28212 -0
- package/lib/icons/lucide.js.map +1 -0
- package/lib/icons/material/filled.d.ts +2180 -0
- package/lib/icons/material/filled.d.ts.map +1 -0
- package/lib/icons/material/filled.js +14003 -0
- package/lib/icons/material/filled.js.map +1 -0
- package/lib/icons/material/outlined.d.ts +2142 -0
- package/lib/icons/material/outlined.d.ts.map +1 -0
- package/lib/icons/material/outlined.js +14545 -0
- package/lib/icons/material/outlined.js.map +1 -0
- package/lib/icons/material/round.d.ts +2147 -0
- package/lib/icons/material/round.d.ts.map +1 -0
- package/lib/icons/material/round.js +14779 -0
- package/lib/icons/material/round.js.map +1 -0
- package/lib/icons/material/sharp.d.ts +2147 -0
- package/lib/icons/material/sharp.d.ts.map +1 -0
- package/lib/icons/material/sharp.js +14189 -0
- package/lib/icons/material/sharp.js.map +1 -0
- package/lib/icons/material/two-tone.d.ts +2185 -0
- package/lib/icons/material/two-tone.d.ts.map +1 -0
- package/lib/icons/material/two-tone.js +17152 -0
- package/lib/icons/material/two-tone.js.map +1 -0
- package/lib/index.d.ts +78 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +71 -0
- package/lib/index.js.map +1 -0
- package/lib/styles/button.d.ts +14 -0
- package/lib/styles/button.d.ts.map +1 -0
- package/lib/styles/button.js +457 -0
- package/lib/styles/button.js.map +1 -0
- package/lib/styles/calendar-month.d.ts +6 -0
- package/lib/styles/calendar-month.d.ts.map +1 -0
- package/lib/styles/calendar-month.js +229 -0
- package/lib/styles/calendar-month.js.map +1 -0
- package/lib/styles/calendar-navigation.d.ts +6 -0
- package/lib/styles/calendar-navigation.d.ts.map +1 -0
- package/lib/styles/calendar-navigation.js +125 -0
- package/lib/styles/calendar-navigation.js.map +1 -0
- package/lib/styles/calendar.d.ts +6 -0
- package/lib/styles/calendar.d.ts.map +1 -0
- package/lib/styles/calendar.js +28 -0
- package/lib/styles/calendar.js.map +1 -0
- package/lib/styles/checkbox.d.ts +9 -0
- package/lib/styles/checkbox.d.ts.map +1 -0
- package/lib/styles/checkbox.js +19 -0
- package/lib/styles/checkbox.js.map +1 -0
- package/lib/styles/copy.d.ts +7 -0
- package/lib/styles/copy.d.ts.map +1 -0
- package/lib/styles/copy.js +94 -0
- package/lib/styles/copy.js.map +1 -0
- package/lib/styles/custom-scrollbar.d.ts +6 -0
- package/lib/styles/custom-scrollbar.d.ts.map +1 -0
- package/lib/styles/custom-scrollbar.js +157 -0
- package/lib/styles/custom-scrollbar.js.map +1 -0
- package/lib/styles/date-picker.d.ts +6 -0
- package/lib/styles/date-picker.d.ts.map +1 -0
- package/lib/styles/date-picker.js +400 -0
- package/lib/styles/date-picker.js.map +1 -0
- package/lib/styles/dropdown.d.ts +12 -0
- package/lib/styles/dropdown.d.ts.map +1 -0
- package/lib/styles/dropdown.js +983 -0
- package/lib/styles/dropdown.js.map +1 -0
- package/lib/styles/icon.d.ts +6 -0
- package/lib/styles/icon.d.ts.map +1 -0
- package/lib/styles/icon.js +231 -0
- package/lib/styles/icon.js.map +1 -0
- package/lib/styles/input.d.ts +7 -0
- package/lib/styles/input.d.ts.map +1 -0
- package/lib/styles/input.js +685 -0
- package/lib/styles/input.js.map +1 -0
- package/lib/styles/modal.d.ts +8 -0
- package/lib/styles/modal.d.ts.map +1 -0
- package/lib/styles/modal.js +134 -0
- package/lib/styles/modal.js.map +1 -0
- package/lib/styles/multiselect.d.ts +6 -0
- package/lib/styles/multiselect.d.ts.map +1 -0
- package/lib/styles/multiselect.js +774 -0
- package/lib/styles/multiselect.js.map +1 -0
- package/lib/styles/option.d.ts +6 -0
- package/lib/styles/option.d.ts.map +1 -0
- package/lib/styles/option.js +116 -0
- package/lib/styles/option.js.map +1 -0
- package/lib/styles/popup.d.ts +8 -0
- package/lib/styles/popup.d.ts.map +1 -0
- package/lib/styles/popup.js +95 -0
- package/lib/styles/popup.js.map +1 -0
- package/lib/styles/radio.d.ts +8 -0
- package/lib/styles/radio.d.ts.map +1 -0
- package/lib/styles/radio.js +160 -0
- package/lib/styles/radio.js.map +1 -0
- package/lib/styles/resize-observer.d.ts +6 -0
- package/lib/styles/resize-observer.d.ts.map +1 -0
- package/lib/styles/resize-observer.js +18 -0
- package/lib/styles/resize-observer.js.map +1 -0
- package/lib/styles/scroll-container.d.ts +6 -0
- package/lib/styles/scroll-container.d.ts.map +1 -0
- package/lib/styles/scroll-container.js +198 -0
- package/lib/styles/scroll-container.js.map +1 -0
- package/lib/styles/step.d.ts +5 -0
- package/lib/styles/step.d.ts.map +1 -0
- package/lib/styles/step.js +50 -0
- package/lib/styles/step.js.map +1 -0
- package/lib/styles/switch.d.ts +9 -0
- package/lib/styles/switch.d.ts.map +1 -0
- package/lib/styles/switch.js +100 -0
- package/lib/styles/switch.js.map +1 -0
- package/lib/styles/tab.d.ts +5 -0
- package/lib/styles/tab.d.ts.map +1 -0
- package/lib/styles/tab.js +51 -0
- package/lib/styles/tab.js.map +1 -0
- package/lib/styles/tabs.d.ts +13 -0
- package/lib/styles/tabs.d.ts.map +1 -0
- package/lib/styles/tabs.js +184 -0
- package/lib/styles/tabs.js.map +1 -0
- package/lib/styles/tag.d.ts +6 -0
- package/lib/styles/tag.d.ts.map +1 -0
- package/lib/styles/tag.js +415 -0
- package/lib/styles/tag.js.map +1 -0
- package/lib/styles/textarea.d.ts +6 -0
- package/lib/styles/textarea.d.ts.map +1 -0
- package/lib/styles/textarea.js +350 -0
- package/lib/styles/textarea.js.map +1 -0
- package/lib/styles/tooltip.d.ts +9 -0
- package/lib/styles/tooltip.d.ts.map +1 -0
- package/lib/styles/tooltip.js +136 -0
- package/lib/styles/tooltip.js.map +1 -0
- package/lib/styles/wizard.d.ts +25 -0
- package/lib/styles/wizard.d.ts.map +1 -0
- package/lib/styles/wizard.js +325 -0
- package/lib/styles/wizard.js.map +1 -0
- package/lib/types/common.d.ts +143 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/common.js +5 -0
- package/lib/types/common.js.map +1 -0
- package/lib/utils/calendar-utils.d.ts +176 -0
- package/lib/utils/calendar-utils.d.ts.map +1 -0
- package/lib/utils/calendar-utils.js +370 -0
- package/lib/utils/calendar-utils.js.map +1 -0
- package/lib/utils/custom-scrollbar.d.ts +82 -0
- package/lib/utils/custom-scrollbar.d.ts.map +1 -0
- package/lib/utils/custom-scrollbar.js +320 -0
- package/lib/utils/custom-scrollbar.js.map +1 -0
- package/lib/utils/icon-registry.d.ts +78 -0
- package/lib/utils/icon-registry.d.ts.map +1 -0
- package/lib/utils/icon-registry.js +304 -0
- package/lib/utils/icon-registry.js.map +1 -0
- package/lib/utils/locale.d.ts +136 -0
- package/lib/utils/locale.d.ts.map +1 -0
- package/lib/utils/locale.js +213 -0
- package/lib/utils/locale.js.map +1 -0
- package/lib/utils/mobile.d.ts +14 -0
- package/lib/utils/mobile.d.ts.map +1 -0
- package/lib/utils/mobile.js +21 -0
- package/lib/utils/mobile.js.map +1 -0
- package/lib/utils/number-format.d.ts +83 -0
- package/lib/utils/number-format.d.ts.map +1 -0
- package/lib/utils/number-format.js +143 -0
- package/lib/utils/number-format.js.map +1 -0
- package/lib/utils/parse-boolean.d.ts +39 -0
- package/lib/utils/parse-boolean.d.ts.map +1 -0
- package/lib/utils/parse-boolean.js +58 -0
- package/lib/utils/parse-boolean.js.map +1 -0
- package/lib/utils/positioning.d.ts +143 -0
- package/lib/utils/positioning.d.ts.map +1 -0
- package/lib/utils/positioning.js +308 -0
- package/lib/utils/positioning.js.map +1 -0
- package/lib/utils/property-capture.d.ts +132 -0
- package/lib/utils/property-capture.d.ts.map +1 -0
- package/lib/utils/property-capture.js +152 -0
- package/lib/utils/property-capture.js.map +1 -0
- package/lib/utils/property-manager.d.ts +90 -0
- package/lib/utils/property-manager.d.ts.map +1 -0
- package/lib/utils/property-manager.js +197 -0
- package/lib/utils/property-manager.js.map +1 -0
- package/lib/utils/resize-observer.d.ts +42 -0
- package/lib/utils/resize-observer.d.ts.map +1 -0
- package/lib/utils/resize-observer.js +71 -0
- package/lib/utils/resize-observer.js.map +1 -0
- package/lib/utils/scroll-lock.d.ts +79 -0
- package/lib/utils/scroll-lock.d.ts.map +1 -0
- package/lib/utils/scroll-lock.js +197 -0
- package/lib/utils/scroll-lock.js.map +1 -0
- package/lib/utils/styles.d.ts +27 -0
- package/lib/utils/styles.d.ts.map +1 -0
- package/lib/utils/styles.js +53 -0
- package/lib/utils/styles.js.map +1 -0
- package/lib/version.d.ts +8 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/version.js +11 -0
- package/lib/version.js.map +1 -0
- package/package.json +159 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS-based scroll prevention using position: fixed.
|
|
3
|
+
*
|
|
4
|
+
* Prevents body/page scrolling by temporarily fixing the body position
|
|
5
|
+
* while preserving scroll position. Much more reliable than event prevention.
|
|
6
|
+
*
|
|
7
|
+
* Key benefits:
|
|
8
|
+
* - No event manipulation complexity
|
|
9
|
+
* - No interference with component keyboard navigation
|
|
10
|
+
* - Preserves scroll position perfectly
|
|
11
|
+
* - Standard industry technique
|
|
12
|
+
* - Multiple component support with proper cleanup
|
|
13
|
+
*/
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Global State Management
|
|
16
|
+
// ============================================================================
|
|
17
|
+
const lockState = {
|
|
18
|
+
locked: false,
|
|
19
|
+
scrollY: 0,
|
|
20
|
+
activeLocks: new Set(),
|
|
21
|
+
};
|
|
22
|
+
// ============================================================================
|
|
23
|
+
// DOM Helper Functions
|
|
24
|
+
// ============================================================================
|
|
25
|
+
/**
|
|
26
|
+
* Get the document body element
|
|
27
|
+
*/
|
|
28
|
+
function getBodyEl() {
|
|
29
|
+
return document.body;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get the document element (html)
|
|
33
|
+
*/
|
|
34
|
+
function getDocEl() {
|
|
35
|
+
return document.documentElement;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get current vertical scroll position
|
|
39
|
+
*/
|
|
40
|
+
function getScrollY() {
|
|
41
|
+
return window.scrollY || getDocEl().scrollTop || 0;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Calculate the width of the browser's scrollbar
|
|
45
|
+
*/
|
|
46
|
+
function getScrollbarWidth() {
|
|
47
|
+
// window.innerWidth - documentElement.clientWidth
|
|
48
|
+
return window.innerWidth - getDocEl().clientWidth;
|
|
49
|
+
}
|
|
50
|
+
// ============================================================================
|
|
51
|
+
// Core Lock/Unlock Functions
|
|
52
|
+
// ============================================================================
|
|
53
|
+
/**
|
|
54
|
+
* Lock body scrolling using overflow: hidden on <html>.
|
|
55
|
+
*
|
|
56
|
+
* Avoids position: fixed on <body> which breaks centered/max-width body layouts
|
|
57
|
+
* by snapping the body to the left edge. Using <html> instead leaves body layout
|
|
58
|
+
* untouched while still preventing scroll.
|
|
59
|
+
*/
|
|
60
|
+
function lockBodyFixed() {
|
|
61
|
+
if (lockState.locked)
|
|
62
|
+
return;
|
|
63
|
+
const scrollbarWidth = getScrollbarWidth();
|
|
64
|
+
const docEl = getDocEl();
|
|
65
|
+
if (window.tyScrollDebug) {
|
|
66
|
+
console.log('🔒 Locking body scroll:', { scrollbarWidth });
|
|
67
|
+
}
|
|
68
|
+
lockState.scrollY = getScrollY();
|
|
69
|
+
lockState.locked = true;
|
|
70
|
+
docEl.style.overflow = 'hidden';
|
|
71
|
+
// Compensate for scrollbar disappearing to prevent layout shift
|
|
72
|
+
if (scrollbarWidth > 0) {
|
|
73
|
+
docEl.style.paddingRight = `${scrollbarWidth}px`;
|
|
74
|
+
}
|
|
75
|
+
docEl.classList.add('ty-scroll-locked');
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Unlock body scrolling
|
|
79
|
+
*/
|
|
80
|
+
function unlockBodyFixed() {
|
|
81
|
+
if (!lockState.locked)
|
|
82
|
+
return;
|
|
83
|
+
const docEl = getDocEl();
|
|
84
|
+
if (window.tyScrollDebug) {
|
|
85
|
+
console.log('🔓 Unlocking body scroll');
|
|
86
|
+
}
|
|
87
|
+
docEl.classList.remove('ty-scroll-locked');
|
|
88
|
+
docEl.style.overflow = '';
|
|
89
|
+
docEl.style.paddingRight = '';
|
|
90
|
+
lockState.locked = false;
|
|
91
|
+
}
|
|
92
|
+
// ============================================================================
|
|
93
|
+
// Public API
|
|
94
|
+
// ============================================================================
|
|
95
|
+
/**
|
|
96
|
+
* Lock scrolling for a specific component.
|
|
97
|
+
*
|
|
98
|
+
* Multiple components can lock scrolling simultaneously.
|
|
99
|
+
* Scroll remains locked until ALL components unlock.
|
|
100
|
+
*
|
|
101
|
+
* @param componentId - Unique identifier for the component
|
|
102
|
+
*/
|
|
103
|
+
export function lockScroll(componentId) {
|
|
104
|
+
if (lockState.activeLocks.has(componentId))
|
|
105
|
+
return;
|
|
106
|
+
// Add this component to active locks
|
|
107
|
+
lockState.activeLocks.add(componentId);
|
|
108
|
+
// Lock body if this is the first lock
|
|
109
|
+
if (lockState.activeLocks.size === 1) {
|
|
110
|
+
lockBodyFixed();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Unlock scrolling for a specific component.
|
|
115
|
+
*
|
|
116
|
+
* Scroll remains locked if other components still have locks active.
|
|
117
|
+
*
|
|
118
|
+
* @param componentId - Unique identifier for the component
|
|
119
|
+
*/
|
|
120
|
+
export function unlockScroll(componentId) {
|
|
121
|
+
if (!lockState.activeLocks.has(componentId))
|
|
122
|
+
return;
|
|
123
|
+
// Remove this component from active locks
|
|
124
|
+
lockState.activeLocks.delete(componentId);
|
|
125
|
+
// Unlock body if this was the last lock
|
|
126
|
+
if (lockState.activeLocks.size === 0) {
|
|
127
|
+
unlockBodyFixed();
|
|
128
|
+
}
|
|
129
|
+
console.log('Lock status', lockState.activeLocks);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Emergency unlock - removes all scroll locks immediately.
|
|
133
|
+
*
|
|
134
|
+
* Use this for cleanup or error recovery scenarios.
|
|
135
|
+
*/
|
|
136
|
+
export function forceUnlockAll() {
|
|
137
|
+
lockState.activeLocks.clear();
|
|
138
|
+
unlockBodyFixed();
|
|
139
|
+
}
|
|
140
|
+
// ============================================================================
|
|
141
|
+
// Debug API
|
|
142
|
+
// ============================================================================
|
|
143
|
+
/**
|
|
144
|
+
* Enable scroll lock debugging - useful for testing and development
|
|
145
|
+
*/
|
|
146
|
+
export function enableDebug() {
|
|
147
|
+
console.log('🔍 CSS Scroll lock debugging enabled');
|
|
148
|
+
window.tyScrollDebug = true;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Disable scroll lock debugging
|
|
152
|
+
*/
|
|
153
|
+
export function disableDebug() {
|
|
154
|
+
console.log('🔍 CSS Scroll lock debugging disabled');
|
|
155
|
+
window.tyScrollDebug = false;
|
|
156
|
+
}
|
|
157
|
+
// ============================================================================
|
|
158
|
+
// State Inspection
|
|
159
|
+
// ============================================================================
|
|
160
|
+
/**
|
|
161
|
+
* Get the set of currently active component locks.
|
|
162
|
+
*
|
|
163
|
+
* @returns Set of component IDs that currently have scroll locked
|
|
164
|
+
*/
|
|
165
|
+
export function getActiveLocks() {
|
|
166
|
+
return new Set(lockState.activeLocks);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Check if scrolling is currently locked.
|
|
170
|
+
*
|
|
171
|
+
* @returns true if any component has scroll locked
|
|
172
|
+
*/
|
|
173
|
+
export function isLocked() {
|
|
174
|
+
return lockState.locked;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Check if scrolling is locked by a specific component.
|
|
178
|
+
*
|
|
179
|
+
* @param componentId - Component identifier to check
|
|
180
|
+
* @returns true if this specific component has scroll locked
|
|
181
|
+
*/
|
|
182
|
+
export function isLockedBy(componentId) {
|
|
183
|
+
return lockState.activeLocks.has(componentId);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get the complete lock state for debugging.
|
|
187
|
+
*
|
|
188
|
+
* @returns Current state including scroll position and active locks
|
|
189
|
+
*/
|
|
190
|
+
export function getLockState() {
|
|
191
|
+
return {
|
|
192
|
+
locked: lockState.locked,
|
|
193
|
+
scrollY: lockState.scrollY,
|
|
194
|
+
activeLocks: Array.from(lockState.activeLocks),
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=scroll-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-lock.js","sourceRoot":"","sources":["../../src/utils/scroll-lock.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Utilities for Ty Components
|
|
3
|
+
* Handles dynamic CSS loading into Shadow DOM
|
|
4
|
+
*/
|
|
5
|
+
import type { StyleContent } from '../types/common';
|
|
6
|
+
/**
|
|
7
|
+
* Ensure CSS is loaded into a shadow root
|
|
8
|
+
* Uses CSSStyleSheet API for efficient style sharing
|
|
9
|
+
*
|
|
10
|
+
* @param shadowRoot - The shadow root to attach styles to
|
|
11
|
+
* @param styleContent - Style content with CSS text and optional ID
|
|
12
|
+
*/
|
|
13
|
+
export declare function ensureStyles(shadowRoot: ShadowRoot, styleContent: StyleContent): void;
|
|
14
|
+
/**
|
|
15
|
+
* Build CSS class list from properties
|
|
16
|
+
* Filters out falsy values
|
|
17
|
+
*
|
|
18
|
+
* @param classes - Array of class names or falsy values
|
|
19
|
+
* @returns Space-separated class string
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildClassList(...classes: (string | false | null | undefined)[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Clear the style cache
|
|
24
|
+
* Useful for testing or hot-reloading
|
|
25
|
+
*/
|
|
26
|
+
export declare function clearStyleCache(): void;
|
|
27
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/utils/styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAKnD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GACzB,IAAI,CAwBN;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAExF;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Utilities for Ty Components
|
|
3
|
+
* Handles dynamic CSS loading into Shadow DOM
|
|
4
|
+
*/
|
|
5
|
+
/** Cache of loaded CSSStyleSheet objects */
|
|
6
|
+
const styleCache = new Map();
|
|
7
|
+
/**
|
|
8
|
+
* Ensure CSS is loaded into a shadow root
|
|
9
|
+
* Uses CSSStyleSheet API for efficient style sharing
|
|
10
|
+
*
|
|
11
|
+
* @param shadowRoot - The shadow root to attach styles to
|
|
12
|
+
* @param styleContent - Style content with CSS text and optional ID
|
|
13
|
+
*/
|
|
14
|
+
export function ensureStyles(shadowRoot, styleContent) {
|
|
15
|
+
const { css, id } = styleContent;
|
|
16
|
+
// Check cache first
|
|
17
|
+
let sheet;
|
|
18
|
+
if (id && styleCache.has(id)) {
|
|
19
|
+
sheet = styleCache.get(id);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
// Create new stylesheet
|
|
23
|
+
sheet = new CSSStyleSheet();
|
|
24
|
+
sheet.replaceSync(css);
|
|
25
|
+
// Cache it if ID provided
|
|
26
|
+
if (id) {
|
|
27
|
+
styleCache.set(id, sheet);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// Append only if not already adopted
|
|
31
|
+
const existing = shadowRoot.adoptedStyleSheets || [];
|
|
32
|
+
if (!existing.includes(sheet)) {
|
|
33
|
+
shadowRoot.adoptedStyleSheets = [...existing, sheet];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Build CSS class list from properties
|
|
38
|
+
* Filters out falsy values
|
|
39
|
+
*
|
|
40
|
+
* @param classes - Array of class names or falsy values
|
|
41
|
+
* @returns Space-separated class string
|
|
42
|
+
*/
|
|
43
|
+
export function buildClassList(...classes) {
|
|
44
|
+
return classes.filter(Boolean).join(' ');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Clear the style cache
|
|
48
|
+
* Useful for testing or hot-reloading
|
|
49
|
+
*/
|
|
50
|
+
export function clearStyleCache() {
|
|
51
|
+
styleCache.clear();
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/utils/styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,4CAA4C;AAC5C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAyB,CAAA;AAEnD;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAsB,EACtB,YAA0B;IAE1B,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,YAAY,CAAA;IAEhC,oBAAoB;IACpB,IAAI,KAAoB,CAAA;IAExB,IAAI,EAAE,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;QAC7B,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,CAAE,CAAA;IAC7B,CAAC;SAAM,CAAC;QACN,wBAAwB;QACxB,KAAK,GAAG,IAAI,aAAa,EAAE,CAAA;QAC3B,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QAEtB,0BAA0B;QAC1B,IAAI,EAAE,EAAE,CAAC;YACP,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;QAC3B,CAAC;IACH,CAAC;IAED,qCAAqC;IACrC,MAAM,QAAQ,GAAG,UAAU,CAAC,kBAAkB,IAAI,EAAE,CAAA;IACpD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,UAAU,CAAC,kBAAkB,GAAG,CAAC,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAA;IACtD,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,GAAG,OAA8C;IAC9E,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,UAAU,CAAC,KAAK,EAAE,CAAA;AACpB,CAAC"}
|
package/lib/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,cAAc,CAAA"}
|
package/lib/version.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE - DO NOT EDIT
|
|
2
|
+
// This file is generated from package.json by scripts/generate-version.js
|
|
3
|
+
// Run 'npm run generate:version' to regenerate
|
|
4
|
+
/**
|
|
5
|
+
* Current version of tyrell-components
|
|
6
|
+
*
|
|
7
|
+
* This is automatically synced with package.json during build.
|
|
8
|
+
* Use `npm version` to bump versions.
|
|
9
|
+
*/
|
|
10
|
+
export const VERSION = '1.0.0-TC7';
|
|
11
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,0EAA0E;AAC1E,+CAA+C;AAE/C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tyrell-components",
|
|
3
|
+
"version": "1.0.0-TC7",
|
|
4
|
+
"description": "Tyrell Components - Framework-agnostic web components with semantic design system",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"./lib/index.js",
|
|
8
|
+
"./lib/components/**/*.js",
|
|
9
|
+
"./dist/*.js"
|
|
10
|
+
],
|
|
11
|
+
"main": "./lib/index.js",
|
|
12
|
+
"module": "./lib/index.js",
|
|
13
|
+
"types": "./lib/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./lib/index.d.ts",
|
|
17
|
+
"import": "./lib/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./button": {
|
|
20
|
+
"types": "./lib/components/button.d.ts",
|
|
21
|
+
"import": "./lib/components/button.js"
|
|
22
|
+
},
|
|
23
|
+
"./modal": {
|
|
24
|
+
"types": "./lib/components/modal.d.ts",
|
|
25
|
+
"import": "./lib/components/modal.js"
|
|
26
|
+
},
|
|
27
|
+
"./input": {
|
|
28
|
+
"types": "./lib/components/input.d.ts",
|
|
29
|
+
"import": "./lib/components/input.js"
|
|
30
|
+
},
|
|
31
|
+
"./dropdown": {
|
|
32
|
+
"types": "./lib/components/dropdown.d.ts",
|
|
33
|
+
"import": "./lib/components/dropdown.js"
|
|
34
|
+
},
|
|
35
|
+
"./checkbox": {
|
|
36
|
+
"types": "./lib/components/checkbox.d.ts",
|
|
37
|
+
"import": "./lib/components/checkbox.js"
|
|
38
|
+
},
|
|
39
|
+
"./textarea": {
|
|
40
|
+
"types": "./lib/components/textarea.d.ts",
|
|
41
|
+
"import": "./lib/components/textarea.js"
|
|
42
|
+
},
|
|
43
|
+
"./copy": {
|
|
44
|
+
"types": "./lib/components/copy.d.ts",
|
|
45
|
+
"import": "./lib/components/copy.js"
|
|
46
|
+
},
|
|
47
|
+
"./popup": {
|
|
48
|
+
"types": "./lib/components/popup.d.ts",
|
|
49
|
+
"import": "./lib/components/popup.js"
|
|
50
|
+
},
|
|
51
|
+
"./tooltip": {
|
|
52
|
+
"types": "./lib/components/tooltip.d.ts",
|
|
53
|
+
"import": "./lib/components/tooltip.js"
|
|
54
|
+
},
|
|
55
|
+
"./tag": {
|
|
56
|
+
"types": "./lib/components/tag.d.ts",
|
|
57
|
+
"import": "./lib/components/tag.js"
|
|
58
|
+
},
|
|
59
|
+
"./option": {
|
|
60
|
+
"types": "./lib/components/option.d.ts",
|
|
61
|
+
"import": "./lib/components/option.js"
|
|
62
|
+
},
|
|
63
|
+
"./icon": {
|
|
64
|
+
"types": "./lib/components/icon.d.ts",
|
|
65
|
+
"import": "./lib/components/icon.js"
|
|
66
|
+
},
|
|
67
|
+
"./tabs": {
|
|
68
|
+
"types": "./lib/components/tabs.d.ts",
|
|
69
|
+
"import": "./lib/components/tabs.js"
|
|
70
|
+
},
|
|
71
|
+
"./tab": {
|
|
72
|
+
"types": "./lib/components/tab.d.ts",
|
|
73
|
+
"import": "./lib/components/tab.js"
|
|
74
|
+
},
|
|
75
|
+
"./calendar": {
|
|
76
|
+
"types": "./lib/components/calendar.d.ts",
|
|
77
|
+
"import": "./lib/components/calendar.js"
|
|
78
|
+
},
|
|
79
|
+
"./calendar-month": {
|
|
80
|
+
"types": "./lib/components/calendar-month.d.ts",
|
|
81
|
+
"import": "./lib/components/calendar-month.js"
|
|
82
|
+
},
|
|
83
|
+
"./calendar-navigation": {
|
|
84
|
+
"types": "./lib/components/calendar-navigation.d.ts",
|
|
85
|
+
"import": "./lib/components/calendar-navigation.js"
|
|
86
|
+
},
|
|
87
|
+
"./date-picker": {
|
|
88
|
+
"types": "./lib/components/date-picker.d.ts",
|
|
89
|
+
"import": "./lib/components/date-picker.js"
|
|
90
|
+
},
|
|
91
|
+
"./multiselect": {
|
|
92
|
+
"types": "./lib/components/multiselect.d.ts",
|
|
93
|
+
"import": "./lib/components/multiselect.js"
|
|
94
|
+
},
|
|
95
|
+
"./css/*": "./css/*",
|
|
96
|
+
"./icons/registry": {
|
|
97
|
+
"types": "./lib/utils/icon-registry.d.ts",
|
|
98
|
+
"import": "./lib/utils/icon-registry.js"
|
|
99
|
+
},
|
|
100
|
+
"./icons/lucide": {
|
|
101
|
+
"types": "./lib/icons/lucide.d.ts",
|
|
102
|
+
"import": "./lib/icons/lucide.js"
|
|
103
|
+
},
|
|
104
|
+
"./icons/heroicons/*": "./lib/icons/heroicons/*",
|
|
105
|
+
"./icons/material/*": "./lib/icons/material/*",
|
|
106
|
+
"./icons/fontawesome/*": "./lib/icons/fontawesome/*",
|
|
107
|
+
"./cdn": "./dist/tyrell.js"
|
|
108
|
+
},
|
|
109
|
+
"files": [
|
|
110
|
+
"lib/**/*",
|
|
111
|
+
"css/**/*",
|
|
112
|
+
"dist/**/*",
|
|
113
|
+
"README.md",
|
|
114
|
+
"LICENSE"
|
|
115
|
+
],
|
|
116
|
+
"keywords": [
|
|
117
|
+
"web-components",
|
|
118
|
+
"typescript",
|
|
119
|
+
"ui-components",
|
|
120
|
+
"custom-elements",
|
|
121
|
+
"shadow-dom",
|
|
122
|
+
"icons",
|
|
123
|
+
"lucide",
|
|
124
|
+
"heroicons",
|
|
125
|
+
"material-design",
|
|
126
|
+
"fontawesome",
|
|
127
|
+
"semantic-design",
|
|
128
|
+
"design-system"
|
|
129
|
+
],
|
|
130
|
+
"scripts": {
|
|
131
|
+
"dev": "vite",
|
|
132
|
+
"generate:version": "node scripts/generate-version.js",
|
|
133
|
+
"build:lib": "npm run generate:version && tsc --project tsconfig.lib.json",
|
|
134
|
+
"build:cdn": "npm run generate:version && vite build --config vite.config.cdn.ts && cp css/tyrell.css dist/tyrell.css",
|
|
135
|
+
"build:dev": "npm run generate:version && vite build --config vite.config.dev.ts && cp css/tyrell.css dist/tyrell.css",
|
|
136
|
+
"build:dev:watch": "vite build --config vite.config.dev.ts --watch",
|
|
137
|
+
"build": "npm run build:lib && npm run build:cdn",
|
|
138
|
+
"prepublishOnly": "npm run build",
|
|
139
|
+
"preview": "vite preview"
|
|
140
|
+
},
|
|
141
|
+
"devDependencies": {
|
|
142
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
143
|
+
"autoprefixer": "^10.4.27",
|
|
144
|
+
"typescript": "^5.7.0",
|
|
145
|
+
"vite": "^5.4.11",
|
|
146
|
+
"vite-plugin-dts": "^4.5.4"
|
|
147
|
+
},
|
|
148
|
+
"repository": {
|
|
149
|
+
"type": "git",
|
|
150
|
+
"url": "https://github.com/gersak/tyrell.git",
|
|
151
|
+
"directory": "packages/core"
|
|
152
|
+
},
|
|
153
|
+
"homepage": "https://gersak.github.io/tyrell/",
|
|
154
|
+
"bugs": {
|
|
155
|
+
"url": "https://github.com/gersak/tyrell/issues"
|
|
156
|
+
},
|
|
157
|
+
"author": "Gersak <dev@gersak.io>",
|
|
158
|
+
"license": "MIT"
|
|
159
|
+
}
|