@shohojdhara/atomix 0.3.4 → 0.3.6

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 (237) hide show
  1. package/README.md +101 -199
  2. package/atomix.config.ts +241 -0
  3. package/dist/atomix.css +269 -189
  4. package/dist/atomix.css.map +1 -0
  5. package/dist/atomix.min.css +15179 -11
  6. package/dist/atomix.min.css.map +1 -0
  7. package/dist/charts.d.ts +1929 -0
  8. package/dist/charts.js +6477 -0
  9. package/dist/charts.js.map +1 -0
  10. package/dist/core.d.ts +1289 -0
  11. package/dist/core.js +3373 -0
  12. package/dist/core.js.map +1 -0
  13. package/dist/forms.d.ts +1085 -0
  14. package/dist/forms.js +2466 -0
  15. package/dist/forms.js.map +1 -0
  16. package/dist/heavy.d.ts +636 -0
  17. package/dist/heavy.js +4566 -0
  18. package/dist/heavy.js.map +1 -0
  19. package/dist/index.d.ts +5171 -4792
  20. package/dist/index.esm.js +6098 -4563
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/index.js +6291 -4747
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.min.js +1 -1
  25. package/dist/index.min.js.map +1 -1
  26. package/dist/layout.d.ts +300 -0
  27. package/dist/layout.js +336 -0
  28. package/dist/layout.js.map +1 -0
  29. package/dist/theme.d.ts +2122 -0
  30. package/dist/theme.js +6084 -0
  31. package/dist/theme.js.map +1 -0
  32. package/package.json +59 -27
  33. package/scripts/atomix-cli.js +544 -16
  34. package/scripts/cli/__tests__/cli-commands.test.js +204 -0
  35. package/scripts/cli/__tests__/utils.test.js +201 -0
  36. package/scripts/cli/__tests__/vitest.config.js +26 -0
  37. package/scripts/cli/interactive-init.js +1 -1
  38. package/scripts/cli/token-manager.js +32 -7
  39. package/scripts/cli/utils.js +347 -0
  40. package/src/components/Accordion/Accordion.stories.tsx +50 -17
  41. package/src/components/Accordion/Accordion.tsx +5 -54
  42. package/src/components/Accordion/index.ts +1 -1
  43. package/src/components/AtomixGlass/AtomixGlass.tsx +65 -31
  44. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +11 -4
  45. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -32
  46. package/src/components/AtomixGlass/stories/Examples.stories.tsx +2 -2
  47. package/src/components/AtomixGlass/stories/shared-components.tsx +0 -31
  48. package/src/components/Avatar/Avatar.stories.tsx +7 -0
  49. package/src/components/Avatar/Avatar.tsx +3 -3
  50. package/src/components/Badge/Badge.stories.tsx +91 -13
  51. package/src/components/Badge/Badge.tsx +3 -3
  52. package/src/components/Block/Block.stories.tsx +7 -23
  53. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +7 -0
  54. package/src/components/Breadcrumb/Breadcrumb.tsx +3 -3
  55. package/src/components/Button/Button.stories.tsx +141 -22
  56. package/src/components/Button/ButtonGroup.stories.tsx +315 -0
  57. package/src/components/Button/ButtonGroup.tsx +67 -0
  58. package/src/components/Button/index.ts +2 -0
  59. package/src/components/Callout/Callout.stories.tsx +8 -6
  60. package/src/components/Card/Card.stories.tsx +82 -28
  61. package/src/components/Card/ElevationCard.tsx +1 -1
  62. package/src/components/Chart/AnimatedChart.tsx +19 -18
  63. package/src/components/Chart/AreaChart.tsx +5 -2
  64. package/src/components/Chart/BarChart.tsx +1 -1
  65. package/src/components/Chart/BubbleChart.tsx +6 -6
  66. package/src/components/Chart/CandlestickChart.tsx +0 -1
  67. package/src/components/Chart/Chart.stories.tsx +5 -7
  68. package/src/components/Chart/Chart.tsx +0 -16
  69. package/src/components/Chart/ChartRenderer.tsx +1 -1
  70. package/src/components/Chart/ChartToolbar.tsx +1 -0
  71. package/src/components/Chart/DonutChart.tsx +0 -1
  72. package/src/components/Chart/FunnelChart.tsx +1 -2
  73. package/src/components/Chart/GaugeChart.tsx +0 -1
  74. package/src/components/Chart/HeatmapChart.tsx +0 -1
  75. package/src/components/Chart/LineChart.tsx +0 -1
  76. package/src/components/Chart/MultiAxisChart.tsx +0 -1
  77. package/src/components/Chart/PieChart.tsx +0 -1
  78. package/src/components/Chart/RadarChart.tsx +19 -13
  79. package/src/components/Chart/ScatterChart.tsx +3 -4
  80. package/src/components/Chart/TreemapChart.tsx +2 -1
  81. package/src/components/Chart/WaterfallChart.tsx +0 -2
  82. package/src/components/Chart/types.ts +12 -2
  83. package/src/components/Chart/utils.ts +4 -3
  84. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +7 -0
  85. package/src/components/DataTable/DataTable.stories.tsx +23 -16
  86. package/src/components/DataTable/DataTable.tsx +3 -3
  87. package/src/components/DatePicker/DatePicker.stories.tsx +27 -19
  88. package/src/components/Dropdown/Dropdown.stories.tsx +11 -19
  89. package/src/components/Dropdown/Dropdown.tsx +12 -9
  90. package/src/components/EdgePanel/EdgePanel.stories.tsx +1 -0
  91. package/src/components/Footer/Footer.stories.tsx +8 -6
  92. package/src/components/Footer/FooterLink.tsx +9 -2
  93. package/src/components/Footer/FooterSection.tsx +3 -3
  94. package/src/components/Form/Checkbox.stories.tsx +7 -0
  95. package/src/components/Form/Checkbox.tsx +3 -3
  96. package/src/components/Form/Form.stories.tsx +7 -0
  97. package/src/components/Form/FormGroup.stories.tsx +9 -1
  98. package/src/components/Form/Input.stories.tsx +69 -16
  99. package/src/components/Form/Input.tsx +4 -2
  100. package/src/components/Form/Radio.stories.tsx +9 -1
  101. package/src/components/Form/Radio.tsx +3 -3
  102. package/src/components/Form/Select.stories.tsx +9 -1
  103. package/src/components/Form/Select.tsx +3 -3
  104. package/src/components/Form/Textarea.stories.tsx +10 -2
  105. package/src/components/Form/Textarea.tsx +4 -2
  106. package/src/components/Hero/Hero.stories.tsx +7 -0
  107. package/src/components/List/List.stories.tsx +10 -3
  108. package/src/components/List/List.tsx +3 -3
  109. package/src/components/List/ListGroup.tsx +3 -1
  110. package/src/components/Messages/Messages.stories.tsx +8 -7
  111. package/src/components/Modal/Modal.stories.tsx +17 -6
  112. package/src/components/Modal/Modal.tsx +3 -3
  113. package/src/components/Navigation/Menu/MegaMenu.tsx +9 -3
  114. package/src/components/Navigation/Menu/Menu.stories.tsx +7 -0
  115. package/src/components/Navigation/Menu/Menu.tsx +9 -3
  116. package/src/components/Navigation/Nav/Nav.stories.tsx +7 -0
  117. package/src/components/Navigation/Navbar/Navbar.stories.tsx +1 -0
  118. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +1 -1
  119. package/src/components/Pagination/Pagination.stories.tsx +188 -111
  120. package/src/components/Pagination/Pagination.tsx +88 -7
  121. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -5
  122. package/src/components/PhotoViewer/PhotoViewerImage.tsx +2 -2
  123. package/src/components/Popover/Popover.stories.tsx +191 -115
  124. package/src/components/Popover/Popover.tsx +4 -4
  125. package/src/components/ProductReview/ProductReview.stories.tsx +80 -58
  126. package/src/components/Progress/Progress.stories.tsx +79 -49
  127. package/src/components/Progress/Progress.tsx +6 -2
  128. package/src/components/Rating/Rating.stories.tsx +109 -84
  129. package/src/components/Rating/Rating.tsx +5 -2
  130. package/src/components/River/River.stories.tsx +194 -114
  131. package/src/components/SectionIntro/SectionIntro.stories.tsx +19 -9
  132. package/src/components/Slider/Slider.stories.tsx +7 -0
  133. package/src/components/Slider/Slider.tsx +10 -9
  134. package/src/components/Spinner/Spinner.stories.tsx +15 -11
  135. package/src/components/Spinner/Spinner.tsx +3 -3
  136. package/src/components/Steps/Steps.stories.tsx +132 -98
  137. package/src/components/Tabs/Tabs.stories.tsx +163 -112
  138. package/src/components/Tabs/Tabs.tsx +3 -3
  139. package/src/components/Testimonial/Testimonial.stories.tsx +114 -68
  140. package/src/components/Todo/Todo.stories.tsx +38 -12
  141. package/src/components/Toggle/Toggle.stories.tsx +61 -28
  142. package/src/components/Tooltip/Tooltip.stories.tsx +318 -200
  143. package/src/components/Tooltip/Tooltip.tsx +3 -3
  144. package/src/components/Upload/Upload.stories.tsx +122 -84
  145. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +7 -24
  146. package/src/components/index.ts +6 -2
  147. package/src/layouts/MasonryGrid/MasonryGrid.tsx +2 -2
  148. package/src/lib/composables/useAtomixGlass.ts +2 -3
  149. package/src/lib/composables/useChartPerformance.ts +102 -78
  150. package/src/lib/composables/useChartScale.ts +10 -0
  151. package/src/lib/composables/useHero.ts +9 -2
  152. package/src/lib/composables/useHeroBackgroundSlider.ts +5 -3
  153. package/src/lib/composables/useNavbar.ts +0 -10
  154. package/src/lib/composables/useSideMenu.ts +1 -0
  155. package/src/lib/composables/useVideoPlayer.ts +3 -2
  156. package/src/lib/config/loader.ts +57 -14
  157. package/src/lib/constants/components.ts +10 -0
  158. package/src/lib/hooks/index.ts +0 -1
  159. package/src/lib/hooks/useComponentCustomization.ts +11 -15
  160. package/src/lib/hooks/usePerformanceMonitor.ts +149 -0
  161. package/src/lib/patterns/index.ts +2 -2
  162. package/src/lib/patterns/slots.tsx +2 -2
  163. package/src/lib/theme/README.md +174 -0
  164. package/src/lib/theme/adapters/index.ts +31 -0
  165. package/src/lib/theme/adapters/themeAdapter.ts +287 -0
  166. package/src/lib/theme/config/__tests__/configLoader.test.ts +207 -0
  167. package/src/lib/theme/config/configLoader.ts +254 -0
  168. package/src/lib/theme/config/loader.ts +37 -48
  169. package/src/lib/theme/config/types.ts +2 -2
  170. package/src/lib/theme/config/validator.ts +15 -91
  171. package/src/lib/theme/{constants.ts → constants/constants.ts} +0 -18
  172. package/src/lib/theme/constants/index.ts +8 -0
  173. package/src/lib/theme/core/ThemeRegistry.ts +19 -6
  174. package/src/lib/theme/core/__tests__/createTheme.test.ts +132 -0
  175. package/src/lib/theme/core/composeTheme.ts +155 -0
  176. package/src/lib/theme/core/createTheme.ts +94 -0
  177. package/src/lib/theme/{createTheme.ts → core/createThemeObject.ts} +10 -6
  178. package/src/lib/theme/core/index.ts +5 -19
  179. package/src/lib/theme/devtools/Comparator.tsx +346 -22
  180. package/src/lib/theme/devtools/IMPROVEMENTS.md +139 -38
  181. package/src/lib/theme/devtools/Inspector.tsx +335 -51
  182. package/src/lib/theme/devtools/LiveEditor.tsx +489 -112
  183. package/src/lib/theme/devtools/Preview.tsx +471 -221
  184. package/src/lib/theme/{core → devtools}/ThemeValidator.ts +6 -3
  185. package/src/lib/theme/devtools/index.ts +14 -4
  186. package/src/lib/theme/devtools/useHistory.ts +130 -0
  187. package/src/lib/theme/errors/index.ts +12 -0
  188. package/src/lib/theme/generators/cssFile.ts +79 -0
  189. package/src/lib/theme/generators/generateCSS.ts +89 -0
  190. package/src/lib/theme/{generateCSSVariables.ts → generators/generateCSSVariables.ts} +4 -14
  191. package/src/lib/theme/generators/index.ts +19 -0
  192. package/src/lib/theme/i18n/rtl.ts +7 -7
  193. package/src/lib/theme/index.ts +120 -15
  194. package/src/lib/theme/runtime/ThemeApplicator.ts +53 -95
  195. package/src/lib/theme/{ThemeContext.tsx → runtime/ThemeContext.tsx} +1 -1
  196. package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +4 -4
  197. package/src/lib/theme/runtime/ThemeProvider.tsx +456 -179
  198. package/src/lib/theme/runtime/index.ts +1 -2
  199. package/src/lib/theme/runtime/useTheme.ts +1 -2
  200. package/src/lib/theme/test/testTheme.ts +385 -0
  201. package/src/lib/theme/tokens/index.ts +12 -0
  202. package/src/lib/theme/tokens/tokens.ts +721 -0
  203. package/src/lib/theme/types.ts +6 -42
  204. package/src/lib/theme/{utils.ts → utils/domUtils.ts} +2 -2
  205. package/src/lib/theme/utils/index.ts +11 -0
  206. package/src/lib/theme/utils/injectCSS.ts +90 -0
  207. package/src/lib/theme/utils/themeHelpers.ts +78 -0
  208. package/src/lib/theme/{themeUtils.ts → utils/themeUtils.ts} +1 -1
  209. package/src/lib/theme-tools.ts +8 -9
  210. package/src/lib/types/components.ts +93 -34
  211. package/src/lib/types/partProps.ts +0 -16
  212. package/src/lib/utils/componentUtils.ts +1 -1
  213. package/src/lib/utils/fontPreloader.ts +148 -0
  214. package/src/lib/utils/index.ts +11 -0
  215. package/src/lib/utils/memoryMonitor.ts +189 -0
  216. package/src/styles/01-settings/_settings.design-tokens.scss +4 -1
  217. package/src/styles/01-settings/_settings.fonts.scss +2 -5
  218. package/src/styles/02-tools/_tools.button.scss +66 -79
  219. package/src/styles/06-components/_components.atomix-glass.scss +13 -3
  220. package/src/styles/06-components/_components.navbar.scss +0 -6
  221. package/src/styles/06-components/_components.pagination.scss +88 -0
  222. package/scripts/build-themes.js +0 -208
  223. package/scripts/sync-theme-config.js +0 -309
  224. package/src/components/AtomixGlass/atomixGLass.old.tsx +0 -1263
  225. package/src/lib/theme/composeTheme.ts +0 -370
  226. package/src/lib/theme/core/ThemeCache.ts +0 -283
  227. package/src/lib/theme/core/ThemeEngine.test.ts +0 -146
  228. package/src/lib/theme/core/ThemeEngine.ts +0 -657
  229. package/src/lib/theme/createThemeFromConfig.ts +0 -132
  230. package/src/lib/theme/devtools/CLI.ts +0 -364
  231. package/src/lib/theme/runtime/ThemeManager.test.ts +0 -192
  232. package/src/lib/theme/runtime/ThemeManager.ts +0 -442
  233. package/src/styles/03-generic/_generated-root.css +0 -5
  234. package/src/themes/README.md +0 -442
  235. package/src/themes/themes.config.js +0 -35
  236. /package/src/lib/theme/{cssVariableMapper.ts → adapters/cssVariableMapper.ts} +0 -0
  237. /package/src/lib/theme/{errors.ts → errors/errors.ts} +0 -0
package/dist/core.js ADDED
@@ -0,0 +1,3373 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+
3
+ import React, { useState, useRef, useEffect, memo, forwardRef, useId, useMemo, useCallback } from "react";
4
+
5
+ import * as PhosphorIcons from "@phosphor-icons/react";
6
+
7
+ /**
8
+ * Default theme colors for components
9
+ */
10
+ /**
11
+ * Button-specific constants
12
+ */ const BUTTON = {
13
+ BASE_CLASS: "c-btn",
14
+ ICON_CLASS: "c-btn__icon",
15
+ LABEL_CLASS: "c-btn__label",
16
+ SPINNER_CLASS: "c-btn__spinner",
17
+ VARIANT_PREFIX: "c-btn--",
18
+ CLASSES: {
19
+ BASE: "c-btn",
20
+ LOADING: "c-btn--loading",
21
+ FULL_WIDTH: "c-btn--full-width",
22
+ BLOCK: "c-btn--block",
23
+ ACTIVE: "c-btn--active",
24
+ SELECTED: "c-btn--selected"
25
+ }
26
+ }, ACCORDION = {
27
+ SELECTORS: {
28
+ ACCORDION: ".c-accordion",
29
+ HEADER: ".c-accordion__header",
30
+ PANEL: ".c-accordion__panel",
31
+ BODY: ".c-accordion__body"
32
+ },
33
+ CLASSES: {
34
+ IS_OPEN: "is-open",
35
+ IS_ANIMATING: "is-animating",
36
+ IS_DISABLED: "is-disabled"
37
+ },
38
+ ATTRIBUTES: {
39
+ ARIA_EXPANDED: "aria-expanded",
40
+ ARIA_CONTROLS: "aria-controls",
41
+ ARIA_HIDDEN: "aria-hidden",
42
+ ROLE: "role"
43
+ },
44
+ CSS_VARS: {
45
+ PANEL_HEIGHT: "--panel-height"
46
+ }
47
+ }, LIST = {
48
+ BASE_CLASS: "c-list",
49
+ ITEM_CLASS: "c-list__item",
50
+ VARIANT_PREFIX: "c-list--",
51
+ SIZE_PREFIX: "c-list--",
52
+ CLASSES: {
53
+ ORDERED: "c-list--ordered",
54
+ INLINE: "c-list--inline"
55
+ }
56
+ }, LIST_GROUP = {
57
+ BASE_CLASS: "c-list-group",
58
+ ITEM_CLASS: "c-list-group__item",
59
+ VARIANT_PREFIX: "c-list-group--",
60
+ SIZE_PREFIX: "c-list-group--"
61
+ }, BREADCRUMB = {
62
+ SELECTORS: {
63
+ BREADCRUMB: ".c-breadcrumb",
64
+ ITEM: ".c-breadcrumb__item",
65
+ LINK: ".c-breadcrumb__link"
66
+ },
67
+ CLASSES: {
68
+ BASE: "c-breadcrumb",
69
+ ITEM: "c-breadcrumb__item",
70
+ LINK: "c-breadcrumb__link",
71
+ ACTIVE: "is-active"
72
+ },
73
+ DEFAULTS: {
74
+ DIVIDER: "›"
75
+ }
76
+ }, CARD = {
77
+ SELECTORS: {
78
+ CARD: ".c-card",
79
+ HEADER: ".c-card__header",
80
+ BODY: ".c-card__body",
81
+ IMAGE: ".c-card__image",
82
+ TITLE: ".c-card__title",
83
+ TEXT: ".c-card__text",
84
+ ACTIONS: ".c-card__actions",
85
+ ICON: ".c-card__icon",
86
+ FOOTER: ".c-card__footer"
87
+ },
88
+ CLASSES: {
89
+ BASE: "c-card",
90
+ // Size modifiers
91
+ SM: "c-card--sm",
92
+ MD: "c-card--md",
93
+ LG: "c-card--lg",
94
+ // Layout modifiers
95
+ ROW: "c-card--row",
96
+ FLAT: "c-card--flat",
97
+ // Appearance modifiers
98
+ FILLED: "c-card--filled",
99
+ OUTLINED: "c-card--outlined",
100
+ GHOST: "c-card--ghost",
101
+ ELEVATED: "c-card--elevated",
102
+ // Elevation modifiers
103
+ ELEVATION_NONE: "c-card--elevation-none",
104
+ ELEVATION_SM: "c-card--elevation-sm",
105
+ ELEVATION_MD: "c-card--elevation-md",
106
+ ELEVATION_LG: "c-card--elevation-lg",
107
+ ELEVATION_XL: "c-card--elevation-xl",
108
+ // State modifiers
109
+ ACTIVE: "is-active",
110
+ DISABLED: "c-card--disabled",
111
+ LOADING: "c-card--loading",
112
+ SELECTED: "c-card--selected",
113
+ INTERACTIVE: "c-card--interactive",
114
+ // Other modifiers
115
+ FLIPPED: "is-flipped",
116
+ FOCUSED: "is-focused",
117
+ CLICKABLE: "is-clickable",
118
+ GLASS: "c-card--glass"
119
+ },
120
+ DEFAULTS: {
121
+ HOVER: !0,
122
+ SIZE: "md",
123
+ VARIANT: "primary",
124
+ APPEARANCE: "filled",
125
+ ELEVATION: "none"
126
+ }
127
+ }, BLOCK = {
128
+ BASE_CLASS: "o-block",
129
+ SPACING_PREFIX: "o-block--",
130
+ CLASSES: {
131
+ SPACING_XS: "o-block--xs",
132
+ SPACING_SM: "o-block--sm",
133
+ SPACING_MD: "o-block--md",
134
+ SPACING_LG: "o-block--lg",
135
+ SPACING_XL: "o-block--xl",
136
+ SPACING_NONE: "o-block--no-spacing",
137
+ FULL_WIDTH: "o-block--full-width",
138
+ BG_PRIMARY: "o-block--primary",
139
+ BG_SECONDARY: "o-block--secondary",
140
+ BG_TERTIARY: "o-block--tertiary",
141
+ BG_INVERT: "o-block--invert",
142
+ BG_BRAND: "o-block--brand",
143
+ BG_ERROR: "o-block--error",
144
+ BG_SUCCESS: "o-block--success",
145
+ BG_WARNING: "o-block--warning",
146
+ BG_INFO: "o-block--info",
147
+ BG_LIGHT: "o-block--light",
148
+ BG_DARK: "o-block--dark"
149
+ },
150
+ SPACING: {
151
+ SIZES: [ "xs", "sm", "md", "lg", "xl", "none" ],
152
+ DEFAULT: "md"
153
+ }
154
+ }, ATOMIX_GLASS = {
155
+ BASE_CLASS: "c-atomix-glass",
156
+ CONTAINER_CLASS: "c-atomix-glass__container",
157
+ INNER_CLASS: "c-atomix-glass__inner",
158
+ FILTER_CLASS: "c-atomix-glass__filter",
159
+ FILTER_OVERLAY_CLASS: "c-atomix-glass__filter-overlay",
160
+ FILTER_SHADOW_CLASS: "c-atomix-glass__filter-shadow",
161
+ CONTENT_CLASS: "c-atomix-glass__content",
162
+ BORDER_1_CLASS: "c-atomix-glass__border-1",
163
+ BORDER_2_CLASS: "c-atomix-glass__border-2",
164
+ HOVER_1_CLASS: "c-atomix-glass__hover-1",
165
+ HOVER_2_CLASS: "c-atomix-glass__hover-2",
166
+ HOVER_3_CLASS: "c-atomix-glass__hover-3",
167
+ BASE_LAYER_CLASS: "c-atomix-glass__base",
168
+ OVERLAY_LAYER_CLASS: "c-atomix-glass__overlay",
169
+ OVERLAY_HIGHLIGHT_CLASS: "c-atomix-glass__overlay-highlight",
170
+ BACKGROUND_LAYER_CLASS: "c-atomix-glass__background-layer",
171
+ BACKGROUND_LAYER_DARK_CLASS: "c-atomix-glass__background-layer--dark",
172
+ BACKGROUND_LAYER_BLACK_CLASS: "c-atomix-glass__background-layer--black",
173
+ BACKGROUND_LAYER_OVER_LIGHT_CLASS: "c-atomix-glass__background-layer--over-light",
174
+ BACKGROUND_LAYER_HIDDEN_CLASS: "c-atomix-glass__background-layer--hidden",
175
+ VARIANT_PREFIX: "c-atomix-glass--",
176
+ MODE_PREFIX: "c-atomix-glass--",
177
+ CLASSES: {
178
+ BASE: "c-atomix-glass",
179
+ CONTAINER: "c-atomix-glass__container",
180
+ INNER: "c-atomix-glass__inner",
181
+ FILTER: "c-atomix-glass__filter",
182
+ CONTENT: "c-atomix-glass__content",
183
+ ACTIVE: "active",
184
+ OVER_LIGHT: "c-atomix-glass__container--over-light",
185
+ // Mode variants
186
+ STANDARD: "c-atomix-glass--standard",
187
+ POLAR: "c-atomix-glass--polar",
188
+ PROMINENT: "c-atomix-glass--prominent",
189
+ SHADER: "c-atomix-glass--shader"
190
+ },
191
+ DEFAULTS: {
192
+ DISPLACEMENT_SCALE: 20,
193
+ BLUR_AMOUNT: 1,
194
+ SATURATION: 140,
195
+ ABERRATION_INTENSITY: 2.5,
196
+ ELASTICITY: .05,
197
+ CORNER_RADIUS: 16,
198
+ // Default border-radius matching design system
199
+ PADDING: "0 0",
200
+ MODE: "standard",
201
+ OVER_LIGHT: !1,
202
+ ENABLE_OVER_LIGHT_LAYERS: !0
203
+ },
204
+ CONSTANTS: {
205
+ ACTIVATION_ZONE: 200,
206
+ MIN_BLUR: .1,
207
+ MOUSE_INFLUENCE_DIVISOR: 100,
208
+ EDGE_FADE_PIXELS: 2,
209
+ DEFAULT_CORNER_RADIUS: 16,
210
+ // Fallback value matching design system
211
+ MAX_SIZE: 4096,
212
+ // Maximum width/height for glass size
213
+ // Gradient calculation constants
214
+ GRADIENT: {
215
+ BASE_ANGLE: 135,
216
+ // Base angle for border gradients (degrees)
217
+ ANGLE_MULTIPLIER: 1.2,
218
+ // Multiplier for mouse influence on angle
219
+ BORDER_STOP_1: {
220
+ MIN: 10,
221
+ // Minimum percentage for border stop 1
222
+ BASE: 33,
223
+ // Base percentage for border stop 1
224
+ MULTIPLIER: .3
225
+ },
226
+ BORDER_STOP_2: {
227
+ MAX: 90,
228
+ // Maximum percentage for border stop 2
229
+ BASE: 66,
230
+ // Base percentage for border stop 2
231
+ MULTIPLIER: .4
232
+ },
233
+ BORDER_OPACITY: {
234
+ BASE_1: .12,
235
+ // Base opacity for border gradient 1
236
+ BASE_2: .4,
237
+ // Base opacity for border gradient 2
238
+ BASE_3: .32,
239
+ // Base opacity for border gradient 3
240
+ BASE_4: .6,
241
+ // Base opacity for border gradient 4
242
+ MULTIPLIER_LOW: .008,
243
+ // Low multiplier for mouse influence on opacity
244
+ MULTIPLIER_HIGH: .012
245
+ },
246
+ CENTER_POSITION: 50,
247
+ // Center position percentage (50%)
248
+ HOVER_POSITION: {
249
+ DIVISOR_1: 2,
250
+ // Divisor for hover 1 position calculation
251
+ DIVISOR_2: 1.5,
252
+ // Divisor for hover 2 position calculation
253
+ MULTIPLIER_3: 1
254
+ },
255
+ BASE_LAYER_MULTIPLIER: .5
256
+ },
257
+ // Gradient opacity values for hover effects
258
+ GRADIENT_OPACITY: {
259
+ HOVER_1: {
260
+ BLACK_START: .3,
261
+ // Start opacity for black hover 1
262
+ BLACK_MID: .1,
263
+ // Mid opacity for black hover 1
264
+ BLACK_STOP: 30,
265
+ // Stop percentage for black hover 1
266
+ BLACK_END: 60,
267
+ // End percentage for black hover 1
268
+ WHITE_START: .5,
269
+ // Start opacity for white hover 1
270
+ WHITE_STOP: 50
271
+ },
272
+ HOVER_2: {
273
+ BLACK_START: .4,
274
+ // Start opacity for black hover 2
275
+ BLACK_MID: .15,
276
+ // Mid opacity for black hover 2
277
+ BLACK_STOP: 40,
278
+ // Stop percentage for black hover 2
279
+ BLACK_END: 80,
280
+ // End percentage for black hover 2
281
+ WHITE_START: 1,
282
+ // Start opacity for white hover 2
283
+ WHITE_STOP: 80
284
+ },
285
+ HOVER_3: {
286
+ BLACK_START: .5,
287
+ // Start opacity for black hover 3
288
+ BLACK_MID: .2,
289
+ // Mid opacity for black hover 3
290
+ BLACK_STOP: 50,
291
+ // Stop percentage for black hover 3
292
+ BLACK_END: 100,
293
+ // End percentage for black hover 3
294
+ WHITE_START: 1,
295
+ // Start opacity for white hover 3
296
+ WHITE_STOP: 100
297
+ }
298
+ },
299
+ // Base and overlay gradient constants
300
+ BASE_GRADIENT: {
301
+ ANGLE: 135,
302
+ // Gradient angle in degrees
303
+ BLACK_START_BASE: .15,
304
+ // Base start opacity for black
305
+ BLACK_START_MULTIPLIER: .003,
306
+ // Multiplier for mouse X influence on start
307
+ BLACK_MID_BASE: .1,
308
+ // Base mid opacity for black
309
+ BLACK_MID_MULTIPLIER: .002,
310
+ // Multiplier for mouse Y influence on mid
311
+ BLACK_MID_STOP: 50,
312
+ // Mid stop percentage
313
+ BLACK_END_BASE: .18,
314
+ // Base end opacity for black
315
+ BLACK_END_MULTIPLIER: .004,
316
+ // Multiplier for mouse X influence on end
317
+ WHITE_OPACITY: .1
318
+ },
319
+ OVERLAY_GRADIENT: {
320
+ BLACK_START_BASE: .12,
321
+ // Base start opacity for black overlay
322
+ BLACK_START_MULTIPLIER: .003,
323
+ // Multiplier for mouse X influence on start
324
+ BLACK_MID: .06,
325
+ // Mid opacity for black overlay
326
+ BLACK_MID_STOP: 40,
327
+ // Mid stop percentage
328
+ BLACK_END_BASE: .15,
329
+ // Base end opacity for black overlay
330
+ BLACK_END_MULTIPLIER: .003,
331
+ // Multiplier for mouse Y influence on end
332
+ WHITE_OPACITY: .05
333
+ },
334
+ // Overlay highlight constants
335
+ OVERLAY_HIGHLIGHT: {
336
+ POSITION_X: 20,
337
+ // X position percentage
338
+ POSITION_Y: 20,
339
+ // Y position percentage
340
+ WHITE_OPACITY: .4,
341
+ // White opacity in gradient
342
+ STOP: 60,
343
+ // Stop percentage
344
+ OPACITY_MULTIPLIER: .7
345
+ },
346
+ // Displacement and aberration multipliers
347
+ MULTIPLIERS: {
348
+ SHADER_DISPLACEMENT: .8,
349
+ // Displacement scale multiplier for shader mode
350
+ OVER_LIGHT_DISPLACEMENT: .6,
351
+ // Displacement scale multiplier for over-light mode
352
+ SHADER_ABERRATION: .7
353
+ },
354
+ // Saturation constants
355
+ SATURATION: {
356
+ HIGH_CONTRAST: 200
357
+ }
358
+ }
359
+ }, {CONSTANTS: CONSTANTS$1} = ATOMIX_GLASS, calculateDistance = (pos1, pos2) => {
360
+ if (!pos1 || !pos2 || "number" != typeof pos1.x || "number" != typeof pos1.y || "number" != typeof pos2.x || "number" != typeof pos2.y) return 0;
361
+ const deltaX = pos1.x - pos2.x, deltaY = pos1.y - pos2.y;
362
+ return Math.sqrt(deltaX * deltaX + deltaY * deltaY);
363
+ }, calculateElementCenter = rect => rect ? {
364
+ x: rect.left + rect.width / 2,
365
+ y: rect.top + rect.height / 2
366
+ } : {
367
+ x: 0,
368
+ y: 0
369
+ }, calculateMouseInfluence = mouseOffset => {
370
+ if (!mouseOffset || "number" != typeof mouseOffset.x || "number" != typeof mouseOffset.y) return 0;
371
+ // More responsive calculation for overlight effects
372
+ const influence = Math.sqrt(mouseOffset.x * mouseOffset.x + mouseOffset.y * mouseOffset.y) / CONSTANTS$1.MOUSE_INFLUENCE_DIVISOR;
373
+ return Math.min(1.5, influence);
374
+ // Cap influence for better control
375
+ }, clampBlur = value => "number" != typeof value || isNaN(value) ? CONSTANTS$1.MIN_BLUR : Math.max(CONSTANTS$1.MIN_BLUR, Math.min(50, value)), validateGlassSize = size => size && "number" == typeof size.width && "number" == typeof size.height && size.width > 0 && size.height > 0 && size.width <= CONSTANTS$1.MAX_SIZE && size.height <= CONSTANTS$1.MAX_SIZE, parseBorderRadiusValue = value => {
376
+ if ("number" == typeof value) return Math.max(0, value);
377
+ if ("string" != typeof value || !value.trim()) return CONSTANTS$1.DEFAULT_CORNER_RADIUS;
378
+ const trimmedValue = value.trim();
379
+ // Handle px values
380
+ if (trimmedValue.endsWith("px")) {
381
+ const parsed = parseFloat(trimmedValue);
382
+ return isNaN(parsed) ? CONSTANTS$1.DEFAULT_CORNER_RADIUS : Math.max(0, parsed);
383
+ }
384
+ // Handle rem values (assume 16px = 1rem)
385
+ if (trimmedValue.endsWith("rem")) {
386
+ const parsed = parseFloat(trimmedValue);
387
+ return isNaN(parsed) ? CONSTANTS$1.DEFAULT_CORNER_RADIUS : Math.max(0, 16 * parsed);
388
+ }
389
+ // Handle em values (assume 16px = 1em for simplicity)
390
+ if (trimmedValue.endsWith("em")) {
391
+ const parsed = parseFloat(trimmedValue);
392
+ return isNaN(parsed) ? CONSTANTS$1.DEFAULT_CORNER_RADIUS : Math.max(0, 16 * parsed);
393
+ }
394
+ // Handle percentage (convert to approximate px value, assuming 200px container)
395
+ if (trimmedValue.endsWith("%")) {
396
+ const parsed = parseFloat(trimmedValue);
397
+ return isNaN(parsed) ? CONSTANTS$1.DEFAULT_CORNER_RADIUS : Math.max(0, parsed / 100 * 200);
398
+ }
399
+ // Handle unitless numbers
400
+ const numValue = parseFloat(trimmedValue);
401
+ return isNaN(numValue) ? CONSTANTS$1.DEFAULT_CORNER_RADIUS : Math.max(0, numValue);
402
+ }, extractBorderRadiusFromElement = element => {
403
+ if (!element || !element.props) return null;
404
+ // Check inline styles first (highest priority)
405
+ if (element.props.style) {
406
+ const radiusFromStyle = (style => {
407
+ if (!style) return null;
408
+ // Check various border-radius properties
409
+ const borderRadius = style.borderRadius || style.borderTopLeftRadius || style.borderTopRightRadius || style.borderBottomLeftRadius || style.borderBottomRightRadius;
410
+ return void 0 !== borderRadius ? parseBorderRadiusValue(borderRadius) : null;
411
+ })(element.props.style);
412
+ if (null !== radiusFromStyle && radiusFromStyle > 0) return radiusFromStyle;
413
+ }
414
+ // If element has children, recursively check them
415
+ if (element.props.children) {
416
+ const childRadius = extractBorderRadiusFromChildren(element.props.children);
417
+ if (childRadius > 0 && childRadius !== CONSTANTS$1.DEFAULT_CORNER_RADIUS) return childRadius;
418
+ }
419
+ return null;
420
+ }, extractBorderRadiusFromChildren = children => {
421
+ if (!children) return CONSTANTS$1.DEFAULT_CORNER_RADIUS;
422
+ try {
423
+ const childArray = React.Children.toArray(children);
424
+ for (let i = 0; i < childArray.length; i++) {
425
+ const child = childArray[i];
426
+ if ( React.isValidElement(child)) {
427
+ const radius = extractBorderRadiusFromElement(child);
428
+ if (null !== radius) return radius;
429
+ }
430
+ }
431
+ } catch (error) {
432
+ // Silently handle errors
433
+ }
434
+ return CONSTANTS$1.DEFAULT_CORNER_RADIUS;
435
+ }, getDisplacementMap = (mode, displacementMap, polarDisplacementMap, prominentDisplacementMap, shaderMapUrl) => {
436
+ switch (mode) {
437
+ case "standard":
438
+ return displacementMap;
439
+
440
+ case "polar":
441
+ return polarDisplacementMap;
442
+
443
+ case "prominent":
444
+ return prominentDisplacementMap;
445
+
446
+ case "shader":
447
+ return shaderMapUrl || displacementMap;
448
+
449
+ default:
450
+ return console.warn("AtomixGlass: Invalid displacement mode"), displacementMap;
451
+ }
452
+ }, GlassFilterComponent = ({id: id, displacementScale: displacementScale, aberrationIntensity: aberrationIntensity, mode: mode, shaderMapUrl: shaderMapUrl, blurAmount: blurAmount}) => jsx("svg", {
453
+ style: {
454
+ position: "absolute",
455
+ width: "100%",
456
+ height: "100%",
457
+ inset: 0
458
+ },
459
+ "aria-hidden": "true",
460
+ suppressHydrationWarning: !0,
461
+ children: jsxs("defs", {
462
+ children: [ jsxs("radialGradient", {
463
+ id: `${id}-edge-mask`,
464
+ cx: "50%",
465
+ cy: "50%",
466
+ r: "50%",
467
+ children: [ jsx("stop", {
468
+ offset: "0%",
469
+ stopColor: "black",
470
+ stopOpacity: "0"
471
+ }), jsx("stop", {
472
+ offset: `${Math.max(30, 80 - 2 * aberrationIntensity)}%`,
473
+ stopColor: "black",
474
+ stopOpacity: "0"
475
+ }), jsx("stop", {
476
+ offset: "100%",
477
+ stopColor: "white",
478
+ stopOpacity: "1"
479
+ }) ]
480
+ }), jsxs("filter", {
481
+ id: id,
482
+ x: "-35%",
483
+ y: "-35%",
484
+ width: "170%",
485
+ height: "170%",
486
+ colorInterpolationFilters: "sRGB",
487
+ children: [ jsx("feImage", {
488
+ id: "feimage",
489
+ x: "0",
490
+ y: "0",
491
+ width: "100%",
492
+ height: "100%",
493
+ result: "DISPLACEMENT_MAP",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aaaVVVVVdWc5znVq1NNttttttttttNNKqqqqudWc5znVq16tbbbbbbbbbbTTSqqqq5XVnOc6tWrVrb1tttttttttNNKqqqqrWrK5VWmmm2230bbbbbbaaaXOc5zlVa1KuVVppptttt9G22222mmlzlVznK6tWVVWmmmm2222222222mlznOc5znLWppVVWmmm22222229bTWrOc5znOcq1qaaVpWmm222222229erVqznOc5znKtatStK0rTbTTbbbberXr1as5znOc5aVpppppWlabaabbbb1ta9WrVnOc5znU0rTTTTTTTTTbTTbbbTWvVq1as5znOdTTStNNNNNNNNNtNNtttN6tWvVq1ZznOrU00rTTTTTTTTTTTTTbTWvVq1atWrOc6tTTTStNNNNNNNNNNtNNtNa9WrVq1Z1Z1NNNNNK1q1NNNNNNNNNNNtNatWrVq1atWrU00000rWrVq1atWrVq1alaaa1atWrVq1NNNammmmla1atWrVq1aterVq16tWrVnVqa1NK1qaaaVX/xAAWEAADAAAAAAAAAAAAAAAAAAAhgJD/2gAIAQEAAz8AaExf/8QAGhEBAQEBAQEBAAAAAAAAAAAAAQISEQADEP/aAAgBAgEBAgDx48ePHjx48ePHjx48ePHjx48ePHjx48ePHj86IiIiIiInjx48ePHjx48IiIiIj0oooooooooRERER73ve60UUUUUUVrWiiiiiihERERER73ve97ooooorRWiiiiihKERERER73ve973RRRRWtFFFFFFCIiIiIiPe973ve60UUVrRRRRRRQiIlCIiI973ve973pRRWiiiiiiiiiiiiiiihEe973ve973RRWtFFFFFFFFFFFFFFFFFFa13ve973WitaKKKKKKKKKKKKKKKKKK1rWtd1rutFa1oooooooooooosssooorWta1rWta1rRRRRRRRRRRZZZZZZZZZWta1rWta1rRRRRRRRRZZZZZZZZZZZZe9a1rWta1rWitaKLLLLLLLLLLLLLLLLL3rWta1rWtFbLLLLLLLLLLLLLLLLLLLL3vWta1rWita1ssssssss+hZZZZZZZZe961rWta0Vre97LLLLLLLLLLLPoWWWWWXrWta1oorWta3ssss+hZZZZ9Cyyyyyyyyiita1orWta1ve9llllllllllllllllFFa0VorWta1ve9llllllllllllllllllFFFaK1rWta1rWiyyyyyyyyyyyyiiiiiiitFFa1rWta1oosoosssssoooosoooorRRRWta1rWta0UUUUUWUUUUUUUUUUUVoooorWta1rWtaKKKKKKmiiiiiiiiiiiiiiitd73ve61oSiiipoqaKKKKKKKKKK0UUUVrve973vREREZoSihEooooorRRRRWtd73ve9EREREREoSiiiiitFllllla73ve9ERERERESiiiiiitH0PoWWWWVrXe96IiIiMoiJRRRRRRWjwlFFllllFFd6IiIiIlCUUUUUUUUUePHjx48ePCIiIiIiIiUUUUUUUUUUUePHjx48ePHjx48ePHjx48IiUUUUUUJRRRX//xAAWEQADAAAAAAAAAAAAAAAAAAABYJD/2gAIAQIBAz8AtEV7/8QAFxEBAQEBAAAAAAAAAAAAAAAAAAECEP/aAAgBAwEBAgCtNNNNNNNNNNNNNNNNNNNNNNNNNNNNNcrTTTTTTTTTTTTTTTTTTTTTTTTTTTTTXKrTTTTTTTU000000000000000000001FVpppppqampqaaaaaaaaaaaaaaaaaaaa5Vaaaaampqampqammmmmmmmmmmlaaaaaaiq0001NTU1NTU1NTTTTTTTTTTSqqtNNNcqtNNSyzU1LNTU1NTTTTTTTTTSqqq001ytNLLLLNTU1NTU1NTbbbTTTTTSqqq001ytNLLLLLNTU1NTU3NttttNNNNNKqq001KrSyyyyyzU1NTU3Nzc02220000qqqqrSqqyyyyyzU1NTU3Nzc3NttttNNNKqqqqqqssssss1NTU3Nzc3NzbbbbTTTSqqqqqqrLLLLLNTU1Nzc3Nzc22220000qqqqqqqqssss1NTU3Nzc3NzbbbbbTTSqqqqqqqqqqzU1NTc3Nzc3Nzbc22000qqqqqqqqqqqtTU3Nzc3Nzc3NtzbTTSqqqqrKqqqqqtNNzc23Nzc3Nzc3NTU1KqqqrKqqqqqtNNNNttzc3Nzc3NzU1NLLLLLKqqqqqqqq0022223Nzc3NzU1NSyyyyyyqqqqqqqrTTbbbbc3Nzc3NTU1LLLLLLKsqqqqqqrTTTTbbbc3Nzc1NTUsssssssqqqqqqrTTTTTbbbTc3NTU1NTUsssssqqqqqqqq0000222023NTU1NTUsssssqqqqqqqq000000003NTU1NTU1LLLLLNKrTSqqqqtNNNNNNtNNTU1NSzUssss00qq0qqqqrTTTTTTTTTU1NTUs1LLLNNNKrTTTSqqq00000000001NTU1LNTU0000qtNNNKqqqtNNNNNNNNTU1NTUs1NNNNNKss1NNNK00qtK0000001NNTU0s000000qq000001NKrStNNNNK1NNNNStNNNNNKqtNNNNNNNK0000000rU0000rTTTTTSq00000rTTTTTTTTTTTTTTTTStNNNNKr/xAAUEQEAAAAAAAAAAAAAAAAAAACg/9oACAEDAQM/AAAf/9k=", "data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/2wCEAAYEBAQFBAYFBQYJBgUGCQsIBgYICwwKCgsKCgwQDAwMDAwMEAwODxAPDgwTExQUExMcGxsbHB8fHx8fHx8fHx8BBwcHDQwNGBAQGBoVERUaHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fH//CABEIAQABAAMBEQACEQEDEQH/xAAxAAADAQEBAAAAAAAAAAAAAAABAgMABAcBAAMBAQEBAAAAAAAAAAAAAAIDBAEABQb/2gAMAwEAAhADEAAAAPG/tfu93bu3bs7d27t3bu2du7d27h3bs3du7d27t3bc3du7d27tvbu3du7d27T3E+2du05u7tm7O2cM7d2zt3Du2YOzbw7N3bcHZt7dm3tvbeO9u7dx3d3Ht3cS05pzd24dOds0Z2HdnDsGdswdg7hw7cHYNzbg3NvbcO9izbx3TvbtPae09pLTmnCObh3ZuHcO4eGcM4ZgzB2DhHYOEbg0QWbcxZtzFmLjvEuO6e07p4jmsWnCOERIiWHcO4NA8M4DwzBmLgjsXRHCNEEI0QQ4sxZjwlxLjvEtPa2keJuJt04bCREsJECw6A3BoHFHhmKIrmLwjQXRGgpCCHEIMcWE8x4S1i4lraR7W02wnIiJsJkTIFg3AWXoHgGqGAcXBTBXhXgXQUgBAD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SIkQhJLMxppjGUUUMYxtvd1NNNCJJESIQklmY0xjKKKKKGMbb3dTTTRJJJJJIhJLMxpjGUUUUUUMbb3dTTQiSSSSSRCSWZjTTGUUUUUUMbb3dTTRJJJJJJJIklmY0xjKKKKKKKG293U005JJJJJJJEkksaaaaoooooooobbb3U05JJJJJJJJEkksaaZRRRRRRRRQ223uppySSSSSSSSIQkNNMoooooooooptt7qackkkkkEEkiEksGmqKKLLKLKKKbbe6mnJJJBBBBJJKSSxpplFFFllllFFNtvdTTkkkggggkklJZjTTVFFFlllllFDbe6mnLkggggggkkSzGmUUUUWWWWWUUU291NOSSCCCCCCSRLMaaZRRRZZZZZRRTb3U5ckkEEEEEEkpLMaaaoossssssop0291OXJBBBBBBBBKSzGmMossssssssp0291OXJBBBzOZBBBKlZjTVFFllllllllOm3upy5cEEHM5kEEEqVmNNUUWWWWdCyyynTb1NOXLggg5nMggglSvGmUqLLOhZ0LLLKdNm6nLgggg5nMggglSsxpqlRZZ0Oh0OhZZTpt7qcuHBzOZzOZzOZBKleNNUUWWdDodDodCynQxmy5cEHM5n/xAAUEQEAAAAAAAAAAAAAAAAAAACg/9oACAEDAQM/AAAf/9k=", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAABVXElEQVR4nO19aZasPKxkuE5toffS+1/YR/8AS6GQZAxZd3qvffJQtjEe5AgNQGaN//N/caZxAAAODFyZsnLcnZIGz47UiVVeNeWpWDlmJbhILW8rv7oaYBz4SpWS+ZJKuwofHMeVH8DXoFMjVHpmXFdJpR1zzRipWFUiVYJaIlVCLpynQO0fHRE7uQ5Vg/JUUQl8TfyeoAXGzJyVI1aemVGdSg24WXtEPKYLdWJ0lQ4HHOdnIKdjzLP04eGsZ+4csbeDelukY3XyfVqO6Ts6ciWdGtyIQKOfajAjlXVneAL1HCCYpzGy1O9xn4fDI/RLe6r6YhxkqKECes0BaZBwoFgHXZV4pVBrRufKg4U1LzHckwwSYSrQBy2ANh1RSkXL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5RkmFoUx49e8u3mVmrf8dPjAG0yBONQJV8mAknoUuJ9RLWi093eTkogAr6R5NnGrAv1BV5uNoIdOgvcc8dpqMGA4jFhgOQtW9z4OsZ+hPuFaZxbYJmXXhnK6hB6FzmNisXRUVJWaygjyYvNBhdO+5xhCHWKWC0JEMcLngXCTFlXh2bHRHZtcviCv0LUzAU7rmBXZgdHqRmjzjwZYU1+iFnIzSv8x3uqfE6AJCeCw7QxOSGVS4O6Bxorv5XYca9laN3PBImlGAfG5/uqplYR3plzjBu5GYIfZZLCtbAL++LtUfeePa3YUC+BJF1ueewlg0OfG2if3HLv7ztYy06p1+BHpkgp6R/bhNQ14e2Tgm5JUotvXOq1gn0NPBKued71nTgrrq47u4DENe/at5CXyBuxYiSwu1pnB8sjED3QIDn0+Oer7plgp4t3Z5tDrTvAt2jP6G5gG/VRvtnPlg2Xj5AmUgMmSoI66Eqp4iDjM9R5Tdp0Hb0KN1duIZ+bmbFGy8oje5GgM6KSbFKvxcUQbwIAJSWPRPUI0qAfsoBeg6wg34beqRT0qDBU6Ea44gLxZ9H58oho4ojVM1s0IcbqGFBmyQ+KVq+Rn9zuTr9ff+q++PaWy9IGkSgG7aYe/ePqBamIBu6xruTznWI5egLDnwxGs4/Ye97bpQhKZJqv7/7GfkgF+rEBGfCVWZCTPnOjwxnPWcyxAqtLMZanXyfSv/Hz46iWQl6ryEc6KdaQ3440BkBh1qeRon4sTqGC2liNQdGdUra0xL+H/kMAsbYr+iHAAAAAElFTkSuQmCC", shaderMapUrl),
495
+ preserveAspectRatio: "xMidYMid slice"
496
+ }), jsx("feColorMatrix", {
497
+ in: "DISPLACEMENT_MAP",
498
+ type: "matrix",
499
+ values: "0.3 0.3 0.3 0 0\n 0.3 0.3 0.3 0 0\n 0.3 0.3 0.3 0 0\n 0 0 0 1 0",
500
+ result: "EDGE_INTENSITY"
501
+ }), jsx("feComponentTransfer", {
502
+ in: "EDGE_INTENSITY",
503
+ result: "EDGE_MASK",
504
+ children: jsx("feFuncA", {
505
+ type: "discrete",
506
+ tableValues: `0 ${.05 * aberrationIntensity} 1`
507
+ })
508
+ }), jsx("feOffset", {
509
+ in: "SourceGraphic",
510
+ dx: "0",
511
+ dy: "0",
512
+ result: "CENTER_ORIGINAL"
513
+ }), jsx("feDisplacementMap", {
514
+ in: "SourceGraphic",
515
+ in2: "DISPLACEMENT_MAP",
516
+ scale: displacementScale * ("shader" === mode ? 1 : -1),
517
+ xChannelSelector: "R",
518
+ yChannelSelector: "B",
519
+ result: "RED_DISPLACED"
520
+ }), jsx("feColorMatrix", {
521
+ in: "RED_DISPLACED",
522
+ type: "matrix",
523
+ values: "1 0 0 0 0\n 0 0 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0",
524
+ result: "RED_CHANNEL"
525
+ }), jsx("feDisplacementMap", {
526
+ in: "SourceGraphic",
527
+ in2: "DISPLACEMENT_MAP",
528
+ scale: displacementScale * (("shader" === mode ? 1 : -1) - .02 * aberrationIntensity),
529
+ xChannelSelector: "R",
530
+ yChannelSelector: "B",
531
+ result: "GREEN_DISPLACED"
532
+ }), jsx("feColorMatrix", {
533
+ in: "GREEN_DISPLACED",
534
+ type: "matrix",
535
+ values: "0 0 0 0 0\n 0 1 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0",
536
+ result: "GREEN_CHANNEL"
537
+ }), jsx("feDisplacementMap", {
538
+ in: "SourceGraphic",
539
+ in2: "DISPLACEMENT_MAP",
540
+ scale: displacementScale * (("shader" === mode ? 1 : -1) - .03 * aberrationIntensity),
541
+ xChannelSelector: "R",
542
+ yChannelSelector: "B",
543
+ result: "BLUE_DISPLACED"
544
+ }), jsx("feColorMatrix", {
545
+ in: "BLUE_DISPLACED",
546
+ type: "matrix",
547
+ values: "0 0 0 0 0\n 0 0 0 0 0\n 0 0 1 0 0\n 0 0 0 1 0",
548
+ result: "BLUE_CHANNEL"
549
+ }), jsx("feBlend", {
550
+ in: "GREEN_CHANNEL",
551
+ in2: "BLUE_CHANNEL",
552
+ mode: "screen",
553
+ result: "GB_COMBINED"
554
+ }), jsx("feBlend", {
555
+ in: "RED_CHANNEL",
556
+ in2: "GB_COMBINED",
557
+ mode: "screen",
558
+ result: "RGB_COMBINED"
559
+ }), jsx("feGaussianBlur", {
560
+ in: "RGB_COMBINED",
561
+ result: "ABERRATED_BLURRED",
562
+ stdDeviation: blurAmount * aberrationIntensity * .05
563
+ }), jsx("feComposite", {
564
+ in: "ABERRATED_BLURRED",
565
+ in2: "EDGE_MASK",
566
+ operator: "in",
567
+ result: "EDGE_ABERRATION"
568
+ }), jsx("feComponentTransfer", {
569
+ in: "EDGE_MASK",
570
+ result: "INVERTED_MASK",
571
+ children: jsx("feFuncA", {
572
+ type: "table",
573
+ tableValues: "1 0"
574
+ })
575
+ }), jsx("feComposite", {
576
+ in: "CENTER_ORIGINAL",
577
+ in2: "INVERTED_MASK",
578
+ operator: "in",
579
+ result: "CENTER_CLEAN"
580
+ }), jsx("feComposite", {
581
+ in: "EDGE_ABERRATION",
582
+ in2: "CENTER_CLEAN",
583
+ operator: "over"
584
+ }) ]
585
+ }) ]
586
+ })
587
+ });
588
+
589
+ /**
590
+ * Accordion-specific constants
591
+ */ GlassFilterComponent.displayName = "GlassFilter";
592
+
593
+ // Memoize component to prevent unnecessary re-renders
594
+ const GlassFilter = memo(GlassFilterComponent, ((prevProps, nextProps) => prevProps.id === nextProps.id && prevProps.displacementScale === nextProps.displacementScale && prevProps.aberrationIntensity === nextProps.aberrationIntensity && prevProps.mode === nextProps.mode && prevProps.shaderMapUrl === nextProps.shaderMapUrl && prevProps.blurAmount === nextProps.blurAmount)), sharedShaderCache = new Map, AtomixGlassContainer = forwardRef((({children: children, className: className = "", style: style, displacementScale: displacementScale = 25, blurAmount: blurAmount = .0625, saturation: saturation = 180, aberrationIntensity: aberrationIntensity = 2, mouseOffset: mouseOffset = {
595
+ x: 0,
596
+ y: 0
597
+ }, globalMousePosition: globalMousePosition = {
598
+ x: 0,
599
+ y: 0
600
+ }, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp, active: active = !1, isHovered: isHovered = !1, isActive: isActive = !1, overLight: overLight = !1, cornerRadius: cornerRadius = 0, padding: padding = "0 0", glassSize: glassSize = {
601
+ width: 0,
602
+ height: 0
603
+ }, onClick: onClick, mode: mode = "standard", effectiveDisableEffects: effectiveDisableEffects = !1, effectiveReducedMotion: effectiveReducedMotion = !1, shaderVariant: shaderVariant = "liquidGlass", enableLiquidBlur: enableLiquidBlur = !1, elasticity: elasticity = 0, contentRef: contentRef}, ref) => {
604
+ // Generate a stable, deterministic ID for SSR compatibility
605
+ // React's useId() should produce the same ID on server and client for the same
606
+ // component position in the tree. We use useState to ensure the ID is only
607
+ // generated once and remains stable across renders.
608
+ const baseId = useId(), [filterId] = useState((() => `atomix-glass-filter-${baseId.replace(/:/g, "-").replace(/^[^a-z]/i, "atomix-")}`)), [shaderMapUrl, setShaderMapUrl] = useState(""), shaderGeneratorRef = useRef(null), shaderUtilsRef = useRef(null), shaderDebounceTimeoutRef = useRef(null);
609
+ // Lazy load shader utilities only when shader mode is needed
610
+ useEffect((() => {
611
+ "shader" === mode ?
612
+ // Dynamic import shader utilities
613
+ Promise.resolve().then((() => shaderUtils)).then((shaderUtils => {
614
+ shaderUtilsRef.current = {
615
+ ShaderDisplacementGenerator: shaderUtils.ShaderDisplacementGenerator,
616
+ fragmentShaders: shaderUtils.fragmentShaders
617
+ };
618
+ })).catch((error => {
619
+ console.warn("AtomixGlassContainer: Error loading shader utilities", error);
620
+ })) :
621
+ // Clear shader utils when not in shader mode to free memory
622
+ shaderUtilsRef.current = null;
623
+ }), [ mode ]),
624
+ // Generate shader map with debouncing and caching
625
+ useEffect((() => {
626
+ // Enhanced validation for shader mode
627
+ if ("shader" === mode && glassSize && validateGlassSize(glassSize) && shaderUtilsRef.current) {
628
+ // Create cache key from size and variant
629
+ const cacheKey = `${glassSize.width}x${glassSize.height}-${shaderVariant}`, cachedUrl = (key => {
630
+ const entry = sharedShaderCache.get(key);
631
+ return entry ? (
632
+ // Update access timestamp for LRU
633
+ entry.timestamp = Date.now(), entry.url) : null;
634
+ })(cacheKey);
635
+ // Check shared cache first
636
+ if (cachedUrl) return void setShaderMapUrl(cachedUrl);
637
+ // Clear any pending debounce
638
+ shaderDebounceTimeoutRef.current && clearTimeout(shaderDebounceTimeoutRef.current);
639
+ // Debounce shader generation to avoid blocking on rapid size changes
640
+ const generateShader = () => {
641
+ if (shaderUtilsRef.current) try {
642
+ const {ShaderDisplacementGenerator: ShaderDisplacementGenerator, fragmentShaders: fragmentShaders} = shaderUtilsRef.current;
643
+ shaderGeneratorRef.current?.destroy();
644
+ const selectedShader = fragmentShaders[shaderVariant] || fragmentShaders.liquidGlass;
645
+ shaderGeneratorRef.current = new ShaderDisplacementGenerator({
646
+ width: glassSize.width,
647
+ height: glassSize.height,
648
+ fragment: selectedShader
649
+ });
650
+ // Use requestIdleCallback if available for non-blocking generation
651
+ const generate = () => {
652
+ const url = shaderGeneratorRef.current?.updateShader() || "";
653
+ ((key, url) => {
654
+ // Evict oldest entries if at capacity
655
+ if (sharedShaderCache.size >= 15) {
656
+ const entries = Array.from(sharedShaderCache.entries());
657
+ // Sort by timestamp (oldest first)
658
+ entries.sort(((a, b) => a[1].timestamp - b[1].timestamp));
659
+ // Remove oldest entry
660
+ const oldestEntry = entries[0];
661
+ oldestEntry && sharedShaderCache.delete(oldestEntry[0]);
662
+ }
663
+ sharedShaderCache.set(key, {
664
+ url: url,
665
+ timestamp: Date.now()
666
+ }),
667
+ // Development mode: log cache size
668
+ "production" !== process.env.NODE_ENV && sharedShaderCache.size;
669
+ })(cacheKey, url), setShaderMapUrl(url);
670
+ };
671
+ "undefined" != typeof requestIdleCallback ? requestIdleCallback(generate, {
672
+ timeout: 1e3
673
+ }) :
674
+ // Fallback to setTimeout for browsers without requestIdleCallback
675
+ setTimeout(generate, 0);
676
+ } catch (error) {
677
+ console.warn("AtomixGlassContainer: Error generating shader map", error), setShaderMapUrl("");
678
+ } else
679
+ // Shader utils not loaded yet, retry after a short delay
680
+ shaderDebounceTimeoutRef.current = setTimeout(generateShader, 100);
681
+ };
682
+ // Debounce with 300ms delay
683
+ shaderDebounceTimeoutRef.current = setTimeout(generateShader, 300);
684
+ } else
685
+ // Not in shader mode, clear URL
686
+ setShaderMapUrl("");
687
+ // Cleanup function with error handling
688
+ return () => {
689
+ shaderDebounceTimeoutRef.current && (clearTimeout(shaderDebounceTimeoutRef.current),
690
+ shaderDebounceTimeoutRef.current = null);
691
+ try {
692
+ shaderGeneratorRef.current?.destroy();
693
+ } catch (error) {
694
+ console.warn("AtomixGlassContainer: Error during shader cleanup", error);
695
+ } finally {
696
+ shaderGeneratorRef.current = null;
697
+ }
698
+ };
699
+ }), [ mode, glassSize, shaderVariant ]);
700
+ // Removed forced reflow to avoid layout thrash and potential feedback sizing loops
701
+ const [rectCache, setRectCache] = useState(null);
702
+ useEffect((() => {
703
+ if (!ref || "function" == typeof ref) return;
704
+ const element = ref.current;
705
+ if (element) try {
706
+ setRectCache(element.getBoundingClientRect());
707
+ } catch (error) {
708
+ console.warn("AtomixGlassContainer: Error getting element bounds", error), setRectCache(null);
709
+ }
710
+ }), [ ref, glassSize ]);
711
+ // Pre-calculate static multipliers outside useMemo
712
+ const liquidBlur = useMemo((() => {
713
+ const defaultBlur = {
714
+ baseBlur: blurAmount,
715
+ edgeBlur: 1.25 * blurAmount,
716
+ centerBlur: 1.1 * blurAmount,
717
+ flowBlur: 1.2 * blurAmount
718
+ };
719
+ // Enhanced validation for liquid blur
720
+ if (!enableLiquidBlur || !rectCache || !globalMousePosition || "number" != typeof globalMousePosition.x || "number" != typeof globalMousePosition.y || isNaN(globalMousePosition.x) || isNaN(globalMousePosition.y)) return defaultBlur;
721
+ try {
722
+ // Cache center and distance calculations
723
+ const center = calculateElementCenter(rectCache), distance = calculateDistance(globalMousePosition, center), maxDistance = Math.sqrt(rectCache.width * rectCache.width + rectCache.height * rectCache.height) / 2, normalizedDistance = Math.min(distance / maxDistance, 1), mouseInfluence = calculateMouseInfluence(mouseOffset), baseBlur = blurAmount + mouseInfluence * blurAmount * .4, edgeBlur = baseBlur * (.8 + .6 * (1.5 * normalizedDistance + .3 * mouseInfluence)), centerBlur = baseBlur * (.3 + .4 * (.3 * (1 - normalizedDistance) + .2 * mouseInfluence)), deltaX = globalMousePosition.x - center.x, deltaY = globalMousePosition.y - center.y, flowDirection = Math.atan2(deltaY, deltaX), flowBlur = baseBlur * (.4 + .6 * (.5 * Math.sin(flowDirection + mouseInfluence * Math.PI) + .5)), stateMultiplier = (isHovered ? 1.2 : 1) * (isActive ? 1.4 : 1);
724
+ return {
725
+ baseBlur: clampBlur(baseBlur * stateMultiplier),
726
+ edgeBlur: clampBlur(edgeBlur * stateMultiplier),
727
+ centerBlur: clampBlur(centerBlur * stateMultiplier),
728
+ flowBlur: clampBlur(flowBlur * stateMultiplier)
729
+ };
730
+ } catch (error) {
731
+ return console.warn("AtomixGlassContainer: Error calculating liquid blur", error),
732
+ defaultBlur;
733
+ }
734
+ }), [ enableLiquidBlur, blurAmount, globalMousePosition, mouseOffset, isHovered, isActive, rectCache, style, glassSize ]), backdropStyle = useMemo((() => {
735
+ try {
736
+ const dynamicSaturation = saturation + 20 * (liquidBlur.baseBlur || 0), validatedBaseBlur = "number" != typeof liquidBlur.baseBlur || isNaN(liquidBlur.baseBlur) ? 0 : liquidBlur.baseBlur, validatedEdgeBlur = "number" != typeof liquidBlur.edgeBlur || isNaN(liquidBlur.edgeBlur) ? 0 : liquidBlur.edgeBlur, validatedCenterBlur = "number" != typeof liquidBlur.centerBlur || isNaN(liquidBlur.centerBlur) ? 0 : liquidBlur.centerBlur, validatedFlowBlur = "number" != typeof liquidBlur.flowBlur || isNaN(liquidBlur.flowBlur) ? 0 : liquidBlur.flowBlur, area = rectCache ? rectCache.width * rectCache.height : 0;
737
+ // Validate blur values before using them
738
+ return !enableLiquidBlur || effectiveReducedMotion || effectiveDisableEffects || area > 18e4 ? {
739
+ backdropFilter: `blur(${clampBlur(Math.max(validatedBaseBlur, .8 * validatedEdgeBlur, 1.1 * validatedCenterBlur, .9 * validatedFlowBlur))}px) saturate(${Math.min(dynamicSaturation, 200)}%) contrast(1.05) brightness(1.05)`
740
+ } : {
741
+ backdropFilter: `${[ `blur(${validatedBaseBlur}px)`, `blur(${validatedEdgeBlur}px)`, `blur(${validatedCenterBlur}px)`, `blur(${validatedFlowBlur}px)` ].join(" ")} saturate(${Math.min(dynamicSaturation, 200)}%) contrast(1.05) brightness(1.05)`
742
+ };
743
+ // Single-pass fallback: stronger radius to match perceived blur of multi-pass
744
+ } catch (error) {
745
+ return console.warn("AtomixGlassContainer: Error calculating backdrop style", error),
746
+ {
747
+ backdropFilter: `blur(${blurAmount}px) saturate(${saturation}%) contrast(1.05) brightness(1.05)`
748
+ };
749
+ }
750
+ }), [ filterId, liquidBlur, saturation, blurAmount, rectCache, effectiveReducedMotion, effectiveDisableEffects, enableLiquidBlur ]), containerVars = useMemo((() => {
751
+ try {
752
+ // Safe extraction of mouse offset values
753
+ const mx = mouseOffset && "number" == typeof mouseOffset.x && !isNaN(mouseOffset.x) ? mouseOffset.x : 0, my = mouseOffset && "number" == typeof mouseOffset.y && !isNaN(mouseOffset.y) ? mouseOffset.y : 0;
754
+ return {
755
+ "--atomix-glass-container-width": `${glassSize?.width}`,
756
+ "--atomix-glass-container-height": `${glassSize?.height}`,
757
+ "--atomix-glass-container-padding": padding || "0 0",
758
+ "--atomix-glass-container-radius": `${"number" != typeof cornerRadius || isNaN(cornerRadius) ? 0 : cornerRadius}px`,
759
+ "--atomix-glass-container-backdrop": backdropStyle?.backdropFilter || "none",
760
+ "--atomix-glass-container-shadow": overLight ? [ `inset 0 1px 0 rgba(255, 255, 255, ${.4 + .002 * mx})`, `inset 0 -1px 0 rgba(0, 0, 0, ${.2 + .001 * Math.abs(my)})`, `inset 0 0 20px rgba(0, 0, 0, ${.08 + .001 * Math.abs(mx + my)})`, `0 2px 12px rgba(0, 0, 0, ${.12 + .002 * Math.abs(my)})` ].join(", ") : "0 0 20px rgba(0, 0, 0, 0.15) inset, 0 4px 8px rgba(0, 0, 0, 0.08) inset",
761
+ "--atomix-glass-container-shadow-opacity": effectiveDisableEffects ? 0 : 1,
762
+ // Background and shadow values use design token-aligned RGB values
763
+ "--atomix-glass-container-bg": overLight ? `linear-gradient(${180 + .5 * mx}deg, rgba(255, 255, 255, 0.1) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.05) 100%)` : "none",
764
+ "--atomix-glass-container-text-shadow": overLight ? "0px 2px 12px rgba(0, 0, 0, 0)" : "0px 2px 12px rgba(0, 0, 0, 0.4)",
765
+ "--atomix-glass-container-box-shadow": overLight ? "0px 16px 70px rgba(0, 0, 0, 0.75)" : "0px 12px 40px rgba(0, 0, 0, 0.25)"
766
+ };
767
+ } catch (error) {
768
+ return console.warn("AtomixGlassContainer: Error generating container variables", error),
769
+ {
770
+ "--atomix-glass-container-padding": "0 0",
771
+ "--atomix-glass-container-radius": "0px",
772
+ "--atomix-glass-container-backdrop": "none",
773
+ "--atomix-glass-container-shadow": "none",
774
+ "--atomix-glass-container-shadow-opacity": 1,
775
+ "--atomix-glass-container-bg": "none",
776
+ "--atomix-glass-container-text-shadow": "none"
777
+ };
778
+ }
779
+ }), [ glassSize, padding, cornerRadius, backdropStyle, mouseOffset, overLight, effectiveDisableEffects ]);
780
+ return jsx("div", {
781
+ ref: ref,
782
+ className: `${ATOMIX_GLASS.CONTAINER_CLASS} ${className} ${active ? ATOMIX_GLASS.CLASSES.ACTIVE : ""} ${overLight ? ATOMIX_GLASS.CLASSES.OVER_LIGHT : ""}`,
783
+ style: {
784
+ ...style,
785
+ ...containerVars
786
+ },
787
+ onClick: onClick,
788
+ children: jsxs("div", {
789
+ className: ATOMIX_GLASS.INNER_CLASS,
790
+ style: {
791
+ padding: "var(--atomix-glass-container-padding)",
792
+ boxShadow: "var(--atomix-glass-container-box-shadow)"
793
+ },
794
+ onMouseEnter: onMouseEnter,
795
+ onMouseLeave: onMouseLeave,
796
+ onMouseDown: onMouseDown,
797
+ onMouseUp: onMouseUp,
798
+ children: [ jsxs("div", {
799
+ className: ATOMIX_GLASS.FILTER_CLASS,
800
+ children: [ jsx(GlassFilter, {
801
+ blurAmount: blurAmount,
802
+ mode: mode,
803
+ id: filterId,
804
+ displacementScale: "number" != typeof displacementScale || isNaN(displacementScale) ? 0 : displacementScale,
805
+ aberrationIntensity: "number" != typeof aberrationIntensity || isNaN(aberrationIntensity) ? 0 : aberrationIntensity,
806
+ shaderMapUrl: shaderMapUrl
807
+ }), jsx("div", {
808
+ className: ATOMIX_GLASS.FILTER_OVERLAY_CLASS,
809
+ suppressHydrationWarning: !0,
810
+ style: {
811
+ filter: `url(#${filterId})`,
812
+ backdropFilter: "var(--atomix-glass-container-backdrop)",
813
+ borderRadius: "var(--atomix-glass-container-radius)"
814
+ }
815
+ }), jsx("div", {
816
+ className: ATOMIX_GLASS.FILTER_SHADOW_CLASS,
817
+ style: {
818
+ boxShadow: "var(--atomix-glass-container-shadow)",
819
+ opacity: "var(--atomix-glass-container-shadow-opacity)",
820
+ background: "var(--atomix-glass-container-bg)",
821
+ borderRadius: "var(--atomix-glass-container-radius)"
822
+ }
823
+ }) ]
824
+ }), jsx("div", {
825
+ ref: contentRef,
826
+ className: ATOMIX_GLASS.CONTENT_CLASS,
827
+ style: {
828
+ position: "relative",
829
+ textShadow: "var(--atomix-glass-container-text-shadow)",
830
+ ...elasticity > 0 ? {
831
+ zIndex: 100
832
+ } : {}
833
+ },
834
+ children: children
835
+ }) ]
836
+ })
837
+ });
838
+ }));
839
+
840
+ // Module-level shared shader cache with LRU eviction
841
+ AtomixGlassContainer.displayName = "AtomixGlassContainer";
842
+
843
+ // Singleton instance
844
+ const globalMouseTracker = new
845
+ /**
846
+ * Global mouse tracker singleton
847
+ * Tracks mouse position at document level and distributes to subscribers
848
+ * Reduces event processing overhead when multiple AtomixGlass instances are present
849
+ */
850
+ class {
851
+ constructor() {
852
+ this.listeners = new Set, this.position = {
853
+ x: 0,
854
+ y: 0
855
+ }, this.rafId = null, this.lastEvent = null, this.isTracking = !1,
856
+ /**
857
+ * Handle mouse move event
858
+ */
859
+ this.handleMouseMove = e => {
860
+ this.lastEvent = e,
861
+ // Use requestAnimationFrame to throttle updates
862
+ null === this.rafId && (this.rafId = requestAnimationFrame((() => {
863
+ this.lastEvent && (this.position = {
864
+ x: this.lastEvent.clientX,
865
+ y: this.lastEvent.clientY
866
+ },
867
+ // Notify all subscribers
868
+ this.listeners.forEach((callback => {
869
+ try {
870
+ callback(this.position);
871
+ } catch (error) {
872
+ console.error("GlobalMouseTracker: Error in subscriber callback", error);
873
+ }
874
+ }))), this.rafId = null;
875
+ })));
876
+ };
877
+ }
878
+ /**
879
+ * Subscribe to mouse position updates
880
+ * @param callback Function to call when mouse position changes
881
+ * @returns Unsubscribe function
882
+ */ subscribe(callback) {
883
+ // Return unsubscribe function
884
+ return this.listeners.add(callback),
885
+ // Start tracking if this is the first subscriber
886
+ 1 === this.listeners.size && this.startTracking(),
887
+ // Immediately notify with current position
888
+ callback(this.position), () => {
889
+ this.unsubscribe(callback);
890
+ };
891
+ }
892
+ /**
893
+ * Unsubscribe from mouse position updates
894
+ */ unsubscribe(callback) {
895
+ this.listeners.delete(callback),
896
+ // Stop tracking if no more subscribers
897
+ 0 === this.listeners.size && this.stopTracking();
898
+ }
899
+ /**
900
+ * Start tracking mouse movement
901
+ */ startTracking() {
902
+ this.isTracking || (this.isTracking = !0,
903
+ // Use document-level listener for global tracking
904
+ document.addEventListener("mousemove", this.handleMouseMove, {
905
+ passive: !0
906
+ }));
907
+ }
908
+ /**
909
+ * Stop tracking mouse movement
910
+ */ stopTracking() {
911
+ this.isTracking && (this.isTracking = !1, document.removeEventListener("mousemove", this.handleMouseMove),
912
+ // Cancel any pending RAF
913
+ null !== this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = null), this.lastEvent = null);
914
+ }
915
+ /**
916
+ * Get current mouse position (synchronous)
917
+ */ getPosition() {
918
+ return {
919
+ ...this.position
920
+ };
921
+ }
922
+ /**
923
+ * Get number of active subscribers (for debugging)
924
+ */ getSubscriberCount() {
925
+ return this.listeners.size;
926
+ }
927
+ }, {CONSTANTS: CONSTANTS} = ATOMIX_GLASS, backgroundDetectionCache = new WeakMap, setCachedBackgroundDetection = (parentElement, overLightConfig, result, threshold) => {
928
+ parentElement && backgroundDetectionCache.set(parentElement, {
929
+ result: result,
930
+ timestamp: Date.now(),
931
+ config: overLightConfig,
932
+ threshold: threshold
933
+ });
934
+ };
935
+
936
+ /**
937
+ * Composable hook for AtomixGlass component logic
938
+ * Manages all state, calculations, and event handlers
939
+ */
940
+ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadius: cornerRadius, globalMousePosition: externalGlobalMousePosition, mouseOffset: externalMouseOffset, mouseContainer: mouseContainer, overLight: overLight = ATOMIX_GLASS.DEFAULTS.OVER_LIGHT, reducedMotion: reducedMotion = !1, highContrast: highContrast = !1, disableEffects: disableEffects = !1, elasticity: elasticity = .05, onClick: onClick, debugCornerRadius: debugCornerRadius = !1, debugOverLight: debugOverLight = !1, enablePerformanceMonitoring: enablePerformanceMonitoring = !1, children: children}) {
941
+ // State
942
+ const [isHovered, setIsHovered] = useState(!1), [isActive, setIsActive] = useState(!1), [glassSize, setGlassSize] = useState({
943
+ width: 270,
944
+ height: 69
945
+ }), [internalGlobalMousePosition, setInternalGlobalMousePosition] = useState({
946
+ x: 0,
947
+ y: 0
948
+ }), [internalMouseOffset, setInternalMouseOffset] = useState({
949
+ x: 0,
950
+ y: 0
951
+ }), [dynamicCornerRadius, setDynamicCornerRadius] = useState(CONSTANTS.DEFAULT_CORNER_RADIUS), [userPrefersReducedMotion, setUserPrefersReducedMotion] = useState(!1), [userPrefersHighContrast, setUserPrefersHighContrast] = useState(!1), [detectedOverLight, setDetectedOverLight] = useState(!1), effectiveCornerRadius = useMemo((() => void 0 !== cornerRadius ? Math.max(0, cornerRadius) : Math.max(0, dynamicCornerRadius)), [ cornerRadius, dynamicCornerRadius, debugCornerRadius ]), effectiveReducedMotion = useMemo((() => reducedMotion || userPrefersReducedMotion), [ reducedMotion, userPrefersReducedMotion ]), effectiveHighContrast = useMemo((() => highContrast || userPrefersHighContrast), [ highContrast, userPrefersHighContrast ]), effectiveDisableEffects = useMemo((() => disableEffects || effectiveReducedMotion), [ disableEffects, effectiveReducedMotion ]), globalMousePosition = useMemo((() => externalGlobalMousePosition || internalGlobalMousePosition), [ externalGlobalMousePosition, internalGlobalMousePosition ]), mouseOffset = useMemo((() => externalMouseOffset || internalMouseOffset), [ externalMouseOffset, internalMouseOffset ]);
952
+ // Extract border-radius from children
953
+ useEffect((() => {
954
+ const extractRadius = () => {
955
+ try {
956
+ let extractedRadius = null, extractionSource = "default";
957
+ if (contentRef.current) {
958
+ const firstChild = contentRef.current.firstElementChild;
959
+ if (firstChild) {
960
+ const domRadius = (element => {
961
+ if (!element || "undefined" == typeof window) return null;
962
+ try {
963
+ const computedStyles = window.getComputedStyle(element), borderRadius = computedStyles.borderRadius || computedStyles.borderTopLeftRadius || computedStyles.borderTopRightRadius || computedStyles.borderBottomLeftRadius || computedStyles.borderBottomRightRadius;
964
+ if (borderRadius && "0px" !== borderRadius && "auto" !== borderRadius) {
965
+ const parsed = parseBorderRadiusValue(borderRadius);
966
+ return parsed > 0 ? parsed : null;
967
+ }
968
+ return null;
969
+ } catch (error) {
970
+ return null;
971
+ }
972
+ })(firstChild);
973
+ null !== domRadius && domRadius > 0 && (extractedRadius = domRadius, extractionSource = "DOM element");
974
+ }
975
+ }
976
+ if (null === extractedRadius) {
977
+ const childRadius = extractBorderRadiusFromChildren(children);
978
+ childRadius > 0 && childRadius !== CONSTANTS.DEFAULT_CORNER_RADIUS && (extractedRadius = childRadius,
979
+ extractionSource = "React children");
980
+ }
981
+ null !== extractedRadius && extractedRadius > 0 ? setDynamicCornerRadius(extractedRadius) : process.env.NODE_ENV;
982
+ } catch (error) {
983
+ "production" !== process.env.NODE_ENV && debugCornerRadius && console.error("[AtomixGlass] Error extracting corner radius:", error);
984
+ }
985
+ };
986
+ extractRadius();
987
+ const timeoutId = setTimeout(extractRadius, 100);
988
+ return () => clearTimeout(timeoutId);
989
+ }), [ children, debugCornerRadius, contentRef ]),
990
+ // Media query handlers and background detection
991
+ useEffect((() => {
992
+ if (("auto" === overLight || "object" == typeof overLight && null !== overLight) && glassRef.current) {
993
+ const element = glassRef.current, cachedResult = ((parentElement, overLightConfig) => {
994
+ if (!parentElement) return null;
995
+ const cached = backgroundDetectionCache.get(parentElement);
996
+ return cached && ((config1, config2) => {
997
+ // Primitive comparison for boolean and 'auto'
998
+ if ("object" != typeof config1 || null === config1) return config1 === config2;
999
+ // Both must be objects at this point
1000
+ if ("object" != typeof config2 || null === config2) return !1;
1001
+ const obj1 = config1, obj2 = config2, props = [ "threshold", "opacity", "contrast", "brightness", "saturationBoost" ];
1002
+ for (const prop of props) {
1003
+ const val1 = obj1[prop], val2 = obj2[prop];
1004
+ // If both are undefined, they're equal for this property
1005
+ if (void 0 !== val1 || void 0 !== val2) {
1006
+ // If one is undefined and the other isn't, they're different
1007
+ if (void 0 === val1 || void 0 === val2) return !1;
1008
+ // Compare numeric values (handle NaN and floating point precision)
1009
+ if ("number" == typeof val1 && "number" == typeof val2) {
1010
+ // Use Number.isNaN for proper NaN comparison
1011
+ if (Number.isNaN(val1) && Number.isNaN(val2)) continue;
1012
+ if (Number.isNaN(val1) || Number.isNaN(val2)) return !1;
1013
+ // Compare with small epsilon for floating point numbers
1014
+ if (Math.abs(val1 - val2) > Number.EPSILON) return !1;
1015
+ } else if (val1 !== val2) return !1;
1016
+ }
1017
+ }
1018
+ return !0;
1019
+ })(cached.config, overLightConfig) ? (
1020
+ // Update timestamp for LRU-like behavior (though WeakMap doesn't support LRU)
1021
+ cached.timestamp = Date.now(), cached.result) : null;
1022
+ })(element.parentElement, overLight);
1023
+ if (null !== cachedResult) return void setDetectedOverLight(cachedResult);
1024
+ const timeoutId = setTimeout((() => {
1025
+ try {
1026
+ if (!element) return void setDetectedOverLight(!1);
1027
+ // Validate window context
1028
+ if ("undefined" == typeof window || "function" != typeof window.getComputedStyle) return void setDetectedOverLight(!1);
1029
+ let totalLuminance = 0, validSamples = 0, hasValidBackground = !1, currentElement = element.parentElement, depth = 0;
1030
+ const maxDepth = 20, maxSamples = 10;
1031
+ // Limit traversal depth to prevent infinite loops and performance issues
1032
+ for (;currentElement && validSamples < maxSamples && depth < maxDepth; ) {
1033
+ try {
1034
+ const computedStyle = window.getComputedStyle(currentElement);
1035
+ if (!computedStyle) {
1036
+ currentElement = currentElement.parentElement, depth++;
1037
+ continue;
1038
+ }
1039
+ const bgColor = computedStyle.backgroundColor, bgImage = computedStyle.backgroundImage;
1040
+ // Check for solid color backgrounds
1041
+ if (bgColor && "rgba(0, 0, 0, 0)" !== bgColor && "transparent" !== bgColor && "initial" !== bgColor && "none" !== bgColor) {
1042
+ const rgb = bgColor.match(/\d+/g);
1043
+ if (rgb && rgb.length >= 3) {
1044
+ const r = Number(rgb[0]), g = Number(rgb[1]), b = Number(rgb[2]);
1045
+ // Validate RGB values are valid numbers
1046
+ if (!isNaN(r) && !isNaN(g) && !isNaN(b) && isFinite(r) && isFinite(g) && isFinite(b) && r >= 0 && r <= 255 && g >= 0 && g <= 255 && b >= 0 && b <= 255 && (r > 10 || g > 10 || b > 10)) {
1047
+ const luminance = (.299 * r + .587 * g + .114 * b) / 255;
1048
+ !isNaN(luminance) && isFinite(luminance) && (totalLuminance += luminance, validSamples++,
1049
+ hasValidBackground = !0);
1050
+ }
1051
+ }
1052
+ }
1053
+ // Check for image backgrounds
1054
+ bgImage && "none" !== bgImage && "initial" !== bgImage && (
1055
+ // For image backgrounds, assume medium luminance
1056
+ totalLuminance += .5, validSamples++, hasValidBackground = !0);
1057
+ } catch (styleError) {
1058
+ process.env.NODE_ENV;
1059
+ }
1060
+ // Move to parent element for next iteration
1061
+ if (!currentElement) break;
1062
+ // Exit loop if currentElement becomes null
1063
+ currentElement = currentElement.parentElement, depth++;
1064
+ }
1065
+ // More conservative detection with better error handling
1066
+ if (hasValidBackground && validSamples > 0) {
1067
+ const avgLuminance = totalLuminance / validSamples;
1068
+ if (!isNaN(avgLuminance) && isFinite(avgLuminance)) {
1069
+ let threshold = .7;
1070
+ // Conservative threshold for overlight
1071
+ // If overLight is an object, use its threshold property with validation
1072
+ if ("object" == typeof overLight && null !== overLight) {
1073
+ const objConfig = overLight;
1074
+ if (void 0 !== objConfig.threshold) {
1075
+ const configThreshold = "number" == typeof objConfig.threshold && !isNaN(objConfig.threshold) && isFinite(objConfig.threshold) ? objConfig.threshold : .7;
1076
+ threshold = Math.min(.9, Math.max(.1, configThreshold));
1077
+ }
1078
+ }
1079
+ const isOverLightDetected = avgLuminance > threshold;
1080
+ // Cache the result in shared cache
1081
+ setCachedBackgroundDetection(element.parentElement, overLight, isOverLightDetected, threshold),
1082
+ setDetectedOverLight(isOverLightDetected);
1083
+ } else {
1084
+ // Invalid luminance calculation, default to false
1085
+ const result = !1, threshold = "object" == typeof overLight && null !== overLight && overLight.threshold || .7;
1086
+ setCachedBackgroundDetection(element.parentElement, overLight, result, threshold),
1087
+ setDetectedOverLight(result);
1088
+ }
1089
+ } else {
1090
+ // Default to false if no valid background found
1091
+ const result = !1, threshold = "object" == typeof overLight && null !== overLight && overLight.threshold || .7;
1092
+ setCachedBackgroundDetection(element.parentElement, overLight, result, threshold),
1093
+ setDetectedOverLight(result);
1094
+ }
1095
+ } catch (error) {
1096
+ // Enhanced error logging with context
1097
+ "development" === process.env.NODE_ENV && console.warn("AtomixGlass: Error detecting background brightness:", error);
1098
+ const result = !1;
1099
+ if (element && element.parentElement) {
1100
+ const threshold = "object" == typeof overLight && null !== overLight && overLight.threshold || .7;
1101
+ setCachedBackgroundDetection(element.parentElement, overLight, result, threshold);
1102
+ }
1103
+ setDetectedOverLight(result);
1104
+ }
1105
+ }), 150);
1106
+ return () => clearTimeout(timeoutId);
1107
+ }
1108
+ if ("boolean" == typeof overLight &&
1109
+ // For boolean values, disable auto-detection
1110
+ // Cache is automatically managed by WeakMap (no manual clearing needed)
1111
+ setDetectedOverLight(!1), "function" == typeof window.matchMedia) try {
1112
+ const mediaQueryReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)"), mediaQueryHighContrast = window.matchMedia("(prefers-contrast: high)");
1113
+ setUserPrefersReducedMotion(mediaQueryReducedMotion.matches), setUserPrefersHighContrast(mediaQueryHighContrast.matches);
1114
+ const handleReducedMotionChange = e => {
1115
+ setUserPrefersReducedMotion(e.matches);
1116
+ }, handleHighContrastChange = e => {
1117
+ setUserPrefersHighContrast(e.matches);
1118
+ };
1119
+ return mediaQueryReducedMotion.addEventListener ? (mediaQueryReducedMotion.addEventListener("change", handleReducedMotionChange),
1120
+ mediaQueryHighContrast.addEventListener("change", handleHighContrastChange)) : mediaQueryReducedMotion.addListener && (mediaQueryReducedMotion.addListener(handleReducedMotionChange),
1121
+ mediaQueryHighContrast.addListener(handleHighContrastChange)), () => {
1122
+ try {
1123
+ mediaQueryReducedMotion.removeEventListener ? (mediaQueryReducedMotion.removeEventListener("change", handleReducedMotionChange),
1124
+ mediaQueryHighContrast.removeEventListener("change", handleHighContrastChange)) : mediaQueryReducedMotion.removeListener && (mediaQueryReducedMotion.removeListener(handleReducedMotionChange),
1125
+ mediaQueryHighContrast.removeListener(handleHighContrastChange));
1126
+ } catch (cleanupError) {
1127
+ console.error("AtomixGlass: Error cleaning up media query listeners:", cleanupError);
1128
+ }
1129
+ };
1130
+ } catch (error) {
1131
+ return void console.error("AtomixGlass: Error setting up media queries:", error);
1132
+ }
1133
+ }), [ overLight, glassRef, debugOverLight ]);
1134
+ // Mouse tracking using shared global tracker
1135
+ // Cache bounding rect to avoid repeated getBoundingClientRect calls
1136
+ const cachedRectRef = useRef(null), updateRectRef = useRef(null), handleGlobalMousePosition = useCallback((globalPos => {
1137
+ if (externalGlobalMousePosition && externalMouseOffset)
1138
+ // External mouse position provided, skip internal tracking
1139
+ return;
1140
+ if (effectiveDisableEffects) return;
1141
+ const container = mouseContainer?.current || glassRef.current;
1142
+ if (!container) return;
1143
+ enablePerformanceMonitoring && performance.now();
1144
+ // Use cached rect if available, otherwise get new one
1145
+ let rect = cachedRectRef.current;
1146
+ if (rect && 0 !== rect.width && 0 !== rect.height || (rect = container.getBoundingClientRect(),
1147
+ cachedRectRef.current = rect), 0 === rect.width || 0 === rect.height) return;
1148
+ const center = calculateElementCenter(rect), newOffset = {
1149
+ x: (globalPos.x - center.x) / rect.width * 100,
1150
+ y: (globalPos.y - center.y) / rect.height * 100
1151
+ };
1152
+ // Calculate offset relative to this container
1153
+ // React 18 automatically batches these updates
1154
+ setInternalMouseOffset(newOffset), setInternalGlobalMousePosition(globalPos), "production" !== process.env.NODE_ENV && enablePerformanceMonitoring && performance.now();
1155
+ }), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects, enablePerformanceMonitoring ]);
1156
+ // Subscribe to shared mouse tracker
1157
+ useEffect((() => {
1158
+ if (externalGlobalMousePosition && externalMouseOffset)
1159
+ // External mouse position provided, don't subscribe
1160
+ return;
1161
+ if (effectiveDisableEffects)
1162
+ // Effects disabled, don't subscribe
1163
+ return;
1164
+ // Subscribe to shared tracker
1165
+ const unsubscribe = globalMouseTracker.subscribe(handleGlobalMousePosition), container = mouseContainer?.current || glassRef.current;
1166
+ // Update cached rect when container size changes
1167
+ let resizeObserver = null;
1168
+ return container && "undefined" != typeof ResizeObserver && (resizeObserver = new ResizeObserver((() => {
1169
+ null !== updateRectRef.current && cancelAnimationFrame(updateRectRef.current), updateRectRef.current = requestAnimationFrame((() => {
1170
+ const container = mouseContainer?.current || glassRef.current;
1171
+ container && (cachedRectRef.current = container.getBoundingClientRect()), updateRectRef.current = null;
1172
+ }));
1173
+ })), resizeObserver.observe(container)), () => {
1174
+ unsubscribe(), null !== updateRectRef.current && (cancelAnimationFrame(updateRectRef.current),
1175
+ updateRectRef.current = null), resizeObserver && resizeObserver.disconnect();
1176
+ };
1177
+ }), [ handleGlobalMousePosition, mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects ]);
1178
+ // Transform calculations
1179
+ const calculateDirectionalScale = useCallback((() => {
1180
+ if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return "scale(1)";
1181
+ const rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect), deltaX = globalMousePosition.x - center.x, deltaY = globalMousePosition.y - center.y, edgeDistanceX = Math.max(0, Math.abs(deltaX) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(deltaY) - glassSize.height / 2), edgeDistance = calculateDistance({
1182
+ x: edgeDistanceX,
1183
+ y: edgeDistanceY
1184
+ }, {
1185
+ x: 0,
1186
+ y: 0
1187
+ });
1188
+ if (edgeDistance > CONSTANTS.ACTIVATION_ZONE) return "scale(1)";
1189
+ const fadeInFactor = 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE, centerDistance = calculateDistance(globalMousePosition, center);
1190
+ if (0 === centerDistance) return "scale(1)";
1191
+ const normalizedX = deltaX / centerDistance, normalizedY = deltaY / centerDistance, stretchIntensity = Math.min(centerDistance / 300, 1) * elasticity * fadeInFactor, scaleX = 1 + Math.abs(normalizedX) * stretchIntensity * .3 - Math.abs(normalizedY) * stretchIntensity * .15, scaleY = 1 + Math.abs(normalizedY) * stretchIntensity * .3 - Math.abs(normalizedX) * stretchIntensity * .15;
1192
+ return `scaleX(${Math.max(.8, scaleX)}) scaleY(${Math.max(.8, scaleY)})`;
1193
+ }), [ globalMousePosition, elasticity, glassSize, glassRef ]), calculateFadeInFactor = useCallback((() => {
1194
+ if (!(globalMousePosition.x && globalMousePosition.y && glassRef.current && validateGlassSize(glassSize))) return 0;
1195
+ const rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect), edgeDistanceX = Math.max(0, Math.abs(globalMousePosition.x - center.x) - glassSize.width / 2), edgeDistanceY = Math.max(0, Math.abs(globalMousePosition.y - center.y) - glassSize.height / 2), edgeDistance = calculateDistance({
1196
+ x: edgeDistanceX,
1197
+ y: edgeDistanceY
1198
+ }, {
1199
+ x: 0,
1200
+ y: 0
1201
+ });
1202
+ return edgeDistance > CONSTANTS.ACTIVATION_ZONE ? 0 : 1 - edgeDistance / CONSTANTS.ACTIVATION_ZONE;
1203
+ }), [ globalMousePosition, glassSize, glassRef ]), calculateElasticTranslation = useCallback((() => {
1204
+ if (!glassRef.current) return {
1205
+ x: 0,
1206
+ y: 0
1207
+ };
1208
+ const fadeInFactor = calculateFadeInFactor(), rect = glassRef.current.getBoundingClientRect(), center = calculateElementCenter(rect);
1209
+ return {
1210
+ x: (globalMousePosition.x - center.x) * elasticity * .1 * fadeInFactor,
1211
+ y: (globalMousePosition.y - center.y) * elasticity * .1 * fadeInFactor
1212
+ };
1213
+ }), [ globalMousePosition, elasticity, calculateFadeInFactor, glassRef ]), elasticTranslation = useMemo((() => effectiveDisableEffects ? {
1214
+ x: 0,
1215
+ y: 0
1216
+ } : calculateElasticTranslation()), [ calculateElasticTranslation, effectiveDisableEffects ]), directionalScale = useMemo((() => effectiveDisableEffects ? "scale(1)" : calculateDirectionalScale()), [ calculateDirectionalScale, effectiveDisableEffects ]), transformStyle = useMemo((() => effectiveDisableEffects ? isActive && Boolean(onClick) ? "scale(0.98)" : "scale(1)" : `translate(${elasticTranslation.x}px, ${elasticTranslation.y}px) ${isActive && Boolean(onClick) ? "scale(0.96)" : directionalScale}`), [ elasticTranslation, isActive, onClick, directionalScale, effectiveDisableEffects ]);
1217
+ // Size management
1218
+ useEffect((() => {
1219
+ const isValidElement = element => null !== element && element instanceof HTMLElement && element.isConnected;
1220
+ let rafId = null, lastSize = {
1221
+ width: 0,
1222
+ height: 0
1223
+ }, lastCornerRadius = effectiveCornerRadius;
1224
+ const updateGlassSize = (forceUpdate = !1) => {
1225
+ null !== rafId && cancelAnimationFrame(rafId), rafId = requestAnimationFrame((() => {
1226
+ if (!isValidElement(glassRef.current)) return void (rafId = null);
1227
+ const rect = glassRef.current.getBoundingClientRect();
1228
+ if (rect.width <= 0 || rect.height <= 0) return void (rafId = null);
1229
+ // Measure actual rendered size without artificial offsets to avoid feedback loops
1230
+ const newSize = {
1231
+ width: Math.round(rect.width),
1232
+ height: Math.round(rect.height)
1233
+ }, cornerRadiusChanged = lastCornerRadius !== effectiveCornerRadius, dimensionsChanged = Math.abs(newSize.width - lastSize.width) > 1 || Math.abs(newSize.height - lastSize.height) > 1;
1234
+ var size;
1235
+ (forceUpdate || cornerRadiusChanged || dimensionsChanged) && validateGlassSize(size = newSize) && size.width <= CONSTANTS.MAX_SIZE && size.height <= CONSTANTS.MAX_SIZE && (lastSize = newSize,
1236
+ lastCornerRadius = effectiveCornerRadius, setGlassSize(newSize)), rafId = null;
1237
+ }));
1238
+ };
1239
+ let resizeTimeoutId = null;
1240
+ const debouncedResizeHandler = () => {
1241
+ resizeTimeoutId && clearTimeout(resizeTimeoutId), resizeTimeoutId = setTimeout((() => updateGlassSize(!1)), 16);
1242
+ }, initialTimeoutId = setTimeout((() => updateGlassSize(!0)), 0);
1243
+ let resizeObserver = null, resizeDebounceTimeout = null;
1244
+ // ResizeObserver has 98%+ browser support, no need for fallback
1245
+ if ("undefined" != typeof ResizeObserver && isValidElement(glassRef.current)) try {
1246
+ resizeObserver = new ResizeObserver((entries => {
1247
+ for (const entry of entries) if (entry.target === glassRef.current) {
1248
+ // Update cached rect when size changes
1249
+ glassRef.current && (cachedRectRef.current = glassRef.current.getBoundingClientRect()),
1250
+ // Debounce resize updates to match RAF timing (16ms)
1251
+ resizeDebounceTimeout && clearTimeout(resizeDebounceTimeout), resizeDebounceTimeout = setTimeout((() => updateGlassSize(!1)), 16);
1252
+ break;
1253
+ }
1254
+ })), resizeObserver.observe(glassRef.current);
1255
+ } catch (error) {
1256
+ console.warn("AtomixGlass: ResizeObserver not available, using window resize only", error);
1257
+ }
1258
+ return window.addEventListener("resize", debouncedResizeHandler, {
1259
+ passive: !0
1260
+ }), () => {
1261
+ clearTimeout(initialTimeoutId), null !== rafId && cancelAnimationFrame(rafId), resizeTimeoutId && clearTimeout(resizeTimeoutId),
1262
+ resizeDebounceTimeout && clearTimeout(resizeDebounceTimeout), window.removeEventListener("resize", debouncedResizeHandler),
1263
+ resizeObserver?.disconnect();
1264
+ };
1265
+ }), [ effectiveCornerRadius, glassRef ]);
1266
+ // OverLight config
1267
+ /**
1268
+ * Get effective overLight value based on configuration
1269
+ * - boolean: returns the boolean value directly
1270
+ * - 'auto': returns detectedOverLight (auto-detected from background)
1271
+ * - object: returns detectedOverLight (auto-detected, but config object provides customization)
1272
+ */
1273
+ const getEffectiveOverLight = useCallback((() => "boolean" == typeof overLight ? overLight : ("auto" === overLight || "object" == typeof overLight && null !== overLight) && detectedOverLight), [ overLight, detectedOverLight ]), validateConfigValue = useCallback(((value, min, max, defaultValue) => "number" != typeof value || isNaN(value) || !isFinite(value) ? defaultValue : Math.min(max, Math.max(min, value))), []), overLightConfig = useMemo((() => {
1274
+ const isOverLight = getEffectiveOverLight(), mouseInfluence = calculateMouseInfluence(mouseOffset), hoverIntensity = isHovered ? 1.4 : 1, activeIntensity = isActive ? 1.6 : 1, baseConfig = {
1275
+ isOverLight: isOverLight,
1276
+ threshold: .7,
1277
+ opacity: isOverLight ? Math.min(.6, Math.max(.2, .5 * hoverIntensity * activeIntensity)) : 0,
1278
+ contrast: Math.min(1.8, Math.max(1, 1.4 + .3 * mouseInfluence)),
1279
+ brightness: Math.min(1.2, Math.max(.7, .85 + .15 * mouseInfluence)),
1280
+ saturationBoost: Math.min(2, Math.max(1, 1.3 + .4 * mouseInfluence)),
1281
+ shadowIntensity: Math.min(1.5, Math.max(.5, .9 + .5 * mouseInfluence)),
1282
+ borderOpacity: Math.min(1, Math.max(.3, .7 + .3 * mouseInfluence))
1283
+ };
1284
+ if ("object" == typeof overLight && null !== overLight) {
1285
+ const objConfig = overLight, validatedThreshold = validateConfigValue(objConfig.threshold, .1, 1, baseConfig.threshold), validatedOpacity = validateConfigValue(objConfig.opacity, .1, 1, baseConfig.opacity), validatedContrast = validateConfigValue(objConfig.contrast, .5, 2.5, baseConfig.contrast), validatedBrightness = validateConfigValue(objConfig.brightness, .5, 2, baseConfig.brightness), validatedSaturationBoost = validateConfigValue(objConfig.saturationBoost, .5, 3, baseConfig.saturationBoost), finalConfig = {
1286
+ ...baseConfig,
1287
+ threshold: validatedThreshold,
1288
+ opacity: validatedOpacity * hoverIntensity * activeIntensity,
1289
+ contrast: validatedContrast + .3 * mouseInfluence,
1290
+ brightness: validatedBrightness + .15 * mouseInfluence,
1291
+ saturationBoost: validatedSaturationBoost + .4 * mouseInfluence
1292
+ };
1293
+ // Validate and apply object config values with proper clamping
1294
+ return process.env.NODE_ENV, finalConfig;
1295
+ }
1296
+ // Debug logging for non-object configs
1297
+ return process.env.NODE_ENV, baseConfig;
1298
+ }), [ overLight, getEffectiveOverLight, mouseOffset, isHovered, isActive, validateConfigValue, debugOverLight ]), handleMouseEnter = useCallback((() => setIsHovered(!0)), []), handleMouseLeave = useCallback((() => setIsHovered(!1)), []), handleMouseDown = useCallback((() => setIsActive(!0)), []), handleMouseUp = useCallback((() => setIsActive(!1)), []), handleKeyDown = useCallback((e => {
1299
+ !onClick || "Enter" !== e.key && " " !== e.key || (e.preventDefault(), onClick());
1300
+ }), [ onClick ]), handleMouseMove = useCallback((_e => {}), []);
1301
+ /**
1302
+ * Validate and clamp a numeric config value
1303
+ * @param value - The value to validate
1304
+ * @param min - Minimum allowed value
1305
+ * @param max - Maximum allowed value
1306
+ * @param defaultValue - Default value if validation fails
1307
+ * @returns Validated and clamped value
1308
+ */ return {
1309
+ // State
1310
+ isHovered: isHovered,
1311
+ isActive: isActive,
1312
+ glassSize: glassSize,
1313
+ dynamicCornerRadius: dynamicCornerRadius,
1314
+ effectiveCornerRadius: effectiveCornerRadius,
1315
+ effectiveReducedMotion: effectiveReducedMotion,
1316
+ effectiveHighContrast: effectiveHighContrast,
1317
+ effectiveDisableEffects: effectiveDisableEffects,
1318
+ detectedOverLight: detectedOverLight,
1319
+ globalMousePosition: globalMousePosition,
1320
+ mouseOffset: mouseOffset,
1321
+ // OverLight config
1322
+ overLightConfig: overLightConfig,
1323
+ // Transform calculations
1324
+ elasticTranslation: elasticTranslation,
1325
+ directionalScale: directionalScale,
1326
+ transformStyle: transformStyle,
1327
+ // Event handlers
1328
+ handleMouseEnter: handleMouseEnter,
1329
+ handleMouseLeave: handleMouseLeave,
1330
+ handleMouseDown: handleMouseDown,
1331
+ handleMouseUp: handleMouseUp,
1332
+ handleMouseMove: handleMouseMove,
1333
+ handleKeyDown: handleKeyDown
1334
+ };
1335
+ }
1336
+
1337
+ /**
1338
+ * AtomixGlass - A high-performance glass morphism component with liquid distortion effects
1339
+ *
1340
+ * Features:
1341
+ * - Hardware-accelerated glass effects with SVG filters
1342
+ * - Mouse-responsive liquid distortion
1343
+ * - Dynamic border-radius extraction from children CSS properties
1344
+ * - Automatic light/dark theme detection via overLight prop
1345
+ * - Accessibility and performance optimizations
1346
+ * - Multiple displacement modes (standard, polar, prominent, shader)
1347
+ * - Design token integration for consistent theming
1348
+ * - Focus ring support for keyboard navigation
1349
+ * - Responsive breakpoints for mobile optimization
1350
+ * - Enhanced ARIA attributes for screen readers
1351
+ *
1352
+ * Design System Compliance:
1353
+ * - Uses design tokens for opacity, spacing, and colors
1354
+ * - Follows BEM methodology for class naming
1355
+ * - Implements focus-ring mixin for accessibility
1356
+ * - Supports reduced motion and high contrast preferences
1357
+ *
1358
+ * @example
1359
+ * // Basic usage with dynamic border-radius extraction
1360
+ * <AtomixGlass>
1361
+ * <div style={{ borderRadius: '12px' }}>Content with 12px radius</div>
1362
+ * </AtomixGlass>
1363
+ *
1364
+ * @example
1365
+ * // Manual border-radius override
1366
+ * <AtomixGlass cornerRadius={20}>
1367
+ * <div>Content with 20px glass radius</div>
1368
+ * </AtomixGlass>
1369
+ *
1370
+ * @example
1371
+ * // Interactive glass with click handler
1372
+ * <AtomixGlass onClick={() => console.log('Clicked')} aria-label="Glass card">
1373
+ * <div>Clickable content</div>
1374
+ * </AtomixGlass>
1375
+ *
1376
+ * @example
1377
+ * // OverLight - Boolean mode (explicit control)
1378
+ * <AtomixGlass overLight={true}>
1379
+ * <div>Content on light background</div>
1380
+ * </AtomixGlass>
1381
+ *
1382
+ * @example
1383
+ * // OverLight - Auto-detection mode
1384
+ * <AtomixGlass overLight="auto">
1385
+ * <div>Content with auto-detected background</div>
1386
+ * </AtomixGlass>
1387
+ *
1388
+ * @example
1389
+ * // OverLight - Object config with custom settings
1390
+ * <AtomixGlass
1391
+ * overLight={{
1392
+ * threshold: 0.8,
1393
+ * opacity: 0.6,
1394
+ * contrast: 1.8,
1395
+ * brightness: 1.0,
1396
+ * saturationBoost: 1.5
1397
+ * }}
1398
+ * >
1399
+ * <div>Content with custom overLight config</div>
1400
+ * </AtomixGlass>
1401
+ *
1402
+ * @example
1403
+ * // Debug mode for overLight detection
1404
+ * <AtomixGlass overLight="auto" debugOverLight={true}>
1405
+ * <div>Content with debug logging enabled</div>
1406
+ * </AtomixGlass>
1407
+ */ function AtomixGlass({children: children, displacementScale: displacementScale = ATOMIX_GLASS.DEFAULTS.DISPLACEMENT_SCALE, blurAmount: blurAmount = ATOMIX_GLASS.DEFAULTS.BLUR_AMOUNT, saturation: saturation = ATOMIX_GLASS.DEFAULTS.SATURATION, aberrationIntensity: aberrationIntensity = ATOMIX_GLASS.DEFAULTS.ABERRATION_INTENSITY, elasticity: elasticity = ATOMIX_GLASS.DEFAULTS.ELASTICITY, cornerRadius: cornerRadius, globalMousePosition: externalGlobalMousePosition, mouseOffset: externalMouseOffset, mouseContainer: mouseContainer = null, className: className = "", padding: padding = ATOMIX_GLASS.DEFAULTS.PADDING, overLight: overLight = ATOMIX_GLASS.DEFAULTS.OVER_LIGHT, style: style = {}, mode: mode = ATOMIX_GLASS.DEFAULTS.MODE, onClick: onClick, shaderVariant: shaderVariant = "liquidGlass", "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, role: role, tabIndex: tabIndex, reducedMotion: reducedMotion = !1, highContrast: highContrast = !1, disableEffects: disableEffects = !1, enableLiquidBlur: enableLiquidBlur = !1, enableBorderEffect: enableBorderEffect = !0, enableOverLightLayers: enableOverLightLayers = ATOMIX_GLASS.DEFAULTS.ENABLE_OVER_LIGHT_LAYERS, enablePerformanceMonitoring: enablePerformanceMonitoring = !1, debugCornerRadius: debugCornerRadius = !1, debugOverLight: debugOverLight = !1}) {
1408
+ const glassRef = useRef(null), contentRef = useRef(null), opacityCacheRef = useRef(null), rgbCacheRef = useRef(null), {isHovered: isHovered, isActive: isActive, glassSize: glassSize, effectiveCornerRadius: effectiveCornerRadius, effectiveReducedMotion: effectiveReducedMotion, effectiveHighContrast: effectiveHighContrast, effectiveDisableEffects: effectiveDisableEffects, overLightConfig: overLightConfig, globalMousePosition: globalMousePosition, mouseOffset: mouseOffset, transformStyle: transformStyle, handleMouseEnter: handleMouseEnter, handleMouseLeave: handleMouseLeave, handleMouseDown: handleMouseDown, handleMouseUp: handleMouseUp, handleKeyDown: handleKeyDown} = useAtomixGlass({
1409
+ glassRef: glassRef,
1410
+ contentRef: contentRef,
1411
+ cornerRadius: cornerRadius,
1412
+ globalMousePosition: externalGlobalMousePosition,
1413
+ mouseOffset: externalMouseOffset,
1414
+ mouseContainer: mouseContainer,
1415
+ overLight: overLight,
1416
+ reducedMotion: reducedMotion,
1417
+ highContrast: highContrast,
1418
+ disableEffects: disableEffects,
1419
+ elasticity: elasticity,
1420
+ onClick: onClick,
1421
+ debugCornerRadius: debugCornerRadius,
1422
+ debugOverLight: debugOverLight,
1423
+ enablePerformanceMonitoring: enablePerformanceMonitoring,
1424
+ children: children
1425
+ }), isOverLight = overLightConfig.isOverLight, shouldRenderOverLightLayers = enableOverLightLayers && isOverLight;
1426
+ // Read CSS custom properties once on mount and cache them
1427
+ useEffect((() => {
1428
+ if ("undefined" != typeof window && glassRef.current) try {
1429
+ const computedStyle = window.getComputedStyle(glassRef.current);
1430
+ // Cache opacity values
1431
+ if (!opacityCacheRef.current) {
1432
+ const opacity50Value = computedStyle.getPropertyValue("--atomix-opacity-50").trim(), opacity40Value = computedStyle.getPropertyValue("--atomix-opacity-40").trim(), opacity80Value = computedStyle.getPropertyValue("--atomix-opacity-80").trim(), opacity0Value = computedStyle.getPropertyValue("--atomix-opacity-0").trim(), parseOpacity = (value, defaultValue) => {
1433
+ if (!value) return defaultValue;
1434
+ const parsed = parseFloat(value);
1435
+ return isNaN(parsed) ? defaultValue : parsed;
1436
+ };
1437
+ opacityCacheRef.current = {
1438
+ opacity50: parseOpacity(opacity50Value, .5),
1439
+ opacity40: parseOpacity(opacity40Value, .4),
1440
+ opacity80: parseOpacity(opacity80Value, .8),
1441
+ opacity0: parseOpacity(opacity0Value, 0)
1442
+ };
1443
+ }
1444
+ // Cache RGB color values from design tokens
1445
+ if (!rgbCacheRef.current) {
1446
+ // Try to read from design tokens, fallback to defaults
1447
+ const whiteRgbValue = computedStyle.getPropertyValue("--atomix-light-rgb").trim() || computedStyle.getPropertyValue("--atomix-white-rgb").trim() || "", blackRgbValue = computedStyle.getPropertyValue("--atomix-dark-rgb").trim() || computedStyle.getPropertyValue("--atomix-black-rgb").trim() || "";
1448
+ rgbCacheRef.current = {
1449
+ whiteRgb: whiteRgbValue || "255, 255, 255",
1450
+ // Fallback to white RGB
1451
+ blackRgb: blackRgbValue || "0, 0, 0"
1452
+ };
1453
+ }
1454
+ } catch (error) {
1455
+ // Fallback to defaults if reading fails
1456
+ opacityCacheRef.current || (opacityCacheRef.current = {
1457
+ opacity50: .5,
1458
+ opacity40: .4,
1459
+ opacity80: .8,
1460
+ opacity0: 0
1461
+ }), rgbCacheRef.current || (rgbCacheRef.current = {
1462
+ whiteRgb: "255, 255, 255",
1463
+ blackRgb: "0, 0, 0"
1464
+ });
1465
+ }
1466
+ }), []);
1467
+ // Calculate base style with transforms (only dynamic values)
1468
+ const baseStyle = useMemo((() => ({
1469
+ ...style,
1470
+ ...0 !== elasticity && !effectiveDisableEffects && {
1471
+ transform: transformStyle
1472
+ }
1473
+ })), [ style, transformStyle, effectiveDisableEffects, elasticity ]), componentClassName = useMemo((() => [ ATOMIX_GLASS.BASE_CLASS, effectiveReducedMotion && `${ATOMIX_GLASS.BASE_CLASS}--reduced-motion`, effectiveHighContrast && `${ATOMIX_GLASS.BASE_CLASS}--high-contrast`, effectiveDisableEffects && `${ATOMIX_GLASS.BASE_CLASS}--disabled-effects`, className ].filter(Boolean).join(" ")), [ effectiveReducedMotion, effectiveHighContrast, effectiveDisableEffects, className ]), baseStylePosition = baseStyle.position, baseStyleTop = baseStyle.top, baseStyleLeft = baseStyle.left, positionStyles = useMemo((() => ({
1474
+ position: baseStylePosition || "absolute",
1475
+ top: baseStyleTop || 0,
1476
+ left: baseStyleLeft || 0
1477
+ })), [ baseStylePosition, baseStyleTop, baseStyleLeft ]), baseStyleWidth = baseStyle.width, baseStyleHeight = baseStyle.height, glassSizeWidth = glassSize.width, glassSizeHeight = glassSize.height, adjustedSize = useMemo((() => ({
1478
+ width: "fixed" !== baseStylePosition ? "100%" : baseStyleWidth || Math.max(glassSizeWidth, 0),
1479
+ height: "fixed" !== baseStylePosition ? "100%" : baseStyleHeight || Math.max(glassSizeHeight, 0)
1480
+ })), [ baseStylePosition, baseStyleWidth, baseStyleHeight, glassSizeWidth, glassSizeHeight ]), mouseOffsetX = mouseOffset.x, mouseOffsetY = mouseOffset.y, GRADIENT = ATOMIX_GLASS.CONSTANTS.GRADIENT, gradientCalculations = useMemo((() => {
1481
+ const mx = mouseOffsetX, my = mouseOffsetY, borderGradientAngle = GRADIENT.BASE_ANGLE + mx * GRADIENT.ANGLE_MULTIPLIER, borderStop1 = Math.max(GRADIENT.BORDER_STOP_1.MIN, GRADIENT.BORDER_STOP_1.BASE + my * GRADIENT.BORDER_STOP_1.MULTIPLIER), borderStop2 = Math.min(GRADIENT.BORDER_STOP_2.MAX, GRADIENT.BORDER_STOP_2.BASE + my * GRADIENT.BORDER_STOP_2.MULTIPLIER), borderOpacity1 = GRADIENT.BORDER_OPACITY.BASE_1 + Math.abs(mx) * GRADIENT.BORDER_OPACITY.MULTIPLIER_LOW, borderOpacity2 = GRADIENT.BORDER_OPACITY.BASE_2 + Math.abs(mx) * GRADIENT.BORDER_OPACITY.MULTIPLIER_HIGH, borderOpacity3 = GRADIENT.BORDER_OPACITY.BASE_3 + Math.abs(mx) * GRADIENT.BORDER_OPACITY.MULTIPLIER_LOW, borderOpacity4 = GRADIENT.BORDER_OPACITY.BASE_4 + Math.abs(mx) * GRADIENT.BORDER_OPACITY.MULTIPLIER_HIGH, hover1X = GRADIENT.CENTER_POSITION + mx / GRADIENT.HOVER_POSITION.DIVISOR_1, hover1Y = GRADIENT.CENTER_POSITION + my / GRADIENT.HOVER_POSITION.DIVISOR_1, hover2X = GRADIENT.CENTER_POSITION + mx / GRADIENT.HOVER_POSITION.DIVISOR_2, hover2Y = GRADIENT.CENTER_POSITION + my / GRADIENT.HOVER_POSITION.DIVISOR_2, hover3X = GRADIENT.CENTER_POSITION + mx * GRADIENT.HOVER_POSITION.MULTIPLIER_3, hover3Y = GRADIENT.CENTER_POSITION + my * GRADIENT.HOVER_POSITION.MULTIPLIER_3, baseX = GRADIENT.CENTER_POSITION + mx * GRADIENT.BASE_LAYER_MULTIPLIER, baseY = GRADIENT.CENTER_POSITION + my * GRADIENT.BASE_LAYER_MULTIPLIER;
1482
+ return {
1483
+ isOverLight: isOverLight,
1484
+ mx: mx,
1485
+ my: my,
1486
+ borderGradientAngle: borderGradientAngle,
1487
+ borderStop1: borderStop1,
1488
+ borderStop2: borderStop2,
1489
+ borderOpacity1: borderOpacity1,
1490
+ borderOpacity2: borderOpacity2,
1491
+ borderOpacity3: borderOpacity3,
1492
+ borderOpacity4: borderOpacity4,
1493
+ hover1X: hover1X,
1494
+ hover1Y: hover1Y,
1495
+ hover2X: hover2X,
1496
+ hover2Y: hover2Y,
1497
+ hover3X: hover3X,
1498
+ hover3Y: hover3Y,
1499
+ baseX: baseX,
1500
+ baseY: baseY
1501
+ };
1502
+ }), [ mouseOffsetX, mouseOffsetY, isOverLight ]), overLightOpacity = overLightConfig.opacity, opacityValues = useMemo((() => {
1503
+ // Use cached values if available, otherwise fallback to defaults
1504
+ const opacity50 = opacityCacheRef.current?.opacity50 ?? .5, opacity40 = opacityCacheRef.current?.opacity40 ?? .4, opacity80 = opacityCacheRef.current?.opacity80 ?? .8, opacity0 = opacityCacheRef.current?.opacity0 ?? 0;
1505
+ // Dynamic multiplier for overlay
1506
+ return {
1507
+ hover1: isHovered || isActive ? opacity50 : opacity0,
1508
+ hover2: isActive ? opacity50 : opacity0,
1509
+ hover3: isHovered ? opacity40 : isActive ? opacity80 : opacity0,
1510
+ base: isOverLight ? overLightOpacity || opacity40 : opacity0,
1511
+ over: isOverLight ? 1.1 * (overLightOpacity || opacity40) : opacity0
1512
+ };
1513
+ }), [ isHovered, isActive, isOverLight, overLightOpacity ]), gradientIsOverLight = gradientCalculations.isOverLight, gradientMx = gradientCalculations.mx, gradientMy = gradientCalculations.my, gradientBorderGradientAngle = gradientCalculations.borderGradientAngle, gradientBorderStop1 = gradientCalculations.borderStop1, gradientBorderStop2 = gradientCalculations.borderStop2, gradientBorderOpacity1 = gradientCalculations.borderOpacity1, gradientBorderOpacity2 = gradientCalculations.borderOpacity2, gradientBorderOpacity3 = gradientCalculations.borderOpacity3, gradientBorderOpacity4 = gradientCalculations.borderOpacity4, gradientHover1X = gradientCalculations.hover1X, gradientHover1Y = gradientCalculations.hover1Y, gradientHover2X = gradientCalculations.hover2X, gradientHover2Y = gradientCalculations.hover2Y, gradientHover3X = gradientCalculations.hover3X, gradientHover3Y = gradientCalculations.hover3Y, gradientBaseX = gradientCalculations.baseX, gradientBaseY = gradientCalculations.baseY, positionStylesPosition = positionStyles.position, positionStylesTop = positionStyles.top, positionStylesLeft = positionStyles.left, adjustedSizeWidth = adjustedSize.width, adjustedSizeHeight = adjustedSize.height, baseStyleTransform = baseStyle.transform, opacityValuesHover1 = opacityValues.hover1, opacityValuesHover2 = opacityValues.hover2, opacityValuesHover3 = opacityValues.hover3, opacityValuesBase = opacityValues.base, opacityValuesOver = opacityValues.over, glassVars = useMemo((() => {
1514
+ // RGB color values for rgba() functions
1515
+ // Note: CSS doesn't support rgba(var(--rgb), opacity) syntax - this is a CSS specification
1516
+ // limitation, not a browser support issue. We read RGB values from design tokens at mount
1517
+ // and cache them for performance. Falls back to defaults if tokens are not available.
1518
+ // Uses design tokens: --atomix-light-rgb / --atomix-white-rgb and --atomix-dark-rgb / --atomix-black-rgb
1519
+ const whiteColor = rgbCacheRef.current?.whiteRgb || "255, 255, 255", blackColor = rgbCacheRef.current?.blackRgb || "0, 0, 0";
1520
+ return {
1521
+ // Standard CSS custom properties for dynamic values
1522
+ "--atomix-glass-radius": `${effectiveCornerRadius}px`,
1523
+ "--atomix-glass-transform": baseStyleTransform || "none",
1524
+ "--atomix-glass-position": positionStylesPosition,
1525
+ "--atomix-glass-top": "fixed" !== positionStylesTop ? `${positionStylesTop}px` : "0",
1526
+ "--atomix-glass-left": "fixed" !== positionStylesLeft ? `${positionStylesLeft}px` : "0",
1527
+ "--atomix-glass-width": "fixed" !== baseStylePosition ? adjustedSizeWidth : `${adjustedSizeWidth}px`,
1528
+ "--atomix-glass-height": "fixed" !== baseStylePosition ? adjustedSizeHeight : `${adjustedSizeHeight}px`,
1529
+ // Border width: Use spacing token for consistency
1530
+ "--atomix-glass-border-width": "var(--atomix-spacing-0-5, 0.09375rem)",
1531
+ "--atomix-glass-blend-mode": gradientIsOverLight ? "multiply" : "overlay",
1532
+ // Dynamic gradients and backgrounds
1533
+ // Note: RGB values use design token-aligned constants (white: 255,255,255; black: 0,0,0)
1534
+ "--atomix-glass-border-gradient-1": `linear-gradient(${gradientBorderGradientAngle}deg, rgba(${whiteColor}, 0) 0%, rgba(${whiteColor}, ${gradientBorderOpacity1}) ${gradientBorderStop1}%, rgba(${whiteColor}, ${gradientBorderOpacity2}) ${gradientBorderStop2}%, rgba(${whiteColor}, 0) 100%)`,
1535
+ "--atomix-glass-border-gradient-2": `linear-gradient(${gradientBorderGradientAngle}deg, rgba(${whiteColor}, 0) 0%, rgba(${whiteColor}, ${gradientBorderOpacity3}) ${gradientBorderStop1}%, rgba(${whiteColor}, ${gradientBorderOpacity4}) ${gradientBorderStop2}%, rgba(${whiteColor}, 0) 100%)`,
1536
+ "--atomix-glass-hover-1-opacity": opacityValuesHover1,
1537
+ "--atomix-glass-hover-1-gradient": gradientIsOverLight ? `radial-gradient(circle at ${gradientHover1X}% ${gradientHover1Y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_START}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_STOP}%, rgba(${blackColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.BLACK_END}%)` : `radial-gradient(circle at ${gradientHover1X}% ${gradientHover1Y}%, rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.WHITE_START}) 0%, rgba(${whiteColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_1.WHITE_STOP}%)`,
1538
+ "--atomix-glass-hover-2-opacity": opacityValuesHover2,
1539
+ "--atomix-glass-hover-2-gradient": gradientIsOverLight ? `radial-gradient(circle at ${gradientHover2X}% ${gradientHover2Y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_START}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_STOP}%, rgba(${blackColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.BLACK_END}%)` : `radial-gradient(circle at ${gradientHover2X}% ${gradientHover2Y}%, rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.WHITE_START}) 0%, rgba(${whiteColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_2.WHITE_STOP}%)`,
1540
+ "--atomix-glass-hover-3-opacity": opacityValuesHover3,
1541
+ "--atomix-glass-hover-3-gradient": gradientIsOverLight ? `radial-gradient(circle at ${gradientHover3X}% ${gradientHover3Y}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_START}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_STOP}%, rgba(${blackColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.BLACK_END}%)` : `radial-gradient(circle at ${gradientHover3X}% ${gradientHover3Y}%, rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.WHITE_START}) 0%, rgba(${whiteColor}, 0) ${ATOMIX_GLASS.CONSTANTS.GRADIENT_OPACITY.HOVER_3.WHITE_STOP}%)`,
1542
+ "--atomix-glass-base-opacity": opacityValuesBase,
1543
+ "--atomix-glass-base-gradient": gradientIsOverLight ? `linear-gradient(${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.ANGLE}deg, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_BASE + gradientMx * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_BASE + gradientMy * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_MULTIPLIER}) ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_BASE + Math.abs(gradientMx) * ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.BASE_GRADIENT.WHITE_OPACITY})`,
1544
+ "--atomix-glass-overlay-opacity": opacityValuesOver,
1545
+ "--atomix-glass-overlay-gradient": gradientIsOverLight ? `radial-gradient(circle at ${gradientBaseX}% ${gradientBaseY}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_BASE + Math.abs(gradientMx) * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_START_MULTIPLIER}) 0%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID}) ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_MID_STOP}%, rgba(${blackColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_BASE + Math.abs(gradientMy) * ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.BLACK_END_MULTIPLIER}) 100%)` : `rgba(${whiteColor}, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_GRADIENT.WHITE_OPACITY})`
1546
+ };
1547
+ }), [
1548
+ // Position styles - only specific properties
1549
+ positionStylesPosition, positionStylesTop, positionStylesLeft,
1550
+ // Adjusted size - only specific properties
1551
+ adjustedSizeWidth, adjustedSizeHeight,
1552
+ // Base style - only transform property
1553
+ baseStyleTransform, baseStylePosition,
1554
+ // Other values
1555
+ effectiveCornerRadius, effectiveReducedMotion,
1556
+ // Gradient calculations - extracted properties
1557
+ gradientIsOverLight, gradientMx, gradientMy, gradientBorderGradientAngle, gradientBorderStop1, gradientBorderStop2, gradientBorderOpacity1, gradientBorderOpacity2, gradientBorderOpacity3, gradientBorderOpacity4, gradientHover1X, gradientHover1Y, gradientHover2X, gradientHover2Y, gradientHover3X, gradientHover3Y, gradientBaseX, gradientBaseY,
1558
+ // Opacity values - extracted properties
1559
+ opacityValuesHover1, opacityValuesHover2, opacityValuesHover3, opacityValuesBase, opacityValuesOver ]);
1560
+ // Build className with state modifiers
1561
+ return jsxs("div", {
1562
+ className: componentClassName,
1563
+ style: glassVars,
1564
+ role: role || (onClick ? "button" : void 0),
1565
+ tabIndex: onClick ? tabIndex ?? 0 : tabIndex,
1566
+ "aria-label": ariaLabel,
1567
+ "aria-describedby": ariaDescribedBy,
1568
+ "aria-disabled": !(!onClick || !effectiveDisableEffects) || !onClick && void 0,
1569
+ "aria-pressed": !(!onClick || !isActive) || !onClick && void 0,
1570
+ onKeyDown: onClick ? handleKeyDown : void 0,
1571
+ children: [ jsx(AtomixGlassContainer, {
1572
+ ref: glassRef,
1573
+ contentRef: contentRef,
1574
+ className: className,
1575
+ style: baseStyle,
1576
+ cornerRadius: effectiveCornerRadius,
1577
+ displacementScale: effectiveDisableEffects ? 0 : "shader" === mode ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_DISPLACEMENT : overLightConfig.isOverLight ? displacementScale * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.OVER_LIGHT_DISPLACEMENT : displacementScale,
1578
+ blurAmount: effectiveDisableEffects ? 0 : blurAmount,
1579
+ saturation: effectiveHighContrast ? ATOMIX_GLASS.CONSTANTS.SATURATION.HIGH_CONTRAST : overLightConfig.isOverLight ? saturation * overLightConfig.saturationBoost : saturation,
1580
+ aberrationIntensity: effectiveDisableEffects ? 0 : "shader" === mode ? aberrationIntensity * ATOMIX_GLASS.CONSTANTS.MULTIPLIERS.SHADER_ABERRATION : aberrationIntensity,
1581
+ glassSize: glassSize,
1582
+ padding: padding,
1583
+ mouseOffset: effectiveDisableEffects ? {
1584
+ x: 0,
1585
+ y: 0
1586
+ } : mouseOffset,
1587
+ globalMousePosition: effectiveDisableEffects ? {
1588
+ x: 0,
1589
+ y: 0
1590
+ } : globalMousePosition,
1591
+ onMouseEnter: handleMouseEnter,
1592
+ onMouseLeave: handleMouseLeave,
1593
+ onMouseDown: handleMouseDown,
1594
+ onMouseUp: handleMouseUp,
1595
+ active: isActive,
1596
+ isHovered: isHovered,
1597
+ isActive: isActive,
1598
+ overLight: overLightConfig.isOverLight,
1599
+ onClick: onClick,
1600
+ mode: mode,
1601
+ transform: baseStyle.transform,
1602
+ effectiveDisableEffects: effectiveDisableEffects,
1603
+ effectiveReducedMotion: effectiveReducedMotion,
1604
+ shaderVariant: shaderVariant,
1605
+ elasticity: elasticity,
1606
+ enableLiquidBlur: enableLiquidBlur,
1607
+ children: children
1608
+ }), Boolean(onClick) && jsxs(Fragment, {
1609
+ children: [ jsx("div", {
1610
+ className: ATOMIX_GLASS.HOVER_1_CLASS
1611
+ }), jsx("div", {
1612
+ className: ATOMIX_GLASS.HOVER_2_CLASS
1613
+ }), jsx("div", {
1614
+ className: ATOMIX_GLASS.HOVER_3_CLASS
1615
+ }) ]
1616
+ }), jsx("div", {
1617
+ className: [ ATOMIX_GLASS.BACKGROUND_LAYER_CLASS, ATOMIX_GLASS.BACKGROUND_LAYER_DARK_CLASS, isOverLight ? ATOMIX_GLASS.BACKGROUND_LAYER_OVER_LIGHT_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_HIDDEN_CLASS ].filter(Boolean).join(" "),
1618
+ style: {
1619
+ ...positionStyles,
1620
+ height: adjustedSize.height,
1621
+ width: adjustedSize.width,
1622
+ borderRadius: `${effectiveCornerRadius}px`,
1623
+ transform: baseStyle.transform
1624
+ }
1625
+ }), jsx("div", {
1626
+ className: [ ATOMIX_GLASS.BACKGROUND_LAYER_CLASS, ATOMIX_GLASS.BACKGROUND_LAYER_BLACK_CLASS, isOverLight ? ATOMIX_GLASS.BACKGROUND_LAYER_OVER_LIGHT_CLASS : ATOMIX_GLASS.BACKGROUND_LAYER_HIDDEN_CLASS ].filter(Boolean).join(" "),
1627
+ style: {
1628
+ ...positionStyles,
1629
+ height: adjustedSize.height,
1630
+ width: adjustedSize.width,
1631
+ borderRadius: `${effectiveCornerRadius}px`,
1632
+ transform: baseStyle.transform
1633
+ }
1634
+ }), shouldRenderOverLightLayers && jsxs(Fragment, {
1635
+ children: [ jsx("div", {
1636
+ className: ATOMIX_GLASS.BASE_LAYER_CLASS
1637
+ }), jsx("div", {
1638
+ className: ATOMIX_GLASS.OVERLAY_LAYER_CLASS
1639
+ }), jsx("div", {
1640
+ className: ATOMIX_GLASS.OVERLAY_HIGHLIGHT_CLASS,
1641
+ style: {
1642
+ opacity: opacityValues.over * ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.OPACITY_MULTIPLIER,
1643
+ background: `radial-gradient(circle at ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_X}% ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.POSITION_Y}%, rgba(255, 255, 255, ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.WHITE_OPACITY}) 0%, transparent ${ATOMIX_GLASS.CONSTANTS.OVERLAY_HIGHLIGHT.STOP}%)`
1644
+ }
1645
+ }) ]
1646
+ }), enableBorderEffect && jsxs(Fragment, {
1647
+ children: [ jsx("span", {
1648
+ className: ATOMIX_GLASS.BORDER_1_CLASS
1649
+ }), jsx("span", {
1650
+ className: ATOMIX_GLASS.BORDER_2_CLASS
1651
+ }) ]
1652
+ }) ]
1653
+ });
1654
+ }
1655
+
1656
+ const Accordion = memo((({title: title, children: children, defaultOpen: defaultOpen = !1, isOpen: controlledOpen, onOpenChange: onOpenChange, disabled: disabled = !1, iconPosition: iconPosition = "right", icon: icon, className: className = "", style: style, glass: glass}) => {
1657
+ // Generate unique IDs for accessibility
1658
+ const instanceId = useId(), buttonId = `accordion-header-${instanceId}`, panelId = `accordion-panel-${instanceId}`, {state: state, toggle: toggle, updatePanelHeight: updatePanelHeight, panelRef: panelRef, contentRef: contentRef, generateClassNames: generateClassNames, generateHeaderClassNames: generateHeaderClassNames} =
1659
+ /**
1660
+ * Accordion functionality hook
1661
+ * @param initialProps - Initial accordion properties
1662
+ * @returns Accordion state and methods
1663
+ */
1664
+ function(initialProps) {
1665
+ // Default accordion properties
1666
+ const defaultProps = {
1667
+ defaultOpen: !1,
1668
+ disabled: !1,
1669
+ iconPosition: "right",
1670
+ ...initialProps
1671
+ }, isControlled = "boolean" == typeof defaultProps.isOpen, [internalOpen, setInternalOpen] = useState(defaultProps.defaultOpen || !1), isOpen = isControlled ? defaultProps.isOpen : internalOpen, [panelHeight, setPanelHeight] = useState(isOpen ? "auto" : "0px"), panelRef = useRef(null), contentRef = useRef(null), updatePanelHeight = () => {
1672
+ if (contentRef.current && panelRef.current) {
1673
+ const height = isOpen ? `${contentRef.current.clientHeight}px` : "0px";
1674
+ panelRef.current.style.setProperty(ACCORDION.CSS_VARS.PANEL_HEIGHT, height), setPanelHeight(height);
1675
+ }
1676
+ };
1677
+ // Controlled/uncontrolled open state
1678
+ /**
1679
+ * Effect to update panel height when open state changes
1680
+ */
1681
+ return useEffect((() => {
1682
+ updatePanelHeight();
1683
+ }), [ isOpen ]),
1684
+ /**
1685
+ * Effect to handle window resize and update panel height
1686
+ */
1687
+ useEffect((() => {
1688
+ const handleResize = () => {
1689
+ isOpen && updatePanelHeight();
1690
+ };
1691
+ return window.addEventListener("resize", handleResize), () => window.removeEventListener("resize", handleResize);
1692
+ }), [ isOpen ]), {
1693
+ state: {
1694
+ isOpen: isOpen,
1695
+ panelHeight: panelHeight
1696
+ },
1697
+ toggle: () => {
1698
+ defaultProps.disabled || (isControlled ? defaultProps.onOpenChange && defaultProps.onOpenChange(!isOpen) : setInternalOpen((prev => !prev)));
1699
+ },
1700
+ updatePanelHeight: updatePanelHeight,
1701
+ panelRef: panelRef,
1702
+ contentRef: contentRef,
1703
+ generateClassNames: (baseClassName = "") => `c-accordion ${isOpen ? ACCORDION.CLASSES.IS_OPEN : ""} ${defaultProps.disabled ? ACCORDION.CLASSES.IS_DISABLED : ""} ${baseClassName}`.trim(),
1704
+ generateHeaderClassNames: () => ("c-accordion__header " + ("left" === defaultProps.iconPosition ? "c-accordion__header--icon-left" : "")).trim()
1705
+ };
1706
+ }({
1707
+ defaultOpen: defaultOpen,
1708
+ disabled: disabled,
1709
+ iconPosition: iconPosition,
1710
+ isOpen: controlledOpen,
1711
+ onOpenChange: onOpenChange
1712
+ }), defaultIcon = jsx("i", {
1713
+ className: "c-accordion__icon",
1714
+ "aria-hidden": "true",
1715
+ children: jsx("svg", {
1716
+ xmlns: "http://www.w3.org/2000/svg",
1717
+ width: "24",
1718
+ height: "24",
1719
+ viewBox: "0 0 24 24",
1720
+ fill: "none",
1721
+ stroke: "currentColor",
1722
+ strokeWidth: "2",
1723
+ strokeLinecap: "round",
1724
+ strokeLinejoin: "round",
1725
+ "aria-hidden": "true",
1726
+ focusable: "false",
1727
+ children: jsx("polyline", {
1728
+ points: "6 9 12 15 18 9"
1729
+ })
1730
+ })
1731
+ }), accordionContent = jsxs("div", {
1732
+ className: generateClassNames(className) + (glass ? " c-accordion--glass" : ""),
1733
+ style: style,
1734
+ children: [ jsxs("button", {
1735
+ id: buttonId,
1736
+ className: generateHeaderClassNames(),
1737
+ onClick: toggle,
1738
+ "aria-expanded": state.isOpen,
1739
+ "aria-controls": panelId,
1740
+ "aria-disabled": disabled,
1741
+ disabled: disabled,
1742
+ type: "button",
1743
+ children: [ jsx("span", {
1744
+ className: "c-accordion__title",
1745
+ children: title
1746
+ }), icon || defaultIcon ]
1747
+ }), jsx("div", {
1748
+ id: panelId,
1749
+ className: ACCORDION.SELECTORS.PANEL.replace(".", ""),
1750
+ ref: panelRef,
1751
+ role: "region",
1752
+ "aria-labelledby": buttonId,
1753
+ children: jsx("div", {
1754
+ className: ACCORDION.SELECTORS.BODY.replace(".", ""),
1755
+ ref: contentRef,
1756
+ children: children
1757
+ })
1758
+ }) ]
1759
+ });
1760
+ if (glass) {
1761
+ // Default glass settings for accordions
1762
+ const defaultGlassProps = {
1763
+ displacementScale: 20,
1764
+ elasticity: 0
1765
+ }, glassProps = !0 === glass ? defaultGlassProps : {
1766
+ ...defaultGlassProps,
1767
+ ...glass
1768
+ };
1769
+ return jsx(AtomixGlass, {
1770
+ ...glassProps,
1771
+ children: accordionContent
1772
+ });
1773
+ }
1774
+ return accordionContent;
1775
+ }));
1776
+
1777
+ // Set display name for debugging
1778
+ Accordion.displayName = "Accordion";
1779
+
1780
+ const Badge = memo((({label: label, variant: variant = "primary", size: size = "md", disabled: disabled = !1, icon: icon, className: className = "", glass: glass, style: style}) => {
1781
+ const {generateBadgeClass: generateBadgeClass} =
1782
+ /**
1783
+ * Badge state and functionality
1784
+ * @param initialProps - Initial badge properties
1785
+ * @returns Badge state and methods
1786
+ */
1787
+ function(initialProps) {
1788
+ // Default badge properties
1789
+ const defaultProps = {
1790
+ variant: "primary",
1791
+ size: "md",
1792
+ disabled: !1,
1793
+ ...initialProps
1794
+ };
1795
+ /**
1796
+ * Generate badge class based on properties
1797
+ * @param props - Badge properties
1798
+ * @returns Class string
1799
+ */ return {
1800
+ defaultProps: defaultProps,
1801
+ generateBadgeClass: props => {
1802
+ const {variant: variant = defaultProps.variant, size: size = defaultProps.size, disabled: disabled = defaultProps.disabled, className: className = ""} = props;
1803
+ return `c-badge ${variant ? `c-badge--${variant}` : ""} ${"md" === size ? "" : `c-badge--${size}`} ${disabled ? "c-badge--disabled" : ""} ${className}`.trim();
1804
+ }
1805
+ };
1806
+ }({
1807
+ variant: variant,
1808
+ size: size,
1809
+ disabled: disabled
1810
+ }), ref = useRef(null), badgeClass = generateBadgeClass({
1811
+ variant: variant,
1812
+ size: size,
1813
+ disabled: disabled,
1814
+ className: `${className} ${glass ? "c-badge--glass" : ""}`.trim()
1815
+ }), badgeElement = jsxs("span", {
1816
+ className: badgeClass,
1817
+ "aria-disabled": disabled,
1818
+ ref: ref,
1819
+ style: style,
1820
+ children: [ icon && jsx("span", {
1821
+ className: "c-badge__icon",
1822
+ children: icon
1823
+ }), jsx("span", {
1824
+ children: label
1825
+ }) ]
1826
+ });
1827
+ if (glass) {
1828
+ // Default glass settings for badges
1829
+ const defaultGlassProps = {
1830
+ displacementScale: 20,
1831
+ cornerRadius: ref.current?.getBoundingClientRect().width ? ref.current?.getBoundingClientRect().width / 2 : 16,
1832
+ className: "c-badge--glass",
1833
+ elasticity: 0
1834
+ }, glassProps = !0 === glass ? defaultGlassProps : {
1835
+ ...defaultGlassProps,
1836
+ ...glass
1837
+ };
1838
+ return jsx(AtomixGlass, {
1839
+ ...glassProps,
1840
+ children: badgeElement
1841
+ });
1842
+ }
1843
+ return badgeElement;
1844
+ }));
1845
+
1846
+ Badge.displayName = "Badge";
1847
+
1848
+ /**
1849
+ * Container component for creating responsive layouts.
1850
+ * Uses the CSS container classes defined in _objects.container.scss.
1851
+ *
1852
+ * @example
1853
+ * ```tsx
1854
+ * <Container>
1855
+ * Content with responsive max-width
1856
+ * </Container>
1857
+ *
1858
+ * <Container type="fluid">
1859
+ * Full width content
1860
+ * </Container>
1861
+ *
1862
+ * <Container type="md">
1863
+ * Content with max-width at md breakpoint
1864
+ * </Container>
1865
+ * ```
1866
+ */
1867
+ const Container = forwardRef((({children: children, className: className = "", type: type, ...props}, ref) => {
1868
+ let containerClass = "o-container";
1869
+ return type && (containerClass = `o-container-${type}`), jsx("div", {
1870
+ ref: ref,
1871
+ className: `${containerClass} ${className}`.trim(),
1872
+ ...props,
1873
+ children: children
1874
+ });
1875
+ }));
1876
+
1877
+ Container.displayName = "Container";
1878
+
1879
+ /**
1880
+ * useBlock composable for Block component
1881
+ * Provides utility functions for generating consistent block styling
1882
+ */
1883
+ const Block = forwardRef((({children: children, as: Component = "section", spacing: spacing = "md", container: container = {}, fullWidth: fullWidth = !1, className: className = "", style: style, background: background = "", ...props}, ref) => {
1884
+ const {generateBlockClass: generateBlockClass} = {
1885
+ generateBlockClass: ({spacing: spacing = BLOCK.SPACING.DEFAULT, background: background = "", fullWidth: fullWidth = !1, className: className = ""}) => {
1886
+ const classes = [ BLOCK.BASE_CLASS ];
1887
+ // Add spacing class
1888
+ // Add background class
1889
+ if (spacing && "none" !== spacing && classes.push(`${BLOCK.SPACING_PREFIX}${spacing}`),
1890
+ background) {
1891
+ const bgClass = BLOCK.CLASSES[`BG_${background.toUpperCase()}`];
1892
+ bgClass && classes.push(bgClass);
1893
+ }
1894
+ // Add full-width class
1895
+ return fullWidth && classes.push(BLOCK.CLASSES.FULL_WIDTH),
1896
+ // Add custom className
1897
+ className && classes.push(className), classes.filter(Boolean).join(" ");
1898
+ }
1899
+ }, blockClasses = generateBlockClass({
1900
+ spacing: spacing,
1901
+ background: background,
1902
+ fullWidth: fullWidth,
1903
+ className: className
1904
+ });
1905
+ return jsx(Component, {
1906
+ ref: ref,
1907
+ className: blockClasses,
1908
+ style: style,
1909
+ ...props,
1910
+ children: fullWidth ? children : jsx(Container, {
1911
+ type: container.type,
1912
+ className: container.className,
1913
+ children: children
1914
+ })
1915
+ });
1916
+ }));
1917
+
1918
+ /**
1919
+ * Block component for creating structured section layouts.
1920
+ * Provides consistent spacing, backgrounds, and container behavior for content sections.
1921
+ *
1922
+ * @example
1923
+ * ```tsx
1924
+ * // Basic usage
1925
+ * <Block>
1926
+ * <h2>Section Title</h2>
1927
+ * <p>Section content goes here...</p>
1928
+ * </Block>
1929
+ *
1930
+ * // With custom spacing and background
1931
+ * <Block spacing="lg" background="subtle">
1932
+ * <h2>Featured Section</h2>
1933
+ * <p>This section has extra padding and a subtle background.</p>
1934
+ * </Block>
1935
+ *
1936
+ * // Full-width with custom container
1937
+ * <Block fullWidth background="primary">
1938
+ * <Container type="lg">
1939
+ * <h2>Hero Section</h2>
1940
+ * <p>Full-width section with centered content.</p>
1941
+ * </Container>
1942
+ * </Block>
1943
+ *
1944
+ * // As article element
1945
+ * <Block as="article" spacing="xl" background="accent">
1946
+ * <h1>Blog Post</h1>
1947
+ * <p>Article content...</p>
1948
+ * </Block>
1949
+ * ```
1950
+ */ Block.displayName = "Block";
1951
+
1952
+ const Breadcrumb = memo((({items: items, divider: divider, className: className = "", ariaLabel: ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style}) => {
1953
+ const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
1954
+ return jsx("nav", {
1955
+ "aria-label": ariaLabel,
1956
+ style: style,
1957
+ children: jsx("ol", {
1958
+ className: breadcrumbClasses,
1959
+ children: items.map(((item, index) => {
1960
+ const isLast = index === items.length - 1, itemClasses = [ BREADCRUMB.CLASSES.ITEM, item.active || isLast ? BREADCRUMB.CLASSES.ACTIVE : "" ].filter(Boolean).join(" "), linkContent = jsxs(Fragment, {
1961
+ children: [ item.icon && jsx("span", {
1962
+ className: "c-breadcrumb__icon",
1963
+ children: item.icon
1964
+ }), item.label ]
1965
+ }), linkProps = {
1966
+ href: item.href,
1967
+ className: BREADCRUMB.CLASSES.LINK,
1968
+ onClick: item.onClick,
1969
+ style: item.style
1970
+ };
1971
+ return jsx("li", {
1972
+ className: itemClasses,
1973
+ style: item.style,
1974
+ children: item.href && !item.active ? jsx(LinkComponent || "a", {
1975
+ ...linkProps,
1976
+ children: linkContent
1977
+ }) : jsx("span", {
1978
+ className: BREADCRUMB.CLASSES.LINK,
1979
+ children: linkContent
1980
+ })
1981
+ }, index);
1982
+ }))
1983
+ })
1984
+ });
1985
+ }));
1986
+
1987
+ Breadcrumb.displayName = "Breadcrumb";
1988
+
1989
+ const Spinner = memo((({size: size = "md", variant: variant = "primary", fullscreen: fullscreen = !1, className: className = "", style: style, glass: glass}) => {
1990
+ const {generateSpinnerClass: generateSpinnerClass} =
1991
+ /**
1992
+ * Spinner state and functionality
1993
+ * @param initialProps - Initial spinner properties
1994
+ * @returns Spinner state and methods
1995
+ */
1996
+ function(initialProps) {
1997
+ // Default spinner properties
1998
+ const defaultProps = {
1999
+ variant: "primary",
2000
+ size: "md",
2001
+ fullscreen: !1,
2002
+ ...initialProps
2003
+ };
2004
+ /**
2005
+ * Generate spinner class based on properties
2006
+ * @param props - Spinner properties
2007
+ * @returns Class string
2008
+ */ return {
2009
+ defaultProps: defaultProps,
2010
+ generateSpinnerClass: props => {
2011
+ const {variant: variant = defaultProps.variant, size: size = defaultProps.size, fullscreen: fullscreen = defaultProps.fullscreen, className: className = ""} = props;
2012
+ return `c-spinner ${variant ? `c-spinner--${variant}` : ""} ${"md" !== size ? `c-spinner--${size}` : ""} ${fullscreen ? "c-spinner--fullscreen" : ""} ${className}`.trim();
2013
+ }
2014
+ };
2015
+ }({
2016
+ size: size,
2017
+ variant: variant,
2018
+ fullscreen: fullscreen
2019
+ }), spinnerClass = generateSpinnerClass({
2020
+ size: size,
2021
+ variant: variant,
2022
+ fullscreen: fullscreen,
2023
+ className: `${className} ${glass ? "c-spinner--glass" : ""}`.trim()
2024
+ }), spinnerContent = jsx("div", {
2025
+ className: spinnerClass,
2026
+ style: style,
2027
+ role: "status",
2028
+ children: jsx("span", {
2029
+ className: "u-visually-hidden",
2030
+ children: "Loading..."
2031
+ })
2032
+ });
2033
+ if (glass) {
2034
+ const defaultGlassProps = {
2035
+ displacementScale: 20,
2036
+ blurAmount: 1,
2037
+ cornerRadius: 999,
2038
+ mode: "shader"
2039
+ }, glassProps = !0 === glass ? defaultGlassProps : {
2040
+ ...defaultGlassProps,
2041
+ ...glass
2042
+ };
2043
+ return jsx(AtomixGlass, {
2044
+ ...glassProps,
2045
+ children: spinnerContent
2046
+ });
2047
+ }
2048
+ return spinnerContent;
2049
+ }));
2050
+
2051
+ Spinner.displayName = "Spinner";
2052
+
2053
+ // Map string sizes to pixel values
2054
+ const sizeMap = {
2055
+ xs: 16,
2056
+ sm: 20,
2057
+ md: 24,
2058
+ lg: 32,
2059
+ xl: 40
2060
+ }, Icon = ({name: name, size: size = "md", weight: weight = "regular", color: color, className: className = "", style: style, alt: alt}) => {
2061
+ // Get the icon component from Phosphor
2062
+ const IconComponent = PhosphorIcons[name];
2063
+ return IconComponent ? jsx("span", {
2064
+ className: `c-icon c-icon--${size} ${className}`,
2065
+ style: style,
2066
+ "aria-hidden": !alt,
2067
+ title: alt,
2068
+ children: jsx(IconComponent, {
2069
+ size: "string" == typeof size ? sizeMap[size] || 24 : size,
2070
+ weight: weight,
2071
+ color: color,
2072
+ "aria-label": alt
2073
+ })
2074
+ }) : (console.warn(`Icon "${name}" not found in Phosphor Icons`), null);
2075
+ // Convert string size to pixel value if needed
2076
+ };
2077
+
2078
+ /**
2079
+ * Icon component that displays a Phosphor icon
2080
+ */ Icon.displayName = "Icon";
2081
+
2082
+ const Button = React.memo( forwardRef((({label: label, children: children, onClick: onClick, variant: variant = "primary", size: size = "md", disabled: disabled = !1, loading: loading = !1, loadingText: loadingText, icon: icon, iconName: iconName, iconSize: iconSize = "sm", iconPosition: iconPosition = "start", iconOnly: iconOnly = !1, rounded: rounded = !1, fullWidth: fullWidth = !1, block: block = !1, active: active = !1, selected: selected = !1, type: type = "button", className: className = "", as: Component = "button", href: href, target: target, glass: glass, onHover: onHover, onFocus: onFocus, onBlur: onBlur, ariaLabel: ariaLabel, ariaDescribedBy: ariaDescribedBy, ariaExpanded: ariaExpanded, ariaControls: ariaControls, tabIndex: tabIndex, style: style, LinkComponent: LinkComponent, ...props}, ref) => {
2083
+ const isDisabled = disabled || loading, shouldRenderAsLink = Boolean(href && !isDisabled), iconElement = useMemo((() => loading ? null : iconName ? jsx(Icon, {
2084
+ name: iconName,
2085
+ size: iconSize
2086
+ }) : icon), [ icon, iconName, iconSize, loading ]), {generateButtonClass: generateButtonClass, handleClick: handleClick} =
2087
+ /**
2088
+ * Button state and functionality
2089
+ * @param initialProps - Initial button properties
2090
+ * @returns Button state and methods
2091
+ */
2092
+ function(initialProps) {
2093
+ // Default button properties
2094
+ const defaultProps = {
2095
+ variant: "primary",
2096
+ size: "md",
2097
+ disabled: !1,
2098
+ rounded: !1,
2099
+ loading: !1,
2100
+ fullWidth: !1,
2101
+ block: !1,
2102
+ active: !1,
2103
+ selected: !1,
2104
+ ...initialProps
2105
+ };
2106
+ /**
2107
+ * Generate button class based on properties
2108
+ * @param props - Button properties
2109
+ * @returns Class string
2110
+ */ return {
2111
+ defaultProps: defaultProps,
2112
+ generateButtonClass: props => {
2113
+ const {variant: variant = defaultProps.variant, size: size = defaultProps.size, disabled: disabled = defaultProps.disabled, rounded: rounded = defaultProps.rounded, iconOnly: iconOnly = !1, glass: glass = defaultProps.glass, loading: loading = defaultProps.loading, fullWidth: fullWidth = defaultProps.fullWidth, block: block = defaultProps.block, active: active = defaultProps.active, selected: selected = defaultProps.selected, className: className = ""} = props, sizeClass = "md" === size ? "" : `c-btn--${size}`, iconOnlyClass = iconOnly ? "c-btn--icon" : "", roundedClass = rounded ? "c-btn--rounded" : "", disabledClass = disabled ? "c-btn--disabled" : "", glassClass = glass ? "c-btn--glass" : "", loadingClass = loading ? BUTTON.CLASSES.LOADING : "", fullWidthClass = fullWidth ? BUTTON.CLASSES.FULL_WIDTH : "", blockClass = block ? BUTTON.CLASSES.BLOCK : "", activeClass = active ? BUTTON.CLASSES.ACTIVE : "", selectedClass = selected ? BUTTON.CLASSES.SELECTED : "";
2114
+ return [ BUTTON.BASE_CLASS, `c-btn--${variant}`, sizeClass, iconOnlyClass, roundedClass, disabledClass, glassClass, loadingClass, fullWidthClass, blockClass, activeClass, selectedClass, className ].filter(Boolean).join(" ");
2115
+ },
2116
+ handleClick: handler => event => {
2117
+ defaultProps.disabled || defaultProps.loading || !handler || handler(event);
2118
+ }
2119
+ };
2120
+ }({
2121
+ variant: variant,
2122
+ size: size,
2123
+ disabled: isDisabled,
2124
+ rounded: rounded,
2125
+ glass: glass,
2126
+ loading: loading,
2127
+ fullWidth: fullWidth,
2128
+ block: block,
2129
+ active: active,
2130
+ selected: selected
2131
+ }), buttonClass = useMemo((() => generateButtonClass({
2132
+ variant: variant,
2133
+ size: size,
2134
+ disabled: isDisabled,
2135
+ rounded: rounded,
2136
+ iconOnly: iconOnly,
2137
+ glass: glass,
2138
+ loading: loading,
2139
+ fullWidth: fullWidth,
2140
+ block: block,
2141
+ active: active,
2142
+ selected: selected,
2143
+ className: className
2144
+ })), [ variant, size, isDisabled, rounded, iconOnly, glass, loading, fullWidth, block, active, selected, className, generateButtonClass ]), handleClickEvent = useCallback((event => {
2145
+ isDisabled ? event.preventDefault() : onClick?.(event);
2146
+ }), [ isDisabled, onClick ]), handleMouseEnter = useCallback((event => {
2147
+ isDisabled || onHover?.(event);
2148
+ }), [ isDisabled, onHover ]), handleFocusEvent = useCallback((event => {
2149
+ isDisabled || onFocus?.(event);
2150
+ }), [ isDisabled, onFocus ]), handleBlurEvent = useCallback((event => {
2151
+ isDisabled || onBlur?.(event);
2152
+ }), [ isDisabled, onBlur ]), buttonText = useMemo((() => loading && loadingText ? loadingText : label || children), [ loading, loadingText, label, children ]), spinnerSize = useMemo((() => "sm" === size ? "sm" : "lg" === size ? "md" : "sm"), [ size ]), buttonContent = useMemo((() => {
2153
+ const iconSpan = iconElement && jsx("span", {
2154
+ className: BUTTON.ICON_CLASS,
2155
+ "aria-hidden": "true",
2156
+ children: iconElement
2157
+ }), spinnerElement = loading && jsx("span", {
2158
+ className: BUTTON.SPINNER_CLASS,
2159
+ "aria-hidden": "true",
2160
+ children: jsx(Spinner, {
2161
+ size: spinnerSize,
2162
+ variant: "link" === variant || "string" == typeof variant && variant.startsWith("outline-") ? "primary" : "danger" === variant ? "error" : variant
2163
+ })
2164
+ }), labelElement = !iconOnly && buttonText && jsx("span", {
2165
+ className: BUTTON.LABEL_CLASS,
2166
+ children: buttonText
2167
+ });
2168
+ return jsxs(Fragment, "end" === iconPosition ? {
2169
+ children: [ labelElement, spinnerElement, iconSpan ]
2170
+ } : {
2171
+ children: [ spinnerElement, iconSpan, labelElement ]
2172
+ });
2173
+ }), [ iconElement, iconPosition, iconOnly, buttonText, loading, spinnerSize, variant ]), buttonProps = useMemo((() => ({
2174
+ ref: ref,
2175
+ className: buttonClass,
2176
+ type: "button" !== Component || shouldRenderAsLink ? void 0 : type,
2177
+ onClick: handleClickEvent,
2178
+ onMouseEnter: onHover ? handleMouseEnter : void 0,
2179
+ onFocus: onFocus ? handleFocusEvent : void 0,
2180
+ onBlur: onBlur ? handleBlurEvent : void 0,
2181
+ disabled: isDisabled && "button" === Component && !shouldRenderAsLink,
2182
+ "aria-disabled": isDisabled,
2183
+ "aria-busy": loading,
2184
+ "aria-label": ariaLabel || (iconOnly ? label || children : void 0),
2185
+ "aria-describedby": ariaDescribedBy,
2186
+ "aria-expanded": ariaExpanded,
2187
+ "aria-controls": ariaControls,
2188
+ tabIndex: void 0 !== tabIndex ? tabIndex : isDisabled ? -1 : 0,
2189
+ style: style,
2190
+ ...props
2191
+ })), [ ref, buttonClass, Component, type, handleClickEvent, handleMouseEnter, handleFocusEvent, handleBlurEvent, isDisabled, loading, ariaLabel, iconOnly, label, children, ariaDescribedBy, ariaExpanded, ariaControls, tabIndex, style, props ]);
2192
+ // Determine if we should render as a link
2193
+ // Render as anchor if href is provided
2194
+ if (shouldRenderAsLink) {
2195
+ const {ref: _, ...buttonPropsWithoutRef} = buttonProps, anchorButtonProps = {
2196
+ ...buttonPropsWithoutRef,
2197
+ type: void 0,
2198
+ disabled: void 0
2199
+ };
2200
+ // Use custom LinkComponent if provided (e.g., Next.js Link)
2201
+ if (LinkComponent) {
2202
+ const LinkComp = LinkComponent, linkProps = {
2203
+ ...anchorButtonProps,
2204
+ ref: ref,
2205
+ href: href,
2206
+ target: target,
2207
+ rel: "_blank" === target ? "noopener noreferrer" : void 0
2208
+ }, linkElement = jsx(LinkComp, {
2209
+ ...linkProps,
2210
+ children: buttonContent
2211
+ });
2212
+ if (glass) {
2213
+ const defaultGlassProps = {
2214
+ displacementScale: 20,
2215
+ blurAmount: 0,
2216
+ saturation: 200,
2217
+ elasticity: 0
2218
+ }, glassProps = !0 === glass ? defaultGlassProps : {
2219
+ ...defaultGlassProps,
2220
+ ...glass
2221
+ };
2222
+ return jsx(AtomixGlass, {
2223
+ ...glassProps,
2224
+ children: linkElement
2225
+ });
2226
+ }
2227
+ return linkElement;
2228
+ }
2229
+ // Fallback to regular anchor tag
2230
+ const anchorElement = jsx("a", {
2231
+ ...anchorButtonProps,
2232
+ ref: ref,
2233
+ href: href,
2234
+ target: target,
2235
+ rel: "_blank" === target ? "noopener noreferrer" : void 0,
2236
+ children: buttonContent
2237
+ });
2238
+ if (glass) {
2239
+ const defaultGlassProps = {
2240
+ displacementScale: 20,
2241
+ blurAmount: 0,
2242
+ saturation: 200,
2243
+ elasticity: 0
2244
+ }, glassProps = !0 === glass ? defaultGlassProps : {
2245
+ ...defaultGlassProps,
2246
+ ...glass
2247
+ };
2248
+ return jsx(AtomixGlass, {
2249
+ ...glassProps,
2250
+ children: anchorElement
2251
+ });
2252
+ }
2253
+ return anchorElement;
2254
+ }
2255
+ // Default button rendering
2256
+ if (glass) {
2257
+ const defaultGlassProps = {
2258
+ displacementScale: 20,
2259
+ blurAmount: 0,
2260
+ saturation: 200,
2261
+ elasticity: 0
2262
+ }, glassProps = !0 === glass ? defaultGlassProps : {
2263
+ ...defaultGlassProps,
2264
+ ...glass
2265
+ };
2266
+ return jsx(AtomixGlass, {
2267
+ ...glassProps,
2268
+ children: jsx(Component, {
2269
+ ...buttonProps,
2270
+ children: buttonContent
2271
+ })
2272
+ });
2273
+ }
2274
+ return jsx(Component, {
2275
+ ...buttonProps,
2276
+ children: buttonContent
2277
+ });
2278
+ })));
2279
+
2280
+ Button.displayName = "Button";
2281
+
2282
+ const Card = React.memo( forwardRef((({
2283
+ // Variants
2284
+ size: size = "md", variant: variant = "", appearance: appearance = "filled", elevation: elevation = "none", hoverable: hoverable = !1, hoverElevation: hoverElevation = "md",
2285
+ // Layout
2286
+ row: row = !1, flat: flat = !1,
2287
+ // States
2288
+ active: active = !1, disabled: disabled = !1, loading: loading = !1, selected: selected = !1, interactive: interactive = !1,
2289
+ // Content
2290
+ header: header, image: image, imageAlt: imageAlt = "", title: title, text: text, actions: actions, icon: icon, footer: footer, children: children,
2291
+ // Interaction
2292
+ onClick: onClick, onHover: onHover, onFocus: onFocus, href: href, target: target,
2293
+ // Glass
2294
+ glass: glass,
2295
+ // Accessibility
2296
+ role: role, ariaLabel: ariaLabel, ariaDescribedBy: ariaDescribedBy, tabIndex: tabIndex,
2297
+ // Styling
2298
+ className: className = "", style: style, ...rest}, ref) => {
2299
+ // Determine if card is clickable/interactive
2300
+ const isClickable = Boolean(onClick || href || interactive), isDisabled = disabled || loading, cardClasses = useMemo((() => [ CARD.CLASSES.BASE,
2301
+ // Size modifiers
2302
+ "sm" === size ? CARD.CLASSES.SM : "", "md" === size ? CARD.CLASSES.MD : "", "lg" === size ? CARD.CLASSES.LG : "",
2303
+ // Variant modifiers (will be handled in SCSS with @each)
2304
+ variant ? `c-card--${variant}` : "",
2305
+ // Appearance modifiers
2306
+ "filled" === appearance ? CARD.CLASSES.FILLED : "", "outlined" === appearance ? CARD.CLASSES.OUTLINED : "", "ghost" === appearance ? CARD.CLASSES.GHOST : "", "elevated" === appearance ? CARD.CLASSES.ELEVATED : "",
2307
+ // Elevation modifiers
2308
+ "none" === elevation ? CARD.CLASSES.ELEVATION_NONE : "", "sm" === elevation ? CARD.CLASSES.ELEVATION_SM : "", "md" === elevation ? CARD.CLASSES.ELEVATION_MD : "", "lg" === elevation ? CARD.CLASSES.ELEVATION_LG : "", "xl" === elevation ? CARD.CLASSES.ELEVATION_XL : "",
2309
+ // Hoverable modifier
2310
+ hoverable ? "c-card--hoverable" : "", hoverable && hoverElevation ? `c-card--hover-elevation-${hoverElevation}` : "",
2311
+ // Layout modifiers
2312
+ row ? CARD.CLASSES.ROW : "", flat ? CARD.CLASSES.FLAT : "",
2313
+ // State modifiers
2314
+ active ? CARD.CLASSES.ACTIVE : "", disabled ? CARD.CLASSES.DISABLED : "", loading ? CARD.CLASSES.LOADING : "", selected ? CARD.CLASSES.SELECTED : "", interactive || isClickable ? CARD.CLASSES.INTERACTIVE : "", glass ? CARD.CLASSES.GLASS : "", className ].filter(Boolean).join(" ")), [ size, variant, appearance, elevation, hoverable, hoverElevation, row, flat, active, disabled, loading, selected, interactive, isClickable, glass, className ]), cardRole = useMemo((() => role || (href ? "link" : isClickable ? "button" : "article")), [ role, href, isClickable ]), handleClick = useCallback((event => {
2315
+ isDisabled ? event.preventDefault() : onClick?.(event);
2316
+ }), [ isDisabled, onClick ]), handleKeyDown = useCallback((event => {
2317
+ isDisabled ? event.preventDefault() :
2318
+ // Enter or Space activates clickable cards
2319
+ !isClickable || "Enter" !== event.key && " " !== event.key || (event.preventDefault(),
2320
+ onClick && onClick(event));
2321
+ }), [ isDisabled, isClickable, onClick ]), handleMouseEnter = useCallback((event => {
2322
+ isDisabled || onHover?.(event);
2323
+ }), [ isDisabled, onHover ]), handleFocusEvent = useCallback((event => {
2324
+ isDisabled || onFocus?.(event);
2325
+ }), [ isDisabled, onFocus ]), effectiveTabIndex = useMemo((() => void 0 !== tabIndex ? tabIndex : isDisabled ? -1 : isClickable ? 0 : void 0), [ tabIndex, isDisabled, isClickable ]), cardContent = useMemo((() => jsxs(Fragment, {
2326
+ children: [ loading && jsx("div", {
2327
+ className: "c-card__loading",
2328
+ "aria-label": "Loading",
2329
+ children: jsx("div", {
2330
+ className: "c-card__spinner"
2331
+ })
2332
+ }), (image || icon || header) && jsxs("div", {
2333
+ className: CARD.SELECTORS.HEADER.substring(1),
2334
+ children: [ header, image && jsx("img", {
2335
+ src: image,
2336
+ alt: imageAlt,
2337
+ className: CARD.SELECTORS.IMAGE.substring(1),
2338
+ loading: "lazy"
2339
+ }), icon && jsx("div", {
2340
+ className: CARD.SELECTORS.ICON.substring(1),
2341
+ children: icon
2342
+ }) ]
2343
+ }), jsxs("div", {
2344
+ className: CARD.SELECTORS.BODY.substring(1),
2345
+ children: [ title && jsx("h3", {
2346
+ className: CARD.SELECTORS.TITLE.substring(1),
2347
+ children: title
2348
+ }), text && jsx("p", {
2349
+ className: CARD.SELECTORS.TEXT.substring(1),
2350
+ children: text
2351
+ }), children ]
2352
+ }), actions && jsx("div", {
2353
+ className: CARD.SELECTORS.ACTIONS.substring(1),
2354
+ children: actions
2355
+ }), footer && jsx("div", {
2356
+ className: CARD.SELECTORS.FOOTER.substring(1),
2357
+ children: footer
2358
+ }) ]
2359
+ })), [ loading, image, imageAlt, icon, header, title, text, children, actions, footer ]), commonProps = {
2360
+ // ref is applied individually to ensure correct typing for polymorphic behavior
2361
+ className: cardClasses,
2362
+ style: style,
2363
+ role: cardRole,
2364
+ "aria-label": ariaLabel,
2365
+ "aria-describedby": ariaDescribedBy,
2366
+ "aria-disabled": !!isDisabled || void 0,
2367
+ tabIndex: effectiveTabIndex,
2368
+ onClick: isClickable ? handleClick : void 0,
2369
+ onKeyDown: isClickable ? handleKeyDown : void 0,
2370
+ onMouseEnter: onHover ? handleMouseEnter : void 0,
2371
+ onFocus: onFocus ? handleFocusEvent : void 0,
2372
+ ...rest
2373
+ };
2374
+ // Render as anchor if href is provided
2375
+ if (href && !isDisabled) {
2376
+ const anchorElement = jsx("a", {
2377
+ ...commonProps,
2378
+ ref: ref,
2379
+ href: href,
2380
+ target: target,
2381
+ rel: "_blank" === target ? "noopener noreferrer" : void 0,
2382
+ children: cardContent
2383
+ });
2384
+ return glass ? jsx(AtomixGlass, {
2385
+ ...!0 === glass ? {} : glass,
2386
+ elasticity: 0,
2387
+ children: anchorElement
2388
+ }) : anchorElement;
2389
+ }
2390
+ // Render as div
2391
+ const divElement = jsx("div", {
2392
+ ...commonProps,
2393
+ ref: ref,
2394
+ children: cardContent
2395
+ });
2396
+ return glass ? jsx(AtomixGlass, {
2397
+ ...!0 === glass ? {} : glass,
2398
+ elasticity: 0,
2399
+ children: divElement
2400
+ }) : divElement;
2401
+ })));
2402
+
2403
+ Card.displayName = "Card";
2404
+
2405
+ const CardHeader = forwardRef((({title: title, subtitle: subtitle, action: action, icon: icon, children: children, className: className = "", ...props}, ref) => {
2406
+ const headerClasses = `${CARD.SELECTORS.HEADER.substring(1)} ${className}`.trim();
2407
+ return jsxs("div", {
2408
+ ref: ref,
2409
+ className: headerClasses,
2410
+ ...props,
2411
+ children: [ icon && jsx("div", {
2412
+ className: CARD.SELECTORS.ICON.substring(1),
2413
+ children: icon
2414
+ }), (title || subtitle) && jsxs("div", {
2415
+ children: [ title && jsx("h3", {
2416
+ className: CARD.SELECTORS.TITLE.substring(1),
2417
+ children: title
2418
+ }), subtitle && jsx("p", {
2419
+ className: CARD.SELECTORS.TEXT.substring(1),
2420
+ children: subtitle
2421
+ }) ]
2422
+ }), action && jsx("div", {
2423
+ className: CARD.SELECTORS.ACTIONS.substring(1),
2424
+ children: action
2425
+ }), children ]
2426
+ });
2427
+ }));
2428
+
2429
+ CardHeader.displayName = "CardHeader";
2430
+
2431
+ const CardBody = forwardRef((({scrollable: scrollable = !1, maxHeight: maxHeight, children: children, className: className = "", style: style, ...props}, ref) => {
2432
+ const bodyClasses = `${CARD.SELECTORS.BODY.substring(1)} ${scrollable ? "c-card__body--scrollable" : ""} ${className}`.trim(), bodyStyle = {
2433
+ ...style,
2434
+ ...scrollable && maxHeight ? {
2435
+ maxHeight: "number" == typeof maxHeight ? `${maxHeight}px` : maxHeight,
2436
+ overflowY: "auto"
2437
+ } : {}
2438
+ };
2439
+ return jsx("div", {
2440
+ ref: ref,
2441
+ className: bodyClasses,
2442
+ style: bodyStyle,
2443
+ ...props,
2444
+ children: children
2445
+ });
2446
+ }));
2447
+
2448
+ CardBody.displayName = "CardBody";
2449
+
2450
+ const CardFooter = forwardRef((({align: align, children: children, className: className = "", style: style, ...props}, ref) => {
2451
+ const footerClasses = `${CARD.SELECTORS.FOOTER.substring(1)} ${align ? `c-card__footer--align-${align}` : ""} ${className}`.trim();
2452
+ return jsx("div", {
2453
+ ref: ref,
2454
+ className: footerClasses,
2455
+ style: style,
2456
+ ...props,
2457
+ children: children
2458
+ });
2459
+ }));
2460
+
2461
+ CardFooter.displayName = "CardFooter",
2462
+ // Attach subcomponents to Card
2463
+ Card.Header = CardHeader, Card.Body = CardBody, Card.Footer = CardFooter;
2464
+
2465
+ /**
2466
+ * Hook for managing Card component state and behaviors
2467
+ *
2468
+ * @param options - Configuration options for the card
2469
+ * @returns Card state and handlers
2470
+ */
2471
+ const ElevationCard = ({elevationClass: elevationClass = "is-elevated", className: className = "", style: style, children: children, onClick: onClick, ...props}) => {
2472
+ const {getCardProps: getCardProps} = ((options = {}) => {
2473
+ const {elevationEffect: elevationEffect = !1, elevationClass: elevationClass = CARD.CLASSES.ACTIVE, flipEffect: flipEffect = !1, flipTrigger: flipTrigger = "click", focusEffect: focusEffect = !1, clickable: clickable = !1, onClick: onClick} = options, cardRef = useRef(null), frontRef = useRef(null), backRef = useRef(null), [isFlipped, setIsFlipped] = useState(!1), [isElevated, setIsElevated] = useState(!1), [isFocused, setIsFocused] = useState(!1), [isHovered, setIsHovered] = useState(!1), handleClick = useCallback((event => {
2474
+ flipEffect && "click" === flipTrigger && setIsFlipped((prev => !prev)), onClick && onClick(event);
2475
+ }), [ flipEffect, flipTrigger, onClick ]), handleKeyDown = useCallback((event => {
2476
+ "Enter" !== event.key && " " !== event.key || (event.preventDefault(), flipEffect && "click" === flipTrigger && setIsFlipped((prev => !prev)),
2477
+ onClick && onClick(event));
2478
+ }), [ flipEffect, flipTrigger, onClick ]), handleMouseEnter = useCallback((() => {
2479
+ setIsHovered(!0), elevationEffect && setIsElevated(!0), flipEffect && "hover" === flipTrigger && setIsFlipped(!0);
2480
+ }), [ elevationEffect, flipEffect, flipTrigger ]), handleMouseLeave = useCallback((() => {
2481
+ setIsHovered(!1), elevationEffect && setIsElevated(!1), flipEffect && "hover" === flipTrigger && setIsFlipped(!1);
2482
+ }), [ elevationEffect, flipEffect, flipTrigger ]), handleFocus = useCallback((() => {
2483
+ setIsFocused(!0);
2484
+ }), []), handleBlur = useCallback((() => {
2485
+ setIsFocused(!1);
2486
+ }), []), getCardProps = useCallback((() => ({
2487
+ className: [ CARD.CLASSES.BASE, isElevated ? elevationClass : "", isFlipped ? CARD.CLASSES.FLIPPED : "", isFocused && focusEffect ? CARD.CLASSES.FOCUSED : "", clickable ? CARD.CLASSES.CLICKABLE : "" ].filter(Boolean).join(" "),
2488
+ ref: cardRef,
2489
+ tabxwIndex: clickable || flipEffect ? 0 : -1,
2490
+ role: clickable ? "button" : void 0,
2491
+ onMouseEnter: handleMouseEnter,
2492
+ onMouseLeave: handleMouseLeave,
2493
+ onFocus: handleFocus,
2494
+ onBlur: handleBlur,
2495
+ onClick: handleClick,
2496
+ onKeyDown: handleKeyDown
2497
+ })), [ isElevated, isFlipped, isFocused, elevationClass, focusEffect, clickable, handleMouseEnter, handleMouseLeave, handleFocus, handleBlur, handleClick, handleKeyDown, flipEffect ]);
2498
+ return {
2499
+ cardRef: cardRef,
2500
+ frontRef: frontRef,
2501
+ backRef: backRef,
2502
+ isFlipped: isFlipped,
2503
+ isElevated: isElevated,
2504
+ isFocused: isFocused,
2505
+ isHovered: isHovered,
2506
+ handleClick: handleClick,
2507
+ handleKeyDown: handleKeyDown,
2508
+ handleMouseEnter: handleMouseEnter,
2509
+ handleMouseLeave: handleMouseLeave,
2510
+ handleFocus: handleFocus,
2511
+ handleBlur: handleBlur,
2512
+ getCardProps: getCardProps
2513
+ };
2514
+ })({
2515
+ elevationEffect: !0,
2516
+ elevationClass: elevationClass,
2517
+ clickable: Boolean(onClick),
2518
+ onClick: onClick,
2519
+ focusEffect: !0
2520
+ }), cardProps = getCardProps();
2521
+ return jsx("div", {
2522
+ className: `${className} ${cardProps.className}`,
2523
+ ref: cardProps.ref,
2524
+ style: style,
2525
+ tabIndex: cardProps.tabIndex,
2526
+ role: cardProps.role,
2527
+ onMouseEnter: cardProps.onMouseEnter,
2528
+ onMouseLeave: cardProps.onMouseLeave,
2529
+ onFocus: cardProps.onFocus,
2530
+ onBlur: cardProps.onBlur,
2531
+ onClick: cardProps.onClick,
2532
+ onKeyDown: cardProps.onKeyDown,
2533
+ children: jsx(Card, {
2534
+ ...props,
2535
+ className: "",
2536
+ onClick: void 0,
2537
+ children: children
2538
+ })
2539
+ });
2540
+ };
2541
+
2542
+ ElevationCard.displayName = "ElevationCard";
2543
+
2544
+ var commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
2545
+
2546
+ function getDefaultExportFromCjs(x) {
2547
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
2548
+ }
2549
+
2550
+ var fails$8 = function(exec) {
2551
+ try {
2552
+ return !!exec();
2553
+ } catch (error) {
2554
+ return !0;
2555
+ }
2556
+ }, functionBindNative = !fails$8((function() {
2557
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
2558
+ var test = function() {/* empty */}.bind();
2559
+ // eslint-disable-next-line no-prototype-builtins -- safe
2560
+ return "function" != typeof test || test.hasOwnProperty("prototype");
2561
+ })), NATIVE_BIND$3 = functionBindNative, FunctionPrototype$1 = Function.prototype, call$5 = FunctionPrototype$1.call, uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$1.bind.bind(call$5, call$5), functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function(fn) {
2562
+ return function() {
2563
+ return call$5.apply(fn, arguments);
2564
+ };
2565
+ }, objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf), check = function(it) {
2566
+ return it && it.Math === Math && it;
2567
+ }, globalThis_1 =
2568
+ // eslint-disable-next-line es/no-global-this -- safe
2569
+ check("object" == typeof globalThis && globalThis) || check("object" == typeof window && window) ||
2570
+ // eslint-disable-next-line no-restricted-globals -- safe
2571
+ check("object" == typeof self && self) || check("object" == typeof commonjsGlobal && commonjsGlobal) || check("object" == typeof commonjsGlobal && commonjsGlobal) ||
2572
+ // eslint-disable-next-line no-new-func -- fallback
2573
+ function() {
2574
+ return this;
2575
+ }() || Function("return this")(), NATIVE_BIND$2 = functionBindNative, FunctionPrototype = Function.prototype, apply$1 = FunctionPrototype.apply, call$4 = FunctionPrototype.call, functionApply = "object" == typeof Reflect && Reflect.apply || (NATIVE_BIND$2 ? call$4.bind(apply$1) : function() {
2576
+ return call$4.apply(apply$1, arguments);
2577
+ }), uncurryThis$7 = functionUncurryThis, toString$3 = uncurryThis$7({}.toString), stringSlice = uncurryThis$7("".slice), classofRaw$2 = function(it) {
2578
+ return stringSlice(toString$3(it), 8, -1);
2579
+ }, classofRaw$1 = classofRaw$2, uncurryThis$6 = functionUncurryThis, functionUncurryThisClause = function(fn) {
2580
+ // Nashorn bug:
2581
+ // https://github.com/zloirock/core-js/issues/1128
2582
+ // https://github.com/zloirock/core-js/issues/1130
2583
+ if ("Function" === classofRaw$1(fn)) return uncurryThis$6(fn);
2584
+ }, documentAll = "object" == typeof document && document.all, isCallable$8 = void 0 === documentAll && void 0 !== documentAll ? function(argument) {
2585
+ return "function" == typeof argument || argument === documentAll;
2586
+ } : function(argument) {
2587
+ return "function" == typeof argument;
2588
+ }, objectGetOwnPropertyDescriptor = {}, descriptors = !fails$8((function() {
2589
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2590
+ return 7 !== Object.defineProperty({}, 1, {
2591
+ get: function() {
2592
+ return 7;
2593
+ }
2594
+ })[1];
2595
+ })), NATIVE_BIND$1 = functionBindNative, call$3 = Function.prototype.call, functionCall = NATIVE_BIND$1 ? call$3.bind(call$3) : function() {
2596
+ return call$3.apply(call$3, arguments);
2597
+ }, objectPropertyIsEnumerable = {}, $propertyIsEnumerable = {}.propertyIsEnumerable, getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
2598
+ 1: 2
2599
+ }, 1);
2600
+
2601
+ // `Object.prototype.propertyIsEnumerable` method implementation
2602
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
2603
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function(V) {
2604
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
2605
+ return !!descriptor && descriptor.enumerable;
2606
+ } : $propertyIsEnumerable;
2607
+
2608
+ var match, version, createPropertyDescriptor$2 = function(bitmap, value) {
2609
+ return {
2610
+ enumerable: !(1 & bitmap),
2611
+ configurable: !(2 & bitmap),
2612
+ writable: !(4 & bitmap),
2613
+ value: value
2614
+ };
2615
+ }, fails$5 = fails$8, classof$3 = classofRaw$2, $Object$3 = Object, split = functionUncurryThis("".split), indexedObject = fails$5((function() {
2616
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
2617
+ // eslint-disable-next-line no-prototype-builtins -- safe
2618
+ return !$Object$3("z").propertyIsEnumerable(0);
2619
+ })) ? function(it) {
2620
+ return "String" === classof$3(it) ? split(it, "") : $Object$3(it);
2621
+ } : $Object$3, isNullOrUndefined$2 = function(it) {
2622
+ return null == it;
2623
+ }, isNullOrUndefined$1 = isNullOrUndefined$2, $TypeError$6 = TypeError, requireObjectCoercible$3 = function(it) {
2624
+ if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
2625
+ return it;
2626
+ }, IndexedObject = indexedObject, requireObjectCoercible$2 = requireObjectCoercible$3, toIndexedObject$2 = function(it) {
2627
+ return IndexedObject(requireObjectCoercible$2(it));
2628
+ }, isCallable$7 = isCallable$8, isObject$5 = function(it) {
2629
+ return "object" == typeof it ? null !== it : isCallable$7(it);
2630
+ }, path$3 = {}, path$2 = path$3, globalThis$a = globalThis_1, isCallable$6 = isCallable$8, aFunction = function(variable) {
2631
+ return isCallable$6(variable) ? variable : void 0;
2632
+ }, navigator = globalThis_1.navigator, userAgent$1 = navigator && navigator.userAgent, globalThis$8 = globalThis_1, userAgent = userAgent$1 ? String(userAgent$1) : "", process$1 = globalThis$8.process, Deno = globalThis$8.Deno, versions = process$1 && process$1.versions || Deno && Deno.version, v8 = versions && versions.v8;
2633
+
2634
+ v8 && (
2635
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
2636
+ // but their correct versions are not interesting for us
2637
+ version = (match = v8.split("."))[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1])),
2638
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
2639
+ // so check `userAgent` even if `.v8` exists, but 0
2640
+ !version && userAgent && (!(match = userAgent.match(/Edge\/(\d+)/)) || match[1] >= 74) && (match = userAgent.match(/Chrome\/(\d+)/)) && (version = +match[1]);
2641
+
2642
+ var V8_VERSION = version, fails$4 = fails$8, $String$3 = globalThis_1.String, symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$4((function() {
2643
+ var symbol = Symbol("symbol detection");
2644
+ // Chrome 38 Symbol has incorrect toString conversion
2645
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
2646
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
2647
+ // of course, fail.
2648
+ return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
2649
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
2650
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
2651
+ })), useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && "symbol" == typeof Symbol.iterator, isCallable$5 = isCallable$8, isPrototypeOf$1 = objectIsPrototypeOf, $Object$2 = Object, isSymbol$2 = useSymbolAsUid ? function(it) {
2652
+ return "symbol" == typeof it;
2653
+ } : function(it) {
2654
+ var $Symbol = function(namespace, method) {
2655
+ return arguments.length < 2 ? aFunction(path$2[namespace]) || aFunction(globalThis$a[namespace]) : path$2[namespace] && path$2[namespace][method] || globalThis$a[namespace] && globalThis$a[namespace][method];
2656
+ }("Symbol");
2657
+ return isCallable$5($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
2658
+ }, $String$2 = String, isCallable$4 = isCallable$8, $TypeError$5 = TypeError, aCallable$2 = function(argument) {
2659
+ if (isCallable$4(argument)) return argument;
2660
+ throw new $TypeError$5(function(argument) {
2661
+ try {
2662
+ return $String$2(argument);
2663
+ } catch (error) {
2664
+ return "Object";
2665
+ }
2666
+ }(argument) + " is not a function");
2667
+ }, aCallable$1 = aCallable$2, isNullOrUndefined = isNullOrUndefined$2, call$2 = functionCall, isCallable$3 = isCallable$8, isObject$4 = isObject$5, $TypeError$4 = TypeError, sharedStore = {
2668
+ exports: {}
2669
+ }, globalThis$6 = globalThis_1, defineProperty = Object.defineProperty, globalThis$5 = globalThis_1, store$1 = sharedStore.exports = globalThis$5["__core-js_shared__"] || function(key, value) {
2670
+ try {
2671
+ defineProperty(globalThis$6, key, {
2672
+ value: value,
2673
+ configurable: !0,
2674
+ writable: !0
2675
+ });
2676
+ } catch (error) {
2677
+ globalThis$6[key] = value;
2678
+ }
2679
+ return value;
2680
+ }("__core-js_shared__", {});
2681
+
2682
+ /* eslint-disable es/no-symbol -- required for testing */ (store$1.versions || (store$1.versions = [])).push({
2683
+ version: "3.43.0",
2684
+ mode: "pure",
2685
+ copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)",
2686
+ license: "https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",
2687
+ source: "https://github.com/zloirock/core-js"
2688
+ });
2689
+
2690
+ var key, value, store = sharedStore.exports, requireObjectCoercible$1 = requireObjectCoercible$3, $Object$1 = Object, hasOwnProperty = functionUncurryThis({}.hasOwnProperty), hasOwnProperty_1 = Object.hasOwn || function(it, key) {
2691
+ return hasOwnProperty($Object$1(requireObjectCoercible$1(it)), key);
2692
+ }, uncurryThis$3 = functionUncurryThis, id = 0, postfix = Math.random(), toString$2 = uncurryThis$3(1.1.toString), hasOwn$2 = hasOwnProperty_1, NATIVE_SYMBOL = symbolConstructorDetection, USE_SYMBOL_AS_UID = useSymbolAsUid, Symbol$1 = globalThis_1.Symbol, WellKnownSymbolsStore = store[key = "wks"] || (store[key] = value || {}), createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1.for || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || function(key) {
2693
+ return "Symbol(" + (void 0 === key ? "" : key) + ")_" + toString$2(++id + postfix, 36);
2694
+ }, wellKnownSymbol$5 = function(name) {
2695
+ return hasOwn$2(WellKnownSymbolsStore, name) || (WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$2(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol("Symbol." + name)),
2696
+ WellKnownSymbolsStore[name];
2697
+ }, call$1 = functionCall, isObject$3 = isObject$5, isSymbol$1 = isSymbol$2, $TypeError$3 = TypeError, TO_PRIMITIVE = wellKnownSymbol$5("toPrimitive"), toPrimitive = function(input, pref) {
2698
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
2699
+ var result, func, exoticToPrim = (func = input[TO_PRIMITIVE], isNullOrUndefined(func) ? void 0 : aCallable$1(func));
2700
+ if (exoticToPrim) {
2701
+ if (void 0 === pref && (pref = "default"), result = call$1(exoticToPrim, input, pref),
2702
+ !isObject$3(result) || isSymbol$1(result)) return result;
2703
+ throw new $TypeError$3("Can't convert object to primitive value");
2704
+ }
2705
+ return void 0 === pref && (pref = "number"), function(input, pref) {
2706
+ var fn, val;
2707
+ if ("string" === pref && isCallable$3(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
2708
+ if (isCallable$3(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
2709
+ if ("string" !== pref && isCallable$3(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
2710
+ throw new $TypeError$4("Can't convert object to primitive value");
2711
+ }(input, pref);
2712
+ }, isSymbol = isSymbol$2, toPropertyKey$2 = function(argument) {
2713
+ var key = toPrimitive(argument, "string");
2714
+ return isSymbol(key) ? key : key + "";
2715
+ }, isObject$2 = isObject$5, document$1 = globalThis_1.document, EXISTS = isObject$2(document$1) && isObject$2(document$1.createElement), ie8DomDefine = !descriptors && !fails$8((function() {
2716
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2717
+ return 7 !== Object.defineProperty((it = "div", EXISTS ? document$1.createElement(it) : {}), "a", {
2718
+ get: function() {
2719
+ return 7;
2720
+ }
2721
+ }).a;
2722
+ var it;
2723
+ })), DESCRIPTORS$3 = descriptors, call = functionCall, propertyIsEnumerableModule = objectPropertyIsEnumerable, createPropertyDescriptor$1 = createPropertyDescriptor$2, toIndexedObject$1 = toIndexedObject$2, toPropertyKey$1 = toPropertyKey$2, hasOwn$1 = hasOwnProperty_1, IE8_DOM_DEFINE$1 = ie8DomDefine, $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
2724
+
2725
+ // `Object.getOwnPropertyDescriptor` method
2726
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
2727
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor$1 : function(O, P) {
2728
+ if (O = toIndexedObject$1(O), P = toPropertyKey$1(P), IE8_DOM_DEFINE$1) try {
2729
+ return $getOwnPropertyDescriptor$1(O, P);
2730
+ } catch (error) {/* empty */}
2731
+ if (hasOwn$1(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
2732
+ };
2733
+
2734
+ var fails$2 = fails$8, isCallable$2 = isCallable$8, replacement = /#|\.prototype\./, isForced$1 = function(feature, detection) {
2735
+ var value = data[normalize(feature)];
2736
+ return value === POLYFILL || value !== NATIVE && (isCallable$2(detection) ? fails$2(detection) : !!detection);
2737
+ }, normalize = isForced$1.normalize = function(string) {
2738
+ return String(string).replace(replacement, ".").toLowerCase();
2739
+ }, data = isForced$1.data = {}, NATIVE = isForced$1.NATIVE = "N", POLYFILL = isForced$1.POLYFILL = "P", isForced_1 = isForced$1, aCallable = aCallable$2, NATIVE_BIND = functionBindNative, bind$1 = functionUncurryThisClause(functionUncurryThisClause.bind), objectDefineProperty = {}, v8PrototypeDefineBug = descriptors && fails$8((function() {
2740
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2741
+ return 42 !== Object.defineProperty((function() {/* empty */}), "prototype", {
2742
+ value: 42,
2743
+ writable: !1
2744
+ }).prototype;
2745
+ })), isObject$1 = isObject$5, $String$1 = String, $TypeError$2 = TypeError, DESCRIPTORS$1 = descriptors, IE8_DOM_DEFINE = ie8DomDefine, V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug, anObject = function(argument) {
2746
+ if (isObject$1(argument)) return argument;
2747
+ throw new $TypeError$2($String$1(argument) + " is not an object");
2748
+ }, toPropertyKey = toPropertyKey$2, $TypeError$1 = TypeError, $defineProperty = Object.defineProperty, $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2749
+
2750
+ // `Object.defineProperty` method
2751
+ // https://tc39.es/ecma262/#sec-object.defineproperty
2752
+ objectDefineProperty.f = DESCRIPTORS$1 ? V8_PROTOTYPE_DEFINE_BUG ? function(O, P, Attributes) {
2753
+ if (anObject(O), P = toPropertyKey(P), anObject(Attributes), "function" == typeof O && "prototype" === P && "value" in Attributes && "writable" in Attributes && !Attributes.writable) {
2754
+ var current = $getOwnPropertyDescriptor(O, P);
2755
+ current && current.writable && (O[P] = Attributes.value, Attributes = {
2756
+ configurable: "configurable" in Attributes ? Attributes.configurable : current.configurable,
2757
+ enumerable: "enumerable" in Attributes ? Attributes.enumerable : current.enumerable,
2758
+ writable: !1
2759
+ });
2760
+ }
2761
+ return $defineProperty(O, P, Attributes);
2762
+ } : $defineProperty : function(O, P, Attributes) {
2763
+ if (anObject(O), P = toPropertyKey(P), anObject(Attributes), IE8_DOM_DEFINE) try {
2764
+ return $defineProperty(O, P, Attributes);
2765
+ } catch (error) {/* empty */}
2766
+ if ("get" in Attributes || "set" in Attributes) throw new $TypeError$1("Accessors not supported");
2767
+ return "value" in Attributes && (O[P] = Attributes.value), O;
2768
+ };
2769
+
2770
+ var definePropertyModule = objectDefineProperty, createPropertyDescriptor = createPropertyDescriptor$2, createNonEnumerableProperty$1 = descriptors ? function(object, key, value) {
2771
+ return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
2772
+ } : function(object, key, value) {
2773
+ return object[key] = value, object;
2774
+ }, globalThis$2 = globalThis_1, apply = functionApply, uncurryThis$1 = functionUncurryThisClause, isCallable$1 = isCallable$8, getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f, isForced = isForced_1, path$1 = path$3, bind = function(fn, that) {
2775
+ return aCallable(fn), void 0 === that ? fn : NATIVE_BIND ? bind$1(fn, that) : function() {
2776
+ return fn.apply(that, arguments);
2777
+ };
2778
+ }, createNonEnumerableProperty = createNonEnumerableProperty$1, hasOwn = hasOwnProperty_1, wrapConstructor = function(NativeConstructor) {
2779
+ var Wrapper = function(a, b, c) {
2780
+ if (this instanceof Wrapper) {
2781
+ switch (arguments.length) {
2782
+ case 0:
2783
+ return new NativeConstructor;
2784
+
2785
+ case 1:
2786
+ return new NativeConstructor(a);
2787
+
2788
+ case 2:
2789
+ return new NativeConstructor(a, b);
2790
+ }
2791
+ return new NativeConstructor(a, b, c);
2792
+ }
2793
+ return apply(NativeConstructor, this, arguments);
2794
+ };
2795
+ return Wrapper.prototype = NativeConstructor.prototype, Wrapper;
2796
+ }, _export = function(options, source) {
2797
+ var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE, key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor, TARGET = options.target, GLOBAL = options.global, STATIC = options.stat, PROTO = options.proto, nativeSource = GLOBAL ? globalThis$2 : STATIC ? globalThis$2[TARGET] : globalThis$2[TARGET] && globalThis$2[TARGET].prototype, target = GLOBAL ? path$1 : path$1[TARGET] || createNonEnumerableProperty(path$1, TARGET, {})[TARGET], targetPrototype = target.prototype;
2798
+ for (key in source)
2799
+ // contains in native
2800
+ USE_NATIVE = !(FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced)) && nativeSource && hasOwn(nativeSource, key),
2801
+ targetProperty = target[key], USE_NATIVE && (nativeProperty = options.dontCallGetSet ? (descriptor = getOwnPropertyDescriptor(nativeSource, key)) && descriptor.value : nativeSource[key]),
2802
+ // export native or implementation
2803
+ sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key], (FORCED || PROTO || typeof targetProperty != typeof sourceProperty) && (
2804
+ // bind methods to global for calling from export context
2805
+ resultProperty = options.bind && USE_NATIVE ? bind(sourceProperty, globalThis$2) : options.wrap && USE_NATIVE ? wrapConstructor(sourceProperty) : PROTO && isCallable$1(sourceProperty) ? uncurryThis$1(sourceProperty) : sourceProperty,
2806
+ // add a flag to not completely full polyfills
2807
+ (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) && createNonEnumerableProperty(resultProperty, "sham", !0),
2808
+ createNonEnumerableProperty(target, key, resultProperty), PROTO && (hasOwn(path$1, VIRTUAL_PROTOTYPE = TARGET + "Prototype") || createNonEnumerableProperty(path$1, VIRTUAL_PROTOTYPE, {}),
2809
+ // export virtual prototype methods
2810
+ createNonEnumerableProperty(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty),
2811
+ // export real prototype methods
2812
+ options.real && targetPrototype && (FORCED || !targetPrototype[key]) && createNonEnumerableProperty(targetPrototype, key, sourceProperty)));
2813
+ }, ceil = Math.ceil, floor = Math.floor, trunc = Math.trunc || function(x) {
2814
+ var n = +x;
2815
+ return (n > 0 ? floor : ceil)(n);
2816
+ }, toIntegerOrInfinity$2 = function(argument) {
2817
+ var number = +argument;
2818
+ // eslint-disable-next-line no-self-compare -- NaN check
2819
+ return number != number || 0 === number ? 0 : trunc(number);
2820
+ }, toIntegerOrInfinity$1 = toIntegerOrInfinity$2, max = Math.max, min$1 = Math.min, toIntegerOrInfinity = toIntegerOrInfinity$2, min = Math.min, toIndexedObject = toIndexedObject$2, lengthOfArrayLike = function(obj) {
2821
+ return argument = obj.length, (len = toIntegerOrInfinity(argument)) > 0 ? min(len, 9007199254740991) : 0;
2822
+ var argument, len;
2823
+ }, createMethod = function(IS_INCLUDES) {
2824
+ return function($this, el, fromIndex) {
2825
+ var O = toIndexedObject($this), length = lengthOfArrayLike(O);
2826
+ if (0 === length) return !IS_INCLUDES && -1;
2827
+ var value, index = function(index, length) {
2828
+ var integer = toIntegerOrInfinity$1(index);
2829
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
2830
+ }(fromIndex, length);
2831
+ // Array#includes uses SameValueZero equality algorithm
2832
+ // eslint-disable-next-line no-self-compare -- NaN check
2833
+ if (IS_INCLUDES && el != el) {
2834
+ for (;length > index; )
2835
+ // eslint-disable-next-line no-self-compare -- NaN check
2836
+ if ((value = O[index++]) != value) return !0;
2837
+ // Array#indexOf ignores holes, Array#includes - not
2838
+ } else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
2839
+ return !IS_INCLUDES && -1;
2840
+ };
2841
+ }, $includes = [ createMethod(!0), createMethod(!1) ][0];
2842
+
2843
+ // `Array.prototype.includes` method
2844
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
2845
+ _export({
2846
+ target: "Array",
2847
+ proto: !0,
2848
+ forced: fails$8((function() {
2849
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
2850
+ return !Array(1).includes();
2851
+ }))
2852
+ }, {
2853
+ includes: function(el /* , fromIndex = 0 */) {
2854
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
2855
+ }
2856
+ });
2857
+
2858
+ var globalThis$1 = globalThis_1, path = path$3, getBuiltInPrototypeMethod$2 = function(CONSTRUCTOR, METHOD) {
2859
+ var Namespace = path[CONSTRUCTOR + "Prototype"], pureMethod = Namespace && Namespace[METHOD];
2860
+ if (pureMethod) return pureMethod;
2861
+ var NativeConstructor = globalThis$1[CONSTRUCTOR], NativePrototype = NativeConstructor && NativeConstructor.prototype;
2862
+ return NativePrototype && NativePrototype[METHOD];
2863
+ }, includes$4 = getBuiltInPrototypeMethod$2("Array", "includes"), isObject = isObject$5, classof$2 = classofRaw$2, MATCH$1 = wellKnownSymbol$5("match"), $TypeError = TypeError, test = {};
2864
+
2865
+ test[wellKnownSymbol$5("toStringTag")] = "z";
2866
+
2867
+ var TO_STRING_TAG_SUPPORT = "[object z]" === String(test), isCallable = isCallable$8, classofRaw = classofRaw$2, TO_STRING_TAG = wellKnownSymbol$5("toStringTag"), $Object = Object, CORRECT_ARGUMENTS = "Arguments" === classofRaw(function() {
2868
+ return arguments;
2869
+ }()), classof = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
2870
+ var O, tag, result;
2871
+ return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (tag = function(it, key) {
2872
+ try {
2873
+ return it[key];
2874
+ } catch (error) {/* empty */}
2875
+ }(O = $Object(it), TO_STRING_TAG)) ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : "Object" === (result = classofRaw(O)) && isCallable(O.callee) ? "Arguments" : result;
2876
+ }, $String = String, MATCH = wellKnownSymbol$5("match"), $ = _export, notARegExp = function(it) {
2877
+ if (function(it) {
2878
+ var isRegExp;
2879
+ return isObject(it) && (void 0 !== (isRegExp = it[MATCH$1]) ? !!isRegExp : "RegExp" === classof$2(it));
2880
+ }(it)) throw new $TypeError("The method doesn't accept regular expressions");
2881
+ return it;
2882
+ }, requireObjectCoercible = requireObjectCoercible$3, toString = function(argument) {
2883
+ if ("Symbol" === classof(argument)) throw new TypeError("Cannot convert a Symbol value to a string");
2884
+ return $String(argument);
2885
+ }, stringIndexOf = functionUncurryThis("".indexOf);
2886
+
2887
+ // `String.prototype.includes` method
2888
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
2889
+ $({
2890
+ target: "String",
2891
+ proto: !0,
2892
+ forced: !function(METHOD_NAME) {
2893
+ var regexp = /./;
2894
+ try {
2895
+ "/./"[METHOD_NAME](regexp);
2896
+ } catch (error1) {
2897
+ try {
2898
+ return regexp[MATCH] = !1, "/./"[METHOD_NAME](regexp);
2899
+ } catch (error2) {/* empty */}
2900
+ }
2901
+ return !1;
2902
+ }("includes")
2903
+ }, {
2904
+ includes: function(searchString /* , position = 0 */) {
2905
+ return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
2906
+ }
2907
+ });
2908
+
2909
+ var includes$3 = getBuiltInPrototypeMethod$2("String", "includes"), isPrototypeOf = objectIsPrototypeOf, arrayMethod = includes$4, stringMethod = includes$3, ArrayPrototype = Array.prototype, StringPrototype = String.prototype;
2910
+
2911
+ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
2912
+ var own = it.includes;
2913
+ return it === ArrayPrototype || isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes ? arrayMethod : "string" == typeof it || it === StringPrototype || isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes ? stringMethod : own;
2914
+ })), Callout = ({title: title, children: children, icon: icon, variant: variant = "primary", onClose: onClose, actions: actions, oneLine: oneLine = !1, toast: toast = !1, glass: glass, className: className, style: style, ...props}) => {
2915
+ const {generateCalloutClass: generateCalloutClass, handleClose: handleClose} =
2916
+ /**
2917
+ * Callout state and functionality
2918
+ * @param initialProps - Initial callout properties
2919
+ * @returns Callout state and methods
2920
+ */
2921
+ function(initialProps) {
2922
+ // Default callout properties
2923
+ const defaultProps = {
2924
+ variant: "primary",
2925
+ oneLine: !1,
2926
+ toast: !1,
2927
+ glass: !1,
2928
+ ...initialProps
2929
+ };
2930
+ /**
2931
+ * Generate callout class based on properties
2932
+ * @param props - Callout properties
2933
+ * @returns Class string
2934
+ */ return {
2935
+ defaultProps: defaultProps,
2936
+ generateCalloutClass: props => {
2937
+ const {variant: variant = defaultProps.variant, oneLine: oneLine = defaultProps.oneLine, toast: toast = defaultProps.toast, glass: glass = defaultProps.glass, className: className = ""} = props;
2938
+ return `c-callout ${variant ? `c-callout--${variant}` : ""} ${oneLine ? "c-callout--oneline" : ""} ${toast ? "c-callout--toast" : ""} ${glass ? "c-callout--glass" : ""} ${className}`.trim();
2939
+ },
2940
+ handleClose: handler => () => {
2941
+ handler && handler();
2942
+ }
2943
+ };
2944
+ }
2945
+ /**
2946
+ * Callout component for displaying important messages, notifications, or alerts
2947
+ */ ({
2948
+ variant: variant,
2949
+ oneLine: oneLine,
2950
+ toast: toast,
2951
+ glass: glass,
2952
+ className: className,
2953
+ style: style
2954
+ }), getAriaAttributes = () => {
2955
+ var _context, _context2;
2956
+ const baseAttributes = {
2957
+ role: "region"
2958
+ };
2959
+ // For toast notifications or alerts, use appropriate role and live region
2960
+ return toast ? (baseAttributes.role = "alert", baseAttributes["aria-live"] = "polite") : _includesInstanceProperty(_context = [ "warning", "error" ]).call(_context, variant) ? (baseAttributes.role = "alert",
2961
+ baseAttributes["aria-live"] = "assertive") : _includesInstanceProperty(_context2 = [ "info", "success" ]).call(_context2, variant) && (baseAttributes.role = "status",
2962
+ baseAttributes["aria-live"] = "polite"), baseAttributes;
2963
+ }, calloutContent = jsxs(Fragment, {
2964
+ children: [ jsxs("div", {
2965
+ className: "c-callout__content",
2966
+ children: [ icon && jsx("div", {
2967
+ className: "c-callout__icon",
2968
+ children: icon
2969
+ }), jsxs("div", {
2970
+ className: "c-callout__message",
2971
+ children: [ title && jsx("div", {
2972
+ className: "c-callout__title",
2973
+ children: title
2974
+ }), children && jsx("div", {
2975
+ className: "c-callout__text",
2976
+ children: children
2977
+ }) ]
2978
+ }) ]
2979
+ }), actions && jsx("div", {
2980
+ className: "c-callout__actions",
2981
+ children: actions
2982
+ }), onClose && jsx("button", {
2983
+ className: "c-callout__close-btn",
2984
+ onClick: handleClose(onClose),
2985
+ "aria-label": "Close",
2986
+ children: jsx(Icon, {
2987
+ name: "X",
2988
+ size: "md"
2989
+ })
2990
+ }) ]
2991
+ });
2992
+ // Determine appropriate ARIA attributes based on variant
2993
+ if (glass) {
2994
+ // Default glass settings for callouts
2995
+ const defaultGlassProps = {
2996
+ displacementScale: 30,
2997
+ cornerRadius: 8,
2998
+ elasticity: 0
2999
+ }, glassProps = !0 === glass ? defaultGlassProps : {
3000
+ ...defaultGlassProps,
3001
+ ...glass
3002
+ };
3003
+ return jsx("div", {
3004
+ className: generateCalloutClass({
3005
+ variant: variant,
3006
+ oneLine: oneLine,
3007
+ toast: toast,
3008
+ glass: glass,
3009
+ className: className
3010
+ }),
3011
+ ...getAriaAttributes(),
3012
+ ...props,
3013
+ style: style,
3014
+ children: jsx(AtomixGlass, {
3015
+ ...glassProps,
3016
+ children: jsx("div", {
3017
+ className: "c-callout__glass-content",
3018
+ style: {
3019
+ borderRadius: glassProps.cornerRadius
3020
+ },
3021
+ children: calloutContent
3022
+ })
3023
+ })
3024
+ });
3025
+ }
3026
+ return jsx("div", {
3027
+ className: generateCalloutClass({
3028
+ variant: variant,
3029
+ oneLine: oneLine,
3030
+ toast: toast,
3031
+ glass: glass,
3032
+ className: className
3033
+ }),
3034
+ ...getAriaAttributes(),
3035
+ ...props,
3036
+ style: style,
3037
+ children: calloutContent
3038
+ });
3039
+ };
3040
+
3041
+ Callout.displayName = "Callout";
3042
+
3043
+ const List = memo((({children: children, variant: variant = "default", className: className = "", style: style, ...props}) => {
3044
+ var _context;
3045
+ // Generate CSS classes
3046
+ const listClasses = [ LIST.BASE_CLASS, "default" !== variant && `c-list--${variant}`, className ].filter(Boolean).join(" "), ListElement = _includesInstanceProperty(_context = [ "number", "text" ]).call(_context, variant) ? "ol" : "ul";
3047
+ // Determine the HTML element based on variant
3048
+ return jsx(ListElement, {
3049
+ className: listClasses,
3050
+ style: style,
3051
+ ...props,
3052
+ children: React.Children.map(children, (child => jsx("li", {
3053
+ className: "c-list__item",
3054
+ children: child
3055
+ })))
3056
+ });
3057
+ }));
3058
+
3059
+ List.displayName = "List";
3060
+
3061
+ const ListGroup = ({children: children, className: className = "", style: style, variant: variant = "default"}) => {
3062
+ // Generate CSS classes
3063
+ const listGroupClasses = [ LIST_GROUP.BASE_CLASS, className ].filter(Boolean).join(" "), validLists = React.Children.toArray(children).filter((child => React.isValidElement(child) && child.type === List));
3064
+ // Get valid List children
3065
+ return jsx("div", {
3066
+ className: listGroupClasses,
3067
+ style: style,
3068
+ children: validLists.map(((child, index) => {
3069
+ const childProps = child.props;
3070
+
3071
+ return React.cloneElement(child, {
3072
+ key: index,
3073
+ variant: childProps?.variant ?? variant
3074
+ });
3075
+ }))
3076
+ });
3077
+ };
3078
+
3079
+ ListGroup.displayName = "ListGroup";
3080
+
3081
+ // Adapted from https://github.com/shuding/liquid-glass
3082
+ // Constants
3083
+ const smoothStep = (a, b, t) => {
3084
+ // Add input validation
3085
+ if ("number" != typeof a || "number" != typeof b || "number" != typeof t) return 0;
3086
+ const clamped = Math.max(0, Math.min(1, (t - a) / (b - a)));
3087
+ return clamped * clamped * (3 - 2 * clamped);
3088
+ }, calculateLength = (x, y) => {
3089
+ // Add input validation and error handling
3090
+ if ("number" != typeof x || "number" != typeof y || isNaN(x) || isNaN(y)) return 0;
3091
+ // Prevent potential overflow
3092
+ const maxX = Math.max(Math.abs(x), Math.abs(y));
3093
+ if (0 === maxX) return 0;
3094
+ const scaledX = x / maxX, scaledY = y / maxX;
3095
+ return maxX * Math.sqrt(scaledX * scaledX + scaledY * scaledY);
3096
+ }, roundedRectSDF = (x, y, width, height, radius) => {
3097
+ // Add input validation
3098
+ if ("number" != typeof x || "number" != typeof y || "number" != typeof width || "number" != typeof height || "number" != typeof radius) return 0;
3099
+ const qx = Math.abs(x) - width + radius, qy = Math.abs(y) - height + radius;
3100
+ return Math.min(Math.max(qx, qy), 0) + calculateLength(Math.max(qx, 0), Math.max(qy, 0)) - radius;
3101
+ }, createTexture = (x, y) => ({
3102
+ x: "number" != typeof x || isNaN(x) ? .5 : Math.max(0, Math.min(1, x)),
3103
+ y: "number" != typeof y || isNaN(y) ? .5 : Math.max(0, Math.min(1, y))
3104
+ }), validateVec2 = vec => vec && "number" == typeof vec.x && "number" == typeof vec.y && !isNaN(vec.x) && !isNaN(vec.y), clampValue = (value, min, max) =>
3105
+ // Add input validation
3106
+ "number" != typeof value || "number" != typeof min || "number" != typeof max || isNaN(value) ? min : isNaN(min) ? 0 : isNaN(max) ? 1 : Math.max(min, Math.min(max, value)), easeInOutCubic = t => {
3107
+ // Add input validation
3108
+ if ("number" != typeof t || isNaN(t)) return 0;
3109
+ const clampedT = Math.max(0, Math.min(1, t));
3110
+ return clampedT < .5 ? 4 * clampedT * clampedT * clampedT : 1 - Math.pow(-2 * clampedT + 2, 3) / 2;
3111
+ }, easeOutQuart = t => {
3112
+ // Add input validation
3113
+ if ("number" != typeof t || isNaN(t)) return 0;
3114
+ const clampedT = Math.max(0, Math.min(1, t));
3115
+ return 1 - Math.pow(1 - clampedT, 4);
3116
+ }, noise2D = (x, y) => {
3117
+ // Add input validation
3118
+ if ("number" != typeof x || "number" != typeof y || isNaN(x) || isNaN(y)) return 0;
3119
+ const X = 255 & Math.floor(x), Y = 255 & Math.floor(y), xf = x - Math.floor(x), yf = y - Math.floor(y), u = easeInOutCubic(xf), v = easeInOutCubic(yf), hash = (i, j) => {
3120
+ // Add input validation
3121
+ if ("number" != typeof i || "number" != typeof j) return 0;
3122
+ const n = i + 57 * j, hashed = 43758.5453 * Math.sin(12.9898 * n + 78.233);
3123
+ // Use a more stable hash function
3124
+ return hashed - Math.floor(hashed);
3125
+ }, a = hash(X, Y), b = hash(X + 1, Y), c = hash(X, Y + 1), x1 = a + u * (b - a);
3126
+ return x1 + v * (c + u * (hash(X + 1, Y + 1) - c) - x1);
3127
+ }, fbm = (x, y, octaves = 4) => {
3128
+ // Add input validation
3129
+ if ("number" != typeof x || "number" != typeof y || isNaN(x) || isNaN(y)) return 0;
3130
+ // Clamp octaves to prevent performance issues
3131
+ const clampedOctaves = Math.max(1, Math.min(8, Math.floor(octaves)));
3132
+ let value = 0, amplitude = .5, frequency = 1;
3133
+ for (let i = 0; i < clampedOctaves; i++) value += amplitude * noise2D(x * frequency, y * frequency),
3134
+ frequency *= 2, amplitude *= .5;
3135
+ return value;
3136
+ }, calculateParallaxOffset = (x, y, depth, mouseX = 0, mouseY = 0) => {
3137
+ // Add input validation
3138
+ if ("number" != typeof x || "number" != typeof y || "number" != typeof depth || "number" != typeof mouseX || "number" != typeof mouseY || isNaN(x) || isNaN(y) || isNaN(depth) || isNaN(mouseX) || isNaN(mouseY)) return {
3139
+ x: 0,
3140
+ y: 0
3141
+ };
3142
+ const parallaxStrength = Math.min(.02 * depth, .1);
3143
+ // Limit strength to prevent extreme values
3144
+ // Calculate offset based on view angle (simulated by mouse position)
3145
+ return {
3146
+ x: (x - mouseX) * parallaxStrength,
3147
+ y: (y - mouseY) * parallaxStrength
3148
+ };
3149
+ }, fragmentShaders = {
3150
+ liquidGlass: (uv, mousePosition) => {
3151
+ if (!validateVec2(uv)) return {
3152
+ x: .5,
3153
+ y: .5
3154
+ };
3155
+ const ix = uv.x - .5, iy = uv.y - .5, time = 8e-4 * Date.now(), mouseX = mousePosition && validateVec2(mousePosition) ? mousePosition.x - .5 : 0, mouseY = mousePosition && validateVec2(mousePosition) ? mousePosition.y - .5 : 0, mouseDistance = calculateLength(mouseX, mouseY), mouseFalloff = easeOutQuart(1 - Math.min(2 * mouseDistance, 1)), organicFlow = fbm(12 * (ix + .5 * mouseX) + time, 12 * (iy + .5 * mouseY) + .7 * time, 3) - .5, distanceToEdge = roundedRectSDF(ix, iy, .4, .3, .35), baseDisplacement = smoothStep(.8, 0, distanceToEdge - .05), radialDist = ((x, y, strength) => {
3156
+ // Add input validation
3157
+ if ("number" != typeof x || "number" != typeof y || isNaN(x) || isNaN(y) || isNaN(strength)) return {
3158
+ x: 0,
3159
+ y: 0
3160
+ };
3161
+ const distance = calculateLength(x, y), distortion = Math.pow(Math.min(distance, 10), 2) * strength;
3162
+ // Limit distance to prevent extreme values
3163
+ return {
3164
+ x: x * (1 + distortion),
3165
+ y: y * (1 + distortion)
3166
+ };
3167
+ })(ix, iy, .4 * .1), refractionX = 1.2 * (radialDist.x - ix) * baseDisplacement, refractionY = 1.2 * (radialDist.y - iy) * baseDisplacement, flowX = .018 * Math.sin(8 * (ix + 2 * mouseX) + 2 * time), flowY = .018 * Math.cos(8 * (iy + 2 * mouseY) + 1.5 * time), rippleEffect = (.015 * Math.sin(12 * (ix - mouseX) + 12 * (iy - mouseY) + 3 * time) + .012 * Math.cos(10 * (ix + mouseX) - 10 * (iy - mouseY) - 2 * time)) * mouseFalloff * mouseDistance, depthEffect = (Math.sin(15 * ix + time) * Math.cos(15 * iy - time) * .008 + Math.sin(20 * ix - .5 * time) * Math.cos(20 * iy + .5 * time) * .006) * baseDisplacement, liquidFlow = .85 * (flowX + flowY + .025 * organicFlow), totalDistortionX = refractionX + liquidFlow + rippleEffect + depthEffect, totalDistortionY = refractionY + .8 * liquidFlow + .9 * rippleEffect + depthEffect, chromaticOffset = ((x, y, intensity) => {
3168
+ // Add input validation
3169
+ if ("number" != typeof x || "number" != typeof y || "number" != typeof intensity || isNaN(x) || isNaN(y) || isNaN(intensity)) return {
3170
+ x: 0,
3171
+ y: 0
3172
+ };
3173
+ const distance = calculateLength(x, y);
3174
+ // Prevent division by zero and extreme values
3175
+ if (0 === distance) return {
3176
+ x: 0,
3177
+ y: 0
3178
+ };
3179
+ const angle = Math.atan2(y, x);
3180
+ return {
3181
+ x: Math.cos(angle) * distance * intensity,
3182
+ y: Math.sin(angle) * distance * intensity
3183
+ };
3184
+ })(ix, iy, .015 * baseDisplacement), scaled = smoothStep(0, 1, 1.15 * baseDisplacement), finalX = ix + totalDistortionX + .5 * chromaticOffset.x, finalY = iy + totalDistortionY + .5 * chromaticOffset.y;
3185
+ return createTexture(clampValue(finalX * scaled + .5, 0, 1), clampValue(finalY * scaled + .5, 0, 1));
3186
+ },
3187
+ // Premium Apple-style fluid glass with enhanced organic flow
3188
+ appleFluid: (uv, mousePosition) => {
3189
+ if (!validateVec2(uv)) return {
3190
+ x: .5,
3191
+ y: .5
3192
+ };
3193
+ const ix = uv.x - .5, iy = uv.y - .5, time = 8e-4 * Date.now() * .6, mouseX = mousePosition && validateVec2(mousePosition) ? mousePosition.x - .5 : 0, mouseY = mousePosition && validateVec2(mousePosition) ? mousePosition.y - .5 : 0, mouseDistance = calculateLength(mouseX, mouseY), mouseFalloff = easeOutQuart(1 - Math.min(1.5 * mouseDistance, 1)), organicX = fbm(10 * (ix + .3 * mouseX) + time, 10 * (iy + .3 * mouseY), 5) - .5, organicY = fbm(10 * (ix - .3 * mouseX), 10 * (iy - .3 * mouseY) + .8 * time, 5) - .5, distanceToEdge = roundedRectSDF(ix, iy, .42, .32, .38), mask = smoothStep(.85, -.1, distanceToEdge), fluidVelocityX = Math.sin(6 * ix + 2 * time) * Math.cos(4 * iy - time) * .025, fluidVelocityY = Math.cos(4 * ix - time) * Math.sin(6 * iy + 2 * time) * .025, vortexAngle = Math.atan2(iy - mouseY, ix - mouseX), vortexStrength = mouseFalloff * mouseDistance * .08, vortexX = Math.cos(vortexAngle + time) * vortexStrength, totalY = iy + (.035 * organicY + fluidVelocityY + Math.sin(vortexAngle + time) * vortexStrength) * mask;
3194
+ return createTexture(clampValue(ix + (.035 * organicX + fluidVelocityX + vortexX) * mask + .5, 0, 1), clampValue(totalY + .5, 0, 1));
3195
+ },
3196
+ // High-end glass with advanced refraction and depth
3197
+ premiumGlass: (uv, mousePosition) => {
3198
+ if (!validateVec2(uv)) return {
3199
+ x: .5,
3200
+ y: .5
3201
+ };
3202
+ const ix = uv.x - .5, iy = uv.y - .5, time = 8e-4 * Date.now() * .4, mouseX = mousePosition && validateVec2(mousePosition) ? mousePosition.x - .5 : 0, mouseY = mousePosition && validateVec2(mousePosition) ? mousePosition.y - .5 : 0, mouseDistance = calculateLength(mouseX, mouseY), centerDistance = calculateLength(ix, iy), refractionStrength = .3 * Math.pow(Math.min(centerDistance, 1), 1.5), refractionAngle = Math.atan2(iy, ix);
3203
+ // Multi-layer depth effect
3204
+ let depthX = 0, depthY = 0;
3205
+ for (let layer = 0; layer < 3; layer++) {
3206
+ const layerScale = 5 * (layer + 1), layerTime = time * (1 + .3 * layer), layerStrength = .01 / (layer + 1);
3207
+ depthX += Math.sin(ix * layerScale + layerTime) * layerStrength, depthY += Math.cos(iy * layerScale - layerTime) * layerStrength;
3208
+ }
3209
+ // Glass refraction with mouse influence
3210
+ const refractionX = Math.cos(refractionAngle) * refractionStrength * (1 + .5 * mouseDistance), refractionY = Math.sin(refractionAngle) * refractionStrength * (1 + .5 * mouseDistance), organicNoise = fbm(8 * ix + time, 8 * iy - time, 2) - .5, distanceToEdge = roundedRectSDF(ix, iy, .43, .33, .36), edgeMask = smoothStep(.9, -.05, distanceToEdge), finalY = iy + (refractionY + depthY + .015 * organicNoise) * edgeMask;
3211
+ return createTexture(clampValue(ix + (refractionX + depthX + .015 * organicNoise) * edgeMask + .5, 0, 1), clampValue(finalY + .5, 0, 1));
3212
+ },
3213
+ // Metallic liquid effect with shimmer
3214
+ liquidMetal: (uv, mousePosition) => {
3215
+ if (!validateVec2(uv)) return {
3216
+ x: .5,
3217
+ y: .5
3218
+ };
3219
+ const ix = uv.x - .5, iy = uv.y - .5, time = 8e-4 * Date.now() * 1.2, mouseX = mousePosition && validateVec2(mousePosition) ? mousePosition.x - .5 : 0, mouseY = mousePosition && validateVec2(mousePosition) ? mousePosition.y - .5 : 0, wave1 = Math.sin(20 * ix + 4 * time) * Math.cos(15 * iy - 3 * time) * .02, wave2 = Math.cos(15 * ix - 2 * time) * Math.sin(20 * iy + 5 * time) * .015, shimmer = .025 * fbm(25 * ix + 2 * time, 25 * iy - 2 * time, 4), flowAngle = Math.atan2(iy - mouseY, ix - mouseX), flowDistance = calculateLength(ix - mouseX, iy - mouseY), flowEffect = .02 * Math.sin(15 * flowDistance - 6 * time) * easeOutQuart(1 - Math.min(2 * flowDistance, 1)), distanceToEdge = roundedRectSDF(ix, iy, .41, .31, .37), mask = smoothStep(.88, -.08, distanceToEdge), totalX = ix + (wave1 + shimmer + Math.cos(flowAngle) * flowEffect) * mask, totalY = iy + (wave2 + .8 * shimmer + Math.sin(flowAngle) * flowEffect) * mask;
3220
+ return createTexture(clampValue(totalX + .5, 0, 1), clampValue(totalY + .5, 0, 1));
3221
+ },
3222
+ // basiBasi - Expert Premium Glass Shader
3223
+ // The most advanced shader with caustics, spectral dispersion, parallax depth, and volumetric effects
3224
+ basiBasi: (uv, mousePosition) => {
3225
+ if (!validateVec2(uv)) return {
3226
+ x: .5,
3227
+ y: .5
3228
+ };
3229
+ const ix = uv.x - .5, iy = uv.y - .5, time = 8e-4 * Date.now() * .5, mouseX = mousePosition && validateVec2(mousePosition) ? mousePosition.x - .5 : 0, mouseY = mousePosition && validateVec2(mousePosition) ? mousePosition.y - .5 : 0, mouseDistance = calculateLength(mouseX, mouseY), mouseFalloff = easeOutQuart(1 - Math.min(1.2 * mouseDistance, 1)), causticIntensity = ((x, y, time, intensity = 1) =>
3230
+ // Add input validation
3231
+ "number" != typeof x || "number" != typeof y || "number" != typeof time || "number" != typeof intensity || isNaN(x) || isNaN(y) || isNaN(time) || isNaN(intensity) ? .5 : .5 * (Math.sin(8 * x + 2 * time) * Math.cos(8 * y - 2 * time) * .5 + Math.sin(8 * (x + .5) * 1.3 - 2 * time * .8) * Math.cos(8 * (y - .3) * 1.3 + 2 * time * .8) * .3 + Math.sin(8 * (x - .3) * .7 + 2 * time * 1.2) * Math.cos(8 * (y + .4) * .7 - 2 * time * 1.2) * .2 + 1) * intensity)(ix, iy, time, .8), causticDistortion = .02 * (causticIntensity - .5), refractionAngle = Math.atan2(iy, ix), spectralDispersion = ((x, y, angle) => {
3232
+ // Add input validation
3233
+ if ("number" != typeof x || "number" != typeof y || "number" != typeof angle || isNaN(x) || isNaN(y) || isNaN(angle) || isNaN(.025)) return {
3234
+ r: {
3235
+ x: 0,
3236
+ y: 0
3237
+ },
3238
+ g: {
3239
+ x: 0,
3240
+ y: 0
3241
+ },
3242
+ b: {
3243
+ x: 0,
3244
+ y: 0
3245
+ }
3246
+ };
3247
+ const distance = calculateLength(x, y), dispersionStrength = Math.min(.025 * distance, 1), redOffset = .8 * dispersionStrength, greenOffset = 1 * dispersionStrength, blueOffset = 1.2 * dispersionStrength;
3248
+ return {
3249
+ r: {
3250
+ x: Math.cos(angle) * redOffset,
3251
+ y: Math.sin(angle) * redOffset
3252
+ },
3253
+ g: {
3254
+ x: Math.cos(angle) * greenOffset,
3255
+ y: Math.sin(angle) * greenOffset
3256
+ },
3257
+ b: {
3258
+ x: Math.cos(angle) * blueOffset,
3259
+ y: Math.sin(angle) * blueOffset
3260
+ }
3261
+ };
3262
+ })(ix, iy, refractionAngle), spectralX = (spectralDispersion.r.x + spectralDispersion.g.x + spectralDispersion.b.x) / 3, spectralY = (spectralDispersion.r.y + spectralDispersion.g.y + spectralDispersion.b.y) / 3;
3263
+ // === MULTI-LAYER PARALLAX DEPTH ===
3264
+ // Create depth perception with 7 layers
3265
+ let parallaxX = 0, parallaxY = 0;
3266
+ for (let layer = 0; layer < 7; layer++) {
3267
+ const parallaxOffset = calculateParallaxOffset(ix, iy, (layer + 1) / 7, mouseX, mouseY), layerNoise = fbm((ix + parallaxOffset.x) * (8 + 2 * layer) + time * (.5 + .1 * layer), (iy + parallaxOffset.y) * (8 + 2 * layer) - time * (.5 + .1 * layer), 3) - .5, layerWeight = 1 / (layer + 1);
3268
+ parallaxX += (parallaxOffset.x + .01 * layerNoise) * layerWeight, parallaxY += (parallaxOffset.y + .01 * layerNoise) * layerWeight;
3269
+ }
3270
+ // Normalize parallax effect
3271
+ parallaxX /= 7, parallaxY /= 7;
3272
+ // === VOLUMETRIC SCATTERING ===
3273
+ // Simulate light scattering through glass volume
3274
+ const volumetricDensity = ((x, y, depth, time) =>
3275
+ // Add input validation
3276
+ "number" != typeof x || "number" != typeof y || "number" != typeof time || isNaN(x) || isNaN(y) || isNaN(.5) || isNaN(time) ? .5 : fbm(5 * x + .5 * time, 5 * y - .5 * time, 3) * Math.exp(2 * -Math.max(0, .5)) * .5 + .5)(ix, iy, 0, time), scatteringX = Math.cos(refractionAngle) * volumetricDensity * .015, scatteringY = Math.sin(refractionAngle) * volumetricDensity * .015, turbulence = ((x, y, time, octaves = 5) => {
3277
+ // Add input validation
3278
+ if ("number" != typeof x || "number" != typeof y || "number" != typeof time || "number" != typeof octaves || isNaN(x) || isNaN(y) || isNaN(time) || isNaN(octaves)) return 0;
3279
+ // Clamp octaves to prevent performance issues
3280
+ const clampedOctaves = Math.max(1, Math.min(8, Math.floor(octaves)));
3281
+ let turbulence = 0, amplitude = 1, frequency = 1;
3282
+ for (let i = 0; i < clampedOctaves; i++) turbulence += Math.abs(noise2D(x * frequency + time, y * frequency - time)) * amplitude,
3283
+ frequency *= 2, amplitude *= .5;
3284
+ return turbulence;
3285
+ })(6 * ix, 6 * iy, time, 6), turbulenceX = .012 * Math.cos(turbulence * Math.PI * 2), turbulenceY = .012 * Math.sin(turbulence * Math.PI * 2), microSurface = ((x, y, time) =>
3286
+ // Add input validation
3287
+ "number" != typeof x || "number" != typeof y || "number" != typeof time || isNaN(x) || isNaN(y) || isNaN(time) ? .5 : .5 * (.7 * fbm(40 * x + .3 * time, 40 * y - .3 * time, 6) + .3 * fbm(80 * x, 80 * y, 4)))(ix, iy, time), microDetailX = .008 * (microSurface - .5), microDetailY = .008 * (microSurface - .5), centerDistance = calculateLength(ix, iy), dynamicRefraction = .35 * Math.pow(Math.min(centerDistance, 1), 1.8) * (1 + mouseFalloff * mouseDistance * .8), refractionX = Math.cos(refractionAngle) * dynamicRefraction, refractionY = Math.sin(refractionAngle) * dynamicRefraction, vortexAngle = Math.atan2(iy - mouseY, ix - mouseX), vortexDistance = calculateLength(ix - mouseX, iy - mouseY), vortexStrength = mouseFalloff * Math.sin(10 * vortexDistance - 3 * time) * .025, vortexX = Math.cos(vortexAngle + 2 * time) * vortexStrength, vortexY = Math.sin(vortexAngle + 2 * time) * vortexStrength, fluidX = Math.sin(10 * ix + 5 * mouseX + 2.5 * time) * Math.cos(8 * iy - 2 * time) * .018, fluidY = Math.cos(8 * ix - 2 * time) * Math.sin(10 * iy + 5 * mouseY + 2.5 * time) * .018, rippleEffect = (.012 * Math.sin(15 * Math.min(centerDistance, 10) - 4 * time) + .008 * Math.cos(20 * Math.min(centerDistance, 10) + 3 * time)) * mouseFalloff, rippleX = Math.cos(refractionAngle) * rippleEffect, rippleY = Math.sin(refractionAngle) * rippleEffect, distanceToEdge = roundedRectSDF(ix, iy, .44, .34, .39), edgeMask = smoothStep(.92, -.12, distanceToEdge), edgeSoftness = smoothStep(.85, .1, distanceToEdge), finalY = iy + (1.2 * refractionY + .8 * spectralY + 1.5 * parallaxY + .9 * scatteringY + 1 * turbulenceY + .6 * microDetailY + 1.3 * vortexY + 1.1 * fluidY + .7 * rippleY + .8 * causticDistortion) * edgeMask * edgeSoftness * .85;
3288
+ return createTexture(clampValue(ix + (1.2 * refractionX + .8 * spectralX + 1.5 * parallaxX + .9 * scatteringX + 1 * turbulenceX + .6 * microDetailX + 1.3 * vortexX + 1.1 * fluidX + .7 * rippleX + causticDistortion) * edgeMask * edgeSoftness * .85 + .5, 0, 1), clampValue(finalY + .5, 0, 1));
3289
+ }
3290
+ }, shaderUtils = Object.freeze( Object.defineProperty({
3291
+ __proto__: null,
3292
+ ShaderDisplacementGenerator: class {
3293
+ constructor(options) {
3294
+ if (this.options = options, this.canvasDPI = 1, !this.validateOptions(options)) throw new Error("Invalid shader options provided");
3295
+ this.canvas = document.createElement("canvas"),
3296
+ // Enhanced validation for canvas dimensions
3297
+ this.canvas.width = Math.max(1, Math.min(4096, Math.round(options.width * this.canvasDPI || 256))),
3298
+ this.canvas.height = Math.max(1, Math.min(4096, Math.round(options.height * this.canvasDPI || 256))),
3299
+ this.canvas.style.display = "none";
3300
+ const context = this.canvas.getContext("2d");
3301
+ if (!context) throw new Error("AtomixGlass: Could not get 2D canvas context");
3302
+ this.context = context;
3303
+ }
3304
+ validateOptions(options) {
3305
+ try {
3306
+ return options && "number" == typeof options.width && options.width > 0 && options.width <= 4096 && "number" == typeof options.height && options.height > 0 && options.height <= 4096 && "function" == typeof options.fragment;
3307
+ } catch (e) {
3308
+ // Graceful error handling
3309
+ return !1;
3310
+ }
3311
+ }
3312
+ updateShader(mousePosition) {
3313
+ try {
3314
+ const w = this.options.width * this.canvasDPI, h = this.options.height * this.canvasDPI;
3315
+ let maxScale = 0;
3316
+ const rawValues = [];
3317
+ // Calculate displacement values with enhanced smoothing
3318
+ for (let y = 0; y < h; y++) for (let x = 0; x < w; x++) {
3319
+ const uv = {
3320
+ x: x / w,
3321
+ y: y / h
3322
+ }, pos = this.options.fragment(uv, mousePosition);
3323
+ let dx = pos.x * w - x, dy = pos.y * h - y;
3324
+ // Apply edge smoothing for Apple-like effect
3325
+ const edgeX = 2 * Math.min(x / w, (w - x) / w), edgeY = 2 * Math.min(y / h, (h - y) / h), edgeFactor = Math.min(edgeX, edgeY);
3326
+ dx *= smoothStep(0, .2, edgeFactor), dy *= smoothStep(0, .2, edgeFactor), maxScale = Math.max(maxScale, Math.abs(dx), Math.abs(dy)),
3327
+ rawValues.push(dx, dy);
3328
+ }
3329
+ // Improved normalization to prevent artifacts while maintaining intensity
3330
+ maxScale = Math.max(maxScale, 1);
3331
+ // Create ImageData and fill it
3332
+ const imageData = this.context.createImageData(w, h), data = imageData.data;
3333
+ // Convert to image data with smoother normalization
3334
+ let rawIndex = 0;
3335
+ for (let y = 0; y < h; y++) for (let x = 0; x < w; x++) {
3336
+ const dx = rawValues[rawIndex++] || 0, dy = rawValues[rawIndex++] || 0, edgeDistance = Math.min(x, y, w - x - 1, h - y - 1), edgeFactor = Math.min(1, edgeDistance / 2), r = dx * edgeFactor / maxScale + .5, g = dy * edgeFactor / maxScale + .5, pixelIndex = 4 * (y * w + x);
3337
+ data[pixelIndex] = clampValue(255 * r, 0, 255), // Red channel (X displacement)
3338
+ data[pixelIndex + 1] = clampValue(255 * g, 0, 255), // Green channel (Y displacement)
3339
+ data[pixelIndex + 2] = clampValue(255 * g, 0, 255), // Blue channel (Y displacement for SVG filter compatibility)
3340
+ data[pixelIndex + 3] = 255;
3341
+ }
3342
+ return this.context.putImageData(imageData, 0, 0), this.canvas.toDataURL();
3343
+ } catch (error) {
3344
+ // Graceful fallback on error
3345
+ return console.warn("ShaderDisplacementGenerator: Error generating shader map, using fallback", error),
3346
+ "";
3347
+ // Return empty string as fallback
3348
+ }
3349
+ }
3350
+ destroy() {
3351
+ try {
3352
+ // Clear canvas data to free memory
3353
+ this.context && this.context.clearRect(0, 0, this.canvas.width, this.canvas.height),
3354
+ // Reduce memory footprint by setting dimensions to 0
3355
+ this.canvas.width = 0, this.canvas.height = 0,
3356
+ // Remove from DOM
3357
+ this.canvas.remove();
3358
+ } catch (e) {
3359
+ // Silently handle cleanup errors
3360
+ console.warn("ShaderDisplacementGenerator: Error during cleanup", e);
3361
+ }
3362
+ }
3363
+ getScale() {
3364
+ return this.canvasDPI;
3365
+ }
3366
+ },
3367
+ fragmentShaders: fragmentShaders
3368
+ }, Symbol.toStringTag, {
3369
+ value: "Module"
3370
+ }));
3371
+
3372
+ export { Accordion, Badge, Block, Breadcrumb, Button, Callout, Card, ElevationCard, Icon, List, ListGroup, Spinner };
3373
+ //# sourceMappingURL=core.js.map