well-petal 0.0.80 → 0.0.82

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.
Files changed (2) hide show
  1. package/dist/petal.js +6 -6
  2. 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 */ createMaskAnimation: () => (/* binding */ createMaskAnimation),\n/* harmony export */ getReverseAnimation: () => (/* binding */ getReverseAnimation),\n/* harmony export */ reverseAnimationMap: () => (/* binding */ reverseAnimationMap)\n/* harmony export */ });\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 */\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 { ease = \"power1.inOut\", duration = 0.5 } = normalizeOptions(options);\n return {\n from: { scale: 0, opacity: 0 },\n to: { scale: 1, opacity: 1, ease, duration },\n };\n },\n \"slide-up\": (options) => {\n const { offset = \"100%\", ease = \"power1.inOut\", duration = 0.5 } = normalizeOptions(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 } = normalizeOptions(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 } = normalizeOptions(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 } = normalizeOptions(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};\n/**\n * Normalizes animation options to support both legacy number/string offset\n * and new AnimationOptions object\n */\nfunction normalizeOptions(options) {\n if (options === undefined || options === null) {\n return {};\n }\n if (typeof options === \"number\" || typeof options === \"string\") {\n return { offset: options };\n }\n return options;\n}\n// Mask/overlay fade animations\nfunction createMaskAnimation(targetOpacity) {\n return {\n from: { opacity: 0 },\n to: { opacity: targetOpacity, duration: 0.5 },\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};\n/**\n * Gets the reverse animation config by swapping from/to\n */\nfunction getReverseAnimation(animationType, options) {\n const reverseType = reverseAnimationMap[animationType];\n const anim = animations[reverseType](options);\n // Swap from and to for reverse\n return {\n from: anim.to,\n to: anim.from,\n };\n}\n\n\n//# sourceURL=webpack://petal/./src/lib/animations.ts?");
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 */ createMaskAnimation: () => (/* binding */ createMaskAnimation),\n/* harmony export */ getReverseAnimation: () => (/* binding */ getReverseAnimation),\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 */\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 { ease = \"power1.inOut\", duration = 0.5 } = normalizeOptions(options);\n return {\n from: { scale: 0, opacity: 0 },\n to: { scale: 1, opacity: 1, ease, duration },\n };\n },\n \"slide-up\": (options) => {\n const { offset = \"100%\", ease = \"power1.inOut\", duration = 0.5 } = normalizeOptions(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 } = normalizeOptions(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 } = normalizeOptions(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 } = normalizeOptions(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 } = normalizeOptions(options);\n return {\n from: { clipPath: \"inset(100% 0% 0% 0%)\", opacity: 0 },\n to: { clipPath: \"inset(0% 0% 0% 0%)\", opacity: 1, ease, duration },\n };\n },\n \"crop-down\": (options) => {\n const { ease = \"power1.inOut\", duration = 0.5 } = normalizeOptions(options);\n return {\n from: { clipPath: \"inset(0% 0% 100% 0%)\", opacity: 0 },\n to: { clipPath: \"inset(0% 0% 0% 0%)\", opacity: 1, ease, duration },\n };\n },\n};\n/**\n * Normalizes animation options to support both legacy number/string offset\n * and new AnimationOptions object\n */\nfunction normalizeOptions(options) {\n if (options === undefined || options === null) {\n return {};\n }\n if (typeof options === \"number\" || typeof options === \"string\") {\n return { offset: options };\n }\n return options;\n}\n// Mask/overlay fade animations\nfunction createMaskAnimation(targetOpacity) {\n return {\n from: { opacity: 0 },\n to: { opacity: targetOpacity, duration: 0.5 },\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};\n/**\n * Gets the reverse animation config by swapping from/to\n */\nfunction getReverseAnimation(animationType, options) {\n const reverseType = reverseAnimationMap[animationType];\n const anim = animations[reverseType](options);\n // Swap from and to for reverse\n return {\n from: anim.to,\n to: anim.from,\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,clipPath,transform' });\n}\n\n\n//# sourceURL=webpack://petal/./src/lib/animations.ts?");
160
160
 
161
161
  /***/ }),
162
162
 
@@ -166,7 +166,7 @@ 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_CLOSE: () => (/* binding */ ATTR_PETAL_CLOSE),\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_ANIM: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_CLOSE_SPEED: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_CLOSE_SPEED),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET_MOBILE: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET_MOBILE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET_MOBILE_LANDSCAPE: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET_MOBILE_LANDSCAPE),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_OFFSET_TABLET),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_OPEN_SPEED: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_OPEN_SPEED),\n/* harmony export */ ATTR_PETAL_DROPDOWN_ANIM_TABLET: () => (/* binding */ ATTR_PETAL_DROPDOWN_ANIM_TABLET),\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_OPEN: () => (/* binding */ ATTR_PETAL_OPEN),\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 */ });\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 * MODAL\n *--------------------------*/\n// ELEMENTS\nconst ATTR_PETAL_MODAL = \"modal\";\nconst ATTR_PETAL_OPEN = \"open\";\nconst ATTR_PETAL_TRIGGER_CLOSE = \"trigger-close\";\nconst ATTR_PETAL_DIALOG = \"dialog\";\n// DEPRECATED - Use ATTR_PETAL_TRIGGER_CLOSE instead\nconst ATTR_PETAL_CLOSE = \"close\";\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// DEPRECATED - Use unified ATTR_PETAL_ANIM_* attributes instead\nconst ATTR_PETAL_DROPDOWN_ANIM = \"petal-dropdown-anim\";\nconst ATTR_PETAL_DROPDOWN_ANIM_TABLET = \"petal-dropdown-anim-tablet\";\nconst ATTR_PETAL_DROPDOWN_ANIM_MOBILE_LANDSCAPE = \"petal-dropdown-anim-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_ANIM_MOBILE = \"petal-dropdown-anim-mobile\";\nconst ATTR_PETAL_DROPDOWN_ANIM_OPEN_SPEED = \"petal-dropdown-anim-open-speed\";\nconst ATTR_PETAL_DROPDOWN_ANIM_CLOSE_SPEED = \"petal-dropdown-anim-close-speed\";\nconst ATTR_PETAL_DROPDOWN_ANIM_OFFSET = \"petal-dropdown-anim-offset\";\nconst ATTR_PETAL_DROPDOWN_ANIM_OFFSET_TABLET = \"petal-dropdown-anim-offset-tablet\";\nconst ATTR_PETAL_DROPDOWN_ANIM_OFFSET_MOBILE_LANDSCAPE = \"petal-dropdown-anim-offset-mobile-landscape\";\nconst ATTR_PETAL_DROPDOWN_ANIM_OFFSET_MOBILE = \"petal-dropdown-anim-offset-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\";\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?");
170
170
 
171
171
  /***/ }),
172
172
 
@@ -226,7 +226,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
226
226
  \***************************************************/
227
227
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
228
228
 
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\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 // Set menu to visible with flex display\n tl.set(menu, { display: \"flex\", visibility: \"visible\" });\n // Set overlay to flex and visible if it exists\n if (overlay) {\n tl.set(overlay, { display: \"flex\", visibility: \"visible\" }, \"<\");\n }\n // Animate the drawer (duration and ease are now in anim.to)\n tl.fromTo(drawer, anim.from, 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 // Fade in overlay\n if (overlay) {\n tl.to(overlay, { opacity: 1, duration: config.animOpenSpeed }, \"<\");\n }\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\n ? (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.getReverseAnimation)(currentCloseAnim, animOptions)\n : (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 // 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?");
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\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 // Set menu to visible with flex display\n tl.set(menu, { display: \"flex\", visibility: \"visible\" });\n // Set overlay to flex and visible if it exists\n if (overlay) {\n tl.set(overlay, { display: \"flex\", visibility: \"visible\" }, \"<\");\n }\n // Animate the drawer (duration and ease are now in anim.to)\n tl.fromTo(drawer, anim.from, 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 // Fade in overlay\n if (overlay) {\n tl.to(overlay, { opacity: 1, duration: config.animOpenSpeed }, \"<\");\n }\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\n ? (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.getReverseAnimation)(currentCloseAnim, animOptions)\n : (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
230
 
231
231
  /***/ }),
232
232
 
@@ -276,7 +276,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
276
276
  \*********************************************/
277
277
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
278
278
 
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 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 * 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// 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 var _a, _b, _c;\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 (nullable)\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);\n const closeMobileLandscape = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE);\n const closeMobile = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_MOBILE);\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 // For close, use explicit close animation if set, otherwise reverse the open animation\n let currentCloseAnim;\n if (width <= 479) {\n currentCloseAnim = (_b = (_a = closeMobile !== null && closeMobile !== void 0 ? closeMobile : closeMobileLandscape) !== null && _a !== void 0 ? _a : closeTablet) !== null && _b !== void 0 ? _b : closeDesktop;\n }\n else if (width <= 767) {\n currentCloseAnim = (_c = closeMobileLandscape !== null && closeMobileLandscape !== void 0 ? closeMobileLandscape : closeTablet) !== null && _c !== void 0 ? _c : closeDesktop;\n }\n else if (width <= 991) {\n currentCloseAnim = closeTablet !== null && closeTablet !== void 0 ? closeTablet : closeDesktop;\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 * Validates and parses modal animation string\n */\nfunction isModalAnimation(value) {\n const validTypes = [\"scale\", \"slide-up\", \"slide-down\", \"slide-left\", \"slide-right\"];\n return validTypes.includes(value);\n}\n/**\n * Safe parser with fallback\n */\nfunction getModalAnimation(modal, attr) {\n const raw = modal.getAttribute(attr);\n return isModalAnimation(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 isModalAnimation(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_2__.gsap.timeline();\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - openModal() called`);\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 // 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)\n ? parseFloat(modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_DURATION))\n : undefined;\n const animOptions = {\n offset: \"100%\",\n ease,\n duration\n };\n const anim = _lib_animations__WEBPACK_IMPORTED_MODULE_0__.animations[animationType](animOptions);\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 = (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.createMaskAnimation)(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 (duration is now in anim.to)\n tl.to(dialog, 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_2__.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)\n ? parseFloat(modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_DURATION))\n : 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 transforms so they don't persist\n tl.set(modal, { display: \"none\" });\n tl.set(dialog, { clearProps: \"x,y,scale,transform\" });\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - Set display to none and cleared transforms`);\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?");
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 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 * 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// 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 var _a, _b, _c;\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 (nullable)\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);\n const closeMobileLandscape = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_MOBILE_LANDSCAPE);\n const closeMobile = getModalAnimationOrNull(modal, _lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_MOBILE);\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 // For close, use explicit close animation if set, otherwise reverse the open animation\n let currentCloseAnim;\n if (width <= 479) {\n currentCloseAnim = (_b = (_a = closeMobile !== null && closeMobile !== void 0 ? closeMobile : closeMobileLandscape) !== null && _a !== void 0 ? _a : closeTablet) !== null && _b !== void 0 ? _b : closeDesktop;\n }\n else if (width <= 767) {\n currentCloseAnim = (_c = closeMobileLandscape !== null && closeMobileLandscape !== void 0 ? closeMobileLandscape : closeTablet) !== null && _c !== void 0 ? _c : closeDesktop;\n }\n else if (width <= 991) {\n currentCloseAnim = closeTablet !== null && closeTablet !== void 0 ? closeTablet : closeDesktop;\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 * Validates and parses modal animation string\n */\nfunction isModalAnimation(value) {\n const validTypes = [\"scale\", \"slide-up\", \"slide-down\", \"slide-left\", \"slide-right\", \"crop-up\", \"crop-down\"];\n return validTypes.includes(value);\n}\n/**\n * Safe parser with fallback\n */\nfunction getModalAnimation(modal, attr) {\n const raw = modal.getAttribute(attr);\n return isModalAnimation(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 isModalAnimation(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_2__.gsap.timeline();\n if (config.debug)\n console.log(`[DEBUG] Modal \"${config.name}\" - openModal() called`);\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 // 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)\n ? parseFloat(modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_OPEN_DURATION))\n : undefined;\n const animOptions = {\n offset: \"100%\",\n ease,\n duration\n };\n const anim = _lib_animations__WEBPACK_IMPORTED_MODULE_0__.animations[animationType](animOptions);\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 = (0,_lib_animations__WEBPACK_IMPORTED_MODULE_0__.createMaskAnimation)(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 (duration is now in anim.to)\n tl.to(dialog, 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_2__.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)\n ? parseFloat(modal.getAttribute(_lib_attributes__WEBPACK_IMPORTED_MODULE_1__.ATTR_PETAL_ANIM_CLOSE_DURATION))\n : 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
280
 
281
281
  /***/ }),
282
282
 
@@ -306,7 +306,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
306
306
  \************************************/
307
307
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
308
308
 
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 console.log(`🌸 [MODAL] initializeAllModals() called`);\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_OPEN);\n const closeTriggers = (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.findPetalElementsByNameOrInParent)(modal, name, _lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_TRIGGER_CLOSE) || (0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.findPetalElementsByNameOrInParent)(modal, name, _lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_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 = [\n ...Array.from((0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.getAllPetalElementsOfType)(_lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_TRIGGER_CLOSE)),\n ...Array.from((0,_lib_helpers__WEBPACK_IMPORTED_MODULE_1__.getAllPetalElementsOfType)(_lib_attributes__WEBPACK_IMPORTED_MODULE_0__.ATTR_PETAL_CLOSE))\n ];\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?");
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 console.log(`🌸 [MODAL] initializeAllModals() called`);\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
310
 
311
311
  /***/ }),
312
312
 
@@ -336,7 +336,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
336
336
  \**********************/
337
337
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
338
338
 
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.80\"}`);\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?");
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.82\"}`);\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
340
 
341
341
  /***/ }),
342
342
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "well-petal",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "description": "Webflow Popups powered by attributes",
5
5
  "main": "dist/petal.js",
6
6
  "files": [