well-petal 0.0.82 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/petal.js +16 -6
- package/package.json +1 -1
package/dist/petal.js
CHANGED
|
@@ -156,7 +156,7 @@ eval("\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElem
|
|
|
156
156
|
\*******************************/
|
|
157
157
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
158
158
|
|
|
159
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ animations: () => (/* binding */ animations),\n/* harmony export */ clearAnimationProperties: () => (/* binding */ clearAnimationProperties),\n/* harmony export */
|
|
159
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ animations: () => (/* binding */ animations),\n/* harmony export */ clearAnimationProperties: () => (/* binding */ clearAnimationProperties),\n/* harmony export */ getReverseAnimation: () => (/* binding */ getReverseAnimation),\n/* harmony export */ isValidAnimation: () => (/* binding */ isValidAnimation),\n/* harmony export */ reverseAnimationMap: () => (/* binding */ reverseAnimationMap)\n/* harmony export */ });\n/* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gsap */ \"./node_modules/gsap/index.js\");\n/**\n * Animation Configurations\n *\n * Centralized animation definitions used by all Petal modules.\n * Returns animation configs with 'from' and 'to' states for GSAP.\n */\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n/**\n * Validates and parses modal animation string\n */\nfunction isValidAnimation(value) {\n const validTypes = [\"scale\", \"slide-up\", \"slide-down\", \"slide-left\", \"slide-right\", \"crop-up\", \"crop-down\", \"fade-in\", \"fade-out\"];\n return validTypes.includes(value);\n}\n/**\n * Unified animation system with configurable offsets, easing, and duration\n * - For modals: use \"100%\" offset for full viewport movements\n * - For dropdowns: use small pixel offsets (e.g., 25) for subtle movements\n * - Easing: GSAP easing function (default: \"power1.inOut\")\n * - Duration: Animation duration in seconds (default: 0.5)\n */\nconst animations = {\n scale: (options) => {\n const { offset = \"1\", ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { scale: 0, opacity: 0 },\n to: { scale: offset, opacity: 1, ease, duration },\n };\n },\n \"slide-up\": (options) => {\n const { offset = \"100%\", ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { x: 0, y: offset, opacity: 0 },\n to: { x: 0, y: 0, opacity: 1, ease, duration },\n };\n },\n \"slide-down\": (options) => {\n const { offset = \"100%\", ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { x: 0, y: typeof offset === \"number\" ? -offset : `-${offset}`, opacity: 0 },\n to: { x: 0, y: 0, opacity: 1, ease, duration },\n };\n },\n \"slide-left\": (options) => {\n const { offset = \"100%\", ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { x: offset, y: 0, opacity: 0 },\n to: { x: 0, y: 0, opacity: 1, ease, duration },\n };\n },\n \"slide-right\": (options) => {\n const { offset = \"100%\", ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { x: typeof offset === \"number\" ? -offset : `-${offset}`, y: 0, opacity: 0 },\n to: { x: 0, y: 0, opacity: 1, ease, duration },\n };\n },\n \"crop-up\": (options) => {\n const { ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { \"clip-path\": \"inset(100% 0% 0% 0%)\" },\n to: { \"clip-path\": \"inset(0% 0% 0% 0%)\", ease, duration },\n };\n },\n \"crop-down\": (options) => {\n const { ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { \"clip-path\": \"inset(0% 0% 100% 0%)\" },\n to: { \"clip-path\": \"inset(0% 0% 0% 0%)\", ease, duration },\n };\n },\n \"fade-in\": (options) => {\n const { offset = \"1\", ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { opacity: 0 },\n to: { opacity: offset, ease, duration },\n };\n },\n \"fade-out\": (options) => {\n const { offset = \"1\", ease = \"power1.inOut\", duration = 0.5 } = options || {};\n return {\n from: { opacity: offset },\n to: { opacity: 0, ease, duration },\n };\n },\n};\n// Animation reversal map (for closing animations)\nconst reverseAnimationMap = {\n scale: \"scale\",\n \"slide-up\": \"slide-down\",\n \"slide-down\": \"slide-up\",\n \"slide-left\": \"slide-right\",\n \"slide-right\": \"slide-left\",\n \"crop-up\": \"crop-down\",\n \"crop-down\": \"crop-up\",\n \"fade-in\": \"fade-out\",\n \"fade-out\": \"fade-in\",\n};\n/**\n * Gets the reverse animation config by swapping from/to\n * Important: ease and duration must stay in the 'to' state, not be swapped\n */\nfunction getReverseAnimation(animationType, options) {\n const reverseType = reverseAnimationMap[animationType];\n const anim = animations[reverseType](options);\n // Extract ease and duration from 'to' before swapping\n const _a = anim.to, { ease, duration } = _a, toWithoutEasing = __rest(_a, [\"ease\", \"duration\"]);\n // Swap from and to, but keep ease and duration in the 'to' state\n return {\n from: toWithoutEasing,\n to: Object.assign(Object.assign({}, anim.from), { ease, duration }),\n };\n}\n/**\n * Clears all animation-related properties from an element\n * This ensures clean state when switching between different animation types\n *\n * Resets:\n * - Position transforms (x, y)\n * - Scale transforms\n * - Opacity\n * - Clip-path\n * - All transforms\n */\nfunction clearAnimationProperties(element) {\n // Use GSAP's clearProps to ensure all inline styles are removed\n gsap__WEBPACK_IMPORTED_MODULE_0__.gsap.set(element, { clearProps: \"x,y,scale,opacity,clip-path,transform\" });\n}\n\n\n//# sourceURL=webpack://petal/./src/lib/animations.ts?");
|
|
160
160
|
|
|
161
161
|
/***/ }),
|
|
162
162
|
|
|
@@ -166,7 +166,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
166
166
|
\*******************************/
|
|
167
167
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
168
168
|
|
|
169
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ARIA_EXPANDED: () => (/* binding */ ARIA_EXPANDED),\n/* harmony export */ ATTR_ALLOW_CLOSE: () => (/* binding */ ATTR_ALLOW_CLOSE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_DURATION: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_DURATION),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_EASE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_EASE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_MOBILE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_MOBILE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_SPEED: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_SPEED),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_TABLET: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_TABLET),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET_MOBILE: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET_MOBILE),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET_TABLET: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET_TABLET),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN: () => (/* binding */ ATTR_PETAL_ANIM_OPEN),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_DURATION: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_DURATION),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_EASE: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_EASE),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_MOBILE: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_MOBILE),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_SPEED: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_SPEED),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_TABLET: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_TABLET),\n/* harmony export */ ATTR_PETAL_BANNER: () => (/* binding */ ATTR_PETAL_BANNER),\n/* harmony export */ ATTR_PETAL_BANNER_CLOSE: () => (/* binding */ ATTR_PETAL_BANNER_CLOSE),\n/* harmony export */ ATTR_PETAL_BANNER_CLOSED_CLASS: () => (/* binding */ ATTR_PETAL_BANNER_CLOSED_CLASS),\n/* harmony export */ ATTR_PETAL_DEBUG: () => (/* binding */ ATTR_PETAL_DEBUG),\n/* harmony export */ ATTR_PETAL_DIALOG: () => (/* binding */ ATTR_PETAL_DIALOG),\n/* harmony export */ ATTR_PETAL_DISABLE_SCROLL_ON_OPEN: () => (/* binding */ ATTR_PETAL_DISABLE_SCROLL_ON_OPEN),\n/* harmony export */ ATTR_PETAL_DROPDOWN: () => (/* binding */ ATTR_PETAL_DROPDOWN),\n/* harmony export */ ATTR_PETAL_DROPDOWN_CLOSE_DELAY: () => (/* binding */ ATTR_PETAL_DROPDOWN_CLOSE_DELAY),\n/* harmony export */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_EXPAND_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_EXPAND_TABLET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_MENU: () => (/* binding */ ATTR_PETAL_DROPDOWN_MENU),\n/* harmony export */ ATTR_PETAL_DROPDOWN_MENU_BOX: () => (/* binding */ ATTR_PETAL_DROPDOWN_MENU_BOX),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_DELAY: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_DELAY),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_TABLET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SCROLL: () => (/* binding */ ATTR_PETAL_DROPDOWN_SCROLL),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_DESKTOP: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_DESKTOP),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_TABLET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_TOGGLE: () => (/* binding */ ATTR_PETAL_DROPDOWN_TOGGLE),\n/* harmony export */ ATTR_PETAL_ELEMENT: () => (/* binding */ ATTR_PETAL_ELEMENT),\n/* harmony export */ ATTR_PETAL_GROUP: () => (/* binding */ ATTR_PETAL_GROUP),\n/* harmony export */ ATTR_PETAL_MODAL: () => (/* binding */ ATTR_PETAL_MODAL),\n/* harmony export */ ATTR_PETAL_MODAL_TYPE: () => (/* binding */ ATTR_PETAL_MODAL_TYPE),\n/* harmony export */ ATTR_PETAL_NAME: () => (/* binding */ ATTR_PETAL_NAME),\n/* harmony export */ ATTR_PETAL_NAV: () => (/* binding */ ATTR_PETAL_NAV),\n/* harmony export */ ATTR_PETAL_NAV_SECONDARY: () => (/* binding */ ATTR_PETAL_NAV_SECONDARY),\n/* harmony export */ ATTR_PETAL_OVERLAY: () => (/* binding */ ATTR_PETAL_OVERLAY),\n/* harmony export */ ATTR_PETAL_OVERLAY_CLOSE: () => (/* binding */ ATTR_PETAL_OVERLAY_CLOSE),\n/* harmony export */ ATTR_PETAL_OVERLAY_OPACITY: () => (/* binding */ ATTR_PETAL_OVERLAY_OPACITY),\n/* harmony export */ ATTR_PETAL_POSITION: () => (/* binding */ ATTR_PETAL_POSITION),\n/* harmony export */ ATTR_PETAL_SESSION_TTL: () => (/* binding */ ATTR_PETAL_SESSION_TTL),\n/* harmony export */ ATTR_PETAL_SHOW_DELAY: () => (/* binding */ ATTR_PETAL_SHOW_DELAY),\n/* harmony export */ ATTR_PETAL_SHOW_ONCE: () => (/* binding */ ATTR_PETAL_SHOW_ONCE),\n/* harmony export */ ATTR_PETAL_STATE: () => (/* binding */ ATTR_PETAL_STATE),\n/* harmony export */ ATTR_PETAL_TRIGGER_CLOSE: () => (/* binding */ ATTR_PETAL_TRIGGER_CLOSE),\n/* harmony export */ ATTR_PETAL_TRIGGER_OPEN: () => (/* binding */ ATTR_PETAL_TRIGGER_OPEN)\n/* harmony export */ });\n// BASE\nconst ATTR_PETAL_NAME = \"petal\";\nconst ATTR_PETAL_ELEMENT = \"petal-el\";\nconst ATTR_PETAL_GROUP = \"petal-group\"; // Group name for coordinated behavior across components\nconst ATTR_PETAL_STATE = \"petal-state\";\nconst ATTR_PETAL_DEBUG = \"petal-debug\"; // Enable debug console logging\n// BEHAVIOR\nconst ATTR_PETAL_SHOW_ONCE = \"petal-show-once\"; // Regardless of other settings, only show the modal once per user session\nconst ATTR_PETAL_SHOW_DELAY = \"petal-show-delay\"; // Time to wait before showing modal (in seconds)\nconst ATTR_PETAL_SESSION_TTL = \"petal-session-ttl\"; // Time to keep user session (in hours)\n// ANIMATIONS\nconst ATTR_PETAL_ANIM_OPEN = \"petal-anim-open\";\nconst ATTR_PETAL_ANIM_OPEN_TABLET = \"petal-anim-open-tablet\";\nconst ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE = \"petal-anim-open-mobile-landscape\";\nconst ATTR_PETAL_ANIM_OPEN_MOBILE = \"petal-anim-open-mobile\";\nconst ATTR_PETAL_ANIM_OPEN_EASE = \"petal-anim-open-ease\";\nconst ATTR_PETAL_ANIM_OPEN_DURATION = \"petal-anim-open-duration\";\nconst ATTR_PETAL_ANIM_CLOSE = \"petal-anim-close\";\nconst ATTR_PETAL_ANIM_CLOSE_TABLET = \"petal-anim-close-tablet\";\nconst ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE = \"petal-anim-close-mobile-landscape\";\nconst ATTR_PETAL_ANIM_CLOSE_MOBILE = \"petal-anim-close-mobile\";\nconst ATTR_PETAL_ANIM_CLOSE_EASE = \"petal-anim-close-ease\";\nconst ATTR_PETAL_ANIM_CLOSE_DURATION = \"petal-anim-close-duration\";\nconst ATTR_PETAL_ANIM_OPEN_SPEED = \"petal-anim-open-speed\";\nconst ATTR_PETAL_ANIM_CLOSE_SPEED = \"petal-anim-close-speed\";\nconst ATTR_PETAL_ANIM_OFFSET = \"petal-anim-offset\";\nconst ATTR_PETAL_ANIM_OFFSET_TABLET = \"petal-anim-offset-tablet\";\nconst ATTR_PETAL_ANIM_OFFSET_MOBILE_LANDSCAPE = \"petal-anim-offset-mobile-landscape\";\nconst ATTR_PETAL_ANIM_OFFSET_MOBILE = \"petal-anim-offset-mobile\";\n/**-------------------------*\n * OVERLAY\n *--------------------------*/\nconst ATTR_PETAL_OVERLAY = \"overlay\";\nconst ATTR_PETAL_OVERLAY_OPACITY = \"petal-overlay-opacity\";\nconst ATTR_PETAL_OVERLAY_CLOSE = \"petal-overlay-close\";\n/**-------------------------*\n * OPEN & CLOSE\n *--------------------------*/\nconst ATTR_PETAL_TRIGGER_OPEN = \"trigger-open\";\nconst ATTR_PETAL_TRIGGER_CLOSE = \"trigger-close\";\n/**-------------------------*\n * MODAL\n *--------------------------*/\n// ELEMENTS\nconst ATTR_PETAL_MODAL = \"modal\";\nconst ATTR_PETAL_DIALOG = \"dialog\";\n// MODAL TYPE\nconst ATTR_PETAL_MODAL_TYPE = \"petal-modal-type\";\n/**-------------------------*\n * NAV\n *--------------------------*/\n// ELEMENTS\nconst ATTR_PETAL_NAV = \"nav\";\nconst ATTR_PETAL_NAV_SECONDARY = \"nav-secondary\";\nconst ATTR_PETAL_BANNER = \"banner\";\nconst ATTR_PETAL_BANNER_CLOSE = \"banner-close\";\n// SETTINGS\nconst ATTR_ALLOW_CLOSE = \"petal-allow-close\";\nconst ATTR_PETAL_POSITION = \"petal-position\";\n// CSS\nconst ATTR_PETAL_BANNER_CLOSED_CLASS = \"petal-hide-nav-banner\";\n/**-------------------------*\n * DROPDOWN\n *--------------------------*/\n// ELEMENTS\nconst ATTR_PETAL_DROPDOWN = \"dropdown\";\nconst ATTR_PETAL_DROPDOWN_TOGGLE = \"dropdown-toggle\";\nconst ATTR_PETAL_DROPDOWN_MENU = \"dropdown-menu\";\nconst ATTR_PETAL_DROPDOWN_MENU_BOX = \"dropdown-drawer\";\nconst ATTR_PETAL_DROPDOWN_SCROLL = \"dropdown-scroll\";\n// BEHAVIOR\nconst ATTR_PETAL_DISABLE_SCROLL_ON_OPEN = \"petal-disable-scroll-on-open\";\n// OPEN/CLOSE BEHAVIOR\nconst ATTR_PETAL_DROPDOWN_OPEN_DELAY = \"petal-dropdown-open-delay\";\nconst ATTR_PETAL_DROPDOWN_CLOSE_DELAY = \"petal-dropdown-close-delay\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER = \"petal-dropdown-open-on-hover\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_TABLET = \"petal-dropdown-open-on-hover-tablet\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE_LANDSCAPE = \"petal-dropdown-open-on-hover-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE = \"petal-dropdown-open-on-hover-mobile\";\n// VISIBILITY\nconst ATTR_PETAL_DROPDOWN_SHOW_DESKTOP = \"petal-dropdown-show-desktop\";\nconst ATTR_PETAL_DROPDOWN_SHOW_TABLET = \"petal-dropdown-show-tablet\";\nconst ATTR_PETAL_DROPDOWN_SHOW_MOBILE_LANDSCAPE = \"petal-dropdown-show-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_SHOW_MOBILE = \"petal-dropdown-show-mobile\";\n// EXPAND\nconst ATTR_PETAL_DROPDOWN_EXPAND_TABLET = \"petal-dropdown-expand-tablet\";\nconst ATTR_PETAL_DROPDOWN_EXPAND_MOBILE_LANDSCAPE = \"petal-dropdown-expand-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_EXPAND_MOBILE = \"petal-dropdown-expand-mobile\";\n// ARIA ATTRIBUTES\nconst ARIA_EXPANDED = \"aria-expanded\";\n\n\n//# sourceURL=webpack://petal/./src/lib/attributes.ts?");
|
|
169
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ARIA_EXPANDED: () => (/* binding */ ARIA_EXPANDED),\n/* harmony export */ ATTR_ALLOW_CLOSE: () => (/* binding */ ATTR_ALLOW_CLOSE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_DURATION: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_DURATION),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_EASE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_EASE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_MOBILE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_MOBILE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_SPEED: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_SPEED),\n/* harmony export */ ATTR_PETAL_ANIM_CLOSE_TABLET: () => (/* binding */ ATTR_PETAL_ANIM_CLOSE_TABLET),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET_MOBILE: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET_MOBILE),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_ANIM_OFFSET_TABLET: () => (/* binding */ ATTR_PETAL_ANIM_OFFSET_TABLET),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN: () => (/* binding */ ATTR_PETAL_ANIM_OPEN),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_DURATION: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_DURATION),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_EASE: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_EASE),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_MOBILE: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_MOBILE),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_SPEED: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_SPEED),\n/* harmony export */ ATTR_PETAL_ANIM_OPEN_TABLET: () => (/* binding */ ATTR_PETAL_ANIM_OPEN_TABLET),\n/* harmony export */ ATTR_PETAL_BANNER: () => (/* binding */ ATTR_PETAL_BANNER),\n/* harmony export */ ATTR_PETAL_BANNER_CLOSE: () => (/* binding */ ATTR_PETAL_BANNER_CLOSE),\n/* harmony export */ ATTR_PETAL_BANNER_CLOSED_CLASS: () => (/* binding */ ATTR_PETAL_BANNER_CLOSED_CLASS),\n/* harmony export */ ATTR_PETAL_DEBUG: () => (/* binding */ ATTR_PETAL_DEBUG),\n/* harmony export */ ATTR_PETAL_DIALOG: () => (/* binding */ ATTR_PETAL_DIALOG),\n/* harmony export */ ATTR_PETAL_DISABLE_SCROLL_ON_OPEN: () => (/* binding */ ATTR_PETAL_DISABLE_SCROLL_ON_OPEN),\n/* harmony export */ ATTR_PETAL_DROPDOWN: () => (/* binding */ ATTR_PETAL_DROPDOWN),\n/* harmony export */ ATTR_PETAL_DROPDOWN_CLOSE_DELAY: () => (/* binding */ ATTR_PETAL_DROPDOWN_CLOSE_DELAY),\n/* harmony export */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_EXPAND_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_EXPAND_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_EXPAND_TABLET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_MENU: () => (/* binding */ ATTR_PETAL_DROPDOWN_MENU),\n/* harmony export */ ATTR_PETAL_DROPDOWN_MENU_BOX: () => (/* binding */ ATTR_PETAL_DROPDOWN_MENU_BOX),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_DELAY: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_DELAY),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_TABLET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SCROLL: () => (/* binding */ ATTR_PETAL_DROPDOWN_SCROLL),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_DESKTOP: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_DESKTOP),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_SHOW_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_SHOW_TABLET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_TOGGLE: () => (/* binding */ ATTR_PETAL_DROPDOWN_TOGGLE),\n/* harmony export */ ATTR_PETAL_ELEMENT: () => (/* binding */ ATTR_PETAL_ELEMENT),\n/* harmony export */ ATTR_PETAL_GROUP: () => (/* binding */ ATTR_PETAL_GROUP),\n/* harmony export */ ATTR_PETAL_MODAL: () => (/* binding */ ATTR_PETAL_MODAL),\n/* harmony export */ ATTR_PETAL_MODAL_TYPE: () => (/* binding */ ATTR_PETAL_MODAL_TYPE),\n/* harmony export */ ATTR_PETAL_NAME: () => (/* binding */ ATTR_PETAL_NAME),\n/* harmony export */ ATTR_PETAL_NAV: () => (/* binding */ ATTR_PETAL_NAV),\n/* harmony export */ ATTR_PETAL_NAV_SECONDARY: () => (/* binding */ ATTR_PETAL_NAV_SECONDARY),\n/* harmony export */ ATTR_PETAL_OVERLAY: () => (/* binding */ ATTR_PETAL_OVERLAY),\n/* harmony export */ ATTR_PETAL_OVERLAY_CLOSE: () => (/* binding */ ATTR_PETAL_OVERLAY_CLOSE),\n/* harmony export */ ATTR_PETAL_OVERLAY_OPACITY: () => (/* binding */ ATTR_PETAL_OVERLAY_OPACITY),\n/* harmony export */ ATTR_PETAL_POSITION: () => (/* binding */ ATTR_PETAL_POSITION),\n/* harmony export */ ATTR_PETAL_SESSION_TTL: () => (/* binding */ ATTR_PETAL_SESSION_TTL),\n/* harmony export */ ATTR_PETAL_SHOW_DELAY: () => (/* binding */ ATTR_PETAL_SHOW_DELAY),\n/* harmony export */ ATTR_PETAL_SHOW_ONCE: () => (/* binding */ ATTR_PETAL_SHOW_ONCE),\n/* harmony export */ ATTR_PETAL_STATE: () => (/* binding */ ATTR_PETAL_STATE),\n/* harmony export */ ATTR_PETAL_TRIGGER_CLOSE: () => (/* binding */ ATTR_PETAL_TRIGGER_CLOSE),\n/* harmony export */ ATTR_PETAL_TRIGGER_OPEN: () => (/* binding */ ATTR_PETAL_TRIGGER_OPEN)\n/* harmony export */ });\n// BASE\nconst ATTR_PETAL_NAME = \"petal\";\nconst ATTR_PETAL_ELEMENT = \"petal-el\";\nconst ATTR_PETAL_GROUP = \"petal-group\"; // Group name for coordinated behavior across components\nconst ATTR_PETAL_STATE = \"petal-state\";\nconst ATTR_PETAL_DEBUG = \"petal-debug\"; // Enable debug console logging\n// BEHAVIOR\nconst ATTR_PETAL_SHOW_ONCE = \"petal-show-once\"; // Regardless of other settings, only show the modal once per user session\nconst ATTR_PETAL_SHOW_DELAY = \"petal-show-delay\"; // Time to wait before showing modal (in seconds)\nconst ATTR_PETAL_SESSION_TTL = \"petal-session-ttl\"; // Time to keep user session (in hours)\n// ANIMATIONS\nconst ATTR_PETAL_ANIM_OPEN = \"petal-anim-open\";\nconst ATTR_PETAL_ANIM_OPEN_TABLET = \"petal-anim-open-tablet\";\nconst ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE = \"petal-anim-open-mobile-landscape\";\nconst ATTR_PETAL_ANIM_OPEN_MOBILE = \"petal-anim-open-mobile\";\nconst ATTR_PETAL_ANIM_OPEN_EASE = \"petal-anim-open-ease\";\nconst ATTR_PETAL_ANIM_OPEN_DURATION = \"petal-anim-open-duration\";\nconst ATTR_PETAL_ANIM_CLOSE = \"petal-anim-close\";\nconst ATTR_PETAL_ANIM_CLOSE_TABLET = \"petal-anim-close-tablet\";\nconst ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE = \"petal-anim-close-mobile-landscape\";\nconst ATTR_PETAL_ANIM_CLOSE_MOBILE = \"petal-anim-close-mobile\";\nconst ATTR_PETAL_ANIM_CLOSE_EASE = \"petal-anim-close-ease\";\nconst ATTR_PETAL_ANIM_CLOSE_DURATION = \"petal-anim-close-duration\";\nconst ATTR_PETAL_ANIM_OPEN_SPEED = \"petal-anim-open-speed\";\nconst ATTR_PETAL_ANIM_CLOSE_SPEED = \"petal-anim-close-speed\";\nconst ATTR_PETAL_ANIM_OFFSET = \"petal-anim-offset\";\nconst ATTR_PETAL_ANIM_OFFSET_TABLET = \"petal-anim-offset-tablet\";\nconst ATTR_PETAL_ANIM_OFFSET_MOBILE_LANDSCAPE = \"petal-anim-offset-mobile-landscape\";\nconst ATTR_PETAL_ANIM_OFFSET_MOBILE = \"petal-anim-offset-mobile\";\n/**-------------------------*\n * OVERLAY\n *--------------------------*/\nconst ATTR_PETAL_OVERLAY = \"overlay\";\nconst ATTR_PETAL_OVERLAY_OPACITY = \"petal-overlay-opacity\";\nconst ATTR_PETAL_OVERLAY_CLOSE = \"petal-overlay-close\";\n/**-------------------------*\n * OPEN & CLOSE\n *--------------------------*/\nconst ATTR_PETAL_TRIGGER_OPEN = \"trigger-open\";\nconst ATTR_PETAL_TRIGGER_CLOSE = \"trigger-close\";\n/**-------------------------*\n * MODAL\n *--------------------------*/\n// ELEMENTS\nconst ATTR_PETAL_MODAL = \"modal\";\nconst ATTR_PETAL_DIALOG = \"dialog\";\nconst ATTR_PETAL_MODAL_TYPE = \"petal-modal-type\";\n/**-------------------------*\n * NAV\n *--------------------------*/\n// ELEMENTS\nconst ATTR_PETAL_NAV = \"nav\";\nconst ATTR_PETAL_NAV_SECONDARY = \"nav-secondary\";\nconst ATTR_PETAL_BANNER = \"banner\";\nconst ATTR_PETAL_BANNER_CLOSE = \"banner-close\";\n// SETTINGS\nconst ATTR_ALLOW_CLOSE = \"petal-allow-close\";\nconst ATTR_PETAL_POSITION = \"petal-position\";\n// CSS\nconst ATTR_PETAL_BANNER_CLOSED_CLASS = \"petal-hide-nav-banner\";\n/**-------------------------*\n * DROPDOWN\n *--------------------------*/\n// ELEMENTS\nconst ATTR_PETAL_DROPDOWN = \"dropdown\";\nconst ATTR_PETAL_DROPDOWN_TOGGLE = \"dropdown-toggle\";\nconst ATTR_PETAL_DROPDOWN_MENU = \"dropdown-menu\";\nconst ATTR_PETAL_DROPDOWN_MENU_BOX = \"dropdown-drawer\";\nconst ATTR_PETAL_DROPDOWN_SCROLL = \"dropdown-scroll\";\n// BEHAVIOR\nconst ATTR_PETAL_DISABLE_SCROLL_ON_OPEN = \"petal-disable-scroll-on-open\";\n// OPEN/CLOSE BEHAVIOR\nconst ATTR_PETAL_DROPDOWN_OPEN_DELAY = \"petal-dropdown-open-delay\";\nconst ATTR_PETAL_DROPDOWN_CLOSE_DELAY = \"petal-dropdown-close-delay\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER = \"petal-dropdown-open-on-hover\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_TABLET = \"petal-dropdown-open-on-hover-tablet\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE_LANDSCAPE = \"petal-dropdown-open-on-hover-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_OPEN_ON_HOVER_MOBILE = \"petal-dropdown-open-on-hover-mobile\";\n// VISIBILITY\nconst ATTR_PETAL_DROPDOWN_SHOW_DESKTOP = \"petal-dropdown-show-desktop\";\nconst ATTR_PETAL_DROPDOWN_SHOW_TABLET = \"petal-dropdown-show-tablet\";\nconst ATTR_PETAL_DROPDOWN_SHOW_MOBILE_LANDSCAPE = \"petal-dropdown-show-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_SHOW_MOBILE = \"petal-dropdown-show-mobile\";\n// EXPAND\nconst ATTR_PETAL_DROPDOWN_EXPAND_TABLET = \"petal-dropdown-expand-tablet\";\nconst ATTR_PETAL_DROPDOWN_EXPAND_MOBILE_LANDSCAPE = \"petal-dropdown-expand-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_EXPAND_MOBILE = \"petal-dropdown-expand-mobile\";\n// ARIA ATTRIBUTES\nconst ARIA_EXPANDED = \"aria-expanded\";\n\n\n//# sourceURL=webpack://petal/./src/lib/attributes.ts?");
|
|
170
|
+
|
|
171
|
+
/***/ }),
|
|
172
|
+
|
|
173
|
+
/***/ "./src/lib/debug.ts":
|
|
174
|
+
/*!**************************!*\
|
|
175
|
+
!*** ./src/lib/debug.ts ***!
|
|
176
|
+
\**************************/
|
|
177
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
178
|
+
|
|
179
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ debug: () => (/* binding */ debug)\n/* harmony export */ });\n/**\n * Debug Helper Module\n *\n * Provides debug logging functionality with module prefixes.\n */\n/**\n * Debug logging function\n * Logs a message with a flower emoji prefix and module name if debug mode is enabled\n *\n * @param debug - Configuration object with debug flag\n * @param module - Module name to display in brackets\n * @param log - Log message to display\n */\nfunction debug(debug, module, log) {\n if (!debug)\n return;\n console.log(`🌸 [${module}] ${log}`);\n}\n\n\n//# sourceURL=webpack://petal/./src/lib/debug.ts?");
|
|
170
180
|
|
|
171
181
|
/***/ }),
|
|
172
182
|
|
|
@@ -226,7 +236,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
226
236
|
\***************************************************/
|
|
227
237
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
228
238
|
|
|
229
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ animateClose: () => (/* binding */ animateClose),\n/* harmony export */ animateOpen: () => (/* binding */ animateOpen),\n/* harmony export */ initializeDrawerPosition: () => (/* binding */ initializeDrawerPosition)\n/* harmony export */ });\n/* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! gsap */ \"./node_modules/gsap/index.js\");\n/* harmony import */ var _lib_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/animations */ \"./src/lib/animations.ts\");\n/* harmony import */ var _lib_attributes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/attributes */ \"./src/lib/attributes.ts\");\n/**\n * Dropdown Animator Module\n *\n * Handles GSAP animations for dropdown menus including:\n * - Opening/closing animations\n * - Overlay fade transitions\n * - Timeline management\n */\n\n\n\n/**\n * Animates dropdown opening with GSAP\n */\nfunction animateOpen(elements, currentAnim, currentOffset, config, index) {\n if (config.debug)\n console.log(`Dropdown ${index + 1} - performOpen() executing with GSAP`);\n const { dropdown, toggle, menu, drawer, overlay } = elements;\n // Build animation options with easing and duration\n const animOptions = {\n offset: currentOffset,\n ease: config.animOpenEase || undefined,\n duration: config.animOpenSpeed
|
|
239
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ animateClose: () => (/* binding */ animateClose),\n/* harmony export */ animateOpen: () => (/* binding */ animateOpen),\n/* harmony export */ initializeDrawerPosition: () => (/* binding */ initializeDrawerPosition)\n/* harmony export */ });\n/* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! gsap */ \"./node_modules/gsap/index.js\");\n/* harmony import */ var _lib_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/animations */ \"./src/lib/animations.ts\");\n/* harmony import */ var _lib_attributes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/attributes */ \"./src/lib/attributes.ts\");\n/**\n * Dropdown Animator Module\n *\n * Handles GSAP animations for dropdown menus including:\n * - Opening/closing animations\n * - Overlay fade transitions\n * - Timeline management\n */\n\n\n\n/**\n * Animates dropdown opening with GSAP\n */\nfunction animateOpen(elements, currentAnim, currentOffset, config, index) {\n if (config.debug)\n console.log(`Dropdown ${index + 1} - performOpen() executing with GSAP`);\n const { dropdown, toggle, menu, drawer, overlay } = elements;\n // Build animation options with easing and duration\n const animOptions = {\n offset: currentOffset,\n ease: config.animOpenEase || undefined,\n duration: config.animOpenSpeed,\n };\n const anim = _lib_animations__WEBPACK_IMPORTED_MODULE_0__.animations[currentAnim](animOptions);\n // Create GSAP timeline\n const tl = gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.timeline();\n // CRITICAL: Set drawer position BEFORE making menu visible to avoid flash\n gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.set(drawer, anim.from);\n // Now make elements visible\n gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.set(menu, { display: \"flex\", visibility: \"visible\" });\n if (overlay) {\n gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.set(overlay, { display: \"flex\", visibility: \"visible\", opacity: 1 });\n }\n // Animate the drawer\n tl.to(drawer, anim.to);\n // Update ARIA and state\n toggle.setAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ARIA_EXPANDED, \"true\");\n dropdown.setAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_STATE, \"open\");\n return tl;\n}\n/**\n * Animates dropdown closing with GSAP\n */\nfunction animateClose(elements, currentOpenAnim, currentCloseAnim, currentOffset, config, index) {\n if (config.debug)\n console.log(`Dropdown ${index + 1} - closeDropdown() executing with GSAP`);\n const { dropdown, toggle, menu, drawer, overlay } = elements;\n // Build animation options with easing and duration\n const animOptions = {\n offset: currentOffset,\n ease: config.animCloseEase || undefined,\n duration: config.animCloseSpeed,\n };\n // Use explicit close animation if provided, otherwise reverse the open animation\n const anim = currentCloseAnim ? (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.getReverseAnimation)(currentCloseAnim, animOptions) : (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.getReverseAnimation)(currentOpenAnim, animOptions);\n // Create GSAP timeline\n const tl = gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.timeline({\n onComplete: () => {\n // Update ARIA and state after animation completes\n toggle.setAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ARIA_EXPANDED, \"false\");\n dropdown.setAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_STATE, \"closed\");\n // Clear all animation properties to ensure clean state for next open\n (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.clearAnimationProperties)(drawer);\n // Set display to none and visibility to hidden after animation completes\n gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.set(menu, { display: \"none\", visibility: \"hidden\" });\n if (overlay) {\n gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.set(overlay, { display: \"none\", visibility: \"hidden\" });\n }\n },\n });\n // Animate the drawer (duration and ease are now in anim.to)\n tl.fromTo(drawer, anim.from, anim.to);\n // Fade out overlay\n if (overlay) {\n tl.to(overlay, { opacity: 0, duration: config.animCloseSpeed }, \"<\");\n }\n return tl;\n}\n/**\n * Initialize drawer to its animation's starting position\n */\nfunction initializeDrawerPosition(drawer, currentAnim, currentOffset) {\n // For initialization, we only need the offset (duration and easing don't apply)\n const anim = _lib_animations__WEBPACK_IMPORTED_MODULE_0__.animations[currentAnim]({ offset: currentOffset });\n gsap__WEBPACK_IMPORTED_MODULE_2__.gsap.set(drawer, anim.from);\n}\n\n\n//# sourceURL=webpack://petal/./src/modules/dropdown/dropdown-animator.ts?");
|
|
230
240
|
|
|
231
241
|
/***/ }),
|
|
232
242
|
|
|
@@ -276,7 +286,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
276
286
|
\*********************************************/
|
|
277
287
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
278
288
|
|
|
279
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ animateClose: () => (/* binding */ animateClose),\n/* harmony export */ animateOpen: () => (/* binding */ animateOpen),\n/* harmony export */ initializeElements: () => (/* binding */ initializeElements)\n/* harmony export */ });\n/* harmony import */ var
|
|
289
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ animateClose: () => (/* binding */ animateClose),\n/* harmony export */ animateOpen: () => (/* binding */ animateOpen),\n/* harmony export */ initializeElements: () => (/* binding */ initializeElements)\n/* harmony export */ });\n/* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! gsap */ \"./node_modules/gsap/index.js\");\n/* harmony import */ var _lib_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/animations */ \"./src/lib/animations.ts\");\n/* harmony import */ var _lib_attributes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/attributes */ \"./src/lib/attributes.ts\");\n/* harmony import */ var _lib_debug__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/debug */ \"./src/lib/debug.ts\");\n/**\n * Modal Animator Module\n *\n * Handles GSAP animations for modals including:\n * - Dialog opening/closing animations\n * - Mask fade transitions\n * - Timeline management\n */\n\n\n\n\n// Map modal type to default animations\nconst modalTypeAnimationMap = {\n center: { open: \"scale\", close: \"scale\" },\n left: { open: \"slide-right\", close: \"slide-left\" },\n right: { open: \"slide-left\", close: \"slide-right\" },\n top: { open: \"slide-down\", close: \"slide-up\" },\n bottom: { open: \"slide-up\", close: \"slide-down\" },\n};\n/**\n * Gets the animation name for the modal based on screen width and direction\n */\nfunction getAnimationName(modal, direction, modalType) {\n const width = window.innerWidth;\n // If modal type is provided and no custom animation attributes are set, use type-based animation\n const hasCustomAnims = modal.hasAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN) ||\n modal.hasAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_TABLET) ||\n modal.hasAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE) ||\n modal.hasAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_MOBILE);\n if (modalType && !hasCustomAnims) {\n return modalTypeAnimationMap[modalType][direction];\n }\n // Get open animations with cascading defaults\n const openDesktop = getModalAnimation(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN);\n const openTablet = getModalAnimation(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_TABLET) || openDesktop;\n const openMobileLandscape = getModalAnimation(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_MOBILE_LANDSCAPE) || openTablet;\n const openMobile = getModalAnimation(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_MOBILE) || openMobileLandscape;\n // Get close animations with cascading defaults (like open animations)\n const closeDesktop = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE);\n const closeTablet = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_TABLET) || closeDesktop;\n const closeMobileLandscape = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE) || closeTablet;\n const closeMobile = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_MOBILE) || closeMobileLandscape;\n // Get current open animation based on breakpoint\n let currentOpenAnim;\n if (width <= 479) {\n currentOpenAnim = openMobile;\n }\n else if (width <= 767) {\n currentOpenAnim = openMobileLandscape;\n }\n else if (width <= 991) {\n currentOpenAnim = openTablet;\n }\n else {\n currentOpenAnim = openDesktop;\n }\n if (direction === \"open\") {\n return currentOpenAnim;\n }\n // Get current close animation based on breakpoint\n let currentCloseAnim;\n if (width <= 479) {\n currentCloseAnim = closeMobile;\n }\n else if (width <= 767) {\n currentCloseAnim = closeMobileLandscape;\n }\n else if (width <= 991) {\n currentCloseAnim = closeTablet;\n }\n else {\n currentCloseAnim = closeDesktop;\n }\n return currentCloseAnim !== null && currentCloseAnim !== void 0 ? currentCloseAnim : _lib_animations__WEBPACK_IMPORTED_MODULE_0__.reverseAnimationMap[currentOpenAnim];\n}\n/**\n * Safe parser with fallback\n */\nfunction getModalAnimation(modal, attr) {\n const raw = modal.getAttribute(attr);\n return (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.isValidAnimation)(raw !== null && raw !== void 0 ? raw : \"\") ? raw : \"slide-up\";\n}\n/**\n * Safe parser that returns null if not found\n */\nfunction getModalAnimationOrNull(modal, attr) {\n const raw = modal.getAttribute(attr);\n return (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.isValidAnimation)(raw !== null && raw !== void 0 ? raw : \"\") ? raw : null;\n}\n/**\n * Animates modal opening with GSAP\n */\nfunction animateOpen(elements, config) {\n const { modal, dialog, mask } = elements;\n const tl = gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.timeline();\n // Get animation with easing and duration (modals use 100% offset for full viewport movements)\n const animationType = getAnimationName(modal, \"open\", config.type);\n const ease = modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_EASE) || undefined;\n const duration = modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_DURATION) ? parseFloat(modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_DURATION)) : undefined;\n const animOptions = {\n offset: \"100%\",\n ease,\n duration,\n };\n (0,_lib_debug__WEBPACK_IMPORTED_MODULE_2__.debug)(config.debug, \"MODAL\", `\"${config.name}\" - open()`);\n (0,_lib_debug__WEBPACK_IMPORTED_MODULE_2__.debug)(config.debug, \"MODAL\", `${animOptions}`);\n const anim = _lib_animations__WEBPACK_IMPORTED_MODULE_0__.animations[animationType](animOptions);\n // Clear any leftover animation properties before starting\n (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.clearAnimationProperties)(dialog);\n // Set Modal display to flex\n tl.set(modal, { display: \"flex\" });\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Set display to flex`);\n // Set initial dialog state to prevent flicker\n tl.set(dialog, anim.from);\n // Animate Mask open (if mask exists)\n if (mask) {\n const maskAnim = _lib_animations__WEBPACK_IMPORTED_MODULE_0__.animations[\"fade-in\"]({ offset: config.maskOpacity });\n tl.fromTo(mask, maskAnim.from, maskAnim.to, \"<\");\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Animating mask open (opacity: ${config.maskOpacity})`);\n }\n // Animate Dialog Open\n tl.fromTo(dialog, anim.from, anim.to);\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Animating dialog open`);\n return tl;\n}\n/**\n * Animates modal closing with GSAP\n */\nfunction animateClose(elements, config) {\n const { modal, dialog, mask } = elements;\n const tl = gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.timeline();\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - closeModal() called`);\n // Get animation with easing and duration (modals use 100% offset for full viewport movements)\n const animationType = getAnimationName(modal, \"close\", config.type);\n const ease = modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_EASE) || undefined;\n const duration = modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_DURATION) ? parseFloat(modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_DURATION)) : undefined;\n const animOptions = {\n offset: \"100%\",\n ease,\n duration,\n };\n const anim = (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.getReverseAnimation)(animationType, animOptions);\n // Animate the Dialog Closed (duration is now in anim.to)\n tl.fromTo(dialog, anim.from, anim.to);\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Animating dialog close`);\n // Animate Mask Closed (if mask exists)\n if (mask) {\n tl.to(mask, { opacity: 0, duration: 0.5 }, \"<\");\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Animating mask close`);\n }\n // Hide the Modal and clear all animation properties\n tl.set(modal, { display: \"none\" });\n tl.call(() => (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.clearAnimationProperties)(dialog));\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Set display to none and cleared all animation properties`);\n return tl;\n}\n/**\n * Initialize modal elements to their starting state\n */\nfunction initializeElements(elements, config) {\n const { modal, mask } = elements;\n // Initialize Mask (if it exists)\n if (mask) {\n mask.style.opacity = \"0\";\n if (config.debug)\n console.log(` [DEBUG] Set mask opacity to 0`);\n }\n // Initialize Modal\n modal.style.display = \"none\";\n if (config.debug)\n console.log(` [DEBUG] Set modal display to none`);\n}\n\n\n//# sourceURL=webpack://petal/./src/modules/modal/modal-animator.ts?");
|
|
280
290
|
|
|
281
291
|
/***/ }),
|
|
282
292
|
|
|
@@ -306,7 +316,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
306
316
|
\************************************/
|
|
307
317
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
308
318
|
|
|
309
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initializeAllModals: () => (/* binding */ initializeAllModals)\n/* harmony export */ });\n/* harmony import */ var _lib_attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/attributes */ \"./src/lib/attributes.ts\");\n/* harmony import */ var _lib_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/helpers */ \"./src/lib/helpers.ts\");\n/* harmony import */ var _modal_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modal-config */ \"./src/modules/modal/modal-config.ts\");\n/* harmony import */ var _modal_controller__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modal-controller */ \"./src/modules/modal/modal-controller.ts\");\n/* harmony import */ var _modal_animator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modal-animator */ \"./src/modules/modal/modal-animator.ts\");\n/**\n * Modal Component\n *\n * Handles interactive modal dialogs with support for:\n * - GSAP animations\n * - Optional overlay with configurable opacity\n * - Video pause on close\n * - Session state storage\n * - Open/close triggers\n * - Overlay click-to-close\n *\n * HTML Attributes (defined in attributes.ts):\n * - petal-el=\"modal\" - Container element (required)\n * - petal-el=\"dialog\" - Dialog content (required)\n * - petal-el=\"overlay\" - Background overlay (optional)\n * - petal=\"name\" - Modal identifier (optional)\n * - petal-el=\"open\" - Open trigger (requires petal=\"name\" on trigger if outside modal)\n * - petal-el=\"trigger-close\" - Close trigger (auto-detects parent modal if no name)\n * - petal-overlay-close=\"true\" - Enable overlay click-to-close (default: true)\n * - petal-overlay-opacity=\"0.15\" - Overlay opacity (default: 0.15)\n * - petal-modal-type=\"center|left|right|top|bottom\" - Modal position type (default: center)\n * - petal-debug=\"true\" - Enable debug logging\n */\n\n\n\n\n\n/**\n * Initialize all modals on the page\n */\nfunction initializeAllModals() {\n
|
|
319
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initializeAllModals: () => (/* binding */ initializeAllModals)\n/* harmony export */ });\n/* harmony import */ var _lib_attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/attributes */ \"./src/lib/attributes.ts\");\n/* harmony import */ var _lib_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/helpers */ \"./src/lib/helpers.ts\");\n/* harmony import */ var _modal_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modal-config */ \"./src/modules/modal/modal-config.ts\");\n/* harmony import */ var _modal_controller__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modal-controller */ \"./src/modules/modal/modal-controller.ts\");\n/* harmony import */ var _modal_animator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modal-animator */ \"./src/modules/modal/modal-animator.ts\");\n/**\n * Modal Component\n *\n * Handles interactive modal dialogs with support for:\n * - GSAP animations\n * - Optional overlay with configurable opacity\n * - Video pause on close\n * - Session state storage\n * - Open/close triggers\n * - Overlay click-to-close\n *\n * HTML Attributes (defined in attributes.ts):\n * - petal-el=\"modal\" - Container element (required)\n * - petal-el=\"dialog\" - Dialog content (required)\n * - petal-el=\"overlay\" - Background overlay (optional)\n * - petal=\"name\" - Modal identifier (optional)\n * - petal-el=\"open\" - Open trigger (requires petal=\"name\" on trigger if outside modal)\n * - petal-el=\"trigger-close\" - Close trigger (auto-detects parent modal if no name)\n * - petal-overlay-close=\"true\" - Enable overlay click-to-close (default: true)\n * - petal-overlay-opacity=\"0.15\" - Overlay opacity (default: 0.15)\n * - petal-modal-type=\"center|left|right|top|bottom\" - Modal position type (default: center)\n * - petal-debug=\"true\" - Enable debug logging\n */\n\n\n\n\n\n/**\n * Initialize all modals on the page\n */\nfunction initializeAllModals() {\n const modals = (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.getAllPetalElementsOfType)(_lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_MODAL);\n console.log(`🌸 [MODAL] Detected ${modals.length} modal(s)`);\n modals.forEach((modal, index) => {\n console.log(`🌸 [MODAL] Processing modal ${index + 1}/${modals.length}`);\n const name = modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_NAME) || null;\n console.log(`🌸 [MODAL] Modal name: \"${name}\"`);\n // ===========================\n // Element References\n // ===========================\n const overlay = (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.findPetalElementByNameOrInParent)(modal, name, _lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_OVERLAY);\n const dialog = (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.findPetalElementByNameOrInParent)(modal, name, _lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_DIALOG);\n const openTriggers = (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.findPetalElementsByNameOrInParent)(modal, name, _lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_TRIGGER_OPEN);\n const closeTriggers = (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.findPetalElementsByNameOrInParent)(modal, name, _lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_TRIGGER_CLOSE);\n console.log(`🌸 [MODAL] Found overlay: ${!!overlay}, dialog: ${!!dialog}`);\n console.log(`🌸 [MODAL] Detected ${(openTriggers === null || openTriggers === void 0 ? void 0 : openTriggers.length) || \"0\"} open trigger(s)`);\n console.log(`🌸 [MODAL] Detected ${(closeTriggers === null || closeTriggers === void 0 ? void 0 : closeTriggers.length) || \"0\"} close trigger(s)`);\n if (!dialog) {\n console.warn(`⚠️ [MODAL] Skipping modal \"${name}\" - missing dialog`);\n return;\n }\n // ===========================\n // Configuration\n // ===========================\n const config = (0,_modal_config__WEBPACK_IMPORTED_MODULE_2__.parseModalConfig)(modal);\n (0,_modal_config__WEBPACK_IMPORTED_MODULE_2__.logConfig)(config);\n // ===========================\n // Initialization\n // ===========================\n const elements = {\n modal: modal,\n dialog,\n mask: overlay,\n };\n // Create a single controller instance for this modal\n console.log(`🌸 [MODAL] Creating controller for modal \"${config.name}\"`);\n const controller = new _modal_controller__WEBPACK_IMPORTED_MODULE_3__.ModalController(elements, config);\n // Initialize Open Triggers\n console.log(`🌸 [MODAL] Attaching listeners to ${(openTriggers === null || openTriggers === void 0 ? void 0 : openTriggers.length) || 0} open trigger(s)`);\n openTriggers === null || openTriggers === void 0 ? void 0 : openTriggers.forEach((trigger, triggerIndex) => {\n console.log(`🌸 [MODAL] Attaching click listener to open trigger ${triggerIndex + 1}`);\n if (config.debug)\n console.log(` [DEBUG] Attached click listener to open trigger`);\n trigger.addEventListener(\"click\", () => {\n console.log(`🌸 [MODAL] Open trigger clicked for modal \"${config.name}\"`);\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Open trigger clicked`);\n controller.open();\n });\n });\n // Initialize Close Triggers\n console.log(`🌸 [MODAL] Attaching listeners to ${(closeTriggers === null || closeTriggers === void 0 ? void 0 : closeTriggers.length) || 0} close trigger(s)`);\n closeTriggers === null || closeTriggers === void 0 ? void 0 : closeTriggers.forEach((trigger, triggerIndex) => {\n console.log(`🌸 [MODAL] Attaching click listener to close trigger ${triggerIndex + 1}`);\n if (config.debug)\n console.log(` [DEBUG] Attached click listener to close trigger`);\n trigger.addEventListener(\"click\", () => {\n console.log(`🌸 [MODAL] Close trigger clicked for modal \"${config.name}\"`);\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Close trigger clicked`);\n controller.close();\n });\n });\n // Find and attach close triggers without names (that are children of this modal)\n if (!name) {\n const allCloseTriggers = [...Array.from((0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.getAllPetalElementsOfType)(_lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_TRIGGER_CLOSE))];\n allCloseTriggers.forEach((trigger) => {\n // Check if this close trigger doesn't have a name and is a child of this modal\n const triggerName = trigger.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_NAME);\n if (!triggerName) {\n const parentModal = (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.findClosestPetalParent)(trigger, _lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_MODAL);\n if (parentModal === modal) {\n console.log(`🌸 [MODAL] Attaching click listener to unnamed close trigger`);\n if (config.debug)\n console.log(` [DEBUG] Attached click listener to unnamed close trigger`);\n trigger.addEventListener(\"click\", () => {\n console.log(`🌸 [MODAL] Unnamed close trigger clicked for modal \"${config.name}\"`);\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Unnamed close trigger clicked`);\n controller.close();\n });\n }\n }\n });\n }\n // Initialize Overlay Close Trigger\n const overlayCloseAttr = modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_OVERLAY_CLOSE);\n const overlayClose = overlayCloseAttr === null ? true : overlayCloseAttr === \"true\";\n console.log(`🌸 [MODAL] Overlay close enabled: ${overlayClose}`);\n if (overlay && overlayClose) {\n console.log(`🌸 [MODAL] Attaching click listener to overlay`);\n if (config.debug)\n console.log(` [DEBUG] Attached click listener to overlay for modal \"${config.name}\"`);\n overlay.addEventListener(\"click\", () => {\n console.log(`🌸 [MODAL] Overlay clicked for modal \"${config.name}\"`);\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Overlay clicked`);\n controller.close();\n });\n }\n console.log(`🌸 [MODAL] Initializing elements for modal \"${config.name}\"`);\n (0,_modal_animator__WEBPACK_IMPORTED_MODULE_4__.initializeElements)(elements, config);\n console.log(`🌸 [MODAL] Modal \"${config.name}\" initialization complete`);\n });\n}\n\n\n//# sourceURL=webpack://petal/./src/modules/modal/modal.ts?");
|
|
310
320
|
|
|
311
321
|
/***/ }),
|
|
312
322
|
|
|
@@ -336,7 +346,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
336
346
|
\**********************/
|
|
337
347
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
338
348
|
|
|
339
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_modal_modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/modal/modal */ \"./src/modules/modal/modal.ts\");\n/* harmony import */ var _modules_banner_banner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/banner/banner */ \"./src/modules/banner/banner.ts\");\n/* harmony import */ var _modules_dropdown_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/dropdown/dropdown */ \"./src/modules/dropdown/dropdown.ts\");\n/* harmony import */ var _modules_overlay_overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/overlay/overlay */ \"./src/modules/overlay/overlay.ts\");\n/* harmony import */ var _petal_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./petal.css */ \"./src/petal.css\");\n/* harmony import */ var _modules_dropdown_dropdown_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/dropdown/dropdown.css */ \"./src/modules/dropdown/dropdown.css\");\n\n\n\n\n\n\nconsole.log(`🌸 Hello from Wellflow Petal v${\"0.0.
|
|
349
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_modal_modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/modal/modal */ \"./src/modules/modal/modal.ts\");\n/* harmony import */ var _modules_banner_banner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/banner/banner */ \"./src/modules/banner/banner.ts\");\n/* harmony import */ var _modules_dropdown_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/dropdown/dropdown */ \"./src/modules/dropdown/dropdown.ts\");\n/* harmony import */ var _modules_overlay_overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/overlay/overlay */ \"./src/modules/overlay/overlay.ts\");\n/* harmony import */ var _petal_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./petal.css */ \"./src/petal.css\");\n/* harmony import */ var _modules_dropdown_dropdown_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/dropdown/dropdown.css */ \"./src/modules/dropdown/dropdown.css\");\n\n\n\n\n\n\nconsole.log(`🌸 Hello from Wellflow Petal v${\"0.0.83\"}`);\n(0,_modules_modal_modal__WEBPACK_IMPORTED_MODULE_0__.initializeAllModals)();\n(0,_modules_banner_banner__WEBPACK_IMPORTED_MODULE_1__.initializeBanner)();\n(0,_modules_dropdown_dropdown__WEBPACK_IMPORTED_MODULE_2__.initializeDropdowns)();\n(0,_modules_overlay_overlay__WEBPACK_IMPORTED_MODULE_3__.initializeOverlays)();\n\n\n//# sourceURL=webpack://petal/./src/petal.ts?");
|
|
340
350
|
|
|
341
351
|
/***/ }),
|
|
342
352
|
|