@caweb/framework 1.9.3 → 1.9.5
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/build/delta.asset.php +1 -1
- package/build/delta.css +1 -0
- package/build/delta.js +9 -9
- package/build/eureka.asset.php +1 -1
- package/build/eureka.css +1 -0
- package/build/eureka.js +9 -9
- package/build/mono.asset.php +1 -1
- package/build/mono.css +1 -0
- package/build/mono.js +9 -9
- package/build/oceanside.asset.php +1 -1
- package/build/oceanside.css +1 -0
- package/build/oceanside.js +9 -9
- package/build/orangecounty.asset.php +1 -1
- package/build/orangecounty.css +1 -0
- package/build/orangecounty.js +9 -9
- package/build/pasorobles.asset.php +1 -1
- package/build/pasorobles.css +1 -0
- package/build/pasorobles.js +9 -9
- package/build/sacramento.asset.php +1 -1
- package/build/sacramento.css +1 -0
- package/build/sacramento.js +9 -9
- package/build/santabarbara.asset.php +1 -1
- package/build/santabarbara.css +1 -0
- package/build/santabarbara.js +9 -9
- package/build/santacruz.asset.php +1 -1
- package/build/santacruz.css +1 -0
- package/build/santacruz.js +9 -9
- package/build/shasta.asset.php +1 -1
- package/build/shasta.css +1 -0
- package/build/shasta.js +9 -9
- package/build/sierra.asset.php +1 -1
- package/build/sierra.css +1 -0
- package/build/sierra.js +9 -9
- package/build/trinity.asset.php +1 -1
- package/build/trinity.css +1 -0
- package/build/trinity.js +9 -9
- package/package.json +4 -4
- package/src/scripts/components/header.js +62 -32
- package/src/styles/components/structural/_header.scss +1 -1
- package/src/styles/components/structural/_type.scss +3 -2
- package/src/styles/index.scss +1 -1
- package/build/delta.min.asset.php +0 -1
- package/build/delta.min.css +0 -23
- package/build/delta.min.css.map +0 -1
- package/build/delta.min.js +0 -2
- package/build/delta.min.js.map +0 -1
- package/build/eureka.min.asset.php +0 -1
- package/build/eureka.min.css +0 -23
- package/build/eureka.min.css.map +0 -1
- package/build/eureka.min.js +0 -2
- package/build/eureka.min.js.map +0 -1
- package/build/mono.min.asset.php +0 -1
- package/build/mono.min.css +0 -23
- package/build/mono.min.css.map +0 -1
- package/build/mono.min.js +0 -2
- package/build/mono.min.js.map +0 -1
- package/build/oceanside.min.asset.php +0 -1
- package/build/oceanside.min.css +0 -23
- package/build/oceanside.min.css.map +0 -1
- package/build/oceanside.min.js +0 -2
- package/build/oceanside.min.js.map +0 -1
- package/build/orangecounty.min.asset.php +0 -1
- package/build/orangecounty.min.css +0 -23
- package/build/orangecounty.min.css.map +0 -1
- package/build/orangecounty.min.js +0 -2
- package/build/orangecounty.min.js.map +0 -1
- package/build/pasorobles.min.asset.php +0 -1
- package/build/pasorobles.min.css +0 -23
- package/build/pasorobles.min.css.map +0 -1
- package/build/pasorobles.min.js +0 -2
- package/build/pasorobles.min.js.map +0 -1
- package/build/sacramento.min.asset.php +0 -1
- package/build/sacramento.min.css +0 -23
- package/build/sacramento.min.css.map +0 -1
- package/build/sacramento.min.js +0 -2
- package/build/sacramento.min.js.map +0 -1
- package/build/santabarbara.min.asset.php +0 -1
- package/build/santabarbara.min.css +0 -23
- package/build/santabarbara.min.css.map +0 -1
- package/build/santabarbara.min.js +0 -2
- package/build/santabarbara.min.js.map +0 -1
- package/build/santacruz.min.asset.php +0 -1
- package/build/santacruz.min.css +0 -23
- package/build/santacruz.min.css.map +0 -1
- package/build/santacruz.min.js +0 -2
- package/build/santacruz.min.js.map +0 -1
- package/build/shasta.min.asset.php +0 -1
- package/build/shasta.min.css +0 -23
- package/build/shasta.min.css.map +0 -1
- package/build/shasta.min.js +0 -2
- package/build/shasta.min.js.map +0 -1
- package/build/sierra.min.asset.php +0 -1
- package/build/sierra.min.css +0 -23
- package/build/sierra.min.css.map +0 -1
- package/build/sierra.min.js +0 -2
- package/build/sierra.min.js.map +0 -1
- package/build/trinity.min.asset.php +0 -1
- package/build/trinity.min.css +0 -23
- package/build/trinity.min.css.map +0 -1
- package/build/trinity.min.js +0 -2
- package/build/trinity.min.js.map +0 -1
package/build/santacruz.js
CHANGED
|
@@ -16,6 +16,14 @@ eval("{/*!\n * Bootstrap v5.3.8 (https://getbootstrap.com/)\n * Copyright 2011
|
|
|
16
16
|
|
|
17
17
|
/***/ },
|
|
18
18
|
|
|
19
|
+
/***/ "./src/styles/colorschemes/santacruz.scss"
|
|
20
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/santacruz.scss?\n}");
|
|
24
|
+
|
|
25
|
+
/***/ },
|
|
26
|
+
|
|
19
27
|
/***/ "./src/scripts/components/external-link.js"
|
|
20
28
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
21
29
|
|
|
@@ -28,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
28
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
29
37
|
|
|
30
38
|
"use strict";
|
|
31
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n let compactedElementsHeight = compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // for each element with an id we add the scroll-margin-top\n document.querySelectorAll('#page-container [id]').forEach(element => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n });\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
32
40
|
|
|
33
41
|
/***/ },
|
|
34
42
|
|
|
@@ -54,14 +62,6 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEvent
|
|
|
54
62
|
"use strict";
|
|
55
63
|
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var bootstrap_dist_js_bootstrap_bundle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"./node_modules/bootstrap/dist/js/bootstrap.bundle.js\");\n/* harmony import */ var _components_mobile_controls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/scripts/components/mobile-controls.js\");\n/* harmony import */ var _components_return_top_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/scripts/components/return-top.js\");\n/* harmony import */ var _components_external_link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"./src/scripts/components/external-link.js\");\n/* harmony import */ var _components_header_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/scripts/components/header.js\");\n\n\n\n\n\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/index.js?\n}");
|
|
56
64
|
|
|
57
|
-
/***/ },
|
|
58
|
-
|
|
59
|
-
/***/ "./src/styles/colorschemes/santacruz.scss"
|
|
60
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
61
|
-
|
|
62
|
-
"use strict";
|
|
63
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/santacruz.scss?\n}");
|
|
64
|
-
|
|
65
65
|
/***/ }
|
|
66
66
|
|
|
67
67
|
/******/ });
|
package/build/shasta.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => 'be89f9e1ec010255b838');
|
package/build/shasta.css
CHANGED
|
@@ -14959,6 +14959,7 @@ footer.keywords ul li {
|
|
|
14959
14959
|
----------------------------------------- */
|
|
14960
14960
|
header.global-header {
|
|
14961
14961
|
position: sticky;
|
|
14962
|
+
top: 0;
|
|
14962
14963
|
background-color: var(--bs-white, #fff);
|
|
14963
14964
|
z-index: 15;
|
|
14964
14965
|
transition: all 0.3s ease;
|
package/build/shasta.js
CHANGED
|
@@ -16,6 +16,14 @@ eval("{/*!\n * Bootstrap v5.3.8 (https://getbootstrap.com/)\n * Copyright 2011
|
|
|
16
16
|
|
|
17
17
|
/***/ },
|
|
18
18
|
|
|
19
|
+
/***/ "./src/styles/colorschemes/shasta.scss"
|
|
20
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/shasta.scss?\n}");
|
|
24
|
+
|
|
25
|
+
/***/ },
|
|
26
|
+
|
|
19
27
|
/***/ "./src/scripts/components/external-link.js"
|
|
20
28
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
21
29
|
|
|
@@ -28,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
28
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
29
37
|
|
|
30
38
|
"use strict";
|
|
31
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n let compactedElementsHeight = compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // for each element with an id we add the scroll-margin-top\n document.querySelectorAll('#page-container [id]').forEach(element => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n });\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
32
40
|
|
|
33
41
|
/***/ },
|
|
34
42
|
|
|
@@ -54,14 +62,6 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEvent
|
|
|
54
62
|
"use strict";
|
|
55
63
|
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var bootstrap_dist_js_bootstrap_bundle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"./node_modules/bootstrap/dist/js/bootstrap.bundle.js\");\n/* harmony import */ var _components_mobile_controls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/scripts/components/mobile-controls.js\");\n/* harmony import */ var _components_return_top_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/scripts/components/return-top.js\");\n/* harmony import */ var _components_external_link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"./src/scripts/components/external-link.js\");\n/* harmony import */ var _components_header_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/scripts/components/header.js\");\n\n\n\n\n\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/index.js?\n}");
|
|
56
64
|
|
|
57
|
-
/***/ },
|
|
58
|
-
|
|
59
|
-
/***/ "./src/styles/colorschemes/shasta.scss"
|
|
60
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
61
|
-
|
|
62
|
-
"use strict";
|
|
63
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/shasta.scss?\n}");
|
|
64
|
-
|
|
65
65
|
/***/ }
|
|
66
66
|
|
|
67
67
|
/******/ });
|
package/build/sierra.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '976a69f8f72d74f9b94e');
|
package/build/sierra.css
CHANGED
|
@@ -14959,6 +14959,7 @@ footer.keywords ul li {
|
|
|
14959
14959
|
----------------------------------------- */
|
|
14960
14960
|
header.global-header {
|
|
14961
14961
|
position: sticky;
|
|
14962
|
+
top: 0;
|
|
14962
14963
|
background-color: var(--bs-white, #fff);
|
|
14963
14964
|
z-index: 15;
|
|
14964
14965
|
transition: all 0.3s ease;
|
package/build/sierra.js
CHANGED
|
@@ -16,6 +16,14 @@ eval("{/*!\n * Bootstrap v5.3.8 (https://getbootstrap.com/)\n * Copyright 2011
|
|
|
16
16
|
|
|
17
17
|
/***/ },
|
|
18
18
|
|
|
19
|
+
/***/ "./src/styles/colorschemes/sierra.scss"
|
|
20
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/sierra.scss?\n}");
|
|
24
|
+
|
|
25
|
+
/***/ },
|
|
26
|
+
|
|
19
27
|
/***/ "./src/scripts/components/external-link.js"
|
|
20
28
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
21
29
|
|
|
@@ -28,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
28
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
29
37
|
|
|
30
38
|
"use strict";
|
|
31
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n let compactedElementsHeight = compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // for each element with an id we add the scroll-margin-top\n document.querySelectorAll('#page-container [id]').forEach(element => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n });\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
32
40
|
|
|
33
41
|
/***/ },
|
|
34
42
|
|
|
@@ -54,14 +62,6 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEvent
|
|
|
54
62
|
"use strict";
|
|
55
63
|
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var bootstrap_dist_js_bootstrap_bundle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"./node_modules/bootstrap/dist/js/bootstrap.bundle.js\");\n/* harmony import */ var _components_mobile_controls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/scripts/components/mobile-controls.js\");\n/* harmony import */ var _components_return_top_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/scripts/components/return-top.js\");\n/* harmony import */ var _components_external_link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"./src/scripts/components/external-link.js\");\n/* harmony import */ var _components_header_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/scripts/components/header.js\");\n\n\n\n\n\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/index.js?\n}");
|
|
56
64
|
|
|
57
|
-
/***/ },
|
|
58
|
-
|
|
59
|
-
/***/ "./src/styles/colorschemes/sierra.scss"
|
|
60
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
61
|
-
|
|
62
|
-
"use strict";
|
|
63
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/sierra.scss?\n}");
|
|
64
|
-
|
|
65
65
|
/***/ }
|
|
66
66
|
|
|
67
67
|
/******/ });
|
package/build/trinity.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '74f95d595640fb9df9f0');
|
package/build/trinity.css
CHANGED
|
@@ -14959,6 +14959,7 @@ footer.keywords ul li {
|
|
|
14959
14959
|
----------------------------------------- */
|
|
14960
14960
|
header.global-header {
|
|
14961
14961
|
position: sticky;
|
|
14962
|
+
top: 0;
|
|
14962
14963
|
background-color: var(--bs-white, #fff);
|
|
14963
14964
|
z-index: 15;
|
|
14964
14965
|
transition: all 0.3s ease;
|
package/build/trinity.js
CHANGED
|
@@ -16,6 +16,14 @@ eval("{/*!\n * Bootstrap v5.3.8 (https://getbootstrap.com/)\n * Copyright 2011
|
|
|
16
16
|
|
|
17
17
|
/***/ },
|
|
18
18
|
|
|
19
|
+
/***/ "./src/styles/colorschemes/trinity.scss"
|
|
20
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/trinity.scss?\n}");
|
|
24
|
+
|
|
25
|
+
/***/ },
|
|
26
|
+
|
|
19
27
|
/***/ "./src/scripts/components/external-link.js"
|
|
20
28
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
21
29
|
|
|
@@ -28,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
28
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
29
37
|
|
|
30
38
|
"use strict";
|
|
31
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n let compactedElementsHeight = compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // for each element with an id we add the scroll-margin-top\n document.querySelectorAll('#page-container [id]').forEach(element => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n });\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
32
40
|
|
|
33
41
|
/***/ },
|
|
34
42
|
|
|
@@ -54,14 +62,6 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEvent
|
|
|
54
62
|
"use strict";
|
|
55
63
|
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var bootstrap_dist_js_bootstrap_bundle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"./node_modules/bootstrap/dist/js/bootstrap.bundle.js\");\n/* harmony import */ var _components_mobile_controls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/scripts/components/mobile-controls.js\");\n/* harmony import */ var _components_return_top_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/scripts/components/return-top.js\");\n/* harmony import */ var _components_external_link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"./src/scripts/components/external-link.js\");\n/* harmony import */ var _components_header_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/scripts/components/header.js\");\n\n\n\n\n\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/index.js?\n}");
|
|
56
64
|
|
|
57
|
-
/***/ },
|
|
58
|
-
|
|
59
|
-
/***/ "./src/styles/colorschemes/trinity.scss"
|
|
60
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
61
|
-
|
|
62
|
-
"use strict";
|
|
63
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@caweb/framework/./src/styles/colorschemes/trinity.scss?\n}");
|
|
64
|
-
|
|
65
65
|
/***/ }
|
|
66
66
|
|
|
67
67
|
/******/ });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/framework",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"description": "Official CAWebPublishing Framework frontend toolkit",
|
|
5
5
|
"author": "CAWebPublishing",
|
|
6
6
|
"homepage": "https://github.com/CAWebPublishing/framework#readme",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"README.md"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@caweb/icon-library": "^1.1.
|
|
30
|
+
"@caweb/icon-library": "^1.1.7",
|
|
31
31
|
"@caweb/template": "^1.0.13",
|
|
32
|
-
"@caweb/webpack": "^1.6.
|
|
32
|
+
"@caweb/webpack": "^1.6.4",
|
|
33
33
|
"@inquirer/prompts": "^8.2.0",
|
|
34
34
|
"animate.css": "^4.1.1",
|
|
35
35
|
"bootstrap": "^5.3.8",
|
|
36
36
|
"bootstrap-forced-colors-css": "^1.0.7",
|
|
37
37
|
"chalk": "^5.6.2",
|
|
38
38
|
"cross-spawn": "^7.0.6",
|
|
39
|
-
"fast-xml-parser": "^5.3.
|
|
39
|
+
"fast-xml-parser": "^5.3.5"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"webpack": "webpack",
|
|
@@ -2,9 +2,36 @@
|
|
|
2
2
|
window.addEventListener('DOMContentLoaded', () => {
|
|
3
3
|
let location_hash = window.location.hash.replace(/(\|)/g, "\\$1");
|
|
4
4
|
|
|
5
|
-
const header = document.querySelector('header');
|
|
6
|
-
const
|
|
7
|
-
|
|
5
|
+
const header = document.querySelector('header') ;
|
|
6
|
+
const pageContainer = document.querySelector('#page-container');
|
|
7
|
+
|
|
8
|
+
// array of elements that are compacted
|
|
9
|
+
const compactedElements = [
|
|
10
|
+
document.querySelector('.alerts'),
|
|
11
|
+
document.querySelector('.utility-header'),
|
|
12
|
+
].filter(Boolean);
|
|
13
|
+
|
|
14
|
+
let compactedElementsHeight = compactedElements.reduce((total, element) => {
|
|
15
|
+
if( element instanceof HTMLElement ){
|
|
16
|
+
return total + element.clientHeight;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return total;
|
|
20
|
+
|
|
21
|
+
}, 0);
|
|
22
|
+
|
|
23
|
+
// lets collect the height of any fixed elements above the header.
|
|
24
|
+
let topOffset = 0;
|
|
25
|
+
let current = header?.previousElementSibling;
|
|
26
|
+
|
|
27
|
+
while( current ){
|
|
28
|
+
// if current element has a fixed position, add its height to the topOffset.
|
|
29
|
+
if( current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed' ){
|
|
30
|
+
topOffset += current.clientHeight ;
|
|
31
|
+
}
|
|
32
|
+
current = current.previousElementSibling;
|
|
33
|
+
}
|
|
34
|
+
|
|
8
35
|
|
|
9
36
|
// scroll to target
|
|
10
37
|
if( location_hash ){
|
|
@@ -12,61 +39,64 @@ window.addEventListener('DOMContentLoaded', () => {
|
|
|
12
39
|
let target = document.getElementById(location_hash.substring(1));
|
|
13
40
|
|
|
14
41
|
// if the location hash is not empty, we scroll to the target element
|
|
15
|
-
|
|
42
|
+
requestAnimationFrame(() => {
|
|
16
43
|
target?.scrollIntoView({
|
|
17
44
|
behavior: 'smooth'
|
|
18
45
|
});
|
|
19
|
-
}
|
|
46
|
+
});
|
|
20
47
|
}
|
|
21
48
|
|
|
22
49
|
if (!header) {
|
|
23
50
|
return;
|
|
24
51
|
}
|
|
52
|
+
|
|
25
53
|
|
|
26
54
|
const compactHeader = () => {
|
|
27
|
-
let scrollHeights = 0;
|
|
28
|
-
|
|
29
|
-
// lets collect the height of any elements above the header.
|
|
30
|
-
let current = header.previousElementSibling;
|
|
31
|
-
let miscElementHeights = 0;
|
|
32
|
-
|
|
33
|
-
while( current ){
|
|
34
|
-
// if current is a div, add its height to the miscElementHeights.
|
|
35
|
-
if( 'DIV' === current.tagName ){
|
|
36
|
-
miscElementHeights += current.clientHeight ;
|
|
37
|
-
}
|
|
38
|
-
current = current.previousElementSibling;
|
|
39
|
-
}
|
|
40
55
|
|
|
41
56
|
// downscroll code passed the header height
|
|
42
57
|
if (document.body.scrollTop >= header.offsetHeight ||
|
|
43
58
|
document.documentElement.scrollTop >= header.offsetHeight
|
|
44
59
|
) {
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
scrollHeights += alerts.clientHeight;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// lets add the scroll heights of the utility header
|
|
51
|
-
if( utilityHeader ){
|
|
52
|
-
scrollHeights += utilityHeader.clientHeight;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// move the header up to the scroll height, minus any elements above the header
|
|
56
|
-
header.style.top = `-${(scrollHeights - miscElementHeights)}px`;
|
|
60
|
+
// move the header up to hide the compacted elements height, minus the top offset.
|
|
61
|
+
header.style.top = `-${(compactedElementsHeight - topOffset)}px`;
|
|
57
62
|
|
|
58
63
|
} else {
|
|
59
64
|
// reset header to initial position
|
|
60
|
-
header
|
|
65
|
+
// we need to set the header's top to the offset.
|
|
66
|
+
if( header ){
|
|
67
|
+
header.style.top = `${topOffset}px`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// if we have a page container, we need to set its top padding to the offset
|
|
71
|
+
if( pageContainer && pageContainer instanceof HTMLElement ){
|
|
72
|
+
pageContainer.style.paddingTop = `${topOffset}px`;
|
|
73
|
+
}
|
|
74
|
+
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
};
|
|
78
|
+
|
|
79
|
+
// for each element with an id we add the scroll-margin-top
|
|
80
|
+
document.querySelectorAll('#page-container [id]').forEach((element) => {
|
|
81
|
+
if( element instanceof HTMLElement ){
|
|
82
|
+
let scrollMarginHeight = header.clientHeight + topOffset;
|
|
83
|
+
|
|
84
|
+
// if the elements offsetTop is greater than twice the header size,
|
|
85
|
+
// we can assume the header is compacted
|
|
86
|
+
// so we need to subtract the compacted elements height from the scroll margin.
|
|
87
|
+
if( element.offsetTop > scrollMarginHeight + (scrollMarginHeight / 2) ){
|
|
88
|
+
scrollMarginHeight -= compactedElementsHeight;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
element.style.scrollMarginTop = `${scrollMarginHeight}px`;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
64
94
|
|
|
65
95
|
// reset position on scroll
|
|
66
96
|
window.addEventListener(
|
|
67
97
|
'scroll', compactHeader
|
|
68
98
|
);
|
|
69
99
|
|
|
70
|
-
compactHeader()
|
|
100
|
+
compactHeader();
|
|
71
101
|
|
|
72
102
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
----------------------------------------- */
|
|
5
5
|
header.global-header{
|
|
6
6
|
position: sticky;
|
|
7
|
+
top: 0;
|
|
7
8
|
background-color: var(--bs-white, $white);
|
|
8
9
|
z-index: 15;
|
|
9
10
|
transition: all 0.3s ease;
|
|
@@ -78,4 +79,3 @@ header.global-header{
|
|
|
78
79
|
text-align: right;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
|
package/src/styles/index.scss
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '4a99e034e3eeb401bbdf');
|