@shohojdhara/atomix 0.4.0 → 0.4.1

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 (66) hide show
  1. package/dist/atomix.css +9231 -9337
  2. package/dist/atomix.css.map +1 -1
  3. package/dist/atomix.min.css +2 -2
  4. package/dist/atomix.min.css.map +1 -1
  5. package/dist/charts.js +4 -5
  6. package/dist/charts.js.map +1 -1
  7. package/dist/core.d.ts +87 -10
  8. package/dist/core.js +673 -480
  9. package/dist/core.js.map +1 -1
  10. package/dist/forms.d.ts +15 -3
  11. package/dist/forms.js +530 -97
  12. package/dist/forms.js.map +1 -1
  13. package/dist/heavy.js +5 -6
  14. package/dist/heavy.js.map +1 -1
  15. package/dist/index.d.ts +495 -254
  16. package/dist/index.esm.js +1269 -723
  17. package/dist/index.esm.js.map +1 -1
  18. package/dist/index.js +1273 -723
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.min.js +1 -1
  21. package/dist/index.min.js.map +1 -1
  22. package/package.json +2 -2
  23. package/scripts/atomix-cli.js +10 -1
  24. package/scripts/cli/__tests__/utils.test.js +6 -2
  25. package/scripts/cli/migration-tools.js +2 -2
  26. package/scripts/cli/theme-bridge.js +7 -9
  27. package/scripts/cli/utils.js +2 -1
  28. package/src/components/Accordion/Accordion.stories.tsx +40 -0
  29. package/src/components/Accordion/Accordion.tsx +174 -56
  30. package/src/components/Accordion/AccordionCompound.test.tsx +70 -0
  31. package/src/components/Breadcrumb/Breadcrumb.tsx +156 -50
  32. package/src/components/Breadcrumb/BreadcrumbCompound.test.tsx +84 -0
  33. package/src/components/Callout/Callout.stories.tsx +166 -1011
  34. package/src/components/Callout/Callout.tsx +196 -84
  35. package/src/components/Callout/CalloutCompound.test.tsx +72 -0
  36. package/src/components/Dropdown/Dropdown.tsx +133 -20
  37. package/src/components/Dropdown/DropdownCompound.test.tsx +64 -0
  38. package/src/components/EdgePanel/EdgePanel.tsx +164 -112
  39. package/src/components/EdgePanel/EdgePanelCompound.test.tsx +53 -0
  40. package/src/components/Form/Select.stories.tsx +23 -0
  41. package/src/components/Form/Select.test.tsx +99 -0
  42. package/src/components/Form/Select.tsx +144 -93
  43. package/src/components/Form/SelectOption.tsx +88 -0
  44. package/src/components/Hero/Hero.stories.tsx +37 -0
  45. package/src/components/Hero/Hero.test.tsx +142 -0
  46. package/src/components/Hero/Hero.tsx +142 -3
  47. package/src/components/List/List.test.tsx +62 -0
  48. package/src/components/List/List.tsx +16 -5
  49. package/src/components/List/ListItem.tsx +20 -0
  50. package/src/components/Modal/Modal.stories.tsx +65 -1
  51. package/src/components/Modal/Modal.tsx +115 -35
  52. package/src/components/Modal/ModalCompound.test.tsx +94 -0
  53. package/src/components/Steps/Steps.tsx +124 -21
  54. package/src/components/Steps/StepsCompound.test.tsx +81 -0
  55. package/src/components/Tabs/Tabs.tsx +197 -44
  56. package/src/components/Tabs/TabsCompound.test.tsx +64 -0
  57. package/src/lib/composables/index.ts +0 -4
  58. package/src/lib/composables/useAtomixGlass.ts +0 -15
  59. package/src/lib/theme/devtools/CLI.ts +2 -10
  60. package/src/lib/types/components.ts +8 -2
  61. package/src/lib/utils/__tests__/componentUtils.test.ts +57 -2
  62. package/src/lib/utils/__tests__/themeNaming.test.ts +117 -0
  63. package/src/lib/utils/themeNaming.ts +1 -1
  64. package/src/styles/02-tools/_tools.breakpoints.scss +1 -1
  65. package/src/styles/02-tools/_tools.utility-api.scss +6 -6
  66. package/src/styles/99-utilities/_utilities.text.scss +0 -1
package/dist/index.esm.js CHANGED
@@ -8,9 +8,379 @@ import { Pause, Play, SkipBack, SkipForward, SpeakerX, SpeakerHigh, Gear, Downlo
8
8
 
9
9
  import { createPortal } from "react-dom";
10
10
 
11
- /**
12
- * Default theme colors for components
13
- */ const THEME_COLORS = [ "primary", "secondary", "success", "info", "warning", "error", "light", "dark" ], SIZES = [ "sm", "md", "lg" ], CLASS_PREFIX = {
11
+ var commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
12
+
13
+ function getDefaultExportFromCjs(x) {
14
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
15
+ }
16
+
17
+ var fails$9 = function(exec) {
18
+ try {
19
+ return !!exec();
20
+ } catch (error) {
21
+ return !0;
22
+ }
23
+ }, functionBindNative = !fails$9((function() {
24
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
25
+ var test = function() {/* empty */}.bind();
26
+ // eslint-disable-next-line no-prototype-builtins -- safe
27
+ return "function" != typeof test || test.hasOwnProperty("prototype");
28
+ })), 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) {
29
+ return function() {
30
+ return call$5.apply(fn, arguments);
31
+ };
32
+ }, objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf), check = function(it) {
33
+ return it && it.Math === Math && it;
34
+ }, globalThis_1 =
35
+ // eslint-disable-next-line es/no-global-this -- safe
36
+ check("object" == typeof globalThis && globalThis) || check("object" == typeof window && window) ||
37
+ // eslint-disable-next-line no-restricted-globals -- safe
38
+ check("object" == typeof self && self) || check("object" == typeof commonjsGlobal && commonjsGlobal) || check("object" == typeof commonjsGlobal && commonjsGlobal) ||
39
+ // eslint-disable-next-line no-new-func -- fallback
40
+ function() {
41
+ return this;
42
+ }() || 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() {
43
+ return call$4.apply(apply$1, arguments);
44
+ }), uncurryThis$7 = functionUncurryThis, toString$3 = uncurryThis$7({}.toString), stringSlice = uncurryThis$7("".slice), classofRaw$2 = function(it) {
45
+ return stringSlice(toString$3(it), 8, -1);
46
+ }, classofRaw$1 = classofRaw$2, uncurryThis$6 = functionUncurryThis, functionUncurryThisClause = function(fn) {
47
+ // Nashorn bug:
48
+ // https://github.com/zloirock/core-js/issues/1128
49
+ // https://github.com/zloirock/core-js/issues/1130
50
+ if ("Function" === classofRaw$1(fn)) return uncurryThis$6(fn);
51
+ }, documentAll = "object" == typeof document && document.all, isCallable$8 = void 0 === documentAll && void 0 !== documentAll ? function(argument) {
52
+ return "function" == typeof argument || argument === documentAll;
53
+ } : function(argument) {
54
+ return "function" == typeof argument;
55
+ }, objectGetOwnPropertyDescriptor = {}, descriptors = !fails$9((function() {
56
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
57
+ return 7 !== Object.defineProperty({}, 1, {
58
+ get: function() {
59
+ return 7;
60
+ }
61
+ })[1];
62
+ })), NATIVE_BIND$1 = functionBindNative, call$3 = Function.prototype.call, functionCall = NATIVE_BIND$1 ? call$3.bind(call$3) : function() {
63
+ return call$3.apply(call$3, arguments);
64
+ }, objectPropertyIsEnumerable = {}, $propertyIsEnumerable = {}.propertyIsEnumerable, getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
65
+ 1: 2
66
+ }, 1);
67
+
68
+ // `Object.prototype.propertyIsEnumerable` method implementation
69
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
70
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function(V) {
71
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
72
+ return !!descriptor && descriptor.enumerable;
73
+ } : $propertyIsEnumerable;
74
+
75
+ var match, version, createPropertyDescriptor$2 = function(bitmap, value) {
76
+ return {
77
+ enumerable: !(1 & bitmap),
78
+ configurable: !(2 & bitmap),
79
+ writable: !(4 & bitmap),
80
+ value: value
81
+ };
82
+ }, fails$6 = fails$9, classof$4 = classofRaw$2, $Object$3 = Object, split = functionUncurryThis("".split), indexedObject = fails$6((function() {
83
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
84
+ // eslint-disable-next-line no-prototype-builtins -- safe
85
+ return !$Object$3("z").propertyIsEnumerable(0);
86
+ })) ? function(it) {
87
+ return "String" === classof$4(it) ? split(it, "") : $Object$3(it);
88
+ } : $Object$3, isNullOrUndefined$2 = function(it) {
89
+ return null == it;
90
+ }, isNullOrUndefined$1 = isNullOrUndefined$2, $TypeError$7 = TypeError, requireObjectCoercible$3 = function(it) {
91
+ if (isNullOrUndefined$1(it)) throw new $TypeError$7("Can't call method on " + it);
92
+ return it;
93
+ }, IndexedObject$1 = indexedObject, requireObjectCoercible$2 = requireObjectCoercible$3, toIndexedObject$2 = function(it) {
94
+ return IndexedObject$1(requireObjectCoercible$2(it));
95
+ }, isCallable$7 = isCallable$8, isObject$6 = function(it) {
96
+ return "object" == typeof it ? null !== it : isCallable$7(it);
97
+ }, path$3 = {}, path$2 = path$3, globalThis$b = globalThis_1, isCallable$6 = isCallable$8, aFunction = function(variable) {
98
+ return isCallable$6(variable) ? variable : void 0;
99
+ }, navigator$1 = globalThis_1.navigator, userAgent$2 = navigator$1 && navigator$1.userAgent, environmentUserAgent = userAgent$2 ? String(userAgent$2) : "", globalThis$9 = globalThis_1, userAgent$1 = environmentUserAgent, process$1 = globalThis$9.process, Deno$1 = globalThis$9.Deno, versions = process$1 && process$1.versions || Deno$1 && Deno$1.version, v8 = versions && versions.v8;
100
+
101
+ v8 && (
102
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
103
+ // but their correct versions are not interesting for us
104
+ version = (match = v8.split("."))[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1])),
105
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
106
+ // so check `userAgent` even if `.v8` exists, but 0
107
+ !version && userAgent$1 && (!(match = userAgent$1.match(/Edge\/(\d+)/)) || match[1] >= 74) && (match = userAgent$1.match(/Chrome\/(\d+)/)) && (version = +match[1]);
108
+
109
+ var environmentV8Version = version, V8_VERSION = environmentV8Version, fails$5 = fails$9, $String$3 = globalThis_1.String, symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5((function() {
110
+ var symbol = Symbol("symbol detection");
111
+ // Chrome 38 Symbol has incorrect toString conversion
112
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
113
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
114
+ // of course, fail.
115
+ return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
116
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
117
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
118
+ })), useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && "symbol" == typeof Symbol.iterator, isCallable$5 = isCallable$8, isPrototypeOf$2 = objectIsPrototypeOf, $Object$2 = Object, isSymbol$2 = useSymbolAsUid ? function(it) {
119
+ return "symbol" == typeof it;
120
+ } : function(it) {
121
+ var $Symbol = function(namespace, method) {
122
+ return arguments.length < 2 ? aFunction(path$2[namespace]) || aFunction(globalThis$b[namespace]) : path$2[namespace] && path$2[namespace][method] || globalThis$b[namespace] && globalThis$b[namespace][method];
123
+ }("Symbol");
124
+ return isCallable$5($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
125
+ }, $String$2 = String, isCallable$4 = isCallable$8, $TypeError$6 = TypeError, aCallable$3 = function(argument) {
126
+ if (isCallable$4(argument)) return argument;
127
+ throw new $TypeError$6(function(argument) {
128
+ try {
129
+ return $String$2(argument);
130
+ } catch (error) {
131
+ return "Object";
132
+ }
133
+ }(argument) + " is not a function");
134
+ }, aCallable$2 = aCallable$3, isNullOrUndefined = isNullOrUndefined$2, call$2 = functionCall, isCallable$3 = isCallable$8, isObject$5 = isObject$6, $TypeError$5 = TypeError, sharedStore = {
135
+ exports: {}
136
+ }, globalThis$7 = globalThis_1, defineProperty = Object.defineProperty, globalThis$6 = globalThis_1, store$1 = sharedStore.exports = globalThis$6["__core-js_shared__"] || function(key, value) {
137
+ try {
138
+ defineProperty(globalThis$7, key, {
139
+ value: value,
140
+ configurable: !0,
141
+ writable: !0
142
+ });
143
+ } catch (error) {
144
+ globalThis$7[key] = value;
145
+ }
146
+ return value;
147
+ }("__core-js_shared__", {});
148
+
149
+ /* eslint-disable es/no-symbol -- required for testing */ (store$1.versions || (store$1.versions = [])).push({
150
+ version: "3.43.0",
151
+ mode: "pure",
152
+ copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)",
153
+ license: "https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",
154
+ source: "https://github.com/zloirock/core-js"
155
+ });
156
+
157
+ var key, value, store = sharedStore.exports, requireObjectCoercible$1 = requireObjectCoercible$3, $Object$1 = Object, toObject$2 = function(argument) {
158
+ return $Object$1(requireObjectCoercible$1(argument));
159
+ }, toObject$1 = toObject$2, hasOwnProperty = functionUncurryThis({}.hasOwnProperty), hasOwnProperty_1 = Object.hasOwn || function(it, key) {
160
+ return hasOwnProperty(toObject$1(it), key);
161
+ }, 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) {
162
+ return "Symbol(" + (void 0 === key ? "" : key) + ")_" + toString$2(++id + postfix, 36);
163
+ }, wellKnownSymbol$5 = function(name) {
164
+ return hasOwn$2(WellKnownSymbolsStore, name) || (WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$2(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol("Symbol." + name)),
165
+ WellKnownSymbolsStore[name];
166
+ }, call$1 = functionCall, isObject$4 = isObject$6, isSymbol$1 = isSymbol$2, $TypeError$4 = TypeError, TO_PRIMITIVE = wellKnownSymbol$5("toPrimitive"), toPrimitive = function(input, pref) {
167
+ if (!isObject$4(input) || isSymbol$1(input)) return input;
168
+ var result, func, exoticToPrim = (func = input[TO_PRIMITIVE], isNullOrUndefined(func) ? void 0 : aCallable$2(func));
169
+ if (exoticToPrim) {
170
+ if (void 0 === pref && (pref = "default"), result = call$1(exoticToPrim, input, pref),
171
+ !isObject$4(result) || isSymbol$1(result)) return result;
172
+ throw new $TypeError$4("Can't convert object to primitive value");
173
+ }
174
+ return void 0 === pref && (pref = "number"), function(input, pref) {
175
+ var fn, val;
176
+ if ("string" === pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
177
+ if (isCallable$3(fn = input.valueOf) && !isObject$5(val = call$2(fn, input))) return val;
178
+ if ("string" !== pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
179
+ throw new $TypeError$5("Can't convert object to primitive value");
180
+ }(input, pref);
181
+ }, isSymbol = isSymbol$2, toPropertyKey$2 = function(argument) {
182
+ var key = toPrimitive(argument, "string");
183
+ return isSymbol(key) ? key : key + "";
184
+ }, isObject$3 = isObject$6, document$1 = globalThis_1.document, EXISTS = isObject$3(document$1) && isObject$3(document$1.createElement), ie8DomDefine = !descriptors && !fails$9((function() {
185
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
186
+ return 7 !== Object.defineProperty((it = "div", EXISTS ? document$1.createElement(it) : {}), "a", {
187
+ get: function() {
188
+ return 7;
189
+ }
190
+ }).a;
191
+ var it;
192
+ })), 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;
193
+
194
+ // `Object.getOwnPropertyDescriptor` method
195
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
196
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor$1 : function(O, P) {
197
+ if (O = toIndexedObject$1(O), P = toPropertyKey$1(P), IE8_DOM_DEFINE$1) try {
198
+ return $getOwnPropertyDescriptor$1(O, P);
199
+ } catch (error) {/* empty */}
200
+ if (hasOwn$1(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
201
+ };
202
+
203
+ var fails$3 = fails$9, isCallable$2 = isCallable$8, replacement = /#|\.prototype\./, isForced$1 = function(feature, detection) {
204
+ var value = data[normalize(feature)];
205
+ return value === POLYFILL || value !== NATIVE && (isCallable$2(detection) ? fails$3(detection) : !!detection);
206
+ }, normalize = isForced$1.normalize = function(string) {
207
+ return String(string).replace(replacement, ".").toLowerCase();
208
+ }, data = isForced$1.data = {}, NATIVE = isForced$1.NATIVE = "N", POLYFILL = isForced$1.POLYFILL = "P", isForced_1 = isForced$1, aCallable$1 = aCallable$3, NATIVE_BIND = functionBindNative, bind$1 = functionUncurryThisClause(functionUncurryThisClause.bind), objectDefineProperty = {}, v8PrototypeDefineBug = descriptors && fails$9((function() {
209
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
210
+ return 42 !== Object.defineProperty((function() {/* empty */}), "prototype", {
211
+ value: 42,
212
+ writable: !1
213
+ }).prototype;
214
+ })), isObject$2 = isObject$6, $String$1 = String, $TypeError$3 = TypeError, DESCRIPTORS$1 = descriptors, IE8_DOM_DEFINE = ie8DomDefine, V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug, anObject = function(argument) {
215
+ if (isObject$2(argument)) return argument;
216
+ throw new $TypeError$3($String$1(argument) + " is not an object");
217
+ }, toPropertyKey = toPropertyKey$2, $TypeError$2 = TypeError, $defineProperty = Object.defineProperty, $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
218
+
219
+ // `Object.defineProperty` method
220
+ // https://tc39.es/ecma262/#sec-object.defineproperty
221
+ objectDefineProperty.f = DESCRIPTORS$1 ? V8_PROTOTYPE_DEFINE_BUG ? function(O, P, Attributes) {
222
+ if (anObject(O), P = toPropertyKey(P), anObject(Attributes), "function" == typeof O && "prototype" === P && "value" in Attributes && "writable" in Attributes && !Attributes.writable) {
223
+ var current = $getOwnPropertyDescriptor(O, P);
224
+ current && current.writable && (O[P] = Attributes.value, Attributes = {
225
+ configurable: "configurable" in Attributes ? Attributes.configurable : current.configurable,
226
+ enumerable: "enumerable" in Attributes ? Attributes.enumerable : current.enumerable,
227
+ writable: !1
228
+ });
229
+ }
230
+ return $defineProperty(O, P, Attributes);
231
+ } : $defineProperty : function(O, P, Attributes) {
232
+ if (anObject(O), P = toPropertyKey(P), anObject(Attributes), IE8_DOM_DEFINE) try {
233
+ return $defineProperty(O, P, Attributes);
234
+ } catch (error) {/* empty */}
235
+ if ("get" in Attributes || "set" in Attributes) throw new $TypeError$2("Accessors not supported");
236
+ return "value" in Attributes && (O[P] = Attributes.value), O;
237
+ };
238
+
239
+ var definePropertyModule = objectDefineProperty, createPropertyDescriptor = createPropertyDescriptor$2, createNonEnumerableProperty$1 = descriptors ? function(object, key, value) {
240
+ return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
241
+ } : function(object, key, value) {
242
+ return object[key] = value, object;
243
+ }, globalThis$3 = 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) {
244
+ return aCallable$1(fn), void 0 === that ? fn : NATIVE_BIND ? bind$1(fn, that) : function() {
245
+ return fn.apply(that, arguments);
246
+ };
247
+ }, createNonEnumerableProperty = createNonEnumerableProperty$1, hasOwn = hasOwnProperty_1, wrapConstructor = function(NativeConstructor) {
248
+ var Wrapper = function(a, b, c) {
249
+ if (this instanceof Wrapper) {
250
+ switch (arguments.length) {
251
+ case 0:
252
+ return new NativeConstructor;
253
+
254
+ case 1:
255
+ return new NativeConstructor(a);
256
+
257
+ case 2:
258
+ return new NativeConstructor(a, b);
259
+ }
260
+ return new NativeConstructor(a, b, c);
261
+ }
262
+ return apply(NativeConstructor, this, arguments);
263
+ };
264
+ return Wrapper.prototype = NativeConstructor.prototype, Wrapper;
265
+ }, _export = function(options, source) {
266
+ 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$3 : STATIC ? globalThis$3[TARGET] : globalThis$3[TARGET] && globalThis$3[TARGET].prototype, target = GLOBAL ? path$1 : path$1[TARGET] || createNonEnumerableProperty(path$1, TARGET, {})[TARGET], targetPrototype = target.prototype;
267
+ for (key in source)
268
+ // contains in native
269
+ USE_NATIVE = !(FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced)) && nativeSource && hasOwn(nativeSource, key),
270
+ targetProperty = target[key], USE_NATIVE && (nativeProperty = options.dontCallGetSet ? (descriptor = getOwnPropertyDescriptor(nativeSource, key)) && descriptor.value : nativeSource[key]),
271
+ // export native or implementation
272
+ sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key], (FORCED || PROTO || typeof targetProperty != typeof sourceProperty) && (
273
+ // bind methods to global for calling from export context
274
+ resultProperty = options.bind && USE_NATIVE ? bind(sourceProperty, globalThis$3) : options.wrap && USE_NATIVE ? wrapConstructor(sourceProperty) : PROTO && isCallable$1(sourceProperty) ? uncurryThis$1(sourceProperty) : sourceProperty,
275
+ // add a flag to not completely full polyfills
276
+ (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) && createNonEnumerableProperty(resultProperty, "sham", !0),
277
+ createNonEnumerableProperty(target, key, resultProperty), PROTO && (hasOwn(path$1, VIRTUAL_PROTOTYPE = TARGET + "Prototype") || createNonEnumerableProperty(path$1, VIRTUAL_PROTOTYPE, {}),
278
+ // export virtual prototype methods
279
+ createNonEnumerableProperty(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty),
280
+ // export real prototype methods
281
+ options.real && targetPrototype && (FORCED || !targetPrototype[key]) && createNonEnumerableProperty(targetPrototype, key, sourceProperty)));
282
+ }, ceil = Math.ceil, floor = Math.floor, trunc = Math.trunc || function(x) {
283
+ var n = +x;
284
+ return (n > 0 ? floor : ceil)(n);
285
+ }, toIntegerOrInfinity$2 = function(argument) {
286
+ var number = +argument;
287
+ // eslint-disable-next-line no-self-compare -- NaN check
288
+ return number != number || 0 === number ? 0 : trunc(number);
289
+ }, toIntegerOrInfinity$1 = toIntegerOrInfinity$2, max = Math.max, min$1 = Math.min, toIntegerOrInfinity = toIntegerOrInfinity$2, min = Math.min, lengthOfArrayLike$2 = function(obj) {
290
+ return argument = obj.length, (len = toIntegerOrInfinity(argument)) > 0 ? min(len, 9007199254740991) : 0;
291
+ var argument, len;
292
+ }, toIndexedObject = toIndexedObject$2, lengthOfArrayLike$1 = lengthOfArrayLike$2, createMethod$1 = function(IS_INCLUDES) {
293
+ return function($this, el, fromIndex) {
294
+ var O = toIndexedObject($this), length = lengthOfArrayLike$1(O);
295
+ if (0 === length) return !IS_INCLUDES && -1;
296
+ var value, index = function(index, length) {
297
+ var integer = toIntegerOrInfinity$1(index);
298
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
299
+ }(fromIndex, length);
300
+ // Array#includes uses SameValueZero equality algorithm
301
+ // eslint-disable-next-line no-self-compare -- NaN check
302
+ if (IS_INCLUDES && el != el) {
303
+ for (;length > index; )
304
+ // eslint-disable-next-line no-self-compare -- NaN check
305
+ if ((value = O[index++]) != value) return !0;
306
+ // Array#indexOf ignores holes, Array#includes - not
307
+ } else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
308
+ return !IS_INCLUDES && -1;
309
+ };
310
+ }, $includes = [ createMethod$1(!0), createMethod$1(!1) ][0];
311
+
312
+ // `Array.prototype.includes` method
313
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
314
+ _export({
315
+ target: "Array",
316
+ proto: !0,
317
+ forced: fails$9((function() {
318
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
319
+ return !Array(1).includes();
320
+ }))
321
+ }, {
322
+ includes: function(el /* , fromIndex = 0 */) {
323
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
324
+ }
325
+ });
326
+
327
+ var globalThis$2 = globalThis_1, path = path$3, getBuiltInPrototypeMethod$3 = function(CONSTRUCTOR, METHOD) {
328
+ var Namespace = path[CONSTRUCTOR + "Prototype"], pureMethod = Namespace && Namespace[METHOD];
329
+ if (pureMethod) return pureMethod;
330
+ var NativeConstructor = globalThis$2[CONSTRUCTOR], NativePrototype = NativeConstructor && NativeConstructor.prototype;
331
+ return NativePrototype && NativePrototype[METHOD];
332
+ }, includes$4 = getBuiltInPrototypeMethod$3("Array", "includes"), isObject$1 = isObject$6, classof$3 = classofRaw$2, MATCH$1 = wellKnownSymbol$5("match"), $TypeError$1 = TypeError, test = {};
333
+
334
+ test[wellKnownSymbol$5("toStringTag")] = "z";
335
+
336
+ 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() {
337
+ return arguments;
338
+ }()), classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
339
+ var O, tag, result;
340
+ return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (tag = function(it, key) {
341
+ try {
342
+ return it[key];
343
+ } catch (error) {/* empty */}
344
+ }(O = $Object(it), TO_STRING_TAG)) ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : "Object" === (result = classofRaw(O)) && isCallable(O.callee) ? "Arguments" : result;
345
+ }, $String = String, MATCH = wellKnownSymbol$5("match"), $$1 = _export, notARegExp = function(it) {
346
+ if (function(it) {
347
+ var isRegExp;
348
+ return isObject$1(it) && (void 0 !== (isRegExp = it[MATCH$1]) ? !!isRegExp : "RegExp" === classof$3(it));
349
+ }(it)) throw new $TypeError$1("The method doesn't accept regular expressions");
350
+ return it;
351
+ }, requireObjectCoercible = requireObjectCoercible$3, toString = function(argument) {
352
+ if ("Symbol" === classof$1(argument)) throw new TypeError("Cannot convert a Symbol value to a string");
353
+ return $String(argument);
354
+ }, stringIndexOf = functionUncurryThis("".indexOf);
355
+
356
+ // `String.prototype.includes` method
357
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
358
+ $$1({
359
+ target: "String",
360
+ proto: !0,
361
+ forced: !function(METHOD_NAME) {
362
+ var regexp = /./;
363
+ try {
364
+ "/./"[METHOD_NAME](regexp);
365
+ } catch (error1) {
366
+ try {
367
+ return regexp[MATCH] = !1, "/./"[METHOD_NAME](regexp);
368
+ } catch (error2) {/* empty */}
369
+ }
370
+ return !1;
371
+ }("includes")
372
+ }, {
373
+ includes: function(searchString /* , position = 0 */) {
374
+ return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
375
+ }
376
+ });
377
+
378
+ var includes$3 = getBuiltInPrototypeMethod$3("String", "includes"), isPrototypeOf$1 = objectIsPrototypeOf, arrayMethod = includes$4, stringMethod = includes$3, ArrayPrototype$1 = Array.prototype, StringPrototype = String.prototype;
379
+
380
+ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
381
+ var own = it.includes;
382
+ return it === ArrayPrototype$1 || isPrototypeOf$1(ArrayPrototype$1, it) && own === ArrayPrototype$1.includes ? arrayMethod : "string" == typeof it || it === StringPrototype || isPrototypeOf$1(StringPrototype, it) && own === StringPrototype.includes ? stringMethod : own;
383
+ })), THEME_COLORS = [ "primary", "secondary", "success", "info", "warning", "error", "light", "dark" ], SIZES = [ "sm", "md", "lg" ], CLASS_PREFIX = {
14
384
  COMPONENT: "c-",
15
385
  UTILITY: "u-",
16
386
  LAYOUT: "l-",
@@ -1523,7 +1893,7 @@ import { createPortal } from "react-dom";
1523
1893
  };
1524
1894
 
1525
1895
  /**
1526
- * Default sizes for components
1896
+ * Default theme colors for components
1527
1897
  */
1528
1898
  /**
1529
1899
  * Accordion functionality hook
@@ -2170,7 +2540,7 @@ class {
2170
2540
  * Composable hook for AtomixGlass component logic
2171
2541
  * Manages all state, calculations, and event handlers
2172
2542
  */
2173
- 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}) {
2543
+ 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, children: children}) {
2174
2544
  // State
2175
2545
  const [isHovered, setIsHovered] = useState(!1), [isActive, setIsActive] = useState(!1), [glassSize, setGlassSize] = useState({
2176
2546
  width: 270,
@@ -2371,9 +2741,8 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
2371
2741
  if (effectiveDisableEffects) return;
2372
2742
  const container = mouseContainer?.current || glassRef.current;
2373
2743
  if (!container) return;
2374
- enablePerformanceMonitoring && performance.now();
2375
2744
  // Use cached rect if available, otherwise get new one
2376
- let rect = cachedRectRef.current;
2745
+ let rect = cachedRectRef.current;
2377
2746
  if (rect && 0 !== rect.width && 0 !== rect.height || (rect = container.getBoundingClientRect(),
2378
2747
  cachedRectRef.current = rect), 0 === rect.width || 0 === rect.height) return;
2379
2748
  const center = calculateElementCenter(rect), newOffset = {
@@ -2382,8 +2751,8 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
2382
2751
  };
2383
2752
  // Calculate offset relative to this container
2384
2753
  // React 18 automatically batches these updates
2385
- setInternalMouseOffset(newOffset), setInternalGlobalMousePosition(globalPos), "undefined" != typeof process && "production" === process.env?.NODE_ENV || !enablePerformanceMonitoring || performance.now();
2386
- }), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects, enablePerformanceMonitoring ]);
2754
+ setInternalMouseOffset(newOffset), setInternalGlobalMousePosition(globalPos);
2755
+ }), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects ]);
2387
2756
  // Subscribe to shared mouse tracker
2388
2757
  useEffect((() => {
2389
2758
  if (externalGlobalMousePosition && externalMouseOffset)
@@ -2823,7 +3192,69 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
2823
3192
  });
2824
3193
  }
2825
3194
 
2826
- const Accordion = memo((({title: title, children: children, defaultOpen: defaultOpen = !1, isOpen: controlledOpen, onOpenChange: onOpenChange, onOpen: onOpen, onClose: onClose, disabled: disabled = !1, iconPosition: iconPosition = "right", icon: icon, className: className = "", style: style, glass: glass}) => {
3195
+ // Default icon
3196
+ const DefaultIcon = () => jsx("i", {
3197
+ className: "c-accordion__icon",
3198
+ "aria-hidden": "true",
3199
+ children: jsx("svg", {
3200
+ xmlns: "http://www.w3.org/2000/svg",
3201
+ width: "24",
3202
+ height: "24",
3203
+ viewBox: "0 0 24 24",
3204
+ fill: "none",
3205
+ stroke: "currentColor",
3206
+ strokeWidth: "2",
3207
+ strokeLinecap: "round",
3208
+ strokeLinejoin: "round",
3209
+ "aria-hidden": "true",
3210
+ focusable: "false",
3211
+ children: jsx("polyline", {
3212
+ points: "6 9 12 15 18 9"
3213
+ })
3214
+ })
3215
+ }), AccordionHeader = forwardRef((({title: title, icon: icon, iconPosition: iconPosition = "right", isOpen: isOpen, children: children, className: className = "", ...props}, ref) => {
3216
+ // Determine icon to render. Explicit check for undefined to allow null/false to hide icon.
3217
+ const iconElement = void 0 === icon ? jsx(DefaultIcon, {}) : icon;
3218
+ return jsxs("button", {
3219
+ ref: ref,
3220
+ type: "button",
3221
+ className: className,
3222
+ ...props,
3223
+ children: [ title && jsx("span", {
3224
+ className: "c-accordion__title",
3225
+ children: title
3226
+ }), children, iconElement ]
3227
+ });
3228
+ }));
3229
+
3230
+ AccordionHeader.displayName = "AccordionHeader";
3231
+
3232
+ const AccordionBody = forwardRef((({children: children, className: className = "", panelRef: panelRef, contentRef: contentRef, ...props}, ref) => {
3233
+ const mergedPanelRef = React.useMemo((() =>
3234
+ // Helper to merge refs
3235
+ function(...refs) {
3236
+ return node => {
3237
+ refs.forEach((ref => {
3238
+ "function" == typeof ref ? ref(node) : null != ref && (ref.current = node);
3239
+ }));
3240
+ };
3241
+ }(ref, panelRef)), [ ref, panelRef ]);
3242
+ return jsx("div", {
3243
+ ref: mergedPanelRef,
3244
+ className: className,
3245
+ role: "region",
3246
+ ...props,
3247
+ children: jsx("div", {
3248
+ className: ACCORDION.SELECTORS.BODY.replace(".", ""),
3249
+ ref: contentRef,
3250
+ children: children
3251
+ })
3252
+ });
3253
+ }));
3254
+
3255
+ AccordionBody.displayName = "AccordionBody";
3256
+
3257
+ const AccordionImpl = memo((({title: title, children: children, defaultOpen: defaultOpen = !1, isOpen: controlledOpen, onOpenChange: onOpenChange, onOpen: onOpen, onClose: onClose, disabled: disabled = !1, iconPosition: iconPosition = "right", icon: icon, className: className = "", style: style, glass: glass}) => {
2827
3258
  // Generate unique IDs for accessibility
2828
3259
  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} = useAccordion({
2829
3260
  defaultOpen: defaultOpen,
@@ -2833,53 +3264,59 @@ const Accordion = memo((({title: title, children: children, defaultOpen: defaul
2833
3264
  onOpenChange: onOpenChange,
2834
3265
  onOpen: onOpen,
2835
3266
  onClose: onClose
2836
- }), defaultIcon = jsx("i", {
2837
- className: "c-accordion__icon",
2838
- "aria-hidden": "true",
2839
- children: jsx("svg", {
2840
- xmlns: "http://www.w3.org/2000/svg",
2841
- width: "24",
2842
- height: "24",
2843
- viewBox: "0 0 24 24",
2844
- fill: "none",
2845
- stroke: "currentColor",
2846
- strokeWidth: "2",
2847
- strokeLinecap: "round",
2848
- strokeLinejoin: "round",
2849
- "aria-hidden": "true",
2850
- focusable: "false",
2851
- children: jsx("polyline", {
2852
- points: "6 9 12 15 18 9"
2853
- })
2854
- })
2855
- }), accordionContent = jsxs("div", {
3267
+ }), headerClassNames = generateHeaderClassNames(), panelClassNames = ACCORDION.SELECTORS.PANEL.replace(".", ""), hasCompoundComponents = React.Children.toArray(children).some((child => {
3268
+ var _context;
3269
+
3270
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "AccordionHeader", "AccordionBody" ]).call(_context, child.type.displayName);
3271
+ })), content = jsx("div", {
2856
3272
  className: generateClassNames(className) + (glass ? " c-accordion--glass" : ""),
2857
3273
  style: style,
2858
- children: [ jsxs("button", {
2859
- id: buttonId,
2860
- className: generateHeaderClassNames(),
2861
- onClick: toggle,
2862
- "aria-expanded": state.isOpen,
2863
- "aria-controls": panelId,
2864
- "aria-disabled": disabled,
2865
- disabled: disabled,
2866
- type: "button",
2867
- children: [ jsx("span", {
2868
- className: "c-accordion__title",
2869
- children: title
2870
- }), icon || defaultIcon ]
2871
- }), jsx("div", {
2872
- id: panelId,
2873
- className: ACCORDION.SELECTORS.PANEL.replace(".", ""),
2874
- ref: panelRef,
2875
- role: "region",
2876
- "aria-labelledby": buttonId,
2877
- children: jsx("div", {
2878
- className: ACCORDION.SELECTORS.BODY.replace(".", ""),
2879
- ref: contentRef,
3274
+ children: hasCompoundComponents ? React.Children.map(children, (child => {
3275
+ if ( React.isValidElement(child)) {
3276
+ if ("AccordionHeader" === child.type.displayName)
3277
+ return React.cloneElement(child, {
3278
+ id: buttonId,
3279
+ className: `${headerClassNames} ${child.props.className || ""}`.trim(),
3280
+ onClick: e => {
3281
+ toggle(), child.props.onClick?.(e);
3282
+ },
3283
+ "aria-expanded": state.isOpen,
3284
+ "aria-controls": panelId,
3285
+ "aria-disabled": disabled,
3286
+ disabled: disabled,
3287
+ iconPosition: child.props.iconPosition || iconPosition
3288
+ });
3289
+ if ("AccordionBody" === child.type.displayName)
3290
+ return React.cloneElement(child, {
3291
+ id: panelId,
3292
+ className: `${panelClassNames} ${child.props.className || ""}`.trim(),
3293
+ "aria-labelledby": buttonId,
3294
+ panelRef: panelRef,
3295
+ contentRef: contentRef
3296
+ });
3297
+ }
3298
+ return child;
3299
+ })) : jsxs(Fragment, {
3300
+ children: [ jsx(AccordionHeader, {
3301
+ id: buttonId,
3302
+ className: headerClassNames,
3303
+ onClick: toggle,
3304
+ "aria-expanded": state.isOpen,
3305
+ "aria-controls": panelId,
3306
+ "aria-disabled": disabled,
3307
+ disabled: disabled,
3308
+ title: title,
3309
+ icon: icon,
3310
+ iconPosition: iconPosition
3311
+ }), jsx(AccordionBody, {
3312
+ id: panelId,
3313
+ className: panelClassNames,
3314
+ "aria-labelledby": buttonId,
3315
+ panelRef: panelRef,
3316
+ contentRef: contentRef,
2880
3317
  children: children
2881
- })
2882
- }) ]
3318
+ }) ]
3319
+ })
2883
3320
  });
2884
3321
  if (glass) {
2885
3322
  // Default glass settings for accordions
@@ -2892,16 +3329,20 @@ const Accordion = memo((({title: title, children: children, defaultOpen: defaul
2892
3329
  };
2893
3330
  return jsx(AtomixGlass, {
2894
3331
  ...glassProps,
2895
- children: accordionContent
3332
+ children: content
2896
3333
  });
2897
3334
  }
2898
- return accordionContent;
3335
+ return content;
2899
3336
  }));
2900
3337
 
2901
- // Set display name for debugging
2902
- Accordion.displayName = "Accordion";
3338
+ AccordionImpl.displayName = "Accordion";
3339
+
3340
+ // Attach subcomponents
3341
+ const AccordionWithSubcomponents = AccordionImpl;
2903
3342
 
2904
- const AtomixLogo = ({height: height = 24, width: width = 24, color: color = "currentColor", ...props}) => jsxs("svg", {
3343
+ AccordionWithSubcomponents.Header = AccordionHeader, AccordionWithSubcomponents.Body = AccordionBody;
3344
+
3345
+ const Accordion = AccordionWithSubcomponents, AtomixLogo = ({height: height = 24, width: width = 24, color: color = "currentColor", ...props}) => jsxs("svg", {
2905
3346
  width: width,
2906
3347
  height: height,
2907
3348
  viewBox: "0 0 24 24",
@@ -3230,8 +3671,6 @@ const AtomixLogo = ({height: height = 24, width: width = 24, color: color = "cur
3230
3671
  // Convert string size to pixel value if needed
3231
3672
  };
3232
3673
 
3233
- // Adapted from https://github.com/shuding/liquid-glass
3234
- // Constants
3235
3674
  Icon.displayName = "Icon";
3236
3675
 
3237
3676
  const Avatar = memo((({src: src, alt: alt = "Avatar", initials: initials, icon: icon, size: size = "md", circle: circle = !1, className: className = "", disabled: disabled = !1, onClick: onClick, style: style, glass: glass}) => {
@@ -3470,37 +3909,75 @@ const useBlock = () => ({
3470
3909
  * ```
3471
3910
  */ Block.displayName = "Block";
3472
3911
 
3473
- const Breadcrumb = memo((({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style}) => {
3912
+ const BreadcrumbItem = forwardRef((({children: children, href: href, active: active, icon: icon, onClick: onClick, className: className = "", style: style, linkAs: LinkComponent, linkProps: linkProps = {}, ...props}, ref) => {
3913
+ const itemClasses = [ BREADCRUMB.CLASSES.ITEM, active ? BREADCRUMB.CLASSES.ACTIVE : "", className ].filter(Boolean).join(" "), linkContent = jsxs(Fragment, {
3914
+ children: [ icon && jsx("span", {
3915
+ className: "c-breadcrumb__icon",
3916
+ children: icon
3917
+ }), children ]
3918
+ }), commonLinkProps = {
3919
+ className: BREADCRUMB.CLASSES.LINK,
3920
+ onClick: onClick,
3921
+ style: style,
3922
+ // Apply style to the link as per legacy behavior
3923
+ ...linkProps
3924
+ };
3925
+ return jsx("li", {
3926
+ ref: ref,
3927
+ className: itemClasses,
3928
+ style: style,
3929
+ ...props,
3930
+ children: href && !active ? jsx(LinkComponent || "a", {
3931
+ href: href,
3932
+ ...commonLinkProps,
3933
+ children: linkContent
3934
+ }) : jsx("span", {
3935
+ className: BREADCRUMB.CLASSES.LINK,
3936
+ children: linkContent
3937
+ })
3938
+ });
3939
+ }));
3940
+
3941
+ BreadcrumbItem.displayName = "BreadcrumbItem";
3942
+
3943
+ const Breadcrumb = memo((({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style, children: children}) => {
3474
3944
  const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
3945
+ let content;
3946
+ if (items && items.length > 0)
3947
+ // Legacy rendering
3948
+ content = items.map(((item, index) => {
3949
+ const isLast = index === items.length - 1;
3950
+ return jsx(BreadcrumbItem, {
3951
+ href: item.href,
3952
+ active: item.active || isLast,
3953
+ icon: item.icon,
3954
+ onClick: item.onClick,
3955
+ className: item.className,
3956
+ style: item.style,
3957
+ linkAs: LinkComponent,
3958
+ children: item.label
3959
+ }, index);
3960
+ })); else {
3961
+ // Compound rendering
3962
+ const childrenCount = Children.count(children);
3963
+ content = Children.map(children, ((child, index) => {
3964
+ if ( isValidElement(child)) {
3965
+ const isLast = index === childrenCount - 1, childProps = child.props;
3966
+
3967
+ return cloneElement(child, {
3968
+ active: childProps.active ?? (!!isLast || void 0),
3969
+ linkAs: childProps.linkAs ?? LinkComponent
3970
+ });
3971
+ }
3972
+ return child;
3973
+ }));
3974
+ }
3475
3975
  return jsx("nav", {
3476
3976
  "aria-label": ariaLabel,
3477
3977
  style: style,
3478
3978
  children: jsx("ol", {
3479
3979
  className: breadcrumbClasses,
3480
- children: items.map(((item, index) => {
3481
- const isLast = index === items.length - 1, itemClasses = [ BREADCRUMB.CLASSES.ITEM, item.active || isLast ? BREADCRUMB.CLASSES.ACTIVE : "" ].filter(Boolean).join(" "), linkContent = jsxs(Fragment, {
3482
- children: [ item.icon && jsx("span", {
3483
- className: "c-breadcrumb__icon",
3484
- children: item.icon
3485
- }), item.label ]
3486
- }), linkProps = {
3487
- href: item.href,
3488
- className: BREADCRUMB.CLASSES.LINK,
3489
- onClick: item.onClick,
3490
- style: item.style
3491
- };
3492
- return jsx("li", {
3493
- className: itemClasses,
3494
- style: item.style,
3495
- children: item.href && !item.active ? jsx(LinkComponent || "a", {
3496
- ...linkProps,
3497
- children: linkContent
3498
- }) : jsx("span", {
3499
- className: BREADCRUMB.CLASSES.LINK,
3500
- children: linkContent
3501
- })
3502
- }, index);
3503
- }))
3980
+ children: content
3504
3981
  })
3505
3982
  });
3506
3983
  }));
@@ -3531,7 +4008,7 @@ function useSpinner(initialProps) {
3531
4008
  };
3532
4009
  }
3533
4010
 
3534
- Breadcrumb.displayName = "Breadcrumb";
4011
+ Breadcrumb.displayName = "Breadcrumb", Breadcrumb.Item = BreadcrumbItem;
3535
4012
 
3536
4013
  const Spinner = memo((({size: size = "md", variant: variant = "primary", fullscreen: fullscreen = !1, className: className = "", style: style, glass: glass, "aria-label": ariaLabel, role: role = "status"}) => {
3537
4014
  const {generateSpinnerClass: generateSpinnerClass} = useSpinner({
@@ -3596,7 +4073,7 @@ class ThemeNaming {
3596
4073
  * Convert camelCase to kebab-case for CSS variables
3597
4074
  * @param str - String to convert
3598
4075
  */ static camelToKebab(str) {
3599
- return str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
4076
+ return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3600
4077
  }
3601
4078
  /**
3602
4079
  * Convert kebab-case to camelCase for JavaScript properties
@@ -3800,379 +4277,77 @@ const ButtonGroup = ({children: children, className: className = "", style: styl
3800
4277
 
3801
4278
  ButtonGroup.displayName = "ButtonGroup";
3802
4279
 
3803
- var commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
3804
-
3805
- function getDefaultExportFromCjs(x) {
3806
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
3807
- }
3808
-
3809
- var fails$9 = function(exec) {
3810
- try {
3811
- return !!exec();
3812
- } catch (error) {
3813
- return !0;
3814
- }
3815
- }, functionBindNative = !fails$9((function() {
3816
- // eslint-disable-next-line es/no-function-prototype-bind -- safe
3817
- var test = function() {/* empty */}.bind();
3818
- // eslint-disable-next-line no-prototype-builtins -- safe
3819
- return "function" != typeof test || test.hasOwnProperty("prototype");
3820
- })), 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) {
3821
- return function() {
3822
- return call$5.apply(fn, arguments);
3823
- };
3824
- }, objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf), check = function(it) {
3825
- return it && it.Math === Math && it;
3826
- }, globalThis_1 =
3827
- // eslint-disable-next-line es/no-global-this -- safe
3828
- check("object" == typeof globalThis && globalThis) || check("object" == typeof window && window) ||
3829
- // eslint-disable-next-line no-restricted-globals -- safe
3830
- check("object" == typeof self && self) || check("object" == typeof commonjsGlobal && commonjsGlobal) || check("object" == typeof commonjsGlobal && commonjsGlobal) ||
3831
- // eslint-disable-next-line no-new-func -- fallback
3832
- function() {
3833
- return this;
3834
- }() || 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() {
3835
- return call$4.apply(apply$1, arguments);
3836
- }), uncurryThis$7 = functionUncurryThis, toString$3 = uncurryThis$7({}.toString), stringSlice = uncurryThis$7("".slice), classofRaw$2 = function(it) {
3837
- return stringSlice(toString$3(it), 8, -1);
3838
- }, classofRaw$1 = classofRaw$2, uncurryThis$6 = functionUncurryThis, functionUncurryThisClause = function(fn) {
3839
- // Nashorn bug:
3840
- // https://github.com/zloirock/core-js/issues/1128
3841
- // https://github.com/zloirock/core-js/issues/1130
3842
- if ("Function" === classofRaw$1(fn)) return uncurryThis$6(fn);
3843
- }, documentAll = "object" == typeof document && document.all, isCallable$8 = void 0 === documentAll && void 0 !== documentAll ? function(argument) {
3844
- return "function" == typeof argument || argument === documentAll;
3845
- } : function(argument) {
3846
- return "function" == typeof argument;
3847
- }, objectGetOwnPropertyDescriptor = {}, descriptors = !fails$9((function() {
3848
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
3849
- return 7 !== Object.defineProperty({}, 1, {
3850
- get: function() {
3851
- return 7;
3852
- }
3853
- })[1];
3854
- })), NATIVE_BIND$1 = functionBindNative, call$3 = Function.prototype.call, functionCall = NATIVE_BIND$1 ? call$3.bind(call$3) : function() {
3855
- return call$3.apply(call$3, arguments);
3856
- }, objectPropertyIsEnumerable = {}, $propertyIsEnumerable = {}.propertyIsEnumerable, getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
3857
- 1: 2
3858
- }, 1);
3859
-
3860
- // `Object.prototype.propertyIsEnumerable` method implementation
3861
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
3862
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function(V) {
3863
- var descriptor = getOwnPropertyDescriptor$1(this, V);
3864
- return !!descriptor && descriptor.enumerable;
3865
- } : $propertyIsEnumerable;
3866
-
3867
- var match, version, createPropertyDescriptor$2 = function(bitmap, value) {
3868
- return {
3869
- enumerable: !(1 & bitmap),
3870
- configurable: !(2 & bitmap),
3871
- writable: !(4 & bitmap),
3872
- value: value
3873
- };
3874
- }, fails$6 = fails$9, classof$4 = classofRaw$2, $Object$3 = Object, split = functionUncurryThis("".split), indexedObject = fails$6((function() {
3875
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
3876
- // eslint-disable-next-line no-prototype-builtins -- safe
3877
- return !$Object$3("z").propertyIsEnumerable(0);
3878
- })) ? function(it) {
3879
- return "String" === classof$4(it) ? split(it, "") : $Object$3(it);
3880
- } : $Object$3, isNullOrUndefined$2 = function(it) {
3881
- return null == it;
3882
- }, isNullOrUndefined$1 = isNullOrUndefined$2, $TypeError$7 = TypeError, requireObjectCoercible$3 = function(it) {
3883
- if (isNullOrUndefined$1(it)) throw new $TypeError$7("Can't call method on " + it);
3884
- return it;
3885
- }, IndexedObject$1 = indexedObject, requireObjectCoercible$2 = requireObjectCoercible$3, toIndexedObject$2 = function(it) {
3886
- return IndexedObject$1(requireObjectCoercible$2(it));
3887
- }, isCallable$7 = isCallable$8, isObject$6 = function(it) {
3888
- return "object" == typeof it ? null !== it : isCallable$7(it);
3889
- }, path$3 = {}, path$2 = path$3, globalThis$b = globalThis_1, isCallable$6 = isCallable$8, aFunction = function(variable) {
3890
- return isCallable$6(variable) ? variable : void 0;
3891
- }, navigator$1 = globalThis_1.navigator, userAgent$2 = navigator$1 && navigator$1.userAgent, environmentUserAgent = userAgent$2 ? String(userAgent$2) : "", globalThis$9 = globalThis_1, userAgent$1 = environmentUserAgent, process$1 = globalThis$9.process, Deno$1 = globalThis$9.Deno, versions = process$1 && process$1.versions || Deno$1 && Deno$1.version, v8 = versions && versions.v8;
3892
-
3893
- v8 && (
3894
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
3895
- // but their correct versions are not interesting for us
3896
- version = (match = v8.split("."))[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1])),
3897
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
3898
- // so check `userAgent` even if `.v8` exists, but 0
3899
- !version && userAgent$1 && (!(match = userAgent$1.match(/Edge\/(\d+)/)) || match[1] >= 74) && (match = userAgent$1.match(/Chrome\/(\d+)/)) && (version = +match[1]);
3900
-
3901
- var environmentV8Version = version, V8_VERSION = environmentV8Version, fails$5 = fails$9, $String$3 = globalThis_1.String, symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5((function() {
3902
- var symbol = Symbol("symbol detection");
3903
- // Chrome 38 Symbol has incorrect toString conversion
3904
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
3905
- // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
3906
- // of course, fail.
3907
- return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
3908
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
3909
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
3910
- })), useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && "symbol" == typeof Symbol.iterator, isCallable$5 = isCallable$8, isPrototypeOf$2 = objectIsPrototypeOf, $Object$2 = Object, isSymbol$2 = useSymbolAsUid ? function(it) {
3911
- return "symbol" == typeof it;
3912
- } : function(it) {
3913
- var $Symbol = function(namespace, method) {
3914
- return arguments.length < 2 ? aFunction(path$2[namespace]) || aFunction(globalThis$b[namespace]) : path$2[namespace] && path$2[namespace][method] || globalThis$b[namespace] && globalThis$b[namespace][method];
3915
- }("Symbol");
3916
- return isCallable$5($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
3917
- }, $String$2 = String, isCallable$4 = isCallable$8, $TypeError$6 = TypeError, aCallable$3 = function(argument) {
3918
- if (isCallable$4(argument)) return argument;
3919
- throw new $TypeError$6(function(argument) {
3920
- try {
3921
- return $String$2(argument);
3922
- } catch (error) {
3923
- return "Object";
3924
- }
3925
- }(argument) + " is not a function");
3926
- }, aCallable$2 = aCallable$3, isNullOrUndefined = isNullOrUndefined$2, call$2 = functionCall, isCallable$3 = isCallable$8, isObject$5 = isObject$6, $TypeError$5 = TypeError, sharedStore = {
3927
- exports: {}
3928
- }, globalThis$7 = globalThis_1, defineProperty = Object.defineProperty, globalThis$6 = globalThis_1, store$1 = sharedStore.exports = globalThis$6["__core-js_shared__"] || function(key, value) {
3929
- try {
3930
- defineProperty(globalThis$7, key, {
3931
- value: value,
3932
- configurable: !0,
3933
- writable: !0
3934
- });
3935
- } catch (error) {
3936
- globalThis$7[key] = value;
3937
- }
3938
- return value;
3939
- }("__core-js_shared__", {});
3940
-
3941
- /* eslint-disable es/no-symbol -- required for testing */ (store$1.versions || (store$1.versions = [])).push({
3942
- version: "3.43.0",
3943
- mode: "pure",
3944
- copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)",
3945
- license: "https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",
3946
- source: "https://github.com/zloirock/core-js"
3947
- });
4280
+ // Subcomponents
4281
+ const CalloutIcon = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
4282
+ ref: ref,
4283
+ className: `c-callout__icon ${className}`.trim(),
4284
+ ...props,
4285
+ children: children
4286
+ })));
3948
4287
 
3949
- var key, value, store = sharedStore.exports, requireObjectCoercible$1 = requireObjectCoercible$3, $Object$1 = Object, toObject$2 = function(argument) {
3950
- return $Object$1(requireObjectCoercible$1(argument));
3951
- }, toObject$1 = toObject$2, hasOwnProperty = functionUncurryThis({}.hasOwnProperty), hasOwnProperty_1 = Object.hasOwn || function(it, key) {
3952
- return hasOwnProperty(toObject$1(it), key);
3953
- }, 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) {
3954
- return "Symbol(" + (void 0 === key ? "" : key) + ")_" + toString$2(++id + postfix, 36);
3955
- }, wellKnownSymbol$5 = function(name) {
3956
- return hasOwn$2(WellKnownSymbolsStore, name) || (WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$2(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol("Symbol." + name)),
3957
- WellKnownSymbolsStore[name];
3958
- }, call$1 = functionCall, isObject$4 = isObject$6, isSymbol$1 = isSymbol$2, $TypeError$4 = TypeError, TO_PRIMITIVE = wellKnownSymbol$5("toPrimitive"), toPrimitive = function(input, pref) {
3959
- if (!isObject$4(input) || isSymbol$1(input)) return input;
3960
- var result, func, exoticToPrim = (func = input[TO_PRIMITIVE], isNullOrUndefined(func) ? void 0 : aCallable$2(func));
3961
- if (exoticToPrim) {
3962
- if (void 0 === pref && (pref = "default"), result = call$1(exoticToPrim, input, pref),
3963
- !isObject$4(result) || isSymbol$1(result)) return result;
3964
- throw new $TypeError$4("Can't convert object to primitive value");
3965
- }
3966
- return void 0 === pref && (pref = "number"), function(input, pref) {
3967
- var fn, val;
3968
- if ("string" === pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
3969
- if (isCallable$3(fn = input.valueOf) && !isObject$5(val = call$2(fn, input))) return val;
3970
- if ("string" !== pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
3971
- throw new $TypeError$5("Can't convert object to primitive value");
3972
- }(input, pref);
3973
- }, isSymbol = isSymbol$2, toPropertyKey$2 = function(argument) {
3974
- var key = toPrimitive(argument, "string");
3975
- return isSymbol(key) ? key : key + "";
3976
- }, isObject$3 = isObject$6, document$1 = globalThis_1.document, EXISTS = isObject$3(document$1) && isObject$3(document$1.createElement), ie8DomDefine = !descriptors && !fails$9((function() {
3977
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
3978
- return 7 !== Object.defineProperty((it = "div", EXISTS ? document$1.createElement(it) : {}), "a", {
3979
- get: function() {
3980
- return 7;
3981
- }
3982
- }).a;
3983
- var it;
3984
- })), 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;
4288
+ CalloutIcon.displayName = "CalloutIcon";
3985
4289
 
3986
- // `Object.getOwnPropertyDescriptor` method
3987
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
3988
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor$1 : function(O, P) {
3989
- if (O = toIndexedObject$1(O), P = toPropertyKey$1(P), IE8_DOM_DEFINE$1) try {
3990
- return $getOwnPropertyDescriptor$1(O, P);
3991
- } catch (error) {/* empty */}
3992
- if (hasOwn$1(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
3993
- };
4290
+ const CalloutMessage = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
4291
+ ref: ref,
4292
+ className: `c-callout__message ${className}`.trim(),
4293
+ ...props,
4294
+ children: children
4295
+ })));
3994
4296
 
3995
- var fails$3 = fails$9, isCallable$2 = isCallable$8, replacement = /#|\.prototype\./, isForced$1 = function(feature, detection) {
3996
- var value = data[normalize(feature)];
3997
- return value === POLYFILL || value !== NATIVE && (isCallable$2(detection) ? fails$3(detection) : !!detection);
3998
- }, normalize = isForced$1.normalize = function(string) {
3999
- return String(string).replace(replacement, ".").toLowerCase();
4000
- }, data = isForced$1.data = {}, NATIVE = isForced$1.NATIVE = "N", POLYFILL = isForced$1.POLYFILL = "P", isForced_1 = isForced$1, aCallable$1 = aCallable$3, NATIVE_BIND = functionBindNative, bind$1 = functionUncurryThisClause(functionUncurryThisClause.bind), objectDefineProperty = {}, v8PrototypeDefineBug = descriptors && fails$9((function() {
4001
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
4002
- return 42 !== Object.defineProperty((function() {/* empty */}), "prototype", {
4003
- value: 42,
4004
- writable: !1
4005
- }).prototype;
4006
- })), isObject$2 = isObject$6, $String$1 = String, $TypeError$3 = TypeError, DESCRIPTORS$1 = descriptors, IE8_DOM_DEFINE = ie8DomDefine, V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug, anObject = function(argument) {
4007
- if (isObject$2(argument)) return argument;
4008
- throw new $TypeError$3($String$1(argument) + " is not an object");
4009
- }, toPropertyKey = toPropertyKey$2, $TypeError$2 = TypeError, $defineProperty = Object.defineProperty, $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
4297
+ CalloutMessage.displayName = "CalloutMessage";
4010
4298
 
4011
- // `Object.defineProperty` method
4012
- // https://tc39.es/ecma262/#sec-object.defineproperty
4013
- objectDefineProperty.f = DESCRIPTORS$1 ? V8_PROTOTYPE_DEFINE_BUG ? function(O, P, Attributes) {
4014
- if (anObject(O), P = toPropertyKey(P), anObject(Attributes), "function" == typeof O && "prototype" === P && "value" in Attributes && "writable" in Attributes && !Attributes.writable) {
4015
- var current = $getOwnPropertyDescriptor(O, P);
4016
- current && current.writable && (O[P] = Attributes.value, Attributes = {
4017
- configurable: "configurable" in Attributes ? Attributes.configurable : current.configurable,
4018
- enumerable: "enumerable" in Attributes ? Attributes.enumerable : current.enumerable,
4019
- writable: !1
4020
- });
4021
- }
4022
- return $defineProperty(O, P, Attributes);
4023
- } : $defineProperty : function(O, P, Attributes) {
4024
- if (anObject(O), P = toPropertyKey(P), anObject(Attributes), IE8_DOM_DEFINE) try {
4025
- return $defineProperty(O, P, Attributes);
4026
- } catch (error) {/* empty */}
4027
- if ("get" in Attributes || "set" in Attributes) throw new $TypeError$2("Accessors not supported");
4028
- return "value" in Attributes && (O[P] = Attributes.value), O;
4029
- };
4299
+ const CalloutTitle = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
4300
+ ref: ref,
4301
+ className: `c-callout__title ${className}`.trim(),
4302
+ ...props,
4303
+ children: children
4304
+ })));
4030
4305
 
4031
- var definePropertyModule = objectDefineProperty, createPropertyDescriptor = createPropertyDescriptor$2, createNonEnumerableProperty$1 = descriptors ? function(object, key, value) {
4032
- return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
4033
- } : function(object, key, value) {
4034
- return object[key] = value, object;
4035
- }, globalThis$3 = 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) {
4036
- return aCallable$1(fn), void 0 === that ? fn : NATIVE_BIND ? bind$1(fn, that) : function() {
4037
- return fn.apply(that, arguments);
4038
- };
4039
- }, createNonEnumerableProperty = createNonEnumerableProperty$1, hasOwn = hasOwnProperty_1, wrapConstructor = function(NativeConstructor) {
4040
- var Wrapper = function(a, b, c) {
4041
- if (this instanceof Wrapper) {
4042
- switch (arguments.length) {
4043
- case 0:
4044
- return new NativeConstructor;
4306
+ CalloutTitle.displayName = "CalloutTitle";
4045
4307
 
4046
- case 1:
4047
- return new NativeConstructor(a);
4308
+ const CalloutText = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
4309
+ ref: ref,
4310
+ className: `c-callout__text ${className}`.trim(),
4311
+ ...props,
4312
+ children: children
4313
+ })));
4048
4314
 
4049
- case 2:
4050
- return new NativeConstructor(a, b);
4051
- }
4052
- return new NativeConstructor(a, b, c);
4053
- }
4054
- return apply(NativeConstructor, this, arguments);
4055
- };
4056
- return Wrapper.prototype = NativeConstructor.prototype, Wrapper;
4057
- }, _export = function(options, source) {
4058
- 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$3 : STATIC ? globalThis$3[TARGET] : globalThis$3[TARGET] && globalThis$3[TARGET].prototype, target = GLOBAL ? path$1 : path$1[TARGET] || createNonEnumerableProperty(path$1, TARGET, {})[TARGET], targetPrototype = target.prototype;
4059
- for (key in source)
4060
- // contains in native
4061
- USE_NATIVE = !(FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced)) && nativeSource && hasOwn(nativeSource, key),
4062
- targetProperty = target[key], USE_NATIVE && (nativeProperty = options.dontCallGetSet ? (descriptor = getOwnPropertyDescriptor(nativeSource, key)) && descriptor.value : nativeSource[key]),
4063
- // export native or implementation
4064
- sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key], (FORCED || PROTO || typeof targetProperty != typeof sourceProperty) && (
4065
- // bind methods to global for calling from export context
4066
- resultProperty = options.bind && USE_NATIVE ? bind(sourceProperty, globalThis$3) : options.wrap && USE_NATIVE ? wrapConstructor(sourceProperty) : PROTO && isCallable$1(sourceProperty) ? uncurryThis$1(sourceProperty) : sourceProperty,
4067
- // add a flag to not completely full polyfills
4068
- (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) && createNonEnumerableProperty(resultProperty, "sham", !0),
4069
- createNonEnumerableProperty(target, key, resultProperty), PROTO && (hasOwn(path$1, VIRTUAL_PROTOTYPE = TARGET + "Prototype") || createNonEnumerableProperty(path$1, VIRTUAL_PROTOTYPE, {}),
4070
- // export virtual prototype methods
4071
- createNonEnumerableProperty(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty),
4072
- // export real prototype methods
4073
- options.real && targetPrototype && (FORCED || !targetPrototype[key]) && createNonEnumerableProperty(targetPrototype, key, sourceProperty)));
4074
- }, ceil = Math.ceil, floor = Math.floor, trunc = Math.trunc || function(x) {
4075
- var n = +x;
4076
- return (n > 0 ? floor : ceil)(n);
4077
- }, toIntegerOrInfinity$2 = function(argument) {
4078
- var number = +argument;
4079
- // eslint-disable-next-line no-self-compare -- NaN check
4080
- return number != number || 0 === number ? 0 : trunc(number);
4081
- }, toIntegerOrInfinity$1 = toIntegerOrInfinity$2, max = Math.max, min$1 = Math.min, toIntegerOrInfinity = toIntegerOrInfinity$2, min = Math.min, lengthOfArrayLike$2 = function(obj) {
4082
- return argument = obj.length, (len = toIntegerOrInfinity(argument)) > 0 ? min(len, 9007199254740991) : 0;
4083
- var argument, len;
4084
- }, toIndexedObject = toIndexedObject$2, lengthOfArrayLike$1 = lengthOfArrayLike$2, createMethod$1 = function(IS_INCLUDES) {
4085
- return function($this, el, fromIndex) {
4086
- var O = toIndexedObject($this), length = lengthOfArrayLike$1(O);
4087
- if (0 === length) return !IS_INCLUDES && -1;
4088
- var value, index = function(index, length) {
4089
- var integer = toIntegerOrInfinity$1(index);
4090
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
4091
- }(fromIndex, length);
4092
- // Array#includes uses SameValueZero equality algorithm
4093
- // eslint-disable-next-line no-self-compare -- NaN check
4094
- if (IS_INCLUDES && el != el) {
4095
- for (;length > index; )
4096
- // eslint-disable-next-line no-self-compare -- NaN check
4097
- if ((value = O[index++]) != value) return !0;
4098
- // Array#indexOf ignores holes, Array#includes - not
4099
- } else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
4100
- return !IS_INCLUDES && -1;
4101
- };
4102
- }, $includes = [ createMethod$1(!0), createMethod$1(!1) ][0];
4315
+ CalloutText.displayName = "CalloutText";
4103
4316
 
4104
- // `Array.prototype.includes` method
4105
- // https://tc39.es/ecma262/#sec-array.prototype.includes
4106
- _export({
4107
- target: "Array",
4108
- proto: !0,
4109
- forced: fails$9((function() {
4110
- // eslint-disable-next-line es/no-array-prototype-includes -- detection
4111
- return !Array(1).includes();
4112
- }))
4113
- }, {
4114
- includes: function(el /* , fromIndex = 0 */) {
4115
- return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
4116
- }
4117
- });
4317
+ const CalloutActions = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
4318
+ ref: ref,
4319
+ className: `c-callout__actions ${className}`.trim(),
4320
+ ...props,
4321
+ children: children
4322
+ })));
4118
4323
 
4119
- var globalThis$2 = globalThis_1, path = path$3, getBuiltInPrototypeMethod$3 = function(CONSTRUCTOR, METHOD) {
4120
- var Namespace = path[CONSTRUCTOR + "Prototype"], pureMethod = Namespace && Namespace[METHOD];
4121
- if (pureMethod) return pureMethod;
4122
- var NativeConstructor = globalThis$2[CONSTRUCTOR], NativePrototype = NativeConstructor && NativeConstructor.prototype;
4123
- return NativePrototype && NativePrototype[METHOD];
4124
- }, includes$4 = getBuiltInPrototypeMethod$3("Array", "includes"), isObject$1 = isObject$6, classof$3 = classofRaw$2, MATCH$1 = wellKnownSymbol$5("match"), $TypeError$1 = TypeError, test = {};
4324
+ CalloutActions.displayName = "CalloutActions";
4125
4325
 
4126
- test[wellKnownSymbol$5("toStringTag")] = "z";
4326
+ const CalloutCloseButton = forwardRef((({onClick: onClick, className: className = "", ...props}, ref) => jsx("button", {
4327
+ ref: ref,
4328
+ className: `c-callout__close-btn ${className}`.trim(),
4329
+ onClick: onClick,
4330
+ "aria-label": "Close",
4331
+ ...props,
4332
+ children: jsx(Icon, {
4333
+ name: "X",
4334
+ size: "md"
4335
+ })
4336
+ })));
4127
4337
 
4128
- 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() {
4129
- return arguments;
4130
- }()), classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
4131
- var O, tag, result;
4132
- return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (tag = function(it, key) {
4133
- try {
4134
- return it[key];
4135
- } catch (error) {/* empty */}
4136
- }(O = $Object(it), TO_STRING_TAG)) ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : "Object" === (result = classofRaw(O)) && isCallable(O.callee) ? "Arguments" : result;
4137
- }, $String = String, MATCH = wellKnownSymbol$5("match"), $$1 = _export, notARegExp = function(it) {
4138
- if (function(it) {
4139
- var isRegExp;
4140
- return isObject$1(it) && (void 0 !== (isRegExp = it[MATCH$1]) ? !!isRegExp : "RegExp" === classof$3(it));
4141
- }(it)) throw new $TypeError$1("The method doesn't accept regular expressions");
4142
- return it;
4143
- }, requireObjectCoercible = requireObjectCoercible$3, toString = function(argument) {
4144
- if ("Symbol" === classof$1(argument)) throw new TypeError("Cannot convert a Symbol value to a string");
4145
- return $String(argument);
4146
- }, stringIndexOf = functionUncurryThis("".indexOf);
4338
+ CalloutCloseButton.displayName = "CalloutCloseButton";
4147
4339
 
4148
- // `String.prototype.includes` method
4149
- // https://tc39.es/ecma262/#sec-string.prototype.includes
4150
- $$1({
4151
- target: "String",
4152
- proto: !0,
4153
- forced: !function(METHOD_NAME) {
4154
- var regexp = /./;
4155
- try {
4156
- "/./"[METHOD_NAME](regexp);
4157
- } catch (error1) {
4158
- try {
4159
- return regexp[MATCH] = !1, "/./"[METHOD_NAME](regexp);
4160
- } catch (error2) {/* empty */}
4161
- }
4162
- return !1;
4163
- }("includes")
4164
- }, {
4165
- includes: function(searchString /* , position = 0 */) {
4166
- return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
4167
- }
4168
- });
4340
+ // Wrapper for content (icon + message)
4341
+ const CalloutContent = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
4342
+ ref: ref,
4343
+ className: `c-callout__content ${className}`.trim(),
4344
+ ...props,
4345
+ children: children
4346
+ })));
4169
4347
 
4170
- var includes$3 = getBuiltInPrototypeMethod$3("String", "includes"), isPrototypeOf$1 = objectIsPrototypeOf, arrayMethod = includes$4, stringMethod = includes$3, ArrayPrototype$1 = Array.prototype, StringPrototype = String.prototype;
4348
+ CalloutContent.displayName = "CalloutContent";
4171
4349
 
4172
- const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
4173
- var own = it.includes;
4174
- return it === ArrayPrototype$1 || isPrototypeOf$1(ArrayPrototype$1, it) && own === ArrayPrototype$1.includes ? arrayMethod : "string" == typeof it || it === StringPrototype || isPrototypeOf$1(StringPrototype, it) && own === StringPrototype.includes ? stringMethod : own;
4175
- })), Callout = ({title: title, children: children, icon: icon, variant: variant = "primary", onClose: onClose, actions: actions, compact: compact = !1, isToast: isToast = !1, glass: glass, className: className, style: style, ...props}) => {
4350
+ const Callout = memo((({title: title, children: children, icon: icon, variant: variant = "primary", onClose: onClose, actions: actions, compact: compact = !1, isToast: isToast = !1, glass: glass, className: className, style: style, ...props}) => {
4176
4351
  const {generateCalloutClass: generateCalloutClass, handleClose: handleClose} =
4177
4352
  /**
4178
4353
  * Callout state and functionality
@@ -4202,10 +4377,7 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
4202
4377
  handler && handler();
4203
4378
  }
4204
4379
  };
4205
- }
4206
- /**
4207
- * Callout component for displaying important messages, notifications, or alerts
4208
- */ ({
4380
+ }({
4209
4381
  variant: variant,
4210
4382
  compact: compact,
4211
4383
  isToast: isToast,
@@ -4221,7 +4393,11 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
4221
4393
  return isToast ? (baseAttributes.role = "alert", baseAttributes["aria-live"] = "polite") : _includesInstanceProperty(_context = [ "warning", "error" ]).call(_context, variant) ? (baseAttributes.role = "alert",
4222
4394
  baseAttributes["aria-live"] = "assertive") : _includesInstanceProperty(_context2 = [ "info", "success" ]).call(_context2, variant) && (baseAttributes.role = "status",
4223
4395
  baseAttributes["aria-live"] = "polite"), baseAttributes;
4224
- }, calloutContent = jsxs(Fragment, {
4396
+ }, calloutContent = React.Children.toArray(children).some((child => {
4397
+ var _context3;
4398
+
4399
+ return React.isValidElement(child) && _includesInstanceProperty(_context3 = [ "CalloutIcon", "CalloutMessage", "CalloutTitle", "CalloutText", "CalloutActions", "CalloutContent" ]).call(_context3, child.type.displayName);
4400
+ })) ? children : jsxs(Fragment, {
4225
4401
  children: [ jsxs("div", {
4226
4402
  className: "c-callout__content",
4227
4403
  children: [ icon && jsx("div", {
@@ -4297,9 +4473,13 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
4297
4473
  style: style,
4298
4474
  children: calloutContent
4299
4475
  });
4300
- };
4476
+ }));
4301
4477
 
4302
- Callout.displayName = "Callout";
4478
+ Callout.displayName = "Callout",
4479
+ // Attach subcomponents
4480
+ Callout.Icon = CalloutIcon, Callout.Message = CalloutMessage, Callout.Title = CalloutTitle,
4481
+ Callout.Text = CalloutText, Callout.Actions = CalloutActions, Callout.CloseButton = CalloutCloseButton,
4482
+ Callout.Content = CalloutContent;
4303
4483
 
4304
4484
  const Card = React.memo( forwardRef((({
4305
4485
  // Variants
@@ -9405,7 +9585,38 @@ const DropdownContext = createContext({
9405
9585
  close: () => {},
9406
9586
  id: "",
9407
9587
  trigger: "click"
9408
- }), DropdownItem = memo((({children: children, href: href, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", LinkComponent: LinkComponent, ...props}) => {
9588
+ }), DropdownMenu = forwardRef((({children: children, className: className = "", ...props}, ref) => {
9589
+ const {glass: glass} = useContext(DropdownStyleContext);
9590
+ // We need to access glass prop here?
9591
+ // Wait, the original code wrapped <ul> in Context Provider.
9592
+ // And applied glass wrapper around <ul>.
9593
+ // If we use Compound Component, DropdownMenu should be the list.
9594
+ return jsx("ul", {
9595
+ ref: ref,
9596
+ className: `c-dropdown__menu ${glass ? "c-dropdown__menu--glass" : ""} ${className}`.trim(),
9597
+ ...props,
9598
+ children: children
9599
+ });
9600
+ }));
9601
+
9602
+ // Compound Components
9603
+ DropdownMenu.displayName = "DropdownMenu";
9604
+
9605
+ const DropdownTrigger = forwardRef((({children: children, className: className = "", onClick: onClick, onKeyDown: onKeyDown, ...props}, ref) => jsx("div", {
9606
+ ref: ref,
9607
+ className: `c-dropdown__toggle ${className}`.trim(),
9608
+ onClick: onClick,
9609
+ onKeyDown: onKeyDown,
9610
+ ...props,
9611
+ children: children
9612
+ })));
9613
+
9614
+ DropdownTrigger.displayName = "DropdownTrigger";
9615
+
9616
+ /**
9617
+ * DropdownItem component for menu items
9618
+ */
9619
+ const DropdownItem = memo((({children: children, href: href, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", LinkComponent: LinkComponent, ...props}) => {
9409
9620
  const {close: close} = useContext(DropdownContext), handleClick = e => {
9410
9621
  disabled ? e.preventDefault() : (onClick && onClick(e),
9411
9622
  // Always close the dropdown when an item is clicked
@@ -9447,7 +9658,7 @@ const DropdownContext = createContext({
9447
9658
  }))), DropdownHeader = memo((({children: children, className: className = ""}) => jsx("li", {
9448
9659
  className: `c-dropdown__header ${className}`,
9449
9660
  children: children
9450
- }))), Dropdown = memo((({children: children, menu: menu, placement: placement = "bottom-start", trigger: trigger = "click", offset: offset = DROPDOWN.DEFAULTS.OFFSET, isOpen: controlledIsOpen, onOpenChange: onOpenChange, closeOnClickOutside: closeOnClickOutside = !0, closeOnEscape: closeOnEscape = !0, maxHeight: maxHeight, minWidth: minWidth = DROPDOWN.DEFAULTS.MIN_WIDTH, variant: variant, className: className = "", style: style, glass: glass, ...props}) => {
9661
+ }))), DropdownStyleContext = createContext({}), Dropdown = memo((({children: children, menu: menu, placement: placement = "bottom-start", trigger: trigger = "click", offset: offset = DROPDOWN.DEFAULTS.OFFSET, isOpen: controlledIsOpen, onOpenChange: onOpenChange, closeOnClickOutside: closeOnClickOutside = !0, closeOnEscape: closeOnEscape = !0, maxHeight: maxHeight, minWidth: minWidth = DROPDOWN.DEFAULTS.MIN_WIDTH, variant: variant, className: className = "", style: style, glass: glass, ...props}) => {
9451
9662
  // Set up controlled vs uncontrolled state
9452
9663
  const [uncontrolledIsOpen, setUncontrolledIsOpen] = useState(!1), isControlled = void 0 !== controlledIsOpen, isOpen = isControlled ? controlledIsOpen : uncontrolledIsOpen, dropdownRef = useRef(null), toggleRef = useRef(null), menuRef = useRef(null), dropdownId = useRef(`dropdown-${Math.random().toString(36).substring(2, 9)}`).current, setIsOpen = useCallback((nextIsOpen => {
9453
9664
  isControlled || setUncontrolledIsOpen(nextIsOpen), onOpenChange && onOpenChange(nextIsOpen);
@@ -9510,20 +9721,59 @@ const DropdownContext = createContext({
9510
9721
  "hover" === trigger && setIsOpen(!0);
9511
9722
  }), [ trigger, setIsOpen ]), dropdownClasses = [ "c-dropdown", "click" === trigger ? "c-dropdown--onclick" : "", variant ? `c-dropdown--${variant}` : "", isOpen ? "is-open" : "", glass ? "c-dropdown--glass" : "", className ].filter(Boolean).join(" "), menuStyleProps = {};
9512
9723
  // Event handlers
9513
- maxHeight && (menuStyleProps.maxHeight = maxHeight), void 0 !== minWidth && (menuStyleProps.minWidth = "number" == typeof minWidth ? `${minWidth}px` : minWidth);
9724
+ let triggerContent, menuContentNode;
9725
+ maxHeight && (menuStyleProps.maxHeight = maxHeight), void 0 !== minWidth && (menuStyleProps.minWidth = "number" == typeof minWidth ? `${minWidth}px` : minWidth),
9726
+ React.Children.toArray(children).some((child => {
9727
+ var _context;
9728
+
9729
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "DropdownTrigger", "DropdownMenu" ]).call(_context, child.type.displayName);
9730
+ })) ?
9731
+ // Find Trigger and Menu in children
9732
+ React.Children.forEach(children, (child => {
9733
+ React.isValidElement(child) && ("DropdownTrigger" === child.type.displayName ? triggerContent = React.cloneElement(child, {
9734
+ ref: toggleRef,
9735
+ onClick: e => {
9736
+ handleToggleClick(e), child.props.onClick?.(e);
9737
+ },
9738
+ onKeyDown: e => {
9739
+ handleToggleKeyDown(e), child.props.onKeyDown?.(e);
9740
+ },
9741
+ "aria-haspopup": "menu",
9742
+ "aria-expanded": isOpen,
9743
+ "aria-controls": dropdownId,
9744
+ tabIndex: 0
9745
+ }) : "DropdownMenu" === child.type.displayName && (menuContentNode = child));
9746
+ })) : (
9747
+ // Legacy mode
9748
+ triggerContent = jsx("div", {
9749
+ ref: toggleRef,
9750
+ className: "c-dropdown__toggle",
9751
+ onClick: handleToggleClick,
9752
+ onKeyDown: handleToggleKeyDown,
9753
+ "aria-haspopup": "menu",
9754
+ "aria-expanded": isOpen,
9755
+ "aria-controls": dropdownId,
9756
+ tabIndex: 0,
9757
+ children: children
9758
+ }), menuContentNode = jsx("ul", {
9759
+ className: "c-dropdown__menu " + (glass ? "c-dropdown__menu--glass" : ""),
9760
+ children: menu
9761
+ }));
9514
9762
  const menuContent = jsx("div", {
9515
9763
  className: "c-dropdown__menu-inner",
9516
9764
  style: menuStyleProps,
9517
- children: jsx(DropdownContext.Provider, {
9765
+ children: jsx(DropdownStyleContext.Provider, {
9518
9766
  value: {
9519
- isOpen: isOpen,
9520
- close: close,
9521
- id: dropdownId,
9522
- trigger: trigger
9767
+ glass: glass
9523
9768
  },
9524
- children: jsx("ul", {
9525
- className: "c-dropdown__menu " + (glass ? "c-dropdown__menu--glass" : ""),
9526
- children: menu
9769
+ children: jsx(DropdownContext.Provider, {
9770
+ value: {
9771
+ isOpen: isOpen,
9772
+ close: close,
9773
+ id: dropdownId,
9774
+ trigger: trigger
9775
+ },
9776
+ children: menuContentNode
9527
9777
  })
9528
9778
  })
9529
9779
  });
@@ -9533,17 +9783,7 @@ const DropdownContext = createContext({
9533
9783
  style: style,
9534
9784
  onMouseEnter: "hover" === trigger ? handleHoverOpen : void 0,
9535
9785
  ...props,
9536
- children: [ jsx("div", {
9537
- ref: toggleRef,
9538
- className: "c-dropdown__toggle",
9539
- onClick: handleToggleClick,
9540
- onKeyDown: handleToggleKeyDown,
9541
- "aria-haspopup": "menu",
9542
- "aria-expanded": isOpen,
9543
- "aria-controls": dropdownId,
9544
- tabIndex: 0,
9545
- children: children
9546
- }), jsx("div", {
9786
+ children: [ triggerContent, jsx("div", {
9547
9787
  ref: menuRef,
9548
9788
  id: dropdownId,
9549
9789
  className: `c-dropdown__menu-wrapper c-dropdown__menu-wrapper--${placement} ${isOpen ? "is-open" : ""} ${glass ? "is-glass" : ""}`,
@@ -9571,9 +9811,9 @@ const DropdownContext = createContext({
9571
9811
  }));
9572
9812
 
9573
9813
  /**
9574
- * DropdownItem component for menu items
9575
- */ Dropdown.displayName = "Dropdown", DropdownItem.displayName = "DropdownItem",
9576
- DropdownDivider.displayName = "DropdownDivider", DropdownHeader.displayName = "DropdownHeader";
9814
+ * DropdownDivider component for separating groups of items
9815
+ */ Dropdown.displayName = "Dropdown", Dropdown.Trigger = DropdownTrigger, Dropdown.Menu = DropdownMenu,
9816
+ Dropdown.Item = DropdownItem, Dropdown.Divider = DropdownDivider, Dropdown.Header = DropdownHeader;
9577
9817
 
9578
9818
  /**
9579
9819
  * DataTable - A flexible and accessible data table component with advanced features
@@ -10662,53 +10902,50 @@ function useEdgePanel(initialProps) {
10662
10902
  };
10663
10903
  }
10664
10904
 
10665
- /**
10666
- * EdgePanel - A sliding panel component that appears from any screen edge
10667
- *
10668
- * @component
10669
- * @example
10670
- * ```tsx
10671
- * // Basic usage
10672
- * <EdgePanel
10673
- * title="My Panel"
10674
- * isOpen={isOpen}
10675
- * onOpenChange={setIsOpen}
10676
- * position="start"
10677
- * >
10678
- * <p>Panel content</p>
10679
- * </EdgePanel>
10680
- *
10681
- * // With glass effect
10682
- * <EdgePanel
10683
- * title="Glass Panel"
10684
- * isOpen={isOpen}
10685
- * onOpenChange={setIsOpen}
10686
- * position="end"
10687
- * glass={true}
10688
- * >
10689
- * <p>Panel with glass morphism</p>
10690
- * </EdgePanel>
10691
- *
10692
- * // With custom glass configuration
10693
- * <EdgePanel
10694
- * title="Custom Glass"
10695
- * isOpen={isOpen}
10696
- * onOpenChange={setIsOpen}
10697
- * position="start"
10698
- * glass={{
10699
- * mode: 'shader',
10700
- * shaderVariant: 'liquidGlass',
10701
- * displacementScale: 70,
10702
- * blurAmount: 1.8,
10703
- * saturation: 170,
10704
- * }}
10705
- * >
10706
- * <p>Panel with custom glass effect</p>
10707
- * </EdgePanel>
10708
- * ```
10709
- */ DatePicker.displayName = "DatePicker";
10905
+ // Subcomponents
10906
+ DatePicker.displayName = "DatePicker";
10907
+
10908
+ const EdgePanelHeader = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
10909
+ ref: ref,
10910
+ className: `c-edge-panel__header ${className}`.trim(),
10911
+ ...props,
10912
+ children: children
10913
+ })));
10914
+
10915
+ EdgePanelHeader.displayName = "EdgePanelHeader";
10916
+
10917
+ const EdgePanelBody = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
10918
+ ref: ref,
10919
+ className: `c-edge-panel__body ${className}`.trim(),
10920
+ ...props,
10921
+ children: children
10922
+ })));
10923
+
10924
+ EdgePanelBody.displayName = "EdgePanelBody";
10925
+
10926
+ const EdgePanelFooter = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
10927
+ ref: ref,
10928
+ className: `c-edge-panel__footer ${className}`.trim(),
10929
+ ...props,
10930
+ children: children
10931
+ })));
10932
+
10933
+ EdgePanelFooter.displayName = "EdgePanelFooter";
10934
+
10935
+ const EdgePanelCloseButton = forwardRef((({className: className = "", onClick: onClick, ...props}, ref) => jsx("button", {
10936
+ ref: ref,
10937
+ className: `c-edge-panel__close c-btn c-btn--icon ${className}`.trim(),
10938
+ onClick: onClick,
10939
+ "aria-label": "Close panel",
10940
+ ...props,
10941
+ children: jsx(Icon, {
10942
+ name: "X"
10943
+ })
10944
+ })));
10710
10945
 
10711
- const EdgePanel = ({title: title, children: children, position: position = "start", mode: mode = "slide", isOpen: isOpen = !1, onOpenChange: onOpenChange, backdrop: backdrop = !0, closeOnBackdropClick: closeOnBackdropClick = !0, closeOnEscape: closeOnEscape = !0, className: className = "", style: style, glass: glass}) => {
10946
+ EdgePanelCloseButton.displayName = "EdgePanelCloseButton";
10947
+
10948
+ const EdgePanel = memo((({title: title, children: children, position: position = "start", mode: mode = "slide", isOpen: isOpen = !1, onOpenChange: onOpenChange, backdrop: backdrop = !0, closeOnBackdropClick: closeOnBackdropClick = !0, closeOnEscape: closeOnEscape = !0, className: className = "", style: style, glass: glass}) => {
10712
10949
  const {isOpen: isOpenState, containerRef: containerRef, backdropRef: backdropRef, generateEdgePanelClass: generateEdgePanelClass, closePanel: closePanel, handleBackdropClick: handleBackdropClick} = useEdgePanel({
10713
10950
  position: position,
10714
10951
  mode: mode,
@@ -10725,13 +10962,23 @@ const EdgePanel = ({title: title, children: children, position: position = "star
10725
10962
  });
10726
10963
  // Moved useRef outside of conditional rendering to fix hook order issue
10727
10964
  // If not open and not controlled by parent, don't render
10965
+ // Note: useEdgePanel manages internal state if onOpenChange is not provided?
10966
+ // Looking at useEdgePanel (implied): it seems to return isOpenState.
10967
+ // If we return null here, animations might be cut off.
10968
+ // Usually EdgePanel/Drawer should stay mounted but hidden or conditionally mounted.
10969
+ // The original code returned null if !isOpenState && isOpen === false.
10970
+ // Let's keep that logic.
10728
10971
  if (!isOpenState && !1 === isOpen) return null;
10729
10972
  const defaultGlassProps = {
10730
10973
  elasticity: 0
10731
10974
  }, glassProps = !0 === glass ? defaultGlassProps : {
10732
10975
  ...defaultGlassProps,
10733
10976
  ...glass
10734
- }, panelContent = jsxs(Fragment, {
10977
+ }, panelContent = React.Children.toArray(children).some((child => {
10978
+ var _context;
10979
+
10980
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "EdgePanelHeader", "EdgePanelBody", "EdgePanelFooter" ]).call(_context, child.type.displayName);
10981
+ })) ? children : jsxs(Fragment, {
10735
10982
  children: [ jsxs("div", {
10736
10983
  className: "c-edge-panel__header",
10737
10984
  children: [ jsx("h4", {
@@ -10774,7 +11021,7 @@ const EdgePanel = ({title: title, children: children, position: position = "star
10774
11021
  }) : panelContent
10775
11022
  }) ]
10776
11023
  });
10777
- };
11024
+ }));
10778
11025
 
10779
11026
  /**
10780
11027
  * Form state and functionality
@@ -10808,7 +11055,8 @@ function useForm(initialProps) {
10808
11055
 
10809
11056
  /**
10810
11057
  * Form - A component for creating form layouts
10811
- */ EdgePanel.displayName = "EdgePanel";
11058
+ */ EdgePanel.displayName = "EdgePanel", EdgePanel.Header = EdgePanelHeader, EdgePanel.Body = EdgePanelBody,
11059
+ EdgePanel.Footer = EdgePanelFooter, EdgePanel.CloseButton = EdgePanelCloseButton;
10812
11060
 
10813
11061
  const Form = ({children: children, onSubmit: onSubmit, onReset: onReset, className: className = "", style: style, disabled: disabled = !1, id: id, method: method = "post", encType: encType, noValidate: noValidate = !1, autoComplete: autoComplete = "on"}) => {
10814
11062
  const {generateFormClass: generateFormClass, handleSubmit: handleSubmit, handleReset: handleReset} = useForm({
@@ -12381,8 +12629,6 @@ function useSlider(options) {
12381
12629
  };
12382
12630
  }
12383
12631
 
12384
- // Button composables
12385
- // export * from './useButton';
12386
12632
  // Accordion composables
12387
12633
  const composablesImport = Object.freeze( Object.defineProperty({
12388
12634
  __proto__: null,
@@ -12423,7 +12669,57 @@ const composablesImport = Object.freeze( Object.defineProperty({
12423
12669
  useTodo: useTodo
12424
12670
  }, Symbol.toStringTag, {
12425
12671
  value: "Module"
12426
- })), Select = memo((({options: options = [], value: value, onChange: onChange, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder = "Select an option", className: className = "", style: style, disabled: disabled = !1, required: required = !1, id: id, name: name, size: size = "md", invalid: invalid = !1, valid: valid = !1, multiple: multiple = !1, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, glass: glass}) => {
12672
+ })), SelectContext = createContext(null), SelectOption = memo((({value: value, children: children, disabled: disabled = !1, className: className = "", style: style}) => {
12673
+ const context = useContext(SelectContext), label = "string" == typeof children ? children : value;
12674
+ // We assume children is the label if it's a string, or we need a way to get label.
12675
+ // For simplicity, we use children as label for registration if it's a string.
12676
+ if (useEffect((() => {
12677
+ if (context) return context.registerOption({
12678
+ value: value,
12679
+ label: label,
12680
+ disabled: disabled
12681
+ }), () => {
12682
+ context.unregisterOption(value);
12683
+ };
12684
+ }), [ context, value, label, disabled ]), !context) return console.warn("SelectOption must be used within a Select component"),
12685
+ null;
12686
+ const {selectedValue: selectedValue, onSelect: onSelect} = context, isSelected = Array.isArray(selectedValue) ? _includesInstanceProperty(selectedValue).call(selectedValue, value) : selectedValue === value;
12687
+ return jsx("li", {
12688
+ className: `${SELECT.CLASSES.SELECT_ITEM} ${className}`.trim(),
12689
+ "data-value": value,
12690
+ onClick: e => {
12691
+ e.preventDefault(), e.stopPropagation(), disabled || onSelect(value, label);
12692
+ },
12693
+ style: style,
12694
+ role: "option",
12695
+ "aria-selected": isSelected,
12696
+ "aria-disabled": disabled,
12697
+ children: jsxs("label", {
12698
+ className: "c-checkbox",
12699
+ style: {
12700
+ pointerEvents: "none"
12701
+ },
12702
+ children: [ jsx("input", {
12703
+ type: "checkbox",
12704
+ className: "c-checkbox__input c-select__item-input",
12705
+ checked: isSelected,
12706
+ readOnly: !0,
12707
+ disabled: disabled,
12708
+ tabIndex: -1
12709
+ }), jsx("div", {
12710
+ className: "c-select__item-label",
12711
+ children: children
12712
+ }) ]
12713
+ })
12714
+ });
12715
+ }));
12716
+
12717
+ SelectOption.displayName = "SelectOption";
12718
+
12719
+ /**
12720
+ * Select - A component for dropdown selection
12721
+ */
12722
+ const Select = memo((({options: options, value: value, onChange: onChange, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder = "Select an option", className: className = "", style: style, disabled: disabled = !1, required: required = !1, id: id, name: name, size: size = "md", invalid: invalid = !1, valid: valid = !1, multiple: multiple = !1, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, glass: glass, children: children}) => {
12427
12723
  const {generateSelectClass: generateSelectClass} = useSelect({
12428
12724
  size: size,
12429
12725
  disabled: disabled,
@@ -12435,14 +12731,18 @@ const composablesImport = Object.freeze( Object.defineProperty({
12435
12731
  disabled: disabled,
12436
12732
  invalid: invalid,
12437
12733
  valid: valid
12438
- }), [isOpen, setIsOpen] = useState(!1), [selectedLabel, setSelectedLabel] = useState(placeholder), dropdownRef = useRef(null), panelRef = useRef(null), bodyRef = useRef(null), nativeSelectRef = useRef(null);
12734
+ }), [isOpen, setIsOpen] = useState(!1), [selectedLabel, setSelectedLabel] = useState(placeholder), dropdownRef = useRef(null), panelRef = useRef(null), bodyRef = useRef(null), nativeSelectRef = useRef(null), [registeredOptions, setRegisteredOptions] = useState([]), registerOption = useCallback((option => {
12735
+ setRegisteredOptions((prev => prev.some((o => o.value === option.value)) ? prev : [ ...prev, option ]));
12736
+ }), []), unregisterOption = useCallback((value => {
12737
+ setRegisteredOptions((prev => prev.filter((o => o.value !== value))));
12738
+ }), []), hasOptionsProp = options && options.length > 0, activeOptions = hasOptionsProp ? options : registeredOptions;
12439
12739
  // Update selected label when value changes
12440
12740
  useEffect((() => {
12441
12741
  if (value) {
12442
- const selectedOption = options.find((opt => opt.value === value));
12742
+ const selectedOption = activeOptions.find((opt => opt.value === value));
12443
12743
  selectedOption && setSelectedLabel(selectedOption.label);
12444
12744
  } else setSelectedLabel(placeholder);
12445
- }), [ value, options, placeholder ]),
12745
+ }), [ value, activeOptions, placeholder ]),
12446
12746
  // Handle click outside to close dropdown
12447
12747
  useEffect((() => {
12448
12748
  const handleClickOutside = event => {
@@ -12454,93 +12754,106 @@ const composablesImport = Object.freeze( Object.defineProperty({
12454
12754
  };
12455
12755
  }), []);
12456
12756
  // Toggle dropdown
12457
- const selectContent = jsxs("div", {
12458
- className: `${selectClass} ${isOpen ? SELECT.CLASSES.IS_OPEN : ""}`,
12459
- ref: dropdownRef,
12460
- style: style,
12461
- "aria-expanded": isOpen,
12462
- children: [ jsxs("select", {
12463
- ref: nativeSelectRef,
12464
- value: value,
12465
- onChange: onChange,
12466
- onBlur: onBlur,
12467
- onFocus: onFocus,
12468
- disabled: disabled,
12469
- required: required,
12470
- id: id,
12471
- name: name,
12472
- multiple: multiple,
12473
- "aria-label": ariaLabel,
12474
- "aria-describedby": ariaDescribedBy,
12475
- "aria-invalid": invalid,
12476
- style: {
12477
- display: "none"
12478
- },
12479
- children: [ placeholder && jsx("option", {
12480
- value: "",
12481
- disabled: !0,
12482
- children: placeholder
12483
- }), options.map((option => jsx("option", {
12484
- value: option.value,
12485
- disabled: option.disabled,
12486
- children: option.label
12487
- }, option.value))) ]
12488
- }), jsx("div", {
12489
- className: SELECT.CLASSES.SELECTED,
12490
- onClick: () => {
12491
- disabled || (!isOpen && bodyRef.current && panelRef.current ? bodyRef.current.style.height = `${panelRef.current.clientHeight}px` : bodyRef.current && (bodyRef.current.style.height = "0px"),
12492
- setIsOpen(!isOpen));
12493
- },
12494
- "aria-disabled": disabled,
12495
- children: selectedLabel
12496
- }), jsx("i", {
12497
- className: `${SELECT.CLASSES.ICON_CARET} ${SELECT.CLASSES.TOGGLE_ICON}`
12498
- }), jsx("div", {
12499
- className: SELECT.CLASSES.SELECT_BODY,
12500
- ref: bodyRef,
12501
- style: {
12502
- height: 0
12503
- },
12504
- children: jsx("div", {
12505
- className: SELECT.CLASSES.SELECT_PANEL,
12506
- ref: panelRef,
12507
- children: jsx("ul", {
12508
- className: SELECT.CLASSES.SELECT_ITEMS,
12509
- children: options.map(((option, index) => jsx("li", {
12510
- className: SELECT.CLASSES.SELECT_ITEM,
12511
- "data-value": option.value,
12512
- onClick: () => !option.disabled && (option => {
12513
- if (setSelectedLabel(option.label), setIsOpen(!1), bodyRef.current && (bodyRef.current.style.height = "0px"),
12514
- nativeSelectRef.current && (nativeSelectRef.current.value = option.value), onChange) {
12515
- // Create a synthetic event
12516
- const event = {
12517
- target: {
12518
- name: name,
12519
- value: option.value
12520
- }
12521
- };
12522
- onChange(event);
12523
- }
12524
- })(option),
12525
- children: jsxs("label", {
12526
- htmlFor: `SelectItem${index}`,
12527
- className: "c-checkbox",
12528
- children: [ jsx("input", {
12529
- type: "checkbox",
12530
- id: `SelectItem${index}`,
12531
- className: "c-checkbox__input c-select__item-input",
12532
- checked: value === option.value,
12533
- readOnly: !0,
12534
- disabled: option.disabled
12535
- }), jsx("div", {
12536
- className: "c-select__item-label",
12537
- children: option.label
12538
- }) ]
12539
- })
12540
- }, option.value)))
12757
+ const handleItemClick = useCallback((option => {
12758
+ if (setSelectedLabel(option.label), setIsOpen(!1), bodyRef.current && (bodyRef.current.style.height = "0px"),
12759
+ nativeSelectRef.current && (nativeSelectRef.current.value = option.value), onChange) {
12760
+ // Create a synthetic event
12761
+ const event = {
12762
+ target: {
12763
+ name: name,
12764
+ value: option.value
12765
+ }
12766
+ };
12767
+ onChange(event);
12768
+ }
12769
+ }), [ onChange, name ]), onSelect = useCallback(((val, label) => {
12770
+ handleItemClick({
12771
+ value: val,
12772
+ label: label
12773
+ });
12774
+ }), [ handleItemClick ]), contextValue = React.useMemo((() => ({
12775
+ registerOption: registerOption,
12776
+ unregisterOption: unregisterOption,
12777
+ selectedValue: value,
12778
+ onSelect: onSelect
12779
+ })), [ registerOption, unregisterOption, value, onSelect ]), selectContent = jsx(SelectContext.Provider, {
12780
+ value: contextValue,
12781
+ children: jsxs("div", {
12782
+ className: `${selectClass} ${isOpen ? SELECT.CLASSES.IS_OPEN : ""}`,
12783
+ ref: dropdownRef,
12784
+ style: style,
12785
+ "aria-expanded": isOpen,
12786
+ children: [ jsxs("select", {
12787
+ ref: nativeSelectRef,
12788
+ value: value,
12789
+ onChange: onChange,
12790
+ onBlur: onBlur,
12791
+ onFocus: onFocus,
12792
+ disabled: disabled,
12793
+ required: required,
12794
+ id: id,
12795
+ name: name,
12796
+ multiple: multiple,
12797
+ "aria-label": ariaLabel,
12798
+ "aria-describedby": ariaDescribedBy,
12799
+ "aria-invalid": invalid,
12800
+ style: {
12801
+ display: "none"
12802
+ },
12803
+ children: [ placeholder && jsx("option", {
12804
+ value: "",
12805
+ disabled: !0,
12806
+ children: placeholder
12807
+ }), activeOptions.map((option => jsx("option", {
12808
+ value: option.value,
12809
+ disabled: option.disabled,
12810
+ children: option.label
12811
+ }, option.value))) ]
12812
+ }), jsx("div", {
12813
+ className: SELECT.CLASSES.SELECTED,
12814
+ onClick: () => {
12815
+ disabled || (!isOpen && bodyRef.current && panelRef.current ? bodyRef.current.style.height = `${panelRef.current.clientHeight}px` : bodyRef.current && (bodyRef.current.style.height = "0px"),
12816
+ setIsOpen(!isOpen));
12817
+ },
12818
+ "aria-disabled": disabled,
12819
+ children: selectedLabel
12820
+ }), jsx("i", {
12821
+ className: `${SELECT.CLASSES.ICON_CARET} ${SELECT.CLASSES.TOGGLE_ICON}`
12822
+ }), jsx("div", {
12823
+ className: SELECT.CLASSES.SELECT_BODY,
12824
+ ref: bodyRef,
12825
+ style: {
12826
+ height: 0
12827
+ },
12828
+ children: jsx("div", {
12829
+ className: SELECT.CLASSES.SELECT_PANEL,
12830
+ ref: panelRef,
12831
+ children: jsx("ul", {
12832
+ className: SELECT.CLASSES.SELECT_ITEMS,
12833
+ children: hasOptionsProp ? options.map(((option, index) => jsx("li", {
12834
+ className: SELECT.CLASSES.SELECT_ITEM,
12835
+ "data-value": option.value,
12836
+ onClick: () => !option.disabled && handleItemClick(option),
12837
+ children: jsxs("label", {
12838
+ htmlFor: `SelectItem${index}`,
12839
+ className: "c-checkbox",
12840
+ children: [ jsx("input", {
12841
+ type: "checkbox",
12842
+ id: `SelectItem${index}`,
12843
+ className: "c-checkbox__input c-select__item-input",
12844
+ checked: value === option.value,
12845
+ readOnly: !0,
12846
+ disabled: option.disabled
12847
+ }), jsx("div", {
12848
+ className: "c-select__item-label",
12849
+ children: option.label
12850
+ }) ]
12851
+ })
12852
+ }, option.value))) : children
12853
+ })
12541
12854
  })
12542
- })
12543
- }) ]
12855
+ }) ]
12856
+ })
12544
12857
  });
12545
12858
  // Handle item selection
12546
12859
  if (glass) {
@@ -12564,9 +12877,7 @@ const composablesImport = Object.freeze( Object.defineProperty({
12564
12877
  return selectContent;
12565
12878
  }));
12566
12879
 
12567
- /**
12568
- * Select - A component for dropdown selection
12569
- */ Select.displayName = "Select";
12880
+ Select.displayName = "Select", Select.Option = SelectOption;
12570
12881
 
12571
12882
  /**
12572
12883
  * Radio - A component for radio button inputs
@@ -13444,7 +13755,7 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
13444
13755
  autoplay: !0,
13445
13756
  loop: !0,
13446
13757
  muted: !0
13447
- }, backgroundSlider: backgroundSlider, headingLevel: headingLevel = "h1", reverseOnMobile: reverseOnMobile = !1, parts: parts, ...rest}) => {
13758
+ }, backgroundSlider: backgroundSlider, headingLevel: headingLevel = "h1", reverseOnMobile: reverseOnMobile = !1, parts: parts, backgroundElement: backgroundElement, ...rest}) => {
13448
13759
  // Define dynamic heading tag
13449
13760
  const HeadingTag = headingLevel, {generateHeroClassNames: generateHeroClassNames, generateImageColClass: generateImageColClass, generateContentColClass: generateContentColClass, hasBackgroundImage: hasBackgroundImage, hasForegroundImage: hasForegroundImage, useGridLayout: useGridLayout, heroRef: heroRef, videoRef: videoRef, backgroundSlider: sliderHook, hasBackgroundSlider: hasBackgroundSlider} = useHero({
13450
13761
  title: title,
@@ -13603,7 +13914,7 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
13603
13914
  "data-parallax": parallax ? "true" : void 0,
13604
13915
  "data-parallax-intensity": parallax ? parallaxIntensity : void 0,
13605
13916
  ...rest,
13606
- children: [ (() => {
13917
+ children: [ backgroundElement, (() => {
13607
13918
  // Render background slider if configured
13608
13919
  if (hasBackgroundSlider && backgroundSlider && sliderHook) {
13609
13920
  const {slides: slides, transition: transition = "fade", transitionDuration: transitionDuration = 1e3} = backgroundSlider, {currentIndex: currentIndex, slideRefs: slideRefs, videoRefs: videoRefs} = sliderHook;
@@ -13698,7 +14009,81 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
13698
14009
  });
13699
14010
  };
13700
14011
 
13701
- Hero.displayName = "Hero";
14012
+ Hero.Title = ({children: children, className: className, level: level = "h1", ...props}) => jsx(level, {
14013
+ className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${className || ""}`.trim(),
14014
+ ...props,
14015
+ children: children
14016
+ }), Hero.Subtitle = ({children: children, className: className, ...props}) => jsx("p", {
14017
+ className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${className || ""}`.trim(),
14018
+ ...props,
14019
+ children: children
14020
+ }), Hero.Text = ({children: children, className: className, ...props}) => jsx("p", {
14021
+ className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${className || ""}`.trim(),
14022
+ ...props,
14023
+ children: children
14024
+ }), Hero.Actions = ({children: children, className: className, ...props}) => jsx("div", {
14025
+ className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${className || ""}`.trim(),
14026
+ ...props,
14027
+ children: children
14028
+ }), Hero.Content = ({children: children, className: className, style: style, glass: glass, ...props}) => {
14029
+ const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim();
14030
+ if (glass) {
14031
+ const glassProps = "boolean" == typeof glass ? {
14032
+ displacementScale: 60,
14033
+ blurAmount: 3,
14034
+ saturation: 180,
14035
+ aberrationIntensity: 0,
14036
+ cornerRadius: 8,
14037
+ overLight: !1,
14038
+ mode: "standard"
14039
+ } : glass;
14040
+ return jsx("div", {
14041
+ className: contentClass,
14042
+ style: style,
14043
+ ...props,
14044
+ children: jsx(AtomixGlass, {
14045
+ ...glassProps,
14046
+ children: jsx("div", {
14047
+ className: "u-p-4",
14048
+ children: children
14049
+ })
14050
+ })
14051
+ });
14052
+ }
14053
+ return jsx("div", {
14054
+ className: contentClass,
14055
+ style: style,
14056
+ ...props,
14057
+ children: children
14058
+ });
14059
+ }, Hero.Image = ({src: src, alt: alt = "", className: className, wrapperClassName: wrapperClassName, wrapperStyle: wrapperStyle, ...props}) => jsx("div", {
14060
+ className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${wrapperClassName || ""}`.trim(),
14061
+ style: wrapperStyle,
14062
+ children: jsx("img", {
14063
+ src: src,
14064
+ alt: alt,
14065
+ className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${className || ""}`.trim(),
14066
+ ...props
14067
+ })
14068
+ }), Hero.Background = ({className: className, style: style, src: src, children: children, ...props}) => jsxs("div", {
14069
+ className: `${HERO.SELECTORS.BG.replace(".", "")} ${className || ""}`.trim(),
14070
+ style: style,
14071
+ ...props,
14072
+ children: [ src && jsx("img", {
14073
+ src: src,
14074
+ alt: "Background",
14075
+ className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
14076
+ }), children ]
14077
+ }), Hero.displayName = "Hero";
14078
+
14079
+ const ListItem = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("li", {
14080
+ ref: ref,
14081
+ className: `${LIST.ITEM_CLASS} ${className}`.trim(),
14082
+ ...props,
14083
+ children: children
14084
+ })));
14085
+
14086
+ ListItem.displayName = "ListItem";
13702
14087
 
13703
14088
  const List = memo((({children: children, variant: variant = "default", className: className = "", style: style, ...props}) => {
13704
14089
  var _context;
@@ -13709,14 +14094,14 @@ const List = memo((({children: children, variant: variant = "default", classNam
13709
14094
  className: listClasses,
13710
14095
  style: style,
13711
14096
  ...props,
13712
- children: React.Children.map(children, (child => jsx("li", {
14097
+ children: React.Children.map(children, (child => React.isValidElement(child) && child.type === ListItem ? child : jsx("li", {
13713
14098
  className: "c-list__item",
13714
14099
  children: child
13715
14100
  })))
13716
14101
  });
13717
14102
  }));
13718
14103
 
13719
- List.displayName = "List";
14104
+ List.displayName = "List", List.Item = ListItem;
13720
14105
 
13721
14106
  const ListGroup = ({children: children, className: className = "", style: style, variant: variant = "default"}) => {
13722
14107
  // Generate CSS classes
@@ -13933,10 +14318,59 @@ const Messages = ({messages: messages = [], otherAvatar: otherAvatar, selfAvatar
13933
14318
  * Messages component for displaying a chat interface with messages, images, and file attachments
13934
14319
  */ Messages.displayName = "Messages";
13935
14320
 
13936
- /**
13937
- * Modal component for displaying overlay content
13938
- */
13939
- const Modal = memo((({children: children, isOpen: isOpen = !1, onOpenChange: onOpenChange, onClose: onClose, onOpen: onOpen, title: title, subtitle: subtitle, size: size = "md", backdrop: backdrop = !0, keyboard: keyboard = !0, className: className = "", style: style, closeButton: closeButton = !0, footer: footer, glass: glass, ...props}) => {
14321
+ const ModalHeader = forwardRef((({title: title, subtitle: subtitle, closeButton: closeButton, onClose: onClose, children: children, className: className = "", ...props}, ref) => jsxs("div", {
14322
+ ref: ref,
14323
+ className: `c-modal__header ${className}`.trim(),
14324
+ ...props,
14325
+ children: [ jsxs("div", {
14326
+ className: "c-modal__header-content",
14327
+ children: [ title && jsx("h3", {
14328
+ className: "c-modal__title",
14329
+ children: title
14330
+ }), subtitle && jsx("p", {
14331
+ className: "c-modal__sub",
14332
+ children: subtitle
14333
+ }), children ]
14334
+ }), closeButton && jsx("button", {
14335
+ type: "button",
14336
+ className: "c-modal__close c-btn js-modal-close",
14337
+ onClick: onClose,
14338
+ "aria-label": "Close modal",
14339
+ children: jsx("svg", {
14340
+ width: "20",
14341
+ height: "20",
14342
+ viewBox: "0 0 20 20",
14343
+ fill: "none",
14344
+ xmlns: "http://www.w3.org/2000/svg",
14345
+ children: jsx("path", {
14346
+ d: "M16.0672 15.1828C16.1253 15.2409 16.1713 15.3098 16.2028 15.3857C16.2342 15.4615 16.2504 15.5429 16.2504 15.625C16.2504 15.7071 16.2342 15.7884 16.2028 15.8643C16.1713 15.9402 16.1253 16.0091 16.0672 16.0672C16.0091 16.1252 15.9402 16.1713 15.8643 16.2027C15.7885 16.2342 15.7071 16.2503 15.625 16.2503C15.5429 16.2503 15.4616 16.2342 15.3857 16.2027C15.3098 16.1713 15.2409 16.1252 15.1828 16.0672L10 10.8836L4.8172 16.0672C4.69992 16.1844 4.54086 16.2503 4.37501 16.2503C4.20916 16.2503 4.0501 16.1844 3.93282 16.0672C3.81555 15.9499 3.74966 15.7908 3.74966 15.625C3.74966 15.4591 3.81555 15.3001 3.93282 15.1828L9.11642 9.99998L3.93282 4.81717C3.81555 4.69989 3.74966 4.54083 3.74966 4.37498C3.74966 4.20913 3.81555 4.05007 3.93282 3.93279C4.0501 3.81552 4.20916 3.74963 4.37501 3.74963C4.54086 3.74963 4.69992 3.81552 4.8172 3.93279L10 9.11639L15.1828 3.93279C15.3001 3.81552 15.4592 3.74963 15.625 3.74963C15.7909 3.74963 15.9499 3.81552 16.0672 3.93279C16.1845 4.05007 16.2504 4.20913 16.2504 4.37498C16.2504 4.54083 16.1845 4.69989 16.0672 4.81717L10.8836 9.99998L16.0672 15.1828Z",
14347
+ fill: "#141414"
14348
+ })
14349
+ })
14350
+ }) ]
14351
+ })));
14352
+
14353
+ ModalHeader.displayName = "ModalHeader";
14354
+
14355
+ const ModalBody = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
14356
+ ref: ref,
14357
+ className: `c-modal__body ${className}`.trim(),
14358
+ ...props,
14359
+ children: children
14360
+ })));
14361
+
14362
+ ModalBody.displayName = "ModalBody";
14363
+
14364
+ const ModalFooter = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
14365
+ ref: ref,
14366
+ className: `c-modal__footer ${className}`.trim(),
14367
+ ...props,
14368
+ children: children
14369
+ })));
14370
+
14371
+ ModalFooter.displayName = "ModalFooter";
14372
+
14373
+ const ModalImpl = memo((({children: children, isOpen: isOpen = !1, onOpenChange: onOpenChange, onClose: onClose, onOpen: onOpen, title: title, subtitle: subtitle, size: size = "md", backdrop: backdrop = !0, keyboard: keyboard = !0, className: className = "", style: style, closeButton: closeButton = !0, footer: footer, glass: glass, ...props}) => {
13940
14374
  const modalRef = useRef(null), dialogRef = useRef(null), backdropRef = useRef(null), {isOpen: isOpenState, open: open, close: close} =
13941
14375
  /**
13942
14376
  * Hook for managing modal state
@@ -13986,43 +14420,26 @@ const Modal = memo((({children: children, isOpen: isOpen = !1, onOpenChange: on
13986
14420
  };
13987
14421
  }), [ isOpenState, close, keyboard ]);
13988
14422
  // Handle backdrop click
13989
- const modalClasses = [ "c-modal", isOpenState ? MODAL.CLASSES.IS_OPEN : "", size ? `c-modal--${size}` : "", glass ? "c-modal--glass" : "", className ].filter(Boolean).join(" "), modalContent = jsxs("div", {
14423
+ const modalClasses = [ "c-modal", isOpenState ? MODAL.CLASSES.IS_OPEN : "", size ? `c-modal--${size}` : "", glass ? "c-modal--glass" : "", className ].filter(Boolean).join(" "), hasCompoundComponents = React.Children.toArray(children).some((child => {
14424
+ var _context;
14425
+
14426
+ return React.isValidElement(child) && _includesInstanceProperty(_context = [ "ModalHeader", "ModalBody", "ModalFooter" ]).call(_context, child.type.displayName);
14427
+ })), modalContent = jsx("div", {
13990
14428
  className: "c-modal__content",
13991
- children: [ (title || closeButton) && jsxs("div", {
13992
- className: "c-modal__header",
13993
- children: [ jsxs("div", {
13994
- className: "c-modal__header-content",
13995
- children: [ title && jsx("h3", {
13996
- className: "c-modal__title",
13997
- children: title
13998
- }), subtitle && jsx("p", {
13999
- className: "c-modal__sub",
14000
- children: subtitle
14001
- }) ]
14002
- }), closeButton && jsx("button", {
14003
- type: "button",
14004
- className: "c-modal__close c-btn js-modal-close",
14005
- onClick: close,
14006
- "aria-label": "Close modal",
14007
- children: jsx("svg", {
14008
- width: "20",
14009
- height: "20",
14010
- viewBox: "0 0 20 20",
14011
- fill: "none",
14012
- xmlns: "http://www.w3.org/2000/svg",
14013
- children: jsx("path", {
14014
- d: "M16.0672 15.1828C16.1253 15.2409 16.1713 15.3098 16.2028 15.3857C16.2342 15.4615 16.2504 15.5429 16.2504 15.625C16.2504 15.7071 16.2342 15.7884 16.2028 15.8643C16.1713 15.9402 16.1253 16.0091 16.0672 16.0672C16.0091 16.1252 15.9402 16.1713 15.8643 16.2027C15.7885 16.2342 15.7071 16.2503 15.625 16.2503C15.5429 16.2503 15.4616 16.2342 15.3857 16.2027C15.3098 16.1713 15.2409 16.1252 15.1828 16.0672L10 10.8836L4.8172 16.0672C4.69992 16.1844 4.54086 16.2503 4.37501 16.2503C4.20916 16.2503 4.0501 16.1844 3.93282 16.0672C3.81555 15.9499 3.74966 15.7908 3.74966 15.625C3.74966 15.4591 3.81555 15.3001 3.93282 15.1828L9.11642 9.99998L3.93282 4.81717C3.81555 4.69989 3.74966 4.54083 3.74966 4.37498C3.74966 4.20913 3.81555 4.05007 3.93282 3.93279C4.0501 3.81552 4.20916 3.74963 4.37501 3.74963C4.54086 3.74963 4.69992 3.81552 4.8172 3.93279L10 9.11639L15.1828 3.93279C15.3001 3.81552 15.4592 3.74963 15.625 3.74963C15.7909 3.74963 15.9499 3.81552 16.0672 3.93279C16.1845 4.05007 16.2504 4.20913 16.2504 4.37498C16.2504 4.54083 16.1845 4.69989 16.0672 4.81717L10.8836 9.99998L16.0672 15.1828Z",
14015
- fill: "#141414"
14016
- })
14017
- })
14429
+ children: hasCompoundComponents ? React.Children.map(children, (child => React.isValidElement(child) && "ModalHeader" === child.type.displayName ? React.cloneElement(child, {
14430
+ onClose: child.props.onClose || close
14431
+ }) : child)) : jsxs(Fragment, {
14432
+ children: [ (title || closeButton) && jsx(ModalHeader, {
14433
+ title: title,
14434
+ subtitle: subtitle,
14435
+ closeButton: closeButton,
14436
+ onClose: close
14437
+ }), jsx(ModalBody, {
14438
+ children: children
14439
+ }), footer && jsx(ModalFooter, {
14440
+ children: footer
14018
14441
  }) ]
14019
- }), jsx("div", {
14020
- className: "c-modal__body",
14021
- children: children
14022
- }), footer && jsx("div", {
14023
- className: "c-modal__footer",
14024
- children: footer
14025
- }) ]
14442
+ })
14026
14443
  });
14027
14444
  // Assemble classes
14028
14445
  return jsxs("div", {
@@ -14067,24 +14484,15 @@ const Modal = memo((({children: children, isOpen: isOpen = !1, onOpenChange: on
14067
14484
  });
14068
14485
  }));
14069
14486
 
14070
- Modal.displayName = "Modal";
14487
+ ModalImpl.displayName = "Modal";
14071
14488
 
14072
- /**
14073
- * Nav component provides a container for navigation items with proper alignment and accessibility.
14074
- *
14075
- * @example
14076
- * ```tsx
14077
- * <Nav alignment="center">
14078
- * <NavItem href="/">Home</NavItem>
14079
- * <NavItem href="/about">About</NavItem>
14080
- * <NavDropdown title="Services">
14081
- * <MenuItem href="/web">Web Design</MenuItem>
14082
- * <MenuItem href="/mobile">Mobile Apps</MenuItem>
14083
- * </NavDropdown>
14084
- * </Nav>
14085
- * ```
14086
- */
14087
- const Nav = forwardRef((({children: children, alignment: alignment = "start", variant: variant = "default", className: className = "", disabled: disabled = !1, glass: glass}, ref) => {
14489
+ // Attach subcomponents
14490
+ const ModalWithSubcomponents = ModalImpl;
14491
+
14492
+ ModalWithSubcomponents.Header = ModalHeader, ModalWithSubcomponents.Body = ModalBody,
14493
+ ModalWithSubcomponents.Footer = ModalFooter;
14494
+
14495
+ const Modal = ModalWithSubcomponents, Nav = forwardRef((({children: children, alignment: alignment = "start", variant: variant = "default", className: className = "", disabled: disabled = !1, glass: glass}, ref) => {
14088
14496
  const {generateNavClass: generateNavClass} = useNav({
14089
14497
  alignment: alignment,
14090
14498
  variant: variant
@@ -14127,7 +14535,21 @@ const Nav = forwardRef((({children: children, alignment: alignment = "start", v
14127
14535
  return navContent;
14128
14536
  }));
14129
14537
 
14130
- Nav.displayName = "Nav";
14538
+ /**
14539
+ * Nav component provides a container for navigation items with proper alignment and accessibility.
14540
+ *
14541
+ * @example
14542
+ * ```tsx
14543
+ * <Nav alignment="center">
14544
+ * <NavItem href="/">Home</NavItem>
14545
+ * <NavItem href="/about">About</NavItem>
14546
+ * <NavDropdown title="Services">
14547
+ * <MenuItem href="/web">Web Design</MenuItem>
14548
+ * <MenuItem href="/mobile">Mobile Apps</MenuItem>
14549
+ * </NavDropdown>
14550
+ * </Nav>
14551
+ * ```
14552
+ */ Nav.displayName = "Nav";
14131
14553
 
14132
14554
  /**
14133
14555
  * NavItem component represents a single navigation item that can be a link, dropdown trigger, or mega menu trigger.
@@ -17003,39 +17425,72 @@ const Slider = forwardRef(((props, ref) => {
17003
17425
 
17004
17426
  Slider.displayName = "Slider";
17005
17427
 
17428
+ const StepsItem = forwardRef((({children: children, className: className = "", number: number, title: title, active: active, completed: completed, index: index, ...props}, ref) => {
17429
+ const itemClasses = [ "c-steps__item", active ? STEPS.CLASSES.ACTIVE : "", completed ? STEPS.CLASSES.COMPLETED : "", className ].filter(Boolean).join(" ");
17430
+ return jsxs("div", {
17431
+ ref: ref,
17432
+ className: itemClasses,
17433
+ "aria-current": active ? "step" : void 0,
17434
+ "data-index": index,
17435
+ ...props,
17436
+ children: [ jsx("div", {
17437
+ className: "c-steps__line"
17438
+ }), jsxs("div", {
17439
+ className: "c-steps__content",
17440
+ children: [ null != number && jsx("div", {
17441
+ className: "c-steps__number",
17442
+ children: number
17443
+ }), title && jsx("div", {
17444
+ className: "c-steps__text",
17445
+ children: title
17446
+ }), children && jsx("div", {
17447
+ className: "c-steps__custom-content",
17448
+ children: children
17449
+ }) ]
17450
+ }) ]
17451
+ });
17452
+ }));
17453
+
17454
+ StepsItem.displayName = "StepsItem";
17455
+
17006
17456
  /**
17007
17457
  * Steps component for displaying a sequence of steps
17008
17458
  */
17009
- const Steps = ({items: items, activeIndex: activeIndex = 0, vertical: vertical = !1, onStepChange: onStepChange, className: className = "", style: style, glass: glass}) => {
17459
+ const Steps = ({items: items, activeIndex: activeIndex = 0, vertical: vertical = !1, onStepChange: onStepChange, className: className = "", style: style, glass: glass, children: children}) => {
17010
17460
  const [currentStep, setCurrentStep] = useState(activeIndex);
17011
17461
  // Update steps when activeIndex prop changes
17012
- useEffect((() => {
17462
+ let content;
17463
+ useEffect((() => {
17013
17464
  currentStep !== activeIndex && setCurrentStep(activeIndex);
17014
- }), [ activeIndex ]);
17465
+ }), [ activeIndex ]),
17466
+ // Legacy rendering
17467
+ content = items && items.length > 0 ? items.map(((item, index) => jsx(StepsItem, {
17468
+ index: index,
17469
+ number: item.number,
17470
+ title: item.text,
17471
+ active: index <= currentStep,
17472
+ completed: index < currentStep,
17473
+ children: item.content
17474
+ }, `step-${index}`))) : Children.map(children, ((child, index) => {
17475
+ if ( isValidElement(child)) {
17476
+ const childProps = child.props, isActive = childProps.active ?? index <= currentStep, isCompleted = childProps.completed ?? index < currentStep, number = childProps.number ?? index + 1;
17477
+ // Inject active/completed based on index if not explicitly provided
17478
+
17479
+ return cloneElement(child, {
17480
+ index: index,
17481
+ active: isActive,
17482
+ completed: isCompleted,
17483
+ number: number
17484
+ });
17485
+ }
17486
+ return child;
17487
+ }));
17015
17488
  const stepsContent = jsx("div", {
17016
17489
  className: `c-steps ${vertical ? STEPS.CLASSES.VERTICAL : ""} ${className}`,
17017
17490
  style: style,
17018
17491
  role: "navigation",
17019
17492
  "aria-label": "Steps",
17020
- children: items.map(((item, index) => jsxs("div", {
17021
- className: `c-steps__item ${index <= currentStep ? STEPS.CLASSES.ACTIVE : ""} ${index < currentStep ? STEPS.CLASSES.COMPLETED : ""}`,
17022
- "aria-current": index === currentStep ? "step" : void 0,
17023
- children: [ jsx("div", {
17024
- className: "c-steps__line"
17025
- }), jsxs("div", {
17026
- className: "c-steps__content",
17027
- children: [ jsx("div", {
17028
- className: "c-steps__number",
17029
- children: item.number
17030
- }), jsx("div", {
17031
- className: "c-steps__text",
17032
- children: item.text
17033
- }), item.content && jsx("div", {
17034
- className: "c-steps__custom-content",
17035
- children: item.content
17036
- }) ]
17037
- }) ]
17038
- }, `step-${index}`)))
17493
+ children: content
17039
17494
  });
17040
17495
  if (glass) {
17041
17496
  // Default glass settings for steps
@@ -17058,24 +17513,104 @@ const Steps = ({items: items, activeIndex: activeIndex = 0, vertical: vertical =
17058
17513
  return stepsContent;
17059
17514
  };
17060
17515
 
17061
- Steps.displayName = "Steps";
17516
+ Steps.displayName = "Steps", Steps.Item = StepsItem, Steps.Step = StepsItem;
17062
17517
 
17063
- /**
17064
- * Tabs component for switching between different content panels
17065
- */
17066
- const Tabs = memo((({items: items, activeIndex: activeIndex = TAB.DEFAULTS.ACTIVE_INDEX, onTabChange: onTabChange, className: className = "", style: style, glass: glass}) => {
17067
- const [currentTab, setCurrentTab] = useState(activeIndex), tabContent = jsxs("div", {
17068
- className: `c-tabs js-atomix-tab ${className}`,
17069
- style: style,
17518
+ // Context for compound usage
17519
+ const TabsContext = createContext({
17520
+ currentTab: 0,
17521
+ handleTabClick: () => {}
17522
+ }), TabsList = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("ul", {
17523
+ ref: ref,
17524
+ className: `c-tabs__nav ${className}`.trim(),
17525
+ ...props,
17526
+ children: React.Children.map(children, ((child, index) => React.isValidElement(child) ? React.cloneElement(child, {
17527
+ index: index
17528
+ }) : child))
17529
+ })));
17530
+
17531
+ // Compound components
17532
+ TabsList.displayName = "TabsList";
17533
+
17534
+ const TabsTrigger = forwardRef((({children: children, className: className = "", index: index, onClick: onClick, ...props}, ref) => {
17535
+ const {currentTab: currentTab, handleTabClick: handleTabClick} = useContext(TabsContext);
17536
+ // Safety check if used outside context or without index
17537
+ void 0 === index && console.warn("TabsTrigger requires an index prop or must be a direct child of TabsList");
17538
+ const isActive = void 0 !== index && currentTab === index;
17539
+ return jsx("li", {
17540
+ className: "c-tabs__nav-item",
17541
+ children: jsx("button", {
17542
+ ref: ref,
17543
+ className: `c-tabs__nav-btn ${isActive ? TAB.CLASSES.ACTIVE : ""} ${className}`.trim(),
17544
+ onClick: e => {
17545
+ void 0 !== index && handleTabClick(index), onClick?.(e);
17546
+ },
17547
+ "data-tabindex": index,
17548
+ role: "tab",
17549
+ "aria-selected": isActive,
17550
+ "aria-controls": `tab-panel-${index}`,
17551
+ type: "button",
17552
+ ...props,
17553
+ children: children
17554
+ })
17555
+ });
17556
+ }));
17557
+
17558
+ TabsTrigger.displayName = "TabsTrigger";
17559
+
17560
+ const TabsPanels = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
17561
+ ref: ref,
17562
+ className: `c-tabs__panels ${className}`.trim(),
17563
+ ...props,
17564
+ children: React.Children.map(children, ((child, index) => React.isValidElement(child) ? React.cloneElement(child, {
17565
+ index: index
17566
+ }) : child))
17567
+ })));
17568
+
17569
+ TabsPanels.displayName = "TabsPanels";
17570
+
17571
+ const TabsPanel = forwardRef((({children: children, className: className = "", index: index, style: style, ...props}, ref) => {
17572
+ const {currentTab: currentTab} = useContext(TabsContext), isActive = void 0 !== index && currentTab === index;
17573
+ return jsx("div", {
17574
+ ref: ref,
17575
+ className: `c-tabs__panel ${isActive ? TAB.CLASSES.ACTIVE : ""} ${className}`.trim(),
17576
+ "data-tabindex": index,
17577
+ id: `tab-panel-${index}`,
17578
+ role: "tabpanel",
17579
+ "aria-labelledby": `tab-nav-${index}`,
17580
+ style: {
17581
+ height: isActive ? "auto" : "0px",
17582
+ opacity: isActive ? 1 : 0,
17583
+ overflow: "hidden",
17584
+ transition: "height 0.3s ease, opacity 0.3s ease",
17585
+ ...style
17586
+ },
17587
+ ...props,
17588
+ children: jsx("div", {
17589
+ className: "c-tabs__panel-body",
17590
+ children: children
17591
+ })
17592
+ });
17593
+ }));
17594
+
17595
+ TabsPanel.displayName = "TabsPanel";
17596
+
17597
+ const Tabs = memo((({items: items, activeIndex: activeIndex = TAB.DEFAULTS.ACTIVE_INDEX, onTabChange: onTabChange, className: className = "", style: style, glass: glass, children: children}) => {
17598
+ const [currentTab, setCurrentTab] = useState(activeIndex), handleTabClick = index => {
17599
+ setCurrentTab(index), onTabChange && onTabChange(index);
17600
+ };
17601
+ // Handle tab change
17602
+ // Determine content based on mode (legacy items vs compound children)
17603
+ let content;
17604
+ // Use items prop if provided
17605
+ // Legacy mode
17606
+ content = items && items.length > 0 ? jsxs(Fragment, {
17070
17607
  children: [ jsx("ul", {
17071
17608
  className: "c-tabs__nav",
17072
17609
  children: items.map(((item, index) => jsx("li", {
17073
17610
  className: "c-tabs__nav-item",
17074
17611
  children: jsx("button", {
17075
17612
  className: `c-tabs__nav-btn ${index === currentTab ? TAB.CLASSES.ACTIVE : ""}`,
17076
- onClick: () => (index => {
17077
- setCurrentTab(index), onTabChange && onTabChange(index);
17078
- })(index),
17613
+ onClick: () => handleTabClick(index),
17079
17614
  "data-tabindex": index,
17080
17615
  role: "tab",
17081
17616
  "aria-selected": index === currentTab,
@@ -17103,9 +17638,19 @@ const Tabs = memo((({items: items, activeIndex: activeIndex = TAB.DEFAULTS.ACTI
17103
17638
  })
17104
17639
  }, `tab-panel-${index}`)))
17105
17640
  }) ]
17641
+ }) : jsx(TabsContext.Provider, {
17642
+ value: {
17643
+ currentTab: currentTab,
17644
+ handleTabClick: handleTabClick
17645
+ },
17646
+ children: children
17106
17647
  });
17107
- // Handle tab change
17108
- if (glass) {
17648
+ const wrapper = jsx("div", {
17649
+ className: `c-tabs js-atomix-tab ${className}`,
17650
+ style: style,
17651
+ children: content
17652
+ });
17653
+ if (glass) {
17109
17654
  // Default glass settings for tabs
17110
17655
  const defaultGlassProps = {
17111
17656
  displacementScale: 60,
@@ -17120,13 +17665,14 @@ const Tabs = memo((({items: items, activeIndex: activeIndex = TAB.DEFAULTS.ACTI
17120
17665
  };
17121
17666
  return jsx(AtomixGlass, {
17122
17667
  ...glassProps,
17123
- children: tabContent
17668
+ children: wrapper
17124
17669
  });
17125
17670
  }
17126
- return tabContent;
17671
+ return wrapper;
17127
17672
  }));
17128
17673
 
17129
- Tabs.displayName = "Tabs";
17674
+ Tabs.displayName = "Tabs", Tabs.List = TabsList, Tabs.Trigger = TabsTrigger, Tabs.Panels = TabsPanels,
17675
+ Tabs.Panel = TabsPanel;
17130
17676
 
17131
17677
  /**
17132
17678
  * Testimonial component for displaying customer quotes and feedback