@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.
- package/dist/atomix.css +9231 -9337
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +2 -2
- package/dist/atomix.min.css.map +1 -1
- package/dist/charts.js +4 -5
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +87 -10
- package/dist/core.js +673 -480
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +15 -3
- package/dist/forms.js +530 -97
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js +5 -6
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +495 -254
- package/dist/index.esm.js +1269 -723
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1273 -723
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -2
- package/scripts/atomix-cli.js +10 -1
- package/scripts/cli/__tests__/utils.test.js +6 -2
- package/scripts/cli/migration-tools.js +2 -2
- package/scripts/cli/theme-bridge.js +7 -9
- package/scripts/cli/utils.js +2 -1
- package/src/components/Accordion/Accordion.stories.tsx +40 -0
- package/src/components/Accordion/Accordion.tsx +174 -56
- package/src/components/Accordion/AccordionCompound.test.tsx +70 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +156 -50
- package/src/components/Breadcrumb/BreadcrumbCompound.test.tsx +84 -0
- package/src/components/Callout/Callout.stories.tsx +166 -1011
- package/src/components/Callout/Callout.tsx +196 -84
- package/src/components/Callout/CalloutCompound.test.tsx +72 -0
- package/src/components/Dropdown/Dropdown.tsx +133 -20
- package/src/components/Dropdown/DropdownCompound.test.tsx +64 -0
- package/src/components/EdgePanel/EdgePanel.tsx +164 -112
- package/src/components/EdgePanel/EdgePanelCompound.test.tsx +53 -0
- package/src/components/Form/Select.stories.tsx +23 -0
- package/src/components/Form/Select.test.tsx +99 -0
- package/src/components/Form/Select.tsx +144 -93
- package/src/components/Form/SelectOption.tsx +88 -0
- package/src/components/Hero/Hero.stories.tsx +37 -0
- package/src/components/Hero/Hero.test.tsx +142 -0
- package/src/components/Hero/Hero.tsx +142 -3
- package/src/components/List/List.test.tsx +62 -0
- package/src/components/List/List.tsx +16 -5
- package/src/components/List/ListItem.tsx +20 -0
- package/src/components/Modal/Modal.stories.tsx +65 -1
- package/src/components/Modal/Modal.tsx +115 -35
- package/src/components/Modal/ModalCompound.test.tsx +94 -0
- package/src/components/Steps/Steps.tsx +124 -21
- package/src/components/Steps/StepsCompound.test.tsx +81 -0
- package/src/components/Tabs/Tabs.tsx +197 -44
- package/src/components/Tabs/TabsCompound.test.tsx +64 -0
- package/src/lib/composables/index.ts +0 -4
- package/src/lib/composables/useAtomixGlass.ts +0 -15
- package/src/lib/theme/devtools/CLI.ts +2 -10
- package/src/lib/types/components.ts +8 -2
- package/src/lib/utils/__tests__/componentUtils.test.ts +57 -2
- package/src/lib/utils/__tests__/themeNaming.test.ts +117 -0
- package/src/lib/utils/themeNaming.ts +1 -1
- package/src/styles/02-tools/_tools.breakpoints.scss +1 -1
- package/src/styles/02-tools/_tools.utility-api.scss +6 -6
- package/src/styles/99-utilities/_utilities.text.scss +0 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,377 @@ function _interopNamespaceCompat(e) {
|
|
|
28
28
|
})), n.default = e, Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var React__default = _interopDefaultCompat(React), PhosphorIcons__namespace = _interopNamespaceCompat(PhosphorIcons);
|
|
31
|
+
var React__default = _interopDefaultCompat(React), PhosphorIcons__namespace = _interopNamespaceCompat(PhosphorIcons), commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
|
|
32
|
+
|
|
33
|
+
function getDefaultExportFromCjs(x) {
|
|
34
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var fails$9 = function(exec) {
|
|
38
|
+
try {
|
|
39
|
+
return !!exec();
|
|
40
|
+
} catch (error) {
|
|
41
|
+
return !0;
|
|
42
|
+
}
|
|
43
|
+
}, functionBindNative = !fails$9((function() {
|
|
44
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
45
|
+
var test = function() {/* empty */}.bind();
|
|
46
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
47
|
+
return "function" != typeof test || test.hasOwnProperty("prototype");
|
|
48
|
+
})), 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) {
|
|
49
|
+
return function() {
|
|
50
|
+
return call$5.apply(fn, arguments);
|
|
51
|
+
};
|
|
52
|
+
}, objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf), check = function(it) {
|
|
53
|
+
return it && it.Math === Math && it;
|
|
54
|
+
}, globalThis_1 =
|
|
55
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
56
|
+
check("object" == typeof globalThis && globalThis) || check("object" == typeof window && window) ||
|
|
57
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
58
|
+
check("object" == typeof self && self) || check("object" == typeof commonjsGlobal && commonjsGlobal) || check("object" == typeof commonjsGlobal && commonjsGlobal) ||
|
|
59
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
60
|
+
function() {
|
|
61
|
+
return this;
|
|
62
|
+
}() || 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() {
|
|
63
|
+
return call$4.apply(apply$1, arguments);
|
|
64
|
+
}), uncurryThis$7 = functionUncurryThis, toString$3 = uncurryThis$7({}.toString), stringSlice = uncurryThis$7("".slice), classofRaw$2 = function(it) {
|
|
65
|
+
return stringSlice(toString$3(it), 8, -1);
|
|
66
|
+
}, classofRaw$1 = classofRaw$2, uncurryThis$6 = functionUncurryThis, functionUncurryThisClause = function(fn) {
|
|
67
|
+
// Nashorn bug:
|
|
68
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
69
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
70
|
+
if ("Function" === classofRaw$1(fn)) return uncurryThis$6(fn);
|
|
71
|
+
}, documentAll = "object" == typeof document && document.all, isCallable$8 = void 0 === documentAll && void 0 !== documentAll ? function(argument) {
|
|
72
|
+
return "function" == typeof argument || argument === documentAll;
|
|
73
|
+
} : function(argument) {
|
|
74
|
+
return "function" == typeof argument;
|
|
75
|
+
}, objectGetOwnPropertyDescriptor = {}, descriptors = !fails$9((function() {
|
|
76
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
77
|
+
return 7 !== Object.defineProperty({}, 1, {
|
|
78
|
+
get: function() {
|
|
79
|
+
return 7;
|
|
80
|
+
}
|
|
81
|
+
})[1];
|
|
82
|
+
})), NATIVE_BIND$1 = functionBindNative, call$3 = Function.prototype.call, functionCall = NATIVE_BIND$1 ? call$3.bind(call$3) : function() {
|
|
83
|
+
return call$3.apply(call$3, arguments);
|
|
84
|
+
}, objectPropertyIsEnumerable = {}, $propertyIsEnumerable = {}.propertyIsEnumerable, getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
|
|
85
|
+
1: 2
|
|
86
|
+
}, 1);
|
|
87
|
+
|
|
88
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
89
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
90
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function(V) {
|
|
91
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
92
|
+
return !!descriptor && descriptor.enumerable;
|
|
93
|
+
} : $propertyIsEnumerable;
|
|
94
|
+
|
|
95
|
+
var match, version, createPropertyDescriptor$2 = function(bitmap, value) {
|
|
96
|
+
return {
|
|
97
|
+
enumerable: !(1 & bitmap),
|
|
98
|
+
configurable: !(2 & bitmap),
|
|
99
|
+
writable: !(4 & bitmap),
|
|
100
|
+
value: value
|
|
101
|
+
};
|
|
102
|
+
}, fails$6 = fails$9, classof$4 = classofRaw$2, $Object$3 = Object, split = functionUncurryThis("".split), indexedObject = fails$6((function() {
|
|
103
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
104
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
105
|
+
return !$Object$3("z").propertyIsEnumerable(0);
|
|
106
|
+
})) ? function(it) {
|
|
107
|
+
return "String" === classof$4(it) ? split(it, "") : $Object$3(it);
|
|
108
|
+
} : $Object$3, isNullOrUndefined$2 = function(it) {
|
|
109
|
+
return null == it;
|
|
110
|
+
}, isNullOrUndefined$1 = isNullOrUndefined$2, $TypeError$7 = TypeError, requireObjectCoercible$3 = function(it) {
|
|
111
|
+
if (isNullOrUndefined$1(it)) throw new $TypeError$7("Can't call method on " + it);
|
|
112
|
+
return it;
|
|
113
|
+
}, IndexedObject$1 = indexedObject, requireObjectCoercible$2 = requireObjectCoercible$3, toIndexedObject$2 = function(it) {
|
|
114
|
+
return IndexedObject$1(requireObjectCoercible$2(it));
|
|
115
|
+
}, isCallable$7 = isCallable$8, isObject$6 = function(it) {
|
|
116
|
+
return "object" == typeof it ? null !== it : isCallable$7(it);
|
|
117
|
+
}, path$3 = {}, path$2 = path$3, globalThis$b = globalThis_1, isCallable$6 = isCallable$8, aFunction = function(variable) {
|
|
118
|
+
return isCallable$6(variable) ? variable : void 0;
|
|
119
|
+
}, 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;
|
|
120
|
+
|
|
121
|
+
v8 && (
|
|
122
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
123
|
+
// but their correct versions are not interesting for us
|
|
124
|
+
version = (match = v8.split("."))[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1])),
|
|
125
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
126
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
127
|
+
!version && userAgent$1 && (!(match = userAgent$1.match(/Edge\/(\d+)/)) || match[1] >= 74) && (match = userAgent$1.match(/Chrome\/(\d+)/)) && (version = +match[1]);
|
|
128
|
+
|
|
129
|
+
var environmentV8Version = version, V8_VERSION = environmentV8Version, fails$5 = fails$9, $String$3 = globalThis_1.String, symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5((function() {
|
|
130
|
+
var symbol = Symbol("symbol detection");
|
|
131
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
132
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
133
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
134
|
+
// of course, fail.
|
|
135
|
+
return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
136
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
137
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
138
|
+
})), useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && "symbol" == typeof Symbol.iterator, isCallable$5 = isCallable$8, isPrototypeOf$2 = objectIsPrototypeOf, $Object$2 = Object, isSymbol$2 = useSymbolAsUid ? function(it) {
|
|
139
|
+
return "symbol" == typeof it;
|
|
140
|
+
} : function(it) {
|
|
141
|
+
var $Symbol = function(namespace, method) {
|
|
142
|
+
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];
|
|
143
|
+
}("Symbol");
|
|
144
|
+
return isCallable$5($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
|
|
145
|
+
}, $String$2 = String, isCallable$4 = isCallable$8, $TypeError$6 = TypeError, aCallable$3 = function(argument) {
|
|
146
|
+
if (isCallable$4(argument)) return argument;
|
|
147
|
+
throw new $TypeError$6(function(argument) {
|
|
148
|
+
try {
|
|
149
|
+
return $String$2(argument);
|
|
150
|
+
} catch (error) {
|
|
151
|
+
return "Object";
|
|
152
|
+
}
|
|
153
|
+
}(argument) + " is not a function");
|
|
154
|
+
}, aCallable$2 = aCallable$3, isNullOrUndefined = isNullOrUndefined$2, call$2 = functionCall, isCallable$3 = isCallable$8, isObject$5 = isObject$6, $TypeError$5 = TypeError, sharedStore = {
|
|
155
|
+
exports: {}
|
|
156
|
+
}, globalThis$7 = globalThis_1, defineProperty = Object.defineProperty, globalThis$6 = globalThis_1, store$1 = sharedStore.exports = globalThis$6["__core-js_shared__"] || function(key, value) {
|
|
157
|
+
try {
|
|
158
|
+
defineProperty(globalThis$7, key, {
|
|
159
|
+
value: value,
|
|
160
|
+
configurable: !0,
|
|
161
|
+
writable: !0
|
|
162
|
+
});
|
|
163
|
+
} catch (error) {
|
|
164
|
+
globalThis$7[key] = value;
|
|
165
|
+
}
|
|
166
|
+
return value;
|
|
167
|
+
}("__core-js_shared__", {});
|
|
168
|
+
|
|
169
|
+
/* eslint-disable es/no-symbol -- required for testing */ (store$1.versions || (store$1.versions = [])).push({
|
|
170
|
+
version: "3.43.0",
|
|
171
|
+
mode: "pure",
|
|
172
|
+
copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)",
|
|
173
|
+
license: "https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",
|
|
174
|
+
source: "https://github.com/zloirock/core-js"
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
var key, value, store = sharedStore.exports, requireObjectCoercible$1 = requireObjectCoercible$3, $Object$1 = Object, toObject$2 = function(argument) {
|
|
178
|
+
return $Object$1(requireObjectCoercible$1(argument));
|
|
179
|
+
}, toObject$1 = toObject$2, hasOwnProperty = functionUncurryThis({}.hasOwnProperty), hasOwnProperty_1 = Object.hasOwn || function(it, key) {
|
|
180
|
+
return hasOwnProperty(toObject$1(it), key);
|
|
181
|
+
}, 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) {
|
|
182
|
+
return "Symbol(" + (void 0 === key ? "" : key) + ")_" + toString$2(++id + postfix, 36);
|
|
183
|
+
}, wellKnownSymbol$5 = function(name) {
|
|
184
|
+
return hasOwn$2(WellKnownSymbolsStore, name) || (WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$2(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol("Symbol." + name)),
|
|
185
|
+
WellKnownSymbolsStore[name];
|
|
186
|
+
}, call$1 = functionCall, isObject$4 = isObject$6, isSymbol$1 = isSymbol$2, $TypeError$4 = TypeError, TO_PRIMITIVE = wellKnownSymbol$5("toPrimitive"), toPrimitive = function(input, pref) {
|
|
187
|
+
if (!isObject$4(input) || isSymbol$1(input)) return input;
|
|
188
|
+
var result, func, exoticToPrim = (func = input[TO_PRIMITIVE], isNullOrUndefined(func) ? void 0 : aCallable$2(func));
|
|
189
|
+
if (exoticToPrim) {
|
|
190
|
+
if (void 0 === pref && (pref = "default"), result = call$1(exoticToPrim, input, pref),
|
|
191
|
+
!isObject$4(result) || isSymbol$1(result)) return result;
|
|
192
|
+
throw new $TypeError$4("Can't convert object to primitive value");
|
|
193
|
+
}
|
|
194
|
+
return void 0 === pref && (pref = "number"), function(input, pref) {
|
|
195
|
+
var fn, val;
|
|
196
|
+
if ("string" === pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
|
|
197
|
+
if (isCallable$3(fn = input.valueOf) && !isObject$5(val = call$2(fn, input))) return val;
|
|
198
|
+
if ("string" !== pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
|
|
199
|
+
throw new $TypeError$5("Can't convert object to primitive value");
|
|
200
|
+
}(input, pref);
|
|
201
|
+
}, isSymbol = isSymbol$2, toPropertyKey$2 = function(argument) {
|
|
202
|
+
var key = toPrimitive(argument, "string");
|
|
203
|
+
return isSymbol(key) ? key : key + "";
|
|
204
|
+
}, isObject$3 = isObject$6, document$1 = globalThis_1.document, EXISTS = isObject$3(document$1) && isObject$3(document$1.createElement), ie8DomDefine = !descriptors && !fails$9((function() {
|
|
205
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
206
|
+
return 7 !== Object.defineProperty((it = "div", EXISTS ? document$1.createElement(it) : {}), "a", {
|
|
207
|
+
get: function() {
|
|
208
|
+
return 7;
|
|
209
|
+
}
|
|
210
|
+
}).a;
|
|
211
|
+
var it;
|
|
212
|
+
})), 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;
|
|
213
|
+
|
|
214
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
215
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
216
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor$1 : function(O, P) {
|
|
217
|
+
if (O = toIndexedObject$1(O), P = toPropertyKey$1(P), IE8_DOM_DEFINE$1) try {
|
|
218
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
219
|
+
} catch (error) {/* empty */}
|
|
220
|
+
if (hasOwn$1(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
var fails$3 = fails$9, isCallable$2 = isCallable$8, replacement = /#|\.prototype\./, isForced$1 = function(feature, detection) {
|
|
224
|
+
var value = data[normalize(feature)];
|
|
225
|
+
return value === POLYFILL || value !== NATIVE && (isCallable$2(detection) ? fails$3(detection) : !!detection);
|
|
226
|
+
}, normalize = isForced$1.normalize = function(string) {
|
|
227
|
+
return String(string).replace(replacement, ".").toLowerCase();
|
|
228
|
+
}, 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() {
|
|
229
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
230
|
+
return 42 !== Object.defineProperty((function() {/* empty */}), "prototype", {
|
|
231
|
+
value: 42,
|
|
232
|
+
writable: !1
|
|
233
|
+
}).prototype;
|
|
234
|
+
})), 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) {
|
|
235
|
+
if (isObject$2(argument)) return argument;
|
|
236
|
+
throw new $TypeError$3($String$1(argument) + " is not an object");
|
|
237
|
+
}, toPropertyKey = toPropertyKey$2, $TypeError$2 = TypeError, $defineProperty = Object.defineProperty, $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
238
|
+
|
|
239
|
+
// `Object.defineProperty` method
|
|
240
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
241
|
+
objectDefineProperty.f = DESCRIPTORS$1 ? V8_PROTOTYPE_DEFINE_BUG ? function(O, P, Attributes) {
|
|
242
|
+
if (anObject(O), P = toPropertyKey(P), anObject(Attributes), "function" == typeof O && "prototype" === P && "value" in Attributes && "writable" in Attributes && !Attributes.writable) {
|
|
243
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
244
|
+
current && current.writable && (O[P] = Attributes.value, Attributes = {
|
|
245
|
+
configurable: "configurable" in Attributes ? Attributes.configurable : current.configurable,
|
|
246
|
+
enumerable: "enumerable" in Attributes ? Attributes.enumerable : current.enumerable,
|
|
247
|
+
writable: !1
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return $defineProperty(O, P, Attributes);
|
|
251
|
+
} : $defineProperty : function(O, P, Attributes) {
|
|
252
|
+
if (anObject(O), P = toPropertyKey(P), anObject(Attributes), IE8_DOM_DEFINE) try {
|
|
253
|
+
return $defineProperty(O, P, Attributes);
|
|
254
|
+
} catch (error) {/* empty */}
|
|
255
|
+
if ("get" in Attributes || "set" in Attributes) throw new $TypeError$2("Accessors not supported");
|
|
256
|
+
return "value" in Attributes && (O[P] = Attributes.value), O;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
var definePropertyModule = objectDefineProperty, createPropertyDescriptor = createPropertyDescriptor$2, createNonEnumerableProperty$1 = descriptors ? function(object, key, value) {
|
|
260
|
+
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
261
|
+
} : function(object, key, value) {
|
|
262
|
+
return object[key] = value, object;
|
|
263
|
+
}, 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) {
|
|
264
|
+
return aCallable$1(fn), void 0 === that ? fn : NATIVE_BIND ? bind$1(fn, that) : function() {
|
|
265
|
+
return fn.apply(that, arguments);
|
|
266
|
+
};
|
|
267
|
+
}, createNonEnumerableProperty = createNonEnumerableProperty$1, hasOwn = hasOwnProperty_1, wrapConstructor = function(NativeConstructor) {
|
|
268
|
+
var Wrapper = function(a, b, c) {
|
|
269
|
+
if (this instanceof Wrapper) {
|
|
270
|
+
switch (arguments.length) {
|
|
271
|
+
case 0:
|
|
272
|
+
return new NativeConstructor;
|
|
273
|
+
|
|
274
|
+
case 1:
|
|
275
|
+
return new NativeConstructor(a);
|
|
276
|
+
|
|
277
|
+
case 2:
|
|
278
|
+
return new NativeConstructor(a, b);
|
|
279
|
+
}
|
|
280
|
+
return new NativeConstructor(a, b, c);
|
|
281
|
+
}
|
|
282
|
+
return apply(NativeConstructor, this, arguments);
|
|
283
|
+
};
|
|
284
|
+
return Wrapper.prototype = NativeConstructor.prototype, Wrapper;
|
|
285
|
+
}, _export = function(options, source) {
|
|
286
|
+
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;
|
|
287
|
+
for (key in source)
|
|
288
|
+
// contains in native
|
|
289
|
+
USE_NATIVE = !(FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced)) && nativeSource && hasOwn(nativeSource, key),
|
|
290
|
+
targetProperty = target[key], USE_NATIVE && (nativeProperty = options.dontCallGetSet ? (descriptor = getOwnPropertyDescriptor(nativeSource, key)) && descriptor.value : nativeSource[key]),
|
|
291
|
+
// export native or implementation
|
|
292
|
+
sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key], (FORCED || PROTO || typeof targetProperty != typeof sourceProperty) && (
|
|
293
|
+
// bind methods to global for calling from export context
|
|
294
|
+
resultProperty = options.bind && USE_NATIVE ? bind(sourceProperty, globalThis$3) : options.wrap && USE_NATIVE ? wrapConstructor(sourceProperty) : PROTO && isCallable$1(sourceProperty) ? uncurryThis$1(sourceProperty) : sourceProperty,
|
|
295
|
+
// add a flag to not completely full polyfills
|
|
296
|
+
(options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) && createNonEnumerableProperty(resultProperty, "sham", !0),
|
|
297
|
+
createNonEnumerableProperty(target, key, resultProperty), PROTO && (hasOwn(path$1, VIRTUAL_PROTOTYPE = TARGET + "Prototype") || createNonEnumerableProperty(path$1, VIRTUAL_PROTOTYPE, {}),
|
|
298
|
+
// export virtual prototype methods
|
|
299
|
+
createNonEnumerableProperty(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty),
|
|
300
|
+
// export real prototype methods
|
|
301
|
+
options.real && targetPrototype && (FORCED || !targetPrototype[key]) && createNonEnumerableProperty(targetPrototype, key, sourceProperty)));
|
|
302
|
+
}, ceil = Math.ceil, floor = Math.floor, trunc = Math.trunc || function(x) {
|
|
303
|
+
var n = +x;
|
|
304
|
+
return (n > 0 ? floor : ceil)(n);
|
|
305
|
+
}, toIntegerOrInfinity$2 = function(argument) {
|
|
306
|
+
var number = +argument;
|
|
307
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
308
|
+
return number != number || 0 === number ? 0 : trunc(number);
|
|
309
|
+
}, toIntegerOrInfinity$1 = toIntegerOrInfinity$2, max = Math.max, min$1 = Math.min, toIntegerOrInfinity = toIntegerOrInfinity$2, min = Math.min, lengthOfArrayLike$2 = function(obj) {
|
|
310
|
+
return argument = obj.length, (len = toIntegerOrInfinity(argument)) > 0 ? min(len, 9007199254740991) : 0;
|
|
311
|
+
var argument, len;
|
|
312
|
+
}, toIndexedObject = toIndexedObject$2, lengthOfArrayLike$1 = lengthOfArrayLike$2, createMethod$1 = function(IS_INCLUDES) {
|
|
313
|
+
return function($this, el, fromIndex) {
|
|
314
|
+
var O = toIndexedObject($this), length = lengthOfArrayLike$1(O);
|
|
315
|
+
if (0 === length) return !IS_INCLUDES && -1;
|
|
316
|
+
var value, index = function(index, length) {
|
|
317
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
318
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
319
|
+
}(fromIndex, length);
|
|
320
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
321
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
322
|
+
if (IS_INCLUDES && el != el) {
|
|
323
|
+
for (;length > index; )
|
|
324
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
325
|
+
if ((value = O[index++]) != value) return !0;
|
|
326
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
327
|
+
} else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
328
|
+
return !IS_INCLUDES && -1;
|
|
329
|
+
};
|
|
330
|
+
}, $includes = [ createMethod$1(!0), createMethod$1(!1) ][0];
|
|
331
|
+
|
|
332
|
+
// `Array.prototype.includes` method
|
|
333
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
334
|
+
_export({
|
|
335
|
+
target: "Array",
|
|
336
|
+
proto: !0,
|
|
337
|
+
forced: fails$9((function() {
|
|
338
|
+
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
339
|
+
return !Array(1).includes();
|
|
340
|
+
}))
|
|
341
|
+
}, {
|
|
342
|
+
includes: function(el /* , fromIndex = 0 */) {
|
|
343
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
var globalThis$2 = globalThis_1, path = path$3, getBuiltInPrototypeMethod$3 = function(CONSTRUCTOR, METHOD) {
|
|
348
|
+
var Namespace = path[CONSTRUCTOR + "Prototype"], pureMethod = Namespace && Namespace[METHOD];
|
|
349
|
+
if (pureMethod) return pureMethod;
|
|
350
|
+
var NativeConstructor = globalThis$2[CONSTRUCTOR], NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
|
351
|
+
return NativePrototype && NativePrototype[METHOD];
|
|
352
|
+
}, includes$4 = getBuiltInPrototypeMethod$3("Array", "includes"), isObject$1 = isObject$6, classof$3 = classofRaw$2, MATCH$1 = wellKnownSymbol$5("match"), $TypeError$1 = TypeError, test = {};
|
|
353
|
+
|
|
354
|
+
test[wellKnownSymbol$5("toStringTag")] = "z";
|
|
355
|
+
|
|
356
|
+
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() {
|
|
357
|
+
return arguments;
|
|
358
|
+
}()), classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
|
|
359
|
+
var O, tag, result;
|
|
360
|
+
return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (tag = function(it, key) {
|
|
361
|
+
try {
|
|
362
|
+
return it[key];
|
|
363
|
+
} catch (error) {/* empty */}
|
|
364
|
+
}(O = $Object(it), TO_STRING_TAG)) ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : "Object" === (result = classofRaw(O)) && isCallable(O.callee) ? "Arguments" : result;
|
|
365
|
+
}, $String = String, MATCH = wellKnownSymbol$5("match"), $$1 = _export, notARegExp = function(it) {
|
|
366
|
+
if (function(it) {
|
|
367
|
+
var isRegExp;
|
|
368
|
+
return isObject$1(it) && (void 0 !== (isRegExp = it[MATCH$1]) ? !!isRegExp : "RegExp" === classof$3(it));
|
|
369
|
+
}(it)) throw new $TypeError$1("The method doesn't accept regular expressions");
|
|
370
|
+
return it;
|
|
371
|
+
}, requireObjectCoercible = requireObjectCoercible$3, toString = function(argument) {
|
|
372
|
+
if ("Symbol" === classof$1(argument)) throw new TypeError("Cannot convert a Symbol value to a string");
|
|
373
|
+
return $String(argument);
|
|
374
|
+
}, stringIndexOf = functionUncurryThis("".indexOf);
|
|
375
|
+
|
|
376
|
+
// `String.prototype.includes` method
|
|
377
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
378
|
+
$$1({
|
|
379
|
+
target: "String",
|
|
380
|
+
proto: !0,
|
|
381
|
+
forced: !function(METHOD_NAME) {
|
|
382
|
+
var regexp = /./;
|
|
383
|
+
try {
|
|
384
|
+
"/./"[METHOD_NAME](regexp);
|
|
385
|
+
} catch (error1) {
|
|
386
|
+
try {
|
|
387
|
+
return regexp[MATCH] = !1, "/./"[METHOD_NAME](regexp);
|
|
388
|
+
} catch (error2) {/* empty */}
|
|
389
|
+
}
|
|
390
|
+
return !1;
|
|
391
|
+
}("includes")
|
|
392
|
+
}, {
|
|
393
|
+
includes: function(searchString /* , position = 0 */) {
|
|
394
|
+
return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
var includes$3 = getBuiltInPrototypeMethod$3("String", "includes"), isPrototypeOf$1 = objectIsPrototypeOf, arrayMethod = includes$4, stringMethod = includes$3, ArrayPrototype$1 = Array.prototype, StringPrototype = String.prototype, _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
|
|
399
|
+
var own = it.includes;
|
|
400
|
+
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;
|
|
401
|
+
}));
|
|
32
402
|
|
|
33
403
|
/**
|
|
34
404
|
* Default theme colors for components
|
|
@@ -2195,7 +2565,7 @@ class {
|
|
|
2195
2565
|
* Composable hook for AtomixGlass component logic
|
|
2196
2566
|
* Manages all state, calculations, and event handlers
|
|
2197
2567
|
*/
|
|
2198
|
-
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,
|
|
2568
|
+
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}) {
|
|
2199
2569
|
// State
|
|
2200
2570
|
const [isHovered, setIsHovered] = React.useState(!1), [isActive, setIsActive] = React.useState(!1), [glassSize, setGlassSize] = React.useState({
|
|
2201
2571
|
width: 270,
|
|
@@ -2396,9 +2766,8 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2396
2766
|
if (effectiveDisableEffects) return;
|
|
2397
2767
|
const container = mouseContainer?.current || glassRef.current;
|
|
2398
2768
|
if (!container) return;
|
|
2399
|
-
enablePerformanceMonitoring && performance.now();
|
|
2400
2769
|
// Use cached rect if available, otherwise get new one
|
|
2401
|
-
|
|
2770
|
+
let rect = cachedRectRef.current;
|
|
2402
2771
|
if (rect && 0 !== rect.width && 0 !== rect.height || (rect = container.getBoundingClientRect(),
|
|
2403
2772
|
cachedRectRef.current = rect), 0 === rect.width || 0 === rect.height) return;
|
|
2404
2773
|
const center = calculateElementCenter(rect), newOffset = {
|
|
@@ -2407,8 +2776,8 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2407
2776
|
};
|
|
2408
2777
|
// Calculate offset relative to this container
|
|
2409
2778
|
// React 18 automatically batches these updates
|
|
2410
|
-
setInternalMouseOffset(newOffset), setInternalGlobalMousePosition(globalPos)
|
|
2411
|
-
}), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects
|
|
2779
|
+
setInternalMouseOffset(newOffset), setInternalGlobalMousePosition(globalPos);
|
|
2780
|
+
}), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects ]);
|
|
2412
2781
|
// Subscribe to shared mouse tracker
|
|
2413
2782
|
React.useEffect((() => {
|
|
2414
2783
|
if (externalGlobalMousePosition && externalMouseOffset)
|
|
@@ -2848,7 +3217,69 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
2848
3217
|
});
|
|
2849
3218
|
}
|
|
2850
3219
|
|
|
2851
|
-
|
|
3220
|
+
// Default icon
|
|
3221
|
+
const DefaultIcon = () => jsxRuntime.jsx("i", {
|
|
3222
|
+
className: "c-accordion__icon",
|
|
3223
|
+
"aria-hidden": "true",
|
|
3224
|
+
children: jsxRuntime.jsx("svg", {
|
|
3225
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3226
|
+
width: "24",
|
|
3227
|
+
height: "24",
|
|
3228
|
+
viewBox: "0 0 24 24",
|
|
3229
|
+
fill: "none",
|
|
3230
|
+
stroke: "currentColor",
|
|
3231
|
+
strokeWidth: "2",
|
|
3232
|
+
strokeLinecap: "round",
|
|
3233
|
+
strokeLinejoin: "round",
|
|
3234
|
+
"aria-hidden": "true",
|
|
3235
|
+
focusable: "false",
|
|
3236
|
+
children: jsxRuntime.jsx("polyline", {
|
|
3237
|
+
points: "6 9 12 15 18 9"
|
|
3238
|
+
})
|
|
3239
|
+
})
|
|
3240
|
+
}), AccordionHeader = React.forwardRef((({title: title, icon: icon, iconPosition: iconPosition = "right", isOpen: isOpen, children: children, className: className = "", ...props}, ref) => {
|
|
3241
|
+
// Determine icon to render. Explicit check for undefined to allow null/false to hide icon.
|
|
3242
|
+
const iconElement = void 0 === icon ? jsxRuntime.jsx(DefaultIcon, {}) : icon;
|
|
3243
|
+
return jsxRuntime.jsxs("button", {
|
|
3244
|
+
ref: ref,
|
|
3245
|
+
type: "button",
|
|
3246
|
+
className: className,
|
|
3247
|
+
...props,
|
|
3248
|
+
children: [ title && jsxRuntime.jsx("span", {
|
|
3249
|
+
className: "c-accordion__title",
|
|
3250
|
+
children: title
|
|
3251
|
+
}), children, iconElement ]
|
|
3252
|
+
});
|
|
3253
|
+
}));
|
|
3254
|
+
|
|
3255
|
+
AccordionHeader.displayName = "AccordionHeader";
|
|
3256
|
+
|
|
3257
|
+
const AccordionBody = React.forwardRef((({children: children, className: className = "", panelRef: panelRef, contentRef: contentRef, ...props}, ref) => {
|
|
3258
|
+
const mergedPanelRef = React__default.default.useMemo((() =>
|
|
3259
|
+
// Helper to merge refs
|
|
3260
|
+
function(...refs) {
|
|
3261
|
+
return node => {
|
|
3262
|
+
refs.forEach((ref => {
|
|
3263
|
+
"function" == typeof ref ? ref(node) : null != ref && (ref.current = node);
|
|
3264
|
+
}));
|
|
3265
|
+
};
|
|
3266
|
+
}(ref, panelRef)), [ ref, panelRef ]);
|
|
3267
|
+
return jsxRuntime.jsx("div", {
|
|
3268
|
+
ref: mergedPanelRef,
|
|
3269
|
+
className: className,
|
|
3270
|
+
role: "region",
|
|
3271
|
+
...props,
|
|
3272
|
+
children: jsxRuntime.jsx("div", {
|
|
3273
|
+
className: ACCORDION.SELECTORS.BODY.replace(".", ""),
|
|
3274
|
+
ref: contentRef,
|
|
3275
|
+
children: children
|
|
3276
|
+
})
|
|
3277
|
+
});
|
|
3278
|
+
}));
|
|
3279
|
+
|
|
3280
|
+
AccordionBody.displayName = "AccordionBody";
|
|
3281
|
+
|
|
3282
|
+
const AccordionImpl = React.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}) => {
|
|
2852
3283
|
// Generate unique IDs for accessibility
|
|
2853
3284
|
const instanceId = React.useId(), buttonId = `accordion-header-${instanceId}`, panelId = `accordion-panel-${instanceId}`, {state: state, toggle: toggle, updatePanelHeight: updatePanelHeight, panelRef: panelRef, contentRef: contentRef, generateClassNames: generateClassNames, generateHeaderClassNames: generateHeaderClassNames} = useAccordion({
|
|
2854
3285
|
defaultOpen: defaultOpen,
|
|
@@ -2858,53 +3289,59 @@ const Accordion = React.memo((({title: title, children: children, defaultOpen:
|
|
|
2858
3289
|
onOpenChange: onOpenChange,
|
|
2859
3290
|
onOpen: onOpen,
|
|
2860
3291
|
onClose: onClose
|
|
2861
|
-
}),
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
width: "24",
|
|
2867
|
-
height: "24",
|
|
2868
|
-
viewBox: "0 0 24 24",
|
|
2869
|
-
fill: "none",
|
|
2870
|
-
stroke: "currentColor",
|
|
2871
|
-
strokeWidth: "2",
|
|
2872
|
-
strokeLinecap: "round",
|
|
2873
|
-
strokeLinejoin: "round",
|
|
2874
|
-
"aria-hidden": "true",
|
|
2875
|
-
focusable: "false",
|
|
2876
|
-
children: jsxRuntime.jsx("polyline", {
|
|
2877
|
-
points: "6 9 12 15 18 9"
|
|
2878
|
-
})
|
|
2879
|
-
})
|
|
2880
|
-
}), accordionContent = jsxRuntime.jsxs("div", {
|
|
3292
|
+
}), headerClassNames = generateHeaderClassNames(), panelClassNames = ACCORDION.SELECTORS.PANEL.replace(".", ""), hasCompoundComponents = React__default.default.Children.toArray(children).some((child => {
|
|
3293
|
+
var _context;
|
|
3294
|
+
|
|
3295
|
+
return React__default.default.isValidElement(child) && _includesInstanceProperty(_context = [ "AccordionHeader", "AccordionBody" ]).call(_context, child.type.displayName);
|
|
3296
|
+
})), content = jsxRuntime.jsx("div", {
|
|
2881
3297
|
className: generateClassNames(className) + (glass ? " c-accordion--glass" : ""),
|
|
2882
3298
|
style: style,
|
|
2883
|
-
children:
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
3299
|
+
children: hasCompoundComponents ? React__default.default.Children.map(children, (child => {
|
|
3300
|
+
if ( React__default.default.isValidElement(child)) {
|
|
3301
|
+
if ("AccordionHeader" === child.type.displayName)
|
|
3302
|
+
return React__default.default.cloneElement(child, {
|
|
3303
|
+
id: buttonId,
|
|
3304
|
+
className: `${headerClassNames} ${child.props.className || ""}`.trim(),
|
|
3305
|
+
onClick: e => {
|
|
3306
|
+
toggle(), child.props.onClick?.(e);
|
|
3307
|
+
},
|
|
3308
|
+
"aria-expanded": state.isOpen,
|
|
3309
|
+
"aria-controls": panelId,
|
|
3310
|
+
"aria-disabled": disabled,
|
|
3311
|
+
disabled: disabled,
|
|
3312
|
+
iconPosition: child.props.iconPosition || iconPosition
|
|
3313
|
+
});
|
|
3314
|
+
if ("AccordionBody" === child.type.displayName)
|
|
3315
|
+
return React__default.default.cloneElement(child, {
|
|
3316
|
+
id: panelId,
|
|
3317
|
+
className: `${panelClassNames} ${child.props.className || ""}`.trim(),
|
|
3318
|
+
"aria-labelledby": buttonId,
|
|
3319
|
+
panelRef: panelRef,
|
|
3320
|
+
contentRef: contentRef
|
|
3321
|
+
});
|
|
3322
|
+
}
|
|
3323
|
+
return child;
|
|
3324
|
+
})) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3325
|
+
children: [ jsxRuntime.jsx(AccordionHeader, {
|
|
3326
|
+
id: buttonId,
|
|
3327
|
+
className: headerClassNames,
|
|
3328
|
+
onClick: toggle,
|
|
3329
|
+
"aria-expanded": state.isOpen,
|
|
3330
|
+
"aria-controls": panelId,
|
|
3331
|
+
"aria-disabled": disabled,
|
|
3332
|
+
disabled: disabled,
|
|
3333
|
+
title: title,
|
|
3334
|
+
icon: icon,
|
|
3335
|
+
iconPosition: iconPosition
|
|
3336
|
+
}), jsxRuntime.jsx(AccordionBody, {
|
|
3337
|
+
id: panelId,
|
|
3338
|
+
className: panelClassNames,
|
|
3339
|
+
"aria-labelledby": buttonId,
|
|
3340
|
+
panelRef: panelRef,
|
|
3341
|
+
contentRef: contentRef,
|
|
2905
3342
|
children: children
|
|
2906
|
-
})
|
|
2907
|
-
})
|
|
3343
|
+
}) ]
|
|
3344
|
+
})
|
|
2908
3345
|
});
|
|
2909
3346
|
if (glass) {
|
|
2910
3347
|
// Default glass settings for accordions
|
|
@@ -2917,16 +3354,20 @@ const Accordion = React.memo((({title: title, children: children, defaultOpen:
|
|
|
2917
3354
|
};
|
|
2918
3355
|
return jsxRuntime.jsx(AtomixGlass, {
|
|
2919
3356
|
...glassProps,
|
|
2920
|
-
children:
|
|
3357
|
+
children: content
|
|
2921
3358
|
});
|
|
2922
3359
|
}
|
|
2923
|
-
return
|
|
3360
|
+
return content;
|
|
2924
3361
|
}));
|
|
2925
3362
|
|
|
2926
|
-
|
|
2927
|
-
Accordion.displayName = "Accordion";
|
|
3363
|
+
AccordionImpl.displayName = "Accordion";
|
|
2928
3364
|
|
|
2929
|
-
|
|
3365
|
+
// Attach subcomponents
|
|
3366
|
+
const AccordionWithSubcomponents = AccordionImpl;
|
|
3367
|
+
|
|
3368
|
+
AccordionWithSubcomponents.Header = AccordionHeader, AccordionWithSubcomponents.Body = AccordionBody;
|
|
3369
|
+
|
|
3370
|
+
const Accordion = AccordionWithSubcomponents, AtomixLogo = ({height: height = 24, width: width = 24, color: color = "currentColor", ...props}) => jsxRuntime.jsxs("svg", {
|
|
2930
3371
|
width: width,
|
|
2931
3372
|
height: height,
|
|
2932
3373
|
viewBox: "0 0 24 24",
|
|
@@ -3153,8 +3594,6 @@ const AtomixLogo = ({height: height = 24, width: width = 24, color: color = "cur
|
|
|
3153
3594
|
noise: (uv, mousePosition) => fragmentShaders.appleFluid(uv, mousePosition)
|
|
3154
3595
|
};
|
|
3155
3596
|
|
|
3156
|
-
// Adapted from https://github.com/shuding/liquid-glass
|
|
3157
|
-
// Constants
|
|
3158
3597
|
var shaderUtils = Object.freeze({
|
|
3159
3598
|
__proto__: null,
|
|
3160
3599
|
ShaderDisplacementGenerator: class {
|
|
@@ -3503,43 +3942,82 @@ const useBlock = () => ({
|
|
|
3503
3942
|
* ```
|
|
3504
3943
|
*/ Block.displayName = "Block";
|
|
3505
3944
|
|
|
3506
|
-
const
|
|
3945
|
+
const BreadcrumbItem = React.forwardRef((({children: children, href: href, active: active, icon: icon, onClick: onClick, className: className = "", style: style, linkAs: LinkComponent, linkProps: linkProps = {}, ...props}, ref) => {
|
|
3946
|
+
const itemClasses = [ BREADCRUMB.CLASSES.ITEM, active ? BREADCRUMB.CLASSES.ACTIVE : "", className ].filter(Boolean).join(" "), linkContent = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3947
|
+
children: [ icon && jsxRuntime.jsx("span", {
|
|
3948
|
+
className: "c-breadcrumb__icon",
|
|
3949
|
+
children: icon
|
|
3950
|
+
}), children ]
|
|
3951
|
+
}), commonLinkProps = {
|
|
3952
|
+
className: BREADCRUMB.CLASSES.LINK,
|
|
3953
|
+
onClick: onClick,
|
|
3954
|
+
style: style,
|
|
3955
|
+
// Apply style to the link as per legacy behavior
|
|
3956
|
+
...linkProps
|
|
3957
|
+
};
|
|
3958
|
+
return jsxRuntime.jsx("li", {
|
|
3959
|
+
ref: ref,
|
|
3960
|
+
className: itemClasses,
|
|
3961
|
+
style: style,
|
|
3962
|
+
...props,
|
|
3963
|
+
children: href && !active ? LinkComponent ? (() => {
|
|
3964
|
+
const Component = LinkComponent;
|
|
3965
|
+
return jsxRuntime.jsx(Component, {
|
|
3966
|
+
href: href,
|
|
3967
|
+
...commonLinkProps,
|
|
3968
|
+
children: linkContent
|
|
3969
|
+
});
|
|
3970
|
+
})() : jsxRuntime.jsx("a", {
|
|
3971
|
+
href: href,
|
|
3972
|
+
...commonLinkProps,
|
|
3973
|
+
children: linkContent
|
|
3974
|
+
}) : jsxRuntime.jsx("span", {
|
|
3975
|
+
className: BREADCRUMB.CLASSES.LINK,
|
|
3976
|
+
children: linkContent
|
|
3977
|
+
})
|
|
3978
|
+
});
|
|
3979
|
+
}));
|
|
3980
|
+
|
|
3981
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
3982
|
+
|
|
3983
|
+
const Breadcrumb = React.memo((({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style, children: children}) => {
|
|
3507
3984
|
const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
|
|
3985
|
+
let content;
|
|
3986
|
+
if (items && items.length > 0)
|
|
3987
|
+
// Legacy rendering
|
|
3988
|
+
content = items.map(((item, index) => {
|
|
3989
|
+
const isLast = index === items.length - 1;
|
|
3990
|
+
return jsxRuntime.jsx(BreadcrumbItem, {
|
|
3991
|
+
href: item.href,
|
|
3992
|
+
active: item.active || isLast,
|
|
3993
|
+
icon: item.icon,
|
|
3994
|
+
onClick: item.onClick,
|
|
3995
|
+
className: item.className,
|
|
3996
|
+
style: item.style,
|
|
3997
|
+
linkAs: LinkComponent,
|
|
3998
|
+
children: item.label
|
|
3999
|
+
}, index);
|
|
4000
|
+
})); else {
|
|
4001
|
+
// Compound rendering
|
|
4002
|
+
const childrenCount = React.Children.count(children);
|
|
4003
|
+
content = React.Children.map(children, ((child, index) => {
|
|
4004
|
+
if ( React.isValidElement(child)) {
|
|
4005
|
+
const isLast = index === childrenCount - 1, childProps = child.props;
|
|
4006
|
+
|
|
4007
|
+
return React.cloneElement(child, {
|
|
4008
|
+
active: childProps.active ?? (!!isLast || void 0),
|
|
4009
|
+
linkAs: childProps.linkAs ?? LinkComponent
|
|
4010
|
+
});
|
|
4011
|
+
}
|
|
4012
|
+
return child;
|
|
4013
|
+
}));
|
|
4014
|
+
}
|
|
3508
4015
|
return jsxRuntime.jsx("nav", {
|
|
3509
4016
|
"aria-label": ariaLabel,
|
|
3510
4017
|
style: style,
|
|
3511
4018
|
children: jsxRuntime.jsx("ol", {
|
|
3512
4019
|
className: breadcrumbClasses,
|
|
3513
|
-
children:
|
|
3514
|
-
const isLast = index === items.length - 1, itemClasses = [ BREADCRUMB.CLASSES.ITEM, item.active || isLast ? BREADCRUMB.CLASSES.ACTIVE : "" ].filter(Boolean).join(" "), linkContent = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3515
|
-
children: [ item.icon && jsxRuntime.jsx("span", {
|
|
3516
|
-
className: "c-breadcrumb__icon",
|
|
3517
|
-
children: item.icon
|
|
3518
|
-
}), item.label ]
|
|
3519
|
-
}), linkProps = {
|
|
3520
|
-
href: item.href,
|
|
3521
|
-
className: BREADCRUMB.CLASSES.LINK,
|
|
3522
|
-
onClick: item.onClick,
|
|
3523
|
-
style: item.style
|
|
3524
|
-
};
|
|
3525
|
-
return jsxRuntime.jsx("li", {
|
|
3526
|
-
className: itemClasses,
|
|
3527
|
-
style: item.style,
|
|
3528
|
-
children: item.href && !item.active ? LinkComponent ? (() => {
|
|
3529
|
-
const Component = LinkComponent;
|
|
3530
|
-
return jsxRuntime.jsx(Component, {
|
|
3531
|
-
...linkProps,
|
|
3532
|
-
children: linkContent
|
|
3533
|
-
});
|
|
3534
|
-
})() : jsxRuntime.jsx("a", {
|
|
3535
|
-
...linkProps,
|
|
3536
|
-
children: linkContent
|
|
3537
|
-
}) : jsxRuntime.jsx("span", {
|
|
3538
|
-
className: BREADCRUMB.CLASSES.LINK,
|
|
3539
|
-
children: linkContent
|
|
3540
|
-
})
|
|
3541
|
-
}, index);
|
|
3542
|
-
}))
|
|
4020
|
+
children: content
|
|
3543
4021
|
})
|
|
3544
4022
|
});
|
|
3545
4023
|
}));
|
|
@@ -3570,7 +4048,7 @@ function useSpinner(initialProps) {
|
|
|
3570
4048
|
};
|
|
3571
4049
|
}
|
|
3572
4050
|
|
|
3573
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
4051
|
+
Breadcrumb.displayName = "Breadcrumb", Breadcrumb.Item = BreadcrumbItem;
|
|
3574
4052
|
|
|
3575
4053
|
const Spinner = React.memo((({size: size = "md", variant: variant = "primary", fullscreen: fullscreen = !1, className: className = "", style: style, glass: glass, "aria-label": ariaLabel, role: role = "status"}) => {
|
|
3576
4054
|
const {generateSpinnerClass: generateSpinnerClass} = useSpinner({
|
|
@@ -3635,7 +4113,7 @@ class ThemeNaming {
|
|
|
3635
4113
|
* Convert camelCase to kebab-case for CSS variables
|
|
3636
4114
|
* @param str - String to convert
|
|
3637
4115
|
*/ static camelToKebab(str) {
|
|
3638
|
-
return str.replace(/([a-z0-9]
|
|
4116
|
+
return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3639
4117
|
}
|
|
3640
4118
|
/**
|
|
3641
4119
|
* Convert kebab-case to camelCase for JavaScript properties
|
|
@@ -3839,382 +4317,77 @@ const ButtonGroup = ({children: children, className: className = "", style: styl
|
|
|
3839
4317
|
|
|
3840
4318
|
ButtonGroup.displayName = "ButtonGroup";
|
|
3841
4319
|
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
try {
|
|
3850
|
-
return !!exec();
|
|
3851
|
-
} catch (error) {
|
|
3852
|
-
return !0;
|
|
3853
|
-
}
|
|
3854
|
-
}, functionBindNative = !fails$9((function() {
|
|
3855
|
-
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
3856
|
-
var test = function() {/* empty */}.bind();
|
|
3857
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
3858
|
-
return "function" != typeof test || test.hasOwnProperty("prototype");
|
|
3859
|
-
})), 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) {
|
|
3860
|
-
return function() {
|
|
3861
|
-
return call$5.apply(fn, arguments);
|
|
3862
|
-
};
|
|
3863
|
-
}, objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf), check = function(it) {
|
|
3864
|
-
return it && it.Math === Math && it;
|
|
3865
|
-
}, globalThis_1 =
|
|
3866
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
3867
|
-
check("object" == typeof globalThis && globalThis) || check("object" == typeof window && window) ||
|
|
3868
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
3869
|
-
check("object" == typeof self && self) || check("object" == typeof commonjsGlobal && commonjsGlobal) || check("object" == typeof commonjsGlobal && commonjsGlobal) ||
|
|
3870
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
3871
|
-
function() {
|
|
3872
|
-
return this;
|
|
3873
|
-
}() || 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() {
|
|
3874
|
-
return call$4.apply(apply$1, arguments);
|
|
3875
|
-
}), uncurryThis$7 = functionUncurryThis, toString$3 = uncurryThis$7({}.toString), stringSlice = uncurryThis$7("".slice), classofRaw$2 = function(it) {
|
|
3876
|
-
return stringSlice(toString$3(it), 8, -1);
|
|
3877
|
-
}, classofRaw$1 = classofRaw$2, uncurryThis$6 = functionUncurryThis, functionUncurryThisClause = function(fn) {
|
|
3878
|
-
// Nashorn bug:
|
|
3879
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
3880
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
3881
|
-
if ("Function" === classofRaw$1(fn)) return uncurryThis$6(fn);
|
|
3882
|
-
}, documentAll = "object" == typeof document && document.all, isCallable$8 = void 0 === documentAll && void 0 !== documentAll ? function(argument) {
|
|
3883
|
-
return "function" == typeof argument || argument === documentAll;
|
|
3884
|
-
} : function(argument) {
|
|
3885
|
-
return "function" == typeof argument;
|
|
3886
|
-
}, objectGetOwnPropertyDescriptor = {}, descriptors = !fails$9((function() {
|
|
3887
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
3888
|
-
return 7 !== Object.defineProperty({}, 1, {
|
|
3889
|
-
get: function() {
|
|
3890
|
-
return 7;
|
|
3891
|
-
}
|
|
3892
|
-
})[1];
|
|
3893
|
-
})), NATIVE_BIND$1 = functionBindNative, call$3 = Function.prototype.call, functionCall = NATIVE_BIND$1 ? call$3.bind(call$3) : function() {
|
|
3894
|
-
return call$3.apply(call$3, arguments);
|
|
3895
|
-
}, objectPropertyIsEnumerable = {}, $propertyIsEnumerable = {}.propertyIsEnumerable, getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
|
|
3896
|
-
1: 2
|
|
3897
|
-
}, 1);
|
|
3898
|
-
|
|
3899
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
3900
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
3901
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function(V) {
|
|
3902
|
-
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
3903
|
-
return !!descriptor && descriptor.enumerable;
|
|
3904
|
-
} : $propertyIsEnumerable;
|
|
3905
|
-
|
|
3906
|
-
var match, version, createPropertyDescriptor$2 = function(bitmap, value) {
|
|
3907
|
-
return {
|
|
3908
|
-
enumerable: !(1 & bitmap),
|
|
3909
|
-
configurable: !(2 & bitmap),
|
|
3910
|
-
writable: !(4 & bitmap),
|
|
3911
|
-
value: value
|
|
3912
|
-
};
|
|
3913
|
-
}, fails$6 = fails$9, classof$4 = classofRaw$2, $Object$3 = Object, split = functionUncurryThis("".split), indexedObject = fails$6((function() {
|
|
3914
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
3915
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
3916
|
-
return !$Object$3("z").propertyIsEnumerable(0);
|
|
3917
|
-
})) ? function(it) {
|
|
3918
|
-
return "String" === classof$4(it) ? split(it, "") : $Object$3(it);
|
|
3919
|
-
} : $Object$3, isNullOrUndefined$2 = function(it) {
|
|
3920
|
-
return null == it;
|
|
3921
|
-
}, isNullOrUndefined$1 = isNullOrUndefined$2, $TypeError$7 = TypeError, requireObjectCoercible$3 = function(it) {
|
|
3922
|
-
if (isNullOrUndefined$1(it)) throw new $TypeError$7("Can't call method on " + it);
|
|
3923
|
-
return it;
|
|
3924
|
-
}, IndexedObject$1 = indexedObject, requireObjectCoercible$2 = requireObjectCoercible$3, toIndexedObject$2 = function(it) {
|
|
3925
|
-
return IndexedObject$1(requireObjectCoercible$2(it));
|
|
3926
|
-
}, isCallable$7 = isCallable$8, isObject$6 = function(it) {
|
|
3927
|
-
return "object" == typeof it ? null !== it : isCallable$7(it);
|
|
3928
|
-
}, path$3 = {}, path$2 = path$3, globalThis$b = globalThis_1, isCallable$6 = isCallable$8, aFunction = function(variable) {
|
|
3929
|
-
return isCallable$6(variable) ? variable : void 0;
|
|
3930
|
-
}, 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;
|
|
3931
|
-
|
|
3932
|
-
v8 && (
|
|
3933
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
3934
|
-
// but their correct versions are not interesting for us
|
|
3935
|
-
version = (match = v8.split("."))[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1])),
|
|
3936
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
3937
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
3938
|
-
!version && userAgent$1 && (!(match = userAgent$1.match(/Edge\/(\d+)/)) || match[1] >= 74) && (match = userAgent$1.match(/Chrome\/(\d+)/)) && (version = +match[1]);
|
|
3939
|
-
|
|
3940
|
-
var environmentV8Version = version, V8_VERSION = environmentV8Version, fails$5 = fails$9, $String$3 = globalThis_1.String, symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5((function() {
|
|
3941
|
-
var symbol = Symbol("symbol detection");
|
|
3942
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
3943
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
3944
|
-
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
3945
|
-
// of course, fail.
|
|
3946
|
-
return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
3947
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
3948
|
-
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
3949
|
-
})), useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && "symbol" == typeof Symbol.iterator, isCallable$5 = isCallable$8, isPrototypeOf$2 = objectIsPrototypeOf, $Object$2 = Object, isSymbol$2 = useSymbolAsUid ? function(it) {
|
|
3950
|
-
return "symbol" == typeof it;
|
|
3951
|
-
} : function(it) {
|
|
3952
|
-
var $Symbol = function(namespace, method) {
|
|
3953
|
-
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];
|
|
3954
|
-
}("Symbol");
|
|
3955
|
-
return isCallable$5($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
|
|
3956
|
-
}, $String$2 = String, isCallable$4 = isCallable$8, $TypeError$6 = TypeError, aCallable$3 = function(argument) {
|
|
3957
|
-
if (isCallable$4(argument)) return argument;
|
|
3958
|
-
throw new $TypeError$6(function(argument) {
|
|
3959
|
-
try {
|
|
3960
|
-
return $String$2(argument);
|
|
3961
|
-
} catch (error) {
|
|
3962
|
-
return "Object";
|
|
3963
|
-
}
|
|
3964
|
-
}(argument) + " is not a function");
|
|
3965
|
-
}, aCallable$2 = aCallable$3, isNullOrUndefined = isNullOrUndefined$2, call$2 = functionCall, isCallable$3 = isCallable$8, isObject$5 = isObject$6, $TypeError$5 = TypeError, sharedStore = {
|
|
3966
|
-
exports: {}
|
|
3967
|
-
}, globalThis$7 = globalThis_1, defineProperty = Object.defineProperty, globalThis$6 = globalThis_1, store$1 = sharedStore.exports = globalThis$6["__core-js_shared__"] || function(key, value) {
|
|
3968
|
-
try {
|
|
3969
|
-
defineProperty(globalThis$7, key, {
|
|
3970
|
-
value: value,
|
|
3971
|
-
configurable: !0,
|
|
3972
|
-
writable: !0
|
|
3973
|
-
});
|
|
3974
|
-
} catch (error) {
|
|
3975
|
-
globalThis$7[key] = value;
|
|
3976
|
-
}
|
|
3977
|
-
return value;
|
|
3978
|
-
}("__core-js_shared__", {});
|
|
3979
|
-
|
|
3980
|
-
/* eslint-disable es/no-symbol -- required for testing */ (store$1.versions || (store$1.versions = [])).push({
|
|
3981
|
-
version: "3.43.0",
|
|
3982
|
-
mode: "pure",
|
|
3983
|
-
copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)",
|
|
3984
|
-
license: "https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",
|
|
3985
|
-
source: "https://github.com/zloirock/core-js"
|
|
3986
|
-
});
|
|
4320
|
+
// Subcomponents
|
|
4321
|
+
const CalloutIcon = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
4322
|
+
ref: ref,
|
|
4323
|
+
className: `c-callout__icon ${className}`.trim(),
|
|
4324
|
+
...props,
|
|
4325
|
+
children: children
|
|
4326
|
+
})));
|
|
3987
4327
|
|
|
3988
|
-
|
|
3989
|
-
return $Object$1(requireObjectCoercible$1(argument));
|
|
3990
|
-
}, toObject$1 = toObject$2, hasOwnProperty = functionUncurryThis({}.hasOwnProperty), hasOwnProperty_1 = Object.hasOwn || function(it, key) {
|
|
3991
|
-
return hasOwnProperty(toObject$1(it), key);
|
|
3992
|
-
}, 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) {
|
|
3993
|
-
return "Symbol(" + (void 0 === key ? "" : key) + ")_" + toString$2(++id + postfix, 36);
|
|
3994
|
-
}, wellKnownSymbol$5 = function(name) {
|
|
3995
|
-
return hasOwn$2(WellKnownSymbolsStore, name) || (WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$2(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol("Symbol." + name)),
|
|
3996
|
-
WellKnownSymbolsStore[name];
|
|
3997
|
-
}, call$1 = functionCall, isObject$4 = isObject$6, isSymbol$1 = isSymbol$2, $TypeError$4 = TypeError, TO_PRIMITIVE = wellKnownSymbol$5("toPrimitive"), toPrimitive = function(input, pref) {
|
|
3998
|
-
if (!isObject$4(input) || isSymbol$1(input)) return input;
|
|
3999
|
-
var result, func, exoticToPrim = (func = input[TO_PRIMITIVE], isNullOrUndefined(func) ? void 0 : aCallable$2(func));
|
|
4000
|
-
if (exoticToPrim) {
|
|
4001
|
-
if (void 0 === pref && (pref = "default"), result = call$1(exoticToPrim, input, pref),
|
|
4002
|
-
!isObject$4(result) || isSymbol$1(result)) return result;
|
|
4003
|
-
throw new $TypeError$4("Can't convert object to primitive value");
|
|
4004
|
-
}
|
|
4005
|
-
return void 0 === pref && (pref = "number"), function(input, pref) {
|
|
4006
|
-
var fn, val;
|
|
4007
|
-
if ("string" === pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
|
|
4008
|
-
if (isCallable$3(fn = input.valueOf) && !isObject$5(val = call$2(fn, input))) return val;
|
|
4009
|
-
if ("string" !== pref && isCallable$3(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
|
|
4010
|
-
throw new $TypeError$5("Can't convert object to primitive value");
|
|
4011
|
-
}(input, pref);
|
|
4012
|
-
}, isSymbol = isSymbol$2, toPropertyKey$2 = function(argument) {
|
|
4013
|
-
var key = toPrimitive(argument, "string");
|
|
4014
|
-
return isSymbol(key) ? key : key + "";
|
|
4015
|
-
}, isObject$3 = isObject$6, document$1 = globalThis_1.document, EXISTS = isObject$3(document$1) && isObject$3(document$1.createElement), ie8DomDefine = !descriptors && !fails$9((function() {
|
|
4016
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
4017
|
-
return 7 !== Object.defineProperty((it = "div", EXISTS ? document$1.createElement(it) : {}), "a", {
|
|
4018
|
-
get: function() {
|
|
4019
|
-
return 7;
|
|
4020
|
-
}
|
|
4021
|
-
}).a;
|
|
4022
|
-
var it;
|
|
4023
|
-
})), 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;
|
|
4328
|
+
CalloutIcon.displayName = "CalloutIcon";
|
|
4024
4329
|
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
if (hasOwn$1(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
4032
|
-
};
|
|
4330
|
+
const CalloutMessage = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
4331
|
+
ref: ref,
|
|
4332
|
+
className: `c-callout__message ${className}`.trim(),
|
|
4333
|
+
...props,
|
|
4334
|
+
children: children
|
|
4335
|
+
})));
|
|
4033
4336
|
|
|
4034
|
-
|
|
4035
|
-
var value = data[normalize(feature)];
|
|
4036
|
-
return value === POLYFILL || value !== NATIVE && (isCallable$2(detection) ? fails$3(detection) : !!detection);
|
|
4037
|
-
}, normalize = isForced$1.normalize = function(string) {
|
|
4038
|
-
return String(string).replace(replacement, ".").toLowerCase();
|
|
4039
|
-
}, 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() {
|
|
4040
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
4041
|
-
return 42 !== Object.defineProperty((function() {/* empty */}), "prototype", {
|
|
4042
|
-
value: 42,
|
|
4043
|
-
writable: !1
|
|
4044
|
-
}).prototype;
|
|
4045
|
-
})), 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) {
|
|
4046
|
-
if (isObject$2(argument)) return argument;
|
|
4047
|
-
throw new $TypeError$3($String$1(argument) + " is not an object");
|
|
4048
|
-
}, toPropertyKey = toPropertyKey$2, $TypeError$2 = TypeError, $defineProperty = Object.defineProperty, $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
4337
|
+
CalloutMessage.displayName = "CalloutMessage";
|
|
4049
4338
|
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
configurable: "configurable" in Attributes ? Attributes.configurable : current.configurable,
|
|
4057
|
-
enumerable: "enumerable" in Attributes ? Attributes.enumerable : current.enumerable,
|
|
4058
|
-
writable: !1
|
|
4059
|
-
});
|
|
4060
|
-
}
|
|
4061
|
-
return $defineProperty(O, P, Attributes);
|
|
4062
|
-
} : $defineProperty : function(O, P, Attributes) {
|
|
4063
|
-
if (anObject(O), P = toPropertyKey(P), anObject(Attributes), IE8_DOM_DEFINE) try {
|
|
4064
|
-
return $defineProperty(O, P, Attributes);
|
|
4065
|
-
} catch (error) {/* empty */}
|
|
4066
|
-
if ("get" in Attributes || "set" in Attributes) throw new $TypeError$2("Accessors not supported");
|
|
4067
|
-
return "value" in Attributes && (O[P] = Attributes.value), O;
|
|
4068
|
-
};
|
|
4339
|
+
const CalloutTitle = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
4340
|
+
ref: ref,
|
|
4341
|
+
className: `c-callout__title ${className}`.trim(),
|
|
4342
|
+
...props,
|
|
4343
|
+
children: children
|
|
4344
|
+
})));
|
|
4069
4345
|
|
|
4070
|
-
|
|
4071
|
-
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
4072
|
-
} : function(object, key, value) {
|
|
4073
|
-
return object[key] = value, object;
|
|
4074
|
-
}, 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) {
|
|
4075
|
-
return aCallable$1(fn), void 0 === that ? fn : NATIVE_BIND ? bind$1(fn, that) : function() {
|
|
4076
|
-
return fn.apply(that, arguments);
|
|
4077
|
-
};
|
|
4078
|
-
}, createNonEnumerableProperty = createNonEnumerableProperty$1, hasOwn = hasOwnProperty_1, wrapConstructor = function(NativeConstructor) {
|
|
4079
|
-
var Wrapper = function(a, b, c) {
|
|
4080
|
-
if (this instanceof Wrapper) {
|
|
4081
|
-
switch (arguments.length) {
|
|
4082
|
-
case 0:
|
|
4083
|
-
return new NativeConstructor;
|
|
4346
|
+
CalloutTitle.displayName = "CalloutTitle";
|
|
4084
4347
|
|
|
4085
|
-
|
|
4086
|
-
|
|
4348
|
+
const CalloutText = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
4349
|
+
ref: ref,
|
|
4350
|
+
className: `c-callout__text ${className}`.trim(),
|
|
4351
|
+
...props,
|
|
4352
|
+
children: children
|
|
4353
|
+
})));
|
|
4087
4354
|
|
|
4088
|
-
|
|
4089
|
-
return new NativeConstructor(a, b);
|
|
4090
|
-
}
|
|
4091
|
-
return new NativeConstructor(a, b, c);
|
|
4092
|
-
}
|
|
4093
|
-
return apply(NativeConstructor, this, arguments);
|
|
4094
|
-
};
|
|
4095
|
-
return Wrapper.prototype = NativeConstructor.prototype, Wrapper;
|
|
4096
|
-
}, _export = function(options, source) {
|
|
4097
|
-
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;
|
|
4098
|
-
for (key in source)
|
|
4099
|
-
// contains in native
|
|
4100
|
-
USE_NATIVE = !(FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced)) && nativeSource && hasOwn(nativeSource, key),
|
|
4101
|
-
targetProperty = target[key], USE_NATIVE && (nativeProperty = options.dontCallGetSet ? (descriptor = getOwnPropertyDescriptor(nativeSource, key)) && descriptor.value : nativeSource[key]),
|
|
4102
|
-
// export native or implementation
|
|
4103
|
-
sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key], (FORCED || PROTO || typeof targetProperty != typeof sourceProperty) && (
|
|
4104
|
-
// bind methods to global for calling from export context
|
|
4105
|
-
resultProperty = options.bind && USE_NATIVE ? bind(sourceProperty, globalThis$3) : options.wrap && USE_NATIVE ? wrapConstructor(sourceProperty) : PROTO && isCallable$1(sourceProperty) ? uncurryThis$1(sourceProperty) : sourceProperty,
|
|
4106
|
-
// add a flag to not completely full polyfills
|
|
4107
|
-
(options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) && createNonEnumerableProperty(resultProperty, "sham", !0),
|
|
4108
|
-
createNonEnumerableProperty(target, key, resultProperty), PROTO && (hasOwn(path$1, VIRTUAL_PROTOTYPE = TARGET + "Prototype") || createNonEnumerableProperty(path$1, VIRTUAL_PROTOTYPE, {}),
|
|
4109
|
-
// export virtual prototype methods
|
|
4110
|
-
createNonEnumerableProperty(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty),
|
|
4111
|
-
// export real prototype methods
|
|
4112
|
-
options.real && targetPrototype && (FORCED || !targetPrototype[key]) && createNonEnumerableProperty(targetPrototype, key, sourceProperty)));
|
|
4113
|
-
}, ceil = Math.ceil, floor = Math.floor, trunc = Math.trunc || function(x) {
|
|
4114
|
-
var n = +x;
|
|
4115
|
-
return (n > 0 ? floor : ceil)(n);
|
|
4116
|
-
}, toIntegerOrInfinity$2 = function(argument) {
|
|
4117
|
-
var number = +argument;
|
|
4118
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
4119
|
-
return number != number || 0 === number ? 0 : trunc(number);
|
|
4120
|
-
}, toIntegerOrInfinity$1 = toIntegerOrInfinity$2, max = Math.max, min$1 = Math.min, toIntegerOrInfinity = toIntegerOrInfinity$2, min = Math.min, lengthOfArrayLike$2 = function(obj) {
|
|
4121
|
-
return argument = obj.length, (len = toIntegerOrInfinity(argument)) > 0 ? min(len, 9007199254740991) : 0;
|
|
4122
|
-
var argument, len;
|
|
4123
|
-
}, toIndexedObject = toIndexedObject$2, lengthOfArrayLike$1 = lengthOfArrayLike$2, createMethod$1 = function(IS_INCLUDES) {
|
|
4124
|
-
return function($this, el, fromIndex) {
|
|
4125
|
-
var O = toIndexedObject($this), length = lengthOfArrayLike$1(O);
|
|
4126
|
-
if (0 === length) return !IS_INCLUDES && -1;
|
|
4127
|
-
var value, index = function(index, length) {
|
|
4128
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
4129
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
4130
|
-
}(fromIndex, length);
|
|
4131
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
4132
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
4133
|
-
if (IS_INCLUDES && el != el) {
|
|
4134
|
-
for (;length > index; )
|
|
4135
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
4136
|
-
if ((value = O[index++]) != value) return !0;
|
|
4137
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
4138
|
-
} else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
4139
|
-
return !IS_INCLUDES && -1;
|
|
4140
|
-
};
|
|
4141
|
-
}, $includes = [ createMethod$1(!0), createMethod$1(!1) ][0];
|
|
4355
|
+
CalloutText.displayName = "CalloutText";
|
|
4142
4356
|
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
4150
|
-
return !Array(1).includes();
|
|
4151
|
-
}))
|
|
4152
|
-
}, {
|
|
4153
|
-
includes: function(el /* , fromIndex = 0 */) {
|
|
4154
|
-
return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
|
|
4155
|
-
}
|
|
4156
|
-
});
|
|
4357
|
+
const CalloutActions = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
4358
|
+
ref: ref,
|
|
4359
|
+
className: `c-callout__actions ${className}`.trim(),
|
|
4360
|
+
...props,
|
|
4361
|
+
children: children
|
|
4362
|
+
})));
|
|
4157
4363
|
|
|
4158
|
-
|
|
4159
|
-
var Namespace = path[CONSTRUCTOR + "Prototype"], pureMethod = Namespace && Namespace[METHOD];
|
|
4160
|
-
if (pureMethod) return pureMethod;
|
|
4161
|
-
var NativeConstructor = globalThis$2[CONSTRUCTOR], NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
|
4162
|
-
return NativePrototype && NativePrototype[METHOD];
|
|
4163
|
-
}, includes$4 = getBuiltInPrototypeMethod$3("Array", "includes"), isObject$1 = isObject$6, classof$3 = classofRaw$2, MATCH$1 = wellKnownSymbol$5("match"), $TypeError$1 = TypeError, test = {};
|
|
4364
|
+
CalloutActions.displayName = "CalloutActions";
|
|
4164
4365
|
|
|
4165
|
-
|
|
4366
|
+
const CalloutCloseButton = React.forwardRef((({onClick: onClick, className: className = "", ...props}, ref) => jsxRuntime.jsx("button", {
|
|
4367
|
+
ref: ref,
|
|
4368
|
+
className: `c-callout__close-btn ${className}`.trim(),
|
|
4369
|
+
onClick: onClick,
|
|
4370
|
+
"aria-label": "Close",
|
|
4371
|
+
...props,
|
|
4372
|
+
children: jsxRuntime.jsx(Icon, {
|
|
4373
|
+
name: "X",
|
|
4374
|
+
size: "md"
|
|
4375
|
+
})
|
|
4376
|
+
})));
|
|
4166
4377
|
|
|
4167
|
-
|
|
4168
|
-
return arguments;
|
|
4169
|
-
}()), classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
|
|
4170
|
-
var O, tag, result;
|
|
4171
|
-
return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (tag = function(it, key) {
|
|
4172
|
-
try {
|
|
4173
|
-
return it[key];
|
|
4174
|
-
} catch (error) {/* empty */}
|
|
4175
|
-
}(O = $Object(it), TO_STRING_TAG)) ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : "Object" === (result = classofRaw(O)) && isCallable(O.callee) ? "Arguments" : result;
|
|
4176
|
-
}, $String = String, MATCH = wellKnownSymbol$5("match"), $$1 = _export, notARegExp = function(it) {
|
|
4177
|
-
if (function(it) {
|
|
4178
|
-
var isRegExp;
|
|
4179
|
-
return isObject$1(it) && (void 0 !== (isRegExp = it[MATCH$1]) ? !!isRegExp : "RegExp" === classof$3(it));
|
|
4180
|
-
}(it)) throw new $TypeError$1("The method doesn't accept regular expressions");
|
|
4181
|
-
return it;
|
|
4182
|
-
}, requireObjectCoercible = requireObjectCoercible$3, toString = function(argument) {
|
|
4183
|
-
if ("Symbol" === classof$1(argument)) throw new TypeError("Cannot convert a Symbol value to a string");
|
|
4184
|
-
return $String(argument);
|
|
4185
|
-
}, stringIndexOf = functionUncurryThis("".indexOf);
|
|
4378
|
+
CalloutCloseButton.displayName = "CalloutCloseButton";
|
|
4186
4379
|
|
|
4187
|
-
//
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
try {
|
|
4195
|
-
"/./"[METHOD_NAME](regexp);
|
|
4196
|
-
} catch (error1) {
|
|
4197
|
-
try {
|
|
4198
|
-
return regexp[MATCH] = !1, "/./"[METHOD_NAME](regexp);
|
|
4199
|
-
} catch (error2) {/* empty */}
|
|
4200
|
-
}
|
|
4201
|
-
return !1;
|
|
4202
|
-
}("includes")
|
|
4203
|
-
}, {
|
|
4204
|
-
includes: function(searchString /* , position = 0 */) {
|
|
4205
|
-
return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
|
|
4206
|
-
}
|
|
4207
|
-
});
|
|
4380
|
+
// Wrapper for content (icon + message)
|
|
4381
|
+
const CalloutContent = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
4382
|
+
ref: ref,
|
|
4383
|
+
className: `c-callout__content ${className}`.trim(),
|
|
4384
|
+
...props,
|
|
4385
|
+
children: children
|
|
4386
|
+
})));
|
|
4208
4387
|
|
|
4209
|
-
|
|
4210
|
-
var own = it.includes;
|
|
4211
|
-
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;
|
|
4212
|
-
}));
|
|
4388
|
+
CalloutContent.displayName = "CalloutContent";
|
|
4213
4389
|
|
|
4214
|
-
|
|
4215
|
-
* Callout component for displaying important messages, notifications, or alerts
|
|
4216
|
-
*/
|
|
4217
|
-
const 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}) => {
|
|
4390
|
+
const Callout = React.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}) => {
|
|
4218
4391
|
const {generateCalloutClass: generateCalloutClass, handleClose: handleClose} =
|
|
4219
4392
|
/**
|
|
4220
4393
|
* Callout state and functionality
|
|
@@ -4260,7 +4433,11 @@ const Callout = ({title: title, children: children, icon: icon, variant: variant
|
|
|
4260
4433
|
return isToast ? (baseAttributes.role = "alert", baseAttributes["aria-live"] = "polite") : _includesInstanceProperty(_context = [ "warning", "error" ]).call(_context, variant) ? (baseAttributes.role = "alert",
|
|
4261
4434
|
baseAttributes["aria-live"] = "assertive") : _includesInstanceProperty(_context2 = [ "info", "success" ]).call(_context2, variant) && (baseAttributes.role = "status",
|
|
4262
4435
|
baseAttributes["aria-live"] = "polite"), baseAttributes;
|
|
4263
|
-
}, calloutContent =
|
|
4436
|
+
}, calloutContent = React__default.default.Children.toArray(children).some((child => {
|
|
4437
|
+
var _context3;
|
|
4438
|
+
|
|
4439
|
+
return React__default.default.isValidElement(child) && _includesInstanceProperty(_context3 = [ "CalloutIcon", "CalloutMessage", "CalloutTitle", "CalloutText", "CalloutActions", "CalloutContent" ]).call(_context3, child.type.displayName);
|
|
4440
|
+
})) ? children : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4264
4441
|
children: [ jsxRuntime.jsxs("div", {
|
|
4265
4442
|
className: "c-callout__content",
|
|
4266
4443
|
children: [ icon && jsxRuntime.jsx("div", {
|
|
@@ -4336,9 +4513,13 @@ const Callout = ({title: title, children: children, icon: icon, variant: variant
|
|
|
4336
4513
|
style: style,
|
|
4337
4514
|
children: calloutContent
|
|
4338
4515
|
});
|
|
4339
|
-
};
|
|
4516
|
+
}));
|
|
4340
4517
|
|
|
4341
|
-
Callout.displayName = "Callout"
|
|
4518
|
+
Callout.displayName = "Callout",
|
|
4519
|
+
// Attach subcomponents
|
|
4520
|
+
Callout.Icon = CalloutIcon, Callout.Message = CalloutMessage, Callout.Title = CalloutTitle,
|
|
4521
|
+
Callout.Text = CalloutText, Callout.Actions = CalloutActions, Callout.CloseButton = CalloutCloseButton,
|
|
4522
|
+
Callout.Content = CalloutContent;
|
|
4342
4523
|
|
|
4343
4524
|
const Card = React__default.default.memo( React.forwardRef((({
|
|
4344
4525
|
// Variants
|
|
@@ -9455,7 +9636,38 @@ const DropdownContext = React.createContext({
|
|
|
9455
9636
|
close: () => {},
|
|
9456
9637
|
id: "",
|
|
9457
9638
|
trigger: "click"
|
|
9458
|
-
}),
|
|
9639
|
+
}), DropdownMenu = React.forwardRef((({children: children, className: className = "", ...props}, ref) => {
|
|
9640
|
+
const {glass: glass} = React.useContext(DropdownStyleContext);
|
|
9641
|
+
// We need to access glass prop here?
|
|
9642
|
+
// Wait, the original code wrapped <ul> in Context Provider.
|
|
9643
|
+
// And applied glass wrapper around <ul>.
|
|
9644
|
+
// If we use Compound Component, DropdownMenu should be the list.
|
|
9645
|
+
return jsxRuntime.jsx("ul", {
|
|
9646
|
+
ref: ref,
|
|
9647
|
+
className: `c-dropdown__menu ${glass ? "c-dropdown__menu--glass" : ""} ${className}`.trim(),
|
|
9648
|
+
...props,
|
|
9649
|
+
children: children
|
|
9650
|
+
});
|
|
9651
|
+
}));
|
|
9652
|
+
|
|
9653
|
+
// Compound Components
|
|
9654
|
+
DropdownMenu.displayName = "DropdownMenu";
|
|
9655
|
+
|
|
9656
|
+
const DropdownTrigger = React.forwardRef((({children: children, className: className = "", onClick: onClick, onKeyDown: onKeyDown, ...props}, ref) => jsxRuntime.jsx("div", {
|
|
9657
|
+
ref: ref,
|
|
9658
|
+
className: `c-dropdown__toggle ${className}`.trim(),
|
|
9659
|
+
onClick: onClick,
|
|
9660
|
+
onKeyDown: onKeyDown,
|
|
9661
|
+
...props,
|
|
9662
|
+
children: children
|
|
9663
|
+
})));
|
|
9664
|
+
|
|
9665
|
+
DropdownTrigger.displayName = "DropdownTrigger";
|
|
9666
|
+
|
|
9667
|
+
/**
|
|
9668
|
+
* DropdownItem component for menu items
|
|
9669
|
+
*/
|
|
9670
|
+
const DropdownItem = React.memo((({children: children, href: href, active: active = !1, disabled: disabled = !1, icon: icon, onClick: onClick, className: className = "", LinkComponent: LinkComponent, ...props}) => {
|
|
9459
9671
|
const {close: close} = React.useContext(DropdownContext), handleClick = e => {
|
|
9460
9672
|
disabled ? e.preventDefault() : (onClick && onClick(e),
|
|
9461
9673
|
// Always close the dropdown when an item is clicked
|
|
@@ -9506,7 +9718,7 @@ const DropdownContext = React.createContext({
|
|
|
9506
9718
|
}))), DropdownHeader = React.memo((({children: children, className: className = ""}) => jsxRuntime.jsx("li", {
|
|
9507
9719
|
className: `c-dropdown__header ${className}`,
|
|
9508
9720
|
children: children
|
|
9509
|
-
}))), Dropdown = React.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}) => {
|
|
9721
|
+
}))), DropdownStyleContext = React.createContext({}), Dropdown = React.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}) => {
|
|
9510
9722
|
// Set up controlled vs uncontrolled state
|
|
9511
9723
|
const [uncontrolledIsOpen, setUncontrolledIsOpen] = React.useState(!1), isControlled = void 0 !== controlledIsOpen, isOpen = isControlled ? controlledIsOpen : uncontrolledIsOpen, dropdownRef = React.useRef(null), toggleRef = React.useRef(null), menuRef = React.useRef(null), dropdownId = React.useRef(`dropdown-${Math.random().toString(36).substring(2, 9)}`).current, setIsOpen = React.useCallback((nextIsOpen => {
|
|
9512
9724
|
isControlled || setUncontrolledIsOpen(nextIsOpen), onOpenChange && onOpenChange(nextIsOpen);
|
|
@@ -9569,20 +9781,59 @@ const DropdownContext = React.createContext({
|
|
|
9569
9781
|
"hover" === trigger && setIsOpen(!0);
|
|
9570
9782
|
}), [ 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 = {};
|
|
9571
9783
|
// Event handlers
|
|
9572
|
-
|
|
9784
|
+
let triggerContent, menuContentNode;
|
|
9785
|
+
maxHeight && (menuStyleProps.maxHeight = maxHeight), void 0 !== minWidth && (menuStyleProps.minWidth = "number" == typeof minWidth ? `${minWidth}px` : minWidth),
|
|
9786
|
+
React__default.default.Children.toArray(children).some((child => {
|
|
9787
|
+
var _context;
|
|
9788
|
+
|
|
9789
|
+
return React__default.default.isValidElement(child) && _includesInstanceProperty(_context = [ "DropdownTrigger", "DropdownMenu" ]).call(_context, child.type.displayName);
|
|
9790
|
+
})) ?
|
|
9791
|
+
// Find Trigger and Menu in children
|
|
9792
|
+
React__default.default.Children.forEach(children, (child => {
|
|
9793
|
+
React__default.default.isValidElement(child) && ("DropdownTrigger" === child.type.displayName ? triggerContent = React__default.default.cloneElement(child, {
|
|
9794
|
+
ref: toggleRef,
|
|
9795
|
+
onClick: e => {
|
|
9796
|
+
handleToggleClick(e), child.props.onClick?.(e);
|
|
9797
|
+
},
|
|
9798
|
+
onKeyDown: e => {
|
|
9799
|
+
handleToggleKeyDown(e), child.props.onKeyDown?.(e);
|
|
9800
|
+
},
|
|
9801
|
+
"aria-haspopup": "menu",
|
|
9802
|
+
"aria-expanded": isOpen,
|
|
9803
|
+
"aria-controls": dropdownId,
|
|
9804
|
+
tabIndex: 0
|
|
9805
|
+
}) : "DropdownMenu" === child.type.displayName && (menuContentNode = child));
|
|
9806
|
+
})) : (
|
|
9807
|
+
// Legacy mode
|
|
9808
|
+
triggerContent = jsxRuntime.jsx("div", {
|
|
9809
|
+
ref: toggleRef,
|
|
9810
|
+
className: "c-dropdown__toggle",
|
|
9811
|
+
onClick: handleToggleClick,
|
|
9812
|
+
onKeyDown: handleToggleKeyDown,
|
|
9813
|
+
"aria-haspopup": "menu",
|
|
9814
|
+
"aria-expanded": isOpen,
|
|
9815
|
+
"aria-controls": dropdownId,
|
|
9816
|
+
tabIndex: 0,
|
|
9817
|
+
children: children
|
|
9818
|
+
}), menuContentNode = jsxRuntime.jsx("ul", {
|
|
9819
|
+
className: "c-dropdown__menu " + (glass ? "c-dropdown__menu--glass" : ""),
|
|
9820
|
+
children: menu
|
|
9821
|
+
}));
|
|
9573
9822
|
const menuContent = jsxRuntime.jsx("div", {
|
|
9574
9823
|
className: "c-dropdown__menu-inner",
|
|
9575
9824
|
style: menuStyleProps,
|
|
9576
|
-
children: jsxRuntime.jsx(
|
|
9825
|
+
children: jsxRuntime.jsx(DropdownStyleContext.Provider, {
|
|
9577
9826
|
value: {
|
|
9578
|
-
|
|
9579
|
-
close: close,
|
|
9580
|
-
id: dropdownId,
|
|
9581
|
-
trigger: trigger
|
|
9827
|
+
glass: glass
|
|
9582
9828
|
},
|
|
9583
|
-
children: jsxRuntime.jsx(
|
|
9584
|
-
|
|
9585
|
-
|
|
9829
|
+
children: jsxRuntime.jsx(DropdownContext.Provider, {
|
|
9830
|
+
value: {
|
|
9831
|
+
isOpen: isOpen,
|
|
9832
|
+
close: close,
|
|
9833
|
+
id: dropdownId,
|
|
9834
|
+
trigger: trigger
|
|
9835
|
+
},
|
|
9836
|
+
children: menuContentNode
|
|
9586
9837
|
})
|
|
9587
9838
|
})
|
|
9588
9839
|
});
|
|
@@ -9592,17 +9843,7 @@ const DropdownContext = React.createContext({
|
|
|
9592
9843
|
style: style,
|
|
9593
9844
|
onMouseEnter: "hover" === trigger ? handleHoverOpen : void 0,
|
|
9594
9845
|
...props,
|
|
9595
|
-
children: [ jsxRuntime.jsx("div", {
|
|
9596
|
-
ref: toggleRef,
|
|
9597
|
-
className: "c-dropdown__toggle",
|
|
9598
|
-
onClick: handleToggleClick,
|
|
9599
|
-
onKeyDown: handleToggleKeyDown,
|
|
9600
|
-
"aria-haspopup": "menu",
|
|
9601
|
-
"aria-expanded": isOpen,
|
|
9602
|
-
"aria-controls": dropdownId,
|
|
9603
|
-
tabIndex: 0,
|
|
9604
|
-
children: children
|
|
9605
|
-
}), jsxRuntime.jsx("div", {
|
|
9846
|
+
children: [ triggerContent, jsxRuntime.jsx("div", {
|
|
9606
9847
|
ref: menuRef,
|
|
9607
9848
|
id: dropdownId,
|
|
9608
9849
|
className: `c-dropdown__menu-wrapper c-dropdown__menu-wrapper--${placement} ${isOpen ? "is-open" : ""} ${glass ? "is-glass" : ""}`,
|
|
@@ -9630,9 +9871,9 @@ const DropdownContext = React.createContext({
|
|
|
9630
9871
|
}));
|
|
9631
9872
|
|
|
9632
9873
|
/**
|
|
9633
|
-
*
|
|
9634
|
-
*/ Dropdown.displayName = "Dropdown",
|
|
9635
|
-
|
|
9874
|
+
* DropdownDivider component for separating groups of items
|
|
9875
|
+
*/ Dropdown.displayName = "Dropdown", Dropdown.Trigger = DropdownTrigger, Dropdown.Menu = DropdownMenu,
|
|
9876
|
+
Dropdown.Item = DropdownItem, Dropdown.Divider = DropdownDivider, Dropdown.Header = DropdownHeader;
|
|
9636
9877
|
|
|
9637
9878
|
/**
|
|
9638
9879
|
* DataTable - A flexible and accessible data table component with advanced features
|
|
@@ -10721,53 +10962,50 @@ function useEdgePanel(initialProps) {
|
|
|
10721
10962
|
};
|
|
10722
10963
|
}
|
|
10723
10964
|
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
* </EdgePanel>
|
|
10767
|
-
* ```
|
|
10768
|
-
*/ DatePicker.displayName = "DatePicker";
|
|
10965
|
+
// Subcomponents
|
|
10966
|
+
DatePicker.displayName = "DatePicker";
|
|
10967
|
+
|
|
10968
|
+
const EdgePanelHeader = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
10969
|
+
ref: ref,
|
|
10970
|
+
className: `c-edge-panel__header ${className}`.trim(),
|
|
10971
|
+
...props,
|
|
10972
|
+
children: children
|
|
10973
|
+
})));
|
|
10974
|
+
|
|
10975
|
+
EdgePanelHeader.displayName = "EdgePanelHeader";
|
|
10976
|
+
|
|
10977
|
+
const EdgePanelBody = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
10978
|
+
ref: ref,
|
|
10979
|
+
className: `c-edge-panel__body ${className}`.trim(),
|
|
10980
|
+
...props,
|
|
10981
|
+
children: children
|
|
10982
|
+
})));
|
|
10983
|
+
|
|
10984
|
+
EdgePanelBody.displayName = "EdgePanelBody";
|
|
10985
|
+
|
|
10986
|
+
const EdgePanelFooter = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
10987
|
+
ref: ref,
|
|
10988
|
+
className: `c-edge-panel__footer ${className}`.trim(),
|
|
10989
|
+
...props,
|
|
10990
|
+
children: children
|
|
10991
|
+
})));
|
|
10992
|
+
|
|
10993
|
+
EdgePanelFooter.displayName = "EdgePanelFooter";
|
|
10994
|
+
|
|
10995
|
+
const EdgePanelCloseButton = React.forwardRef((({className: className = "", onClick: onClick, ...props}, ref) => jsxRuntime.jsx("button", {
|
|
10996
|
+
ref: ref,
|
|
10997
|
+
className: `c-edge-panel__close c-btn c-btn--icon ${className}`.trim(),
|
|
10998
|
+
onClick: onClick,
|
|
10999
|
+
"aria-label": "Close panel",
|
|
11000
|
+
...props,
|
|
11001
|
+
children: jsxRuntime.jsx(Icon, {
|
|
11002
|
+
name: "X"
|
|
11003
|
+
})
|
|
11004
|
+
})));
|
|
11005
|
+
|
|
11006
|
+
EdgePanelCloseButton.displayName = "EdgePanelCloseButton";
|
|
10769
11007
|
|
|
10770
|
-
const EdgePanel =
|
|
11008
|
+
const EdgePanel = React.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}) => {
|
|
10771
11009
|
const {isOpen: isOpenState, containerRef: containerRef, backdropRef: backdropRef, generateEdgePanelClass: generateEdgePanelClass, closePanel: closePanel, handleBackdropClick: handleBackdropClick} = useEdgePanel({
|
|
10772
11010
|
position: position,
|
|
10773
11011
|
mode: mode,
|
|
@@ -10784,13 +11022,23 @@ const EdgePanel = ({title: title, children: children, position: position = "star
|
|
|
10784
11022
|
});
|
|
10785
11023
|
// Moved useRef outside of conditional rendering to fix hook order issue
|
|
10786
11024
|
// If not open and not controlled by parent, don't render
|
|
11025
|
+
// Note: useEdgePanel manages internal state if onOpenChange is not provided?
|
|
11026
|
+
// Looking at useEdgePanel (implied): it seems to return isOpenState.
|
|
11027
|
+
// If we return null here, animations might be cut off.
|
|
11028
|
+
// Usually EdgePanel/Drawer should stay mounted but hidden or conditionally mounted.
|
|
11029
|
+
// The original code returned null if !isOpenState && isOpen === false.
|
|
11030
|
+
// Let's keep that logic.
|
|
10787
11031
|
if (!isOpenState && !1 === isOpen) return null;
|
|
10788
11032
|
const defaultGlassProps = {
|
|
10789
11033
|
elasticity: 0
|
|
10790
11034
|
}, glassProps = !0 === glass ? defaultGlassProps : {
|
|
10791
11035
|
...defaultGlassProps,
|
|
10792
11036
|
...glass
|
|
10793
|
-
}, panelContent =
|
|
11037
|
+
}, panelContent = React__default.default.Children.toArray(children).some((child => {
|
|
11038
|
+
var _context;
|
|
11039
|
+
|
|
11040
|
+
return React__default.default.isValidElement(child) && _includesInstanceProperty(_context = [ "EdgePanelHeader", "EdgePanelBody", "EdgePanelFooter" ]).call(_context, child.type.displayName);
|
|
11041
|
+
})) ? children : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
10794
11042
|
children: [ jsxRuntime.jsxs("div", {
|
|
10795
11043
|
className: "c-edge-panel__header",
|
|
10796
11044
|
children: [ jsxRuntime.jsx("h4", {
|
|
@@ -10833,7 +11081,7 @@ const EdgePanel = ({title: title, children: children, position: position = "star
|
|
|
10833
11081
|
}) : panelContent
|
|
10834
11082
|
}) ]
|
|
10835
11083
|
});
|
|
10836
|
-
};
|
|
11084
|
+
}));
|
|
10837
11085
|
|
|
10838
11086
|
/**
|
|
10839
11087
|
* Form state and functionality
|
|
@@ -10867,7 +11115,8 @@ function useForm(initialProps) {
|
|
|
10867
11115
|
|
|
10868
11116
|
/**
|
|
10869
11117
|
* Form - A component for creating form layouts
|
|
10870
|
-
*/ EdgePanel.displayName = "EdgePanel"
|
|
11118
|
+
*/ EdgePanel.displayName = "EdgePanel", EdgePanel.Header = EdgePanelHeader, EdgePanel.Body = EdgePanelBody,
|
|
11119
|
+
EdgePanel.Footer = EdgePanelFooter, EdgePanel.CloseButton = EdgePanelCloseButton;
|
|
10871
11120
|
|
|
10872
11121
|
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"}) => {
|
|
10873
11122
|
const {generateFormClass: generateFormClass, handleSubmit: handleSubmit, handleReset: handleReset} = useForm({
|
|
@@ -12438,8 +12687,6 @@ function useSlider(options) {
|
|
|
12438
12687
|
};
|
|
12439
12688
|
}
|
|
12440
12689
|
|
|
12441
|
-
// Button composables
|
|
12442
|
-
// export * from './useButton';
|
|
12443
12690
|
// Accordion composables
|
|
12444
12691
|
var composablesImport = Object.freeze({
|
|
12445
12692
|
__proto__: null,
|
|
@@ -12480,9 +12727,57 @@ var composablesImport = Object.freeze({
|
|
|
12480
12727
|
useTodo: useTodo
|
|
12481
12728
|
});
|
|
12482
12729
|
|
|
12730
|
+
const SelectContext = React.createContext(null), SelectOption = React.memo((({value: value, children: children, disabled: disabled = !1, className: className = "", style: style}) => {
|
|
12731
|
+
const context = React.useContext(SelectContext), label = "string" == typeof children ? children : value;
|
|
12732
|
+
// We assume children is the label if it's a string, or we need a way to get label.
|
|
12733
|
+
// For simplicity, we use children as label for registration if it's a string.
|
|
12734
|
+
if (React.useEffect((() => {
|
|
12735
|
+
if (context) return context.registerOption({
|
|
12736
|
+
value: value,
|
|
12737
|
+
label: label,
|
|
12738
|
+
disabled: disabled
|
|
12739
|
+
}), () => {
|
|
12740
|
+
context.unregisterOption(value);
|
|
12741
|
+
};
|
|
12742
|
+
}), [ context, value, label, disabled ]), !context) return console.warn("SelectOption must be used within a Select component"),
|
|
12743
|
+
null;
|
|
12744
|
+
const {selectedValue: selectedValue, onSelect: onSelect} = context, isSelected = Array.isArray(selectedValue) ? _includesInstanceProperty(selectedValue).call(selectedValue, value) : selectedValue === value;
|
|
12745
|
+
return jsxRuntime.jsx("li", {
|
|
12746
|
+
className: `${SELECT.CLASSES.SELECT_ITEM} ${className}`.trim(),
|
|
12747
|
+
"data-value": value,
|
|
12748
|
+
onClick: e => {
|
|
12749
|
+
e.preventDefault(), e.stopPropagation(), disabled || onSelect(value, label);
|
|
12750
|
+
},
|
|
12751
|
+
style: style,
|
|
12752
|
+
role: "option",
|
|
12753
|
+
"aria-selected": isSelected,
|
|
12754
|
+
"aria-disabled": disabled,
|
|
12755
|
+
children: jsxRuntime.jsxs("label", {
|
|
12756
|
+
className: "c-checkbox",
|
|
12757
|
+
style: {
|
|
12758
|
+
pointerEvents: "none"
|
|
12759
|
+
},
|
|
12760
|
+
children: [ jsxRuntime.jsx("input", {
|
|
12761
|
+
type: "checkbox",
|
|
12762
|
+
className: "c-checkbox__input c-select__item-input",
|
|
12763
|
+
checked: isSelected,
|
|
12764
|
+
readOnly: !0,
|
|
12765
|
+
disabled: disabled,
|
|
12766
|
+
tabIndex: -1
|
|
12767
|
+
}), jsxRuntime.jsx("div", {
|
|
12768
|
+
className: "c-select__item-label",
|
|
12769
|
+
children: children
|
|
12770
|
+
}) ]
|
|
12771
|
+
})
|
|
12772
|
+
});
|
|
12773
|
+
}));
|
|
12774
|
+
|
|
12775
|
+
SelectOption.displayName = "SelectOption";
|
|
12776
|
+
|
|
12483
12777
|
/**
|
|
12484
12778
|
* Select - A component for dropdown selection
|
|
12485
|
-
*/
|
|
12779
|
+
*/
|
|
12780
|
+
const Select = React.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}) => {
|
|
12486
12781
|
const {generateSelectClass: generateSelectClass} = useSelect({
|
|
12487
12782
|
size: size,
|
|
12488
12783
|
disabled: disabled,
|
|
@@ -12494,14 +12789,18 @@ var composablesImport = Object.freeze({
|
|
|
12494
12789
|
disabled: disabled,
|
|
12495
12790
|
invalid: invalid,
|
|
12496
12791
|
valid: valid
|
|
12497
|
-
}), [isOpen, setIsOpen] = React.useState(!1), [selectedLabel, setSelectedLabel] = React.useState(placeholder), dropdownRef = React.useRef(null), panelRef = React.useRef(null), bodyRef = React.useRef(null), nativeSelectRef = React.useRef(null)
|
|
12792
|
+
}), [isOpen, setIsOpen] = React.useState(!1), [selectedLabel, setSelectedLabel] = React.useState(placeholder), dropdownRef = React.useRef(null), panelRef = React.useRef(null), bodyRef = React.useRef(null), nativeSelectRef = React.useRef(null), [registeredOptions, setRegisteredOptions] = React.useState([]), registerOption = React.useCallback((option => {
|
|
12793
|
+
setRegisteredOptions((prev => prev.some((o => o.value === option.value)) ? prev : [ ...prev, option ]));
|
|
12794
|
+
}), []), unregisterOption = React.useCallback((value => {
|
|
12795
|
+
setRegisteredOptions((prev => prev.filter((o => o.value !== value))));
|
|
12796
|
+
}), []), hasOptionsProp = options && options.length > 0, activeOptions = hasOptionsProp ? options : registeredOptions;
|
|
12498
12797
|
// Update selected label when value changes
|
|
12499
12798
|
React.useEffect((() => {
|
|
12500
12799
|
if (value) {
|
|
12501
|
-
const selectedOption =
|
|
12800
|
+
const selectedOption = activeOptions.find((opt => opt.value === value));
|
|
12502
12801
|
selectedOption && setSelectedLabel(selectedOption.label);
|
|
12503
12802
|
} else setSelectedLabel(placeholder);
|
|
12504
|
-
}), [ value,
|
|
12803
|
+
}), [ value, activeOptions, placeholder ]),
|
|
12505
12804
|
// Handle click outside to close dropdown
|
|
12506
12805
|
React.useEffect((() => {
|
|
12507
12806
|
const handleClickOutside = event => {
|
|
@@ -12513,93 +12812,106 @@ var composablesImport = Object.freeze({
|
|
|
12513
12812
|
};
|
|
12514
12813
|
}), []);
|
|
12515
12814
|
// Toggle dropdown
|
|
12516
|
-
const
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12815
|
+
const handleItemClick = React.useCallback((option => {
|
|
12816
|
+
if (setSelectedLabel(option.label), setIsOpen(!1), bodyRef.current && (bodyRef.current.style.height = "0px"),
|
|
12817
|
+
nativeSelectRef.current && (nativeSelectRef.current.value = option.value), onChange) {
|
|
12818
|
+
// Create a synthetic event
|
|
12819
|
+
const event = {
|
|
12820
|
+
target: {
|
|
12821
|
+
name: name,
|
|
12822
|
+
value: option.value
|
|
12823
|
+
}
|
|
12824
|
+
};
|
|
12825
|
+
onChange(event);
|
|
12826
|
+
}
|
|
12827
|
+
}), [ onChange, name ]), onSelect = React.useCallback(((val, label) => {
|
|
12828
|
+
handleItemClick({
|
|
12829
|
+
value: val,
|
|
12830
|
+
label: label
|
|
12831
|
+
});
|
|
12832
|
+
}), [ handleItemClick ]), contextValue = React__default.default.useMemo((() => ({
|
|
12833
|
+
registerOption: registerOption,
|
|
12834
|
+
unregisterOption: unregisterOption,
|
|
12835
|
+
selectedValue: value,
|
|
12836
|
+
onSelect: onSelect
|
|
12837
|
+
})), [ registerOption, unregisterOption, value, onSelect ]), selectContent = jsxRuntime.jsx(SelectContext.Provider, {
|
|
12838
|
+
value: contextValue,
|
|
12839
|
+
children: jsxRuntime.jsxs("div", {
|
|
12840
|
+
className: `${selectClass} ${isOpen ? SELECT.CLASSES.IS_OPEN : ""}`,
|
|
12841
|
+
ref: dropdownRef,
|
|
12842
|
+
style: style,
|
|
12843
|
+
"aria-expanded": isOpen,
|
|
12844
|
+
children: [ jsxRuntime.jsxs("select", {
|
|
12845
|
+
ref: nativeSelectRef,
|
|
12846
|
+
value: value,
|
|
12847
|
+
onChange: onChange,
|
|
12848
|
+
onBlur: onBlur,
|
|
12849
|
+
onFocus: onFocus,
|
|
12850
|
+
disabled: disabled,
|
|
12851
|
+
required: required,
|
|
12852
|
+
id: id,
|
|
12853
|
+
name: name,
|
|
12854
|
+
multiple: multiple,
|
|
12855
|
+
"aria-label": ariaLabel,
|
|
12856
|
+
"aria-describedby": ariaDescribedBy,
|
|
12857
|
+
"aria-invalid": invalid,
|
|
12858
|
+
style: {
|
|
12859
|
+
display: "none"
|
|
12860
|
+
},
|
|
12861
|
+
children: [ placeholder && jsxRuntime.jsx("option", {
|
|
12862
|
+
value: "",
|
|
12863
|
+
disabled: !0,
|
|
12864
|
+
children: placeholder
|
|
12865
|
+
}), activeOptions.map((option => jsxRuntime.jsx("option", {
|
|
12866
|
+
value: option.value,
|
|
12867
|
+
disabled: option.disabled,
|
|
12868
|
+
children: option.label
|
|
12869
|
+
}, option.value))) ]
|
|
12870
|
+
}), jsxRuntime.jsx("div", {
|
|
12871
|
+
className: SELECT.CLASSES.SELECTED,
|
|
12872
|
+
onClick: () => {
|
|
12873
|
+
disabled || (!isOpen && bodyRef.current && panelRef.current ? bodyRef.current.style.height = `${panelRef.current.clientHeight}px` : bodyRef.current && (bodyRef.current.style.height = "0px"),
|
|
12874
|
+
setIsOpen(!isOpen));
|
|
12875
|
+
},
|
|
12876
|
+
"aria-disabled": disabled,
|
|
12877
|
+
children: selectedLabel
|
|
12878
|
+
}), jsxRuntime.jsx("i", {
|
|
12879
|
+
className: `${SELECT.CLASSES.ICON_CARET} ${SELECT.CLASSES.TOGGLE_ICON}`
|
|
12880
|
+
}), jsxRuntime.jsx("div", {
|
|
12881
|
+
className: SELECT.CLASSES.SELECT_BODY,
|
|
12882
|
+
ref: bodyRef,
|
|
12883
|
+
style: {
|
|
12884
|
+
height: 0
|
|
12885
|
+
},
|
|
12886
|
+
children: jsxRuntime.jsx("div", {
|
|
12887
|
+
className: SELECT.CLASSES.SELECT_PANEL,
|
|
12888
|
+
ref: panelRef,
|
|
12889
|
+
children: jsxRuntime.jsx("ul", {
|
|
12890
|
+
className: SELECT.CLASSES.SELECT_ITEMS,
|
|
12891
|
+
children: hasOptionsProp ? options.map(((option, index) => jsxRuntime.jsx("li", {
|
|
12892
|
+
className: SELECT.CLASSES.SELECT_ITEM,
|
|
12893
|
+
"data-value": option.value,
|
|
12894
|
+
onClick: () => !option.disabled && handleItemClick(option),
|
|
12895
|
+
children: jsxRuntime.jsxs("label", {
|
|
12896
|
+
htmlFor: `SelectItem${index}`,
|
|
12897
|
+
className: "c-checkbox",
|
|
12898
|
+
children: [ jsxRuntime.jsx("input", {
|
|
12899
|
+
type: "checkbox",
|
|
12900
|
+
id: `SelectItem${index}`,
|
|
12901
|
+
className: "c-checkbox__input c-select__item-input",
|
|
12902
|
+
checked: value === option.value,
|
|
12903
|
+
readOnly: !0,
|
|
12904
|
+
disabled: option.disabled
|
|
12905
|
+
}), jsxRuntime.jsx("div", {
|
|
12906
|
+
className: "c-select__item-label",
|
|
12907
|
+
children: option.label
|
|
12908
|
+
}) ]
|
|
12909
|
+
})
|
|
12910
|
+
}, option.value))) : children
|
|
12911
|
+
})
|
|
12600
12912
|
})
|
|
12601
|
-
})
|
|
12602
|
-
})
|
|
12913
|
+
}) ]
|
|
12914
|
+
})
|
|
12603
12915
|
});
|
|
12604
12916
|
// Handle item selection
|
|
12605
12917
|
if (glass) {
|
|
@@ -12623,7 +12935,7 @@ var composablesImport = Object.freeze({
|
|
|
12623
12935
|
return selectContent;
|
|
12624
12936
|
}));
|
|
12625
12937
|
|
|
12626
|
-
Select.displayName = "Select";
|
|
12938
|
+
Select.displayName = "Select", Select.Option = SelectOption;
|
|
12627
12939
|
|
|
12628
12940
|
/**
|
|
12629
12941
|
* Radio - A component for radio button inputs
|
|
@@ -13501,7 +13813,7 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13501
13813
|
autoplay: !0,
|
|
13502
13814
|
loop: !0,
|
|
13503
13815
|
muted: !0
|
|
13504
|
-
}, backgroundSlider: backgroundSlider, headingLevel: headingLevel = "h1", reverseOnMobile: reverseOnMobile = !1, parts: parts, ...rest}) => {
|
|
13816
|
+
}, backgroundSlider: backgroundSlider, headingLevel: headingLevel = "h1", reverseOnMobile: reverseOnMobile = !1, parts: parts, backgroundElement: backgroundElement, ...rest}) => {
|
|
13505
13817
|
// Define dynamic heading tag
|
|
13506
13818
|
const HeadingTag = headingLevel, {generateHeroClassNames: generateHeroClassNames, generateImageColClass: generateImageColClass, generateContentColClass: generateContentColClass, hasBackgroundImage: hasBackgroundImage, hasForegroundImage: hasForegroundImage, useGridLayout: useGridLayout, heroRef: heroRef, videoRef: videoRef, backgroundSlider: sliderHook, hasBackgroundSlider: hasBackgroundSlider} = useHero({
|
|
13507
13819
|
title: title,
|
|
@@ -13660,7 +13972,7 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13660
13972
|
"data-parallax": parallax ? "true" : void 0,
|
|
13661
13973
|
"data-parallax-intensity": parallax ? parallaxIntensity : void 0,
|
|
13662
13974
|
...rest,
|
|
13663
|
-
children: [ (() => {
|
|
13975
|
+
children: [ backgroundElement, (() => {
|
|
13664
13976
|
// Render background slider if configured
|
|
13665
13977
|
if (hasBackgroundSlider && backgroundSlider && sliderHook) {
|
|
13666
13978
|
const {slides: slides, transition: transition = "fade", transitionDuration: transitionDuration = 1e3} = backgroundSlider, {currentIndex: currentIndex, slideRefs: slideRefs, videoRefs: videoRefs} = sliderHook;
|
|
@@ -13755,7 +14067,84 @@ const Hero = ({title: title, subtitle: subtitle, text: text, imageSrc: imageSrc,
|
|
|
13755
14067
|
});
|
|
13756
14068
|
};
|
|
13757
14069
|
|
|
13758
|
-
Hero.
|
|
14070
|
+
Hero.Title = ({children: children, className: className, level: level = "h1", ...props}) => {
|
|
14071
|
+
const Tag = level;
|
|
14072
|
+
return jsxRuntime.jsx(Tag, {
|
|
14073
|
+
className: `${HERO.SELECTORS.TITLE.replace(".", "")} ${className || ""}`.trim(),
|
|
14074
|
+
...props,
|
|
14075
|
+
children: children
|
|
14076
|
+
});
|
|
14077
|
+
}, Hero.Subtitle = ({children: children, className: className, ...props}) => jsxRuntime.jsx("p", {
|
|
14078
|
+
className: `${HERO.SELECTORS.SUBTITLE.replace(".", "")} ${className || ""}`.trim(),
|
|
14079
|
+
...props,
|
|
14080
|
+
children: children
|
|
14081
|
+
}), Hero.Text = ({children: children, className: className, ...props}) => jsxRuntime.jsx("p", {
|
|
14082
|
+
className: `${HERO.SELECTORS.TEXT.replace(".", "")} ${className || ""}`.trim(),
|
|
14083
|
+
...props,
|
|
14084
|
+
children: children
|
|
14085
|
+
}), Hero.Actions = ({children: children, className: className, ...props}) => jsxRuntime.jsx("div", {
|
|
14086
|
+
className: `${HERO.SELECTORS.ACTIONS.replace(".", "")} ${className || ""}`.trim(),
|
|
14087
|
+
...props,
|
|
14088
|
+
children: children
|
|
14089
|
+
}), Hero.Content = ({children: children, className: className, style: style, glass: glass, ...props}) => {
|
|
14090
|
+
const contentClass = `${HERO.SELECTORS.CONTENT.replace(".", "")} ${className || ""}`.trim();
|
|
14091
|
+
if (glass) {
|
|
14092
|
+
const glassProps = "boolean" == typeof glass ? {
|
|
14093
|
+
displacementScale: 60,
|
|
14094
|
+
blurAmount: 3,
|
|
14095
|
+
saturation: 180,
|
|
14096
|
+
aberrationIntensity: 0,
|
|
14097
|
+
cornerRadius: 8,
|
|
14098
|
+
overLight: !1,
|
|
14099
|
+
mode: "standard"
|
|
14100
|
+
} : glass;
|
|
14101
|
+
return jsxRuntime.jsx("div", {
|
|
14102
|
+
className: contentClass,
|
|
14103
|
+
style: style,
|
|
14104
|
+
...props,
|
|
14105
|
+
children: jsxRuntime.jsx(AtomixGlass, {
|
|
14106
|
+
...glassProps,
|
|
14107
|
+
children: jsxRuntime.jsx("div", {
|
|
14108
|
+
className: "u-p-4",
|
|
14109
|
+
children: children
|
|
14110
|
+
})
|
|
14111
|
+
})
|
|
14112
|
+
});
|
|
14113
|
+
}
|
|
14114
|
+
return jsxRuntime.jsx("div", {
|
|
14115
|
+
className: contentClass,
|
|
14116
|
+
style: style,
|
|
14117
|
+
...props,
|
|
14118
|
+
children: children
|
|
14119
|
+
});
|
|
14120
|
+
}, Hero.Image = ({src: src, alt: alt = "", className: className, wrapperClassName: wrapperClassName, wrapperStyle: wrapperStyle, ...props}) => jsxRuntime.jsx("div", {
|
|
14121
|
+
className: `${HERO.SELECTORS.IMAGE_WRAPPER.replace(".", "")} ${wrapperClassName || ""}`.trim(),
|
|
14122
|
+
style: wrapperStyle,
|
|
14123
|
+
children: jsxRuntime.jsx("img", {
|
|
14124
|
+
src: src,
|
|
14125
|
+
alt: alt,
|
|
14126
|
+
className: `${HERO.SELECTORS.IMAGE.replace(".", "")} ${className || ""}`.trim(),
|
|
14127
|
+
...props
|
|
14128
|
+
})
|
|
14129
|
+
}), Hero.Background = ({className: className, style: style, src: src, children: children, ...props}) => jsxRuntime.jsxs("div", {
|
|
14130
|
+
className: `${HERO.SELECTORS.BG.replace(".", "")} ${className || ""}`.trim(),
|
|
14131
|
+
style: style,
|
|
14132
|
+
...props,
|
|
14133
|
+
children: [ src && jsxRuntime.jsx("img", {
|
|
14134
|
+
src: src,
|
|
14135
|
+
alt: "Background",
|
|
14136
|
+
className: HERO.SELECTORS.BG_IMAGE.replace(".", "")
|
|
14137
|
+
}), children ]
|
|
14138
|
+
}), Hero.displayName = "Hero";
|
|
14139
|
+
|
|
14140
|
+
const ListItem = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("li", {
|
|
14141
|
+
ref: ref,
|
|
14142
|
+
className: `${LIST.ITEM_CLASS} ${className}`.trim(),
|
|
14143
|
+
...props,
|
|
14144
|
+
children: children
|
|
14145
|
+
})));
|
|
14146
|
+
|
|
14147
|
+
ListItem.displayName = "ListItem";
|
|
13759
14148
|
|
|
13760
14149
|
const List = React.memo((({children: children, variant: variant = "default", className: className = "", style: style, ...props}) => {
|
|
13761
14150
|
var _context;
|
|
@@ -13766,14 +14155,14 @@ const List = React.memo((({children: children, variant: variant = "default", cl
|
|
|
13766
14155
|
className: listClasses,
|
|
13767
14156
|
style: style,
|
|
13768
14157
|
...props,
|
|
13769
|
-
children: React__default.default.Children.map(children, (child => jsxRuntime.jsx("li", {
|
|
14158
|
+
children: React__default.default.Children.map(children, (child => React__default.default.isValidElement(child) && child.type === ListItem ? child : jsxRuntime.jsx("li", {
|
|
13770
14159
|
className: "c-list__item",
|
|
13771
14160
|
children: child
|
|
13772
14161
|
})))
|
|
13773
14162
|
});
|
|
13774
14163
|
}));
|
|
13775
14164
|
|
|
13776
|
-
List.displayName = "List";
|
|
14165
|
+
List.displayName = "List", List.Item = ListItem;
|
|
13777
14166
|
|
|
13778
14167
|
const ListGroup = ({children: children, className: className = "", style: style, variant: variant = "default"}) => {
|
|
13779
14168
|
// Generate CSS classes
|
|
@@ -13990,10 +14379,59 @@ const Messages = ({messages: messages = [], otherAvatar: otherAvatar, selfAvatar
|
|
|
13990
14379
|
* Messages component for displaying a chat interface with messages, images, and file attachments
|
|
13991
14380
|
*/ Messages.displayName = "Messages";
|
|
13992
14381
|
|
|
13993
|
-
|
|
13994
|
-
|
|
13995
|
-
|
|
13996
|
-
|
|
14382
|
+
const ModalHeader = React.forwardRef((({title: title, subtitle: subtitle, closeButton: closeButton, onClose: onClose, children: children, className: className = "", ...props}, ref) => jsxRuntime.jsxs("div", {
|
|
14383
|
+
ref: ref,
|
|
14384
|
+
className: `c-modal__header ${className}`.trim(),
|
|
14385
|
+
...props,
|
|
14386
|
+
children: [ jsxRuntime.jsxs("div", {
|
|
14387
|
+
className: "c-modal__header-content",
|
|
14388
|
+
children: [ title && jsxRuntime.jsx("h3", {
|
|
14389
|
+
className: "c-modal__title",
|
|
14390
|
+
children: title
|
|
14391
|
+
}), subtitle && jsxRuntime.jsx("p", {
|
|
14392
|
+
className: "c-modal__sub",
|
|
14393
|
+
children: subtitle
|
|
14394
|
+
}), children ]
|
|
14395
|
+
}), closeButton && jsxRuntime.jsx("button", {
|
|
14396
|
+
type: "button",
|
|
14397
|
+
className: "c-modal__close c-btn js-modal-close",
|
|
14398
|
+
onClick: onClose,
|
|
14399
|
+
"aria-label": "Close modal",
|
|
14400
|
+
children: jsxRuntime.jsx("svg", {
|
|
14401
|
+
width: "20",
|
|
14402
|
+
height: "20",
|
|
14403
|
+
viewBox: "0 0 20 20",
|
|
14404
|
+
fill: "none",
|
|
14405
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14406
|
+
children: jsxRuntime.jsx("path", {
|
|
14407
|
+
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",
|
|
14408
|
+
fill: "#141414"
|
|
14409
|
+
})
|
|
14410
|
+
})
|
|
14411
|
+
}) ]
|
|
14412
|
+
})));
|
|
14413
|
+
|
|
14414
|
+
ModalHeader.displayName = "ModalHeader";
|
|
14415
|
+
|
|
14416
|
+
const ModalBody = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
14417
|
+
ref: ref,
|
|
14418
|
+
className: `c-modal__body ${className}`.trim(),
|
|
14419
|
+
...props,
|
|
14420
|
+
children: children
|
|
14421
|
+
})));
|
|
14422
|
+
|
|
14423
|
+
ModalBody.displayName = "ModalBody";
|
|
14424
|
+
|
|
14425
|
+
const ModalFooter = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
14426
|
+
ref: ref,
|
|
14427
|
+
className: `c-modal__footer ${className}`.trim(),
|
|
14428
|
+
...props,
|
|
14429
|
+
children: children
|
|
14430
|
+
})));
|
|
14431
|
+
|
|
14432
|
+
ModalFooter.displayName = "ModalFooter";
|
|
14433
|
+
|
|
14434
|
+
const ModalImpl = React.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}) => {
|
|
13997
14435
|
const modalRef = React.useRef(null), dialogRef = React.useRef(null), backdropRef = React.useRef(null), {isOpen: isOpenState, open: open, close: close} =
|
|
13998
14436
|
/**
|
|
13999
14437
|
* Hook for managing modal state
|
|
@@ -14043,43 +14481,26 @@ const Modal = React.memo((({children: children, isOpen: isOpen = !1, onOpenChan
|
|
|
14043
14481
|
};
|
|
14044
14482
|
}), [ isOpenState, close, keyboard ]);
|
|
14045
14483
|
// Handle backdrop click
|
|
14046
|
-
const modalClasses = [ "c-modal", isOpenState ? MODAL.CLASSES.IS_OPEN : "", size ? `c-modal--${size}` : "", glass ? "c-modal--glass" : "", className ].filter(Boolean).join(" "),
|
|
14484
|
+
const modalClasses = [ "c-modal", isOpenState ? MODAL.CLASSES.IS_OPEN : "", size ? `c-modal--${size}` : "", glass ? "c-modal--glass" : "", className ].filter(Boolean).join(" "), hasCompoundComponents = React__default.default.Children.toArray(children).some((child => {
|
|
14485
|
+
var _context;
|
|
14486
|
+
|
|
14487
|
+
return React__default.default.isValidElement(child) && _includesInstanceProperty(_context = [ "ModalHeader", "ModalBody", "ModalFooter" ]).call(_context, child.type.displayName);
|
|
14488
|
+
})), modalContent = jsxRuntime.jsx("div", {
|
|
14047
14489
|
className: "c-modal__content",
|
|
14048
|
-
children:
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
type: "button",
|
|
14061
|
-
className: "c-modal__close c-btn js-modal-close",
|
|
14062
|
-
onClick: close,
|
|
14063
|
-
"aria-label": "Close modal",
|
|
14064
|
-
children: jsxRuntime.jsx("svg", {
|
|
14065
|
-
width: "20",
|
|
14066
|
-
height: "20",
|
|
14067
|
-
viewBox: "0 0 20 20",
|
|
14068
|
-
fill: "none",
|
|
14069
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14070
|
-
children: jsxRuntime.jsx("path", {
|
|
14071
|
-
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",
|
|
14072
|
-
fill: "#141414"
|
|
14073
|
-
})
|
|
14074
|
-
})
|
|
14490
|
+
children: hasCompoundComponents ? React__default.default.Children.map(children, (child => React__default.default.isValidElement(child) && "ModalHeader" === child.type.displayName ? React__default.default.cloneElement(child, {
|
|
14491
|
+
onClose: child.props.onClose || close
|
|
14492
|
+
}) : child)) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14493
|
+
children: [ (title || closeButton) && jsxRuntime.jsx(ModalHeader, {
|
|
14494
|
+
title: title,
|
|
14495
|
+
subtitle: subtitle,
|
|
14496
|
+
closeButton: closeButton,
|
|
14497
|
+
onClose: close
|
|
14498
|
+
}), jsxRuntime.jsx(ModalBody, {
|
|
14499
|
+
children: children
|
|
14500
|
+
}), footer && jsxRuntime.jsx(ModalFooter, {
|
|
14501
|
+
children: footer
|
|
14075
14502
|
}) ]
|
|
14076
|
-
})
|
|
14077
|
-
className: "c-modal__body",
|
|
14078
|
-
children: children
|
|
14079
|
-
}), footer && jsxRuntime.jsx("div", {
|
|
14080
|
-
className: "c-modal__footer",
|
|
14081
|
-
children: footer
|
|
14082
|
-
}) ]
|
|
14503
|
+
})
|
|
14083
14504
|
});
|
|
14084
14505
|
// Assemble classes
|
|
14085
14506
|
return jsxRuntime.jsxs("div", {
|
|
@@ -14124,24 +14545,15 @@ const Modal = React.memo((({children: children, isOpen: isOpen = !1, onOpenChan
|
|
|
14124
14545
|
});
|
|
14125
14546
|
}));
|
|
14126
14547
|
|
|
14127
|
-
|
|
14548
|
+
ModalImpl.displayName = "Modal";
|
|
14128
14549
|
|
|
14129
|
-
|
|
14130
|
-
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
* <NavItem href="/about">About</NavItem>
|
|
14137
|
-
* <NavDropdown title="Services">
|
|
14138
|
-
* <MenuItem href="/web">Web Design</MenuItem>
|
|
14139
|
-
* <MenuItem href="/mobile">Mobile Apps</MenuItem>
|
|
14140
|
-
* </NavDropdown>
|
|
14141
|
-
* </Nav>
|
|
14142
|
-
* ```
|
|
14143
|
-
*/
|
|
14144
|
-
const Nav = React.forwardRef((({children: children, alignment: alignment = "start", variant: variant = "default", className: className = "", disabled: disabled = !1, glass: glass}, ref) => {
|
|
14550
|
+
// Attach subcomponents
|
|
14551
|
+
const ModalWithSubcomponents = ModalImpl;
|
|
14552
|
+
|
|
14553
|
+
ModalWithSubcomponents.Header = ModalHeader, ModalWithSubcomponents.Body = ModalBody,
|
|
14554
|
+
ModalWithSubcomponents.Footer = ModalFooter;
|
|
14555
|
+
|
|
14556
|
+
const Modal = ModalWithSubcomponents, Nav = React.forwardRef((({children: children, alignment: alignment = "start", variant: variant = "default", className: className = "", disabled: disabled = !1, glass: glass}, ref) => {
|
|
14145
14557
|
const {generateNavClass: generateNavClass} = useNav({
|
|
14146
14558
|
alignment: alignment,
|
|
14147
14559
|
variant: variant
|
|
@@ -14184,7 +14596,21 @@ const Nav = React.forwardRef((({children: children, alignment: alignment = "sta
|
|
|
14184
14596
|
return navContent;
|
|
14185
14597
|
}));
|
|
14186
14598
|
|
|
14187
|
-
|
|
14599
|
+
/**
|
|
14600
|
+
* Nav component provides a container for navigation items with proper alignment and accessibility.
|
|
14601
|
+
*
|
|
14602
|
+
* @example
|
|
14603
|
+
* ```tsx
|
|
14604
|
+
* <Nav alignment="center">
|
|
14605
|
+
* <NavItem href="/">Home</NavItem>
|
|
14606
|
+
* <NavItem href="/about">About</NavItem>
|
|
14607
|
+
* <NavDropdown title="Services">
|
|
14608
|
+
* <MenuItem href="/web">Web Design</MenuItem>
|
|
14609
|
+
* <MenuItem href="/mobile">Mobile Apps</MenuItem>
|
|
14610
|
+
* </NavDropdown>
|
|
14611
|
+
* </Nav>
|
|
14612
|
+
* ```
|
|
14613
|
+
*/ Nav.displayName = "Nav";
|
|
14188
14614
|
|
|
14189
14615
|
/**
|
|
14190
14616
|
* NavItem component represents a single navigation item that can be a link, dropdown trigger, or mega menu trigger.
|
|
@@ -17072,39 +17498,72 @@ const Slider = React.forwardRef(((props, ref) => {
|
|
|
17072
17498
|
|
|
17073
17499
|
Slider.displayName = "Slider";
|
|
17074
17500
|
|
|
17501
|
+
const StepsItem = React.forwardRef((({children: children, className: className = "", number: number, title: title, active: active, completed: completed, index: index, ...props}, ref) => {
|
|
17502
|
+
const itemClasses = [ "c-steps__item", active ? STEPS.CLASSES.ACTIVE : "", completed ? STEPS.CLASSES.COMPLETED : "", className ].filter(Boolean).join(" ");
|
|
17503
|
+
return jsxRuntime.jsxs("div", {
|
|
17504
|
+
ref: ref,
|
|
17505
|
+
className: itemClasses,
|
|
17506
|
+
"aria-current": active ? "step" : void 0,
|
|
17507
|
+
"data-index": index,
|
|
17508
|
+
...props,
|
|
17509
|
+
children: [ jsxRuntime.jsx("div", {
|
|
17510
|
+
className: "c-steps__line"
|
|
17511
|
+
}), jsxRuntime.jsxs("div", {
|
|
17512
|
+
className: "c-steps__content",
|
|
17513
|
+
children: [ null != number && jsxRuntime.jsx("div", {
|
|
17514
|
+
className: "c-steps__number",
|
|
17515
|
+
children: number
|
|
17516
|
+
}), title && jsxRuntime.jsx("div", {
|
|
17517
|
+
className: "c-steps__text",
|
|
17518
|
+
children: title
|
|
17519
|
+
}), children && jsxRuntime.jsx("div", {
|
|
17520
|
+
className: "c-steps__custom-content",
|
|
17521
|
+
children: children
|
|
17522
|
+
}) ]
|
|
17523
|
+
}) ]
|
|
17524
|
+
});
|
|
17525
|
+
}));
|
|
17526
|
+
|
|
17527
|
+
StepsItem.displayName = "StepsItem";
|
|
17528
|
+
|
|
17075
17529
|
/**
|
|
17076
17530
|
* Steps component for displaying a sequence of steps
|
|
17077
17531
|
*/
|
|
17078
|
-
const Steps = ({items: items, activeIndex: activeIndex = 0, vertical: vertical = !1, onStepChange: onStepChange, className: className = "", style: style, glass: glass}) => {
|
|
17532
|
+
const Steps = ({items: items, activeIndex: activeIndex = 0, vertical: vertical = !1, onStepChange: onStepChange, className: className = "", style: style, glass: glass, children: children}) => {
|
|
17079
17533
|
const [currentStep, setCurrentStep] = React.useState(activeIndex);
|
|
17080
17534
|
// Update steps when activeIndex prop changes
|
|
17081
|
-
|
|
17535
|
+
let content;
|
|
17536
|
+
React.useEffect((() => {
|
|
17082
17537
|
currentStep !== activeIndex && setCurrentStep(activeIndex);
|
|
17083
|
-
}), [ activeIndex ])
|
|
17538
|
+
}), [ activeIndex ]),
|
|
17539
|
+
// Legacy rendering
|
|
17540
|
+
content = items && items.length > 0 ? items.map(((item, index) => jsxRuntime.jsx(StepsItem, {
|
|
17541
|
+
index: index,
|
|
17542
|
+
number: item.number,
|
|
17543
|
+
title: item.text,
|
|
17544
|
+
active: index <= currentStep,
|
|
17545
|
+
completed: index < currentStep,
|
|
17546
|
+
children: item.content
|
|
17547
|
+
}, `step-${index}`))) : React.Children.map(children, ((child, index) => {
|
|
17548
|
+
if ( React.isValidElement(child)) {
|
|
17549
|
+
const childProps = child.props, isActive = childProps.active ?? index <= currentStep, isCompleted = childProps.completed ?? index < currentStep, number = childProps.number ?? index + 1;
|
|
17550
|
+
// Inject active/completed based on index if not explicitly provided
|
|
17551
|
+
|
|
17552
|
+
return React.cloneElement(child, {
|
|
17553
|
+
index: index,
|
|
17554
|
+
active: isActive,
|
|
17555
|
+
completed: isCompleted,
|
|
17556
|
+
number: number
|
|
17557
|
+
});
|
|
17558
|
+
}
|
|
17559
|
+
return child;
|
|
17560
|
+
}));
|
|
17084
17561
|
const stepsContent = jsxRuntime.jsx("div", {
|
|
17085
17562
|
className: `c-steps ${vertical ? STEPS.CLASSES.VERTICAL : ""} ${className}`,
|
|
17086
17563
|
style: style,
|
|
17087
17564
|
role: "navigation",
|
|
17088
17565
|
"aria-label": "Steps",
|
|
17089
|
-
children:
|
|
17090
|
-
className: `c-steps__item ${index <= currentStep ? STEPS.CLASSES.ACTIVE : ""} ${index < currentStep ? STEPS.CLASSES.COMPLETED : ""}`,
|
|
17091
|
-
"aria-current": index === currentStep ? "step" : void 0,
|
|
17092
|
-
children: [ jsxRuntime.jsx("div", {
|
|
17093
|
-
className: "c-steps__line"
|
|
17094
|
-
}), jsxRuntime.jsxs("div", {
|
|
17095
|
-
className: "c-steps__content",
|
|
17096
|
-
children: [ jsxRuntime.jsx("div", {
|
|
17097
|
-
className: "c-steps__number",
|
|
17098
|
-
children: item.number
|
|
17099
|
-
}), jsxRuntime.jsx("div", {
|
|
17100
|
-
className: "c-steps__text",
|
|
17101
|
-
children: item.text
|
|
17102
|
-
}), item.content && jsxRuntime.jsx("div", {
|
|
17103
|
-
className: "c-steps__custom-content",
|
|
17104
|
-
children: item.content
|
|
17105
|
-
}) ]
|
|
17106
|
-
}) ]
|
|
17107
|
-
}, `step-${index}`)))
|
|
17566
|
+
children: content
|
|
17108
17567
|
});
|
|
17109
17568
|
if (glass) {
|
|
17110
17569
|
// Default glass settings for steps
|
|
@@ -17127,24 +17586,104 @@ const Steps = ({items: items, activeIndex: activeIndex = 0, vertical: vertical =
|
|
|
17127
17586
|
return stepsContent;
|
|
17128
17587
|
};
|
|
17129
17588
|
|
|
17130
|
-
Steps.displayName = "Steps";
|
|
17589
|
+
Steps.displayName = "Steps", Steps.Item = StepsItem, Steps.Step = StepsItem;
|
|
17131
17590
|
|
|
17132
|
-
|
|
17133
|
-
|
|
17134
|
-
|
|
17135
|
-
|
|
17136
|
-
|
|
17137
|
-
|
|
17138
|
-
|
|
17591
|
+
// Context for compound usage
|
|
17592
|
+
const TabsContext = React.createContext({
|
|
17593
|
+
currentTab: 0,
|
|
17594
|
+
handleTabClick: () => {}
|
|
17595
|
+
}), TabsList = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("ul", {
|
|
17596
|
+
ref: ref,
|
|
17597
|
+
className: `c-tabs__nav ${className}`.trim(),
|
|
17598
|
+
...props,
|
|
17599
|
+
children: React__default.default.Children.map(children, ((child, index) => React__default.default.isValidElement(child) ? React__default.default.cloneElement(child, {
|
|
17600
|
+
index: index
|
|
17601
|
+
}) : child))
|
|
17602
|
+
})));
|
|
17603
|
+
|
|
17604
|
+
// Compound components
|
|
17605
|
+
TabsList.displayName = "TabsList";
|
|
17606
|
+
|
|
17607
|
+
const TabsTrigger = React.forwardRef((({children: children, className: className = "", index: index, onClick: onClick, ...props}, ref) => {
|
|
17608
|
+
const {currentTab: currentTab, handleTabClick: handleTabClick} = React.useContext(TabsContext);
|
|
17609
|
+
// Safety check if used outside context or without index
|
|
17610
|
+
void 0 === index && console.warn("TabsTrigger requires an index prop or must be a direct child of TabsList");
|
|
17611
|
+
const isActive = void 0 !== index && currentTab === index;
|
|
17612
|
+
return jsxRuntime.jsx("li", {
|
|
17613
|
+
className: "c-tabs__nav-item",
|
|
17614
|
+
children: jsxRuntime.jsx("button", {
|
|
17615
|
+
ref: ref,
|
|
17616
|
+
className: `c-tabs__nav-btn ${isActive ? TAB.CLASSES.ACTIVE : ""} ${className}`.trim(),
|
|
17617
|
+
onClick: e => {
|
|
17618
|
+
void 0 !== index && handleTabClick(index), onClick?.(e);
|
|
17619
|
+
},
|
|
17620
|
+
"data-tabindex": index,
|
|
17621
|
+
role: "tab",
|
|
17622
|
+
"aria-selected": isActive,
|
|
17623
|
+
"aria-controls": `tab-panel-${index}`,
|
|
17624
|
+
type: "button",
|
|
17625
|
+
...props,
|
|
17626
|
+
children: children
|
|
17627
|
+
})
|
|
17628
|
+
});
|
|
17629
|
+
}));
|
|
17630
|
+
|
|
17631
|
+
TabsTrigger.displayName = "TabsTrigger";
|
|
17632
|
+
|
|
17633
|
+
const TabsPanels = React.forwardRef((({children: children, className: className = "", ...props}, ref) => jsxRuntime.jsx("div", {
|
|
17634
|
+
ref: ref,
|
|
17635
|
+
className: `c-tabs__panels ${className}`.trim(),
|
|
17636
|
+
...props,
|
|
17637
|
+
children: React__default.default.Children.map(children, ((child, index) => React__default.default.isValidElement(child) ? React__default.default.cloneElement(child, {
|
|
17638
|
+
index: index
|
|
17639
|
+
}) : child))
|
|
17640
|
+
})));
|
|
17641
|
+
|
|
17642
|
+
TabsPanels.displayName = "TabsPanels";
|
|
17643
|
+
|
|
17644
|
+
const TabsPanel = React.forwardRef((({children: children, className: className = "", index: index, style: style, ...props}, ref) => {
|
|
17645
|
+
const {currentTab: currentTab} = React.useContext(TabsContext), isActive = void 0 !== index && currentTab === index;
|
|
17646
|
+
return jsxRuntime.jsx("div", {
|
|
17647
|
+
ref: ref,
|
|
17648
|
+
className: `c-tabs__panel ${isActive ? TAB.CLASSES.ACTIVE : ""} ${className}`.trim(),
|
|
17649
|
+
"data-tabindex": index,
|
|
17650
|
+
id: `tab-panel-${index}`,
|
|
17651
|
+
role: "tabpanel",
|
|
17652
|
+
"aria-labelledby": `tab-nav-${index}`,
|
|
17653
|
+
style: {
|
|
17654
|
+
height: isActive ? "auto" : "0px",
|
|
17655
|
+
opacity: isActive ? 1 : 0,
|
|
17656
|
+
overflow: "hidden",
|
|
17657
|
+
transition: "height 0.3s ease, opacity 0.3s ease",
|
|
17658
|
+
...style
|
|
17659
|
+
},
|
|
17660
|
+
...props,
|
|
17661
|
+
children: jsxRuntime.jsx("div", {
|
|
17662
|
+
className: "c-tabs__panel-body",
|
|
17663
|
+
children: children
|
|
17664
|
+
})
|
|
17665
|
+
});
|
|
17666
|
+
}));
|
|
17667
|
+
|
|
17668
|
+
TabsPanel.displayName = "TabsPanel";
|
|
17669
|
+
|
|
17670
|
+
const Tabs = React.memo((({items: items, activeIndex: activeIndex = TAB.DEFAULTS.ACTIVE_INDEX, onTabChange: onTabChange, className: className = "", style: style, glass: glass, children: children}) => {
|
|
17671
|
+
const [currentTab, setCurrentTab] = React.useState(activeIndex), handleTabClick = index => {
|
|
17672
|
+
setCurrentTab(index), onTabChange && onTabChange(index);
|
|
17673
|
+
};
|
|
17674
|
+
// Handle tab change
|
|
17675
|
+
// Determine content based on mode (legacy items vs compound children)
|
|
17676
|
+
let content;
|
|
17677
|
+
// Use items prop if provided
|
|
17678
|
+
// Legacy mode
|
|
17679
|
+
content = items && items.length > 0 ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
17139
17680
|
children: [ jsxRuntime.jsx("ul", {
|
|
17140
17681
|
className: "c-tabs__nav",
|
|
17141
17682
|
children: items.map(((item, index) => jsxRuntime.jsx("li", {
|
|
17142
17683
|
className: "c-tabs__nav-item",
|
|
17143
17684
|
children: jsxRuntime.jsx("button", {
|
|
17144
17685
|
className: `c-tabs__nav-btn ${index === currentTab ? TAB.CLASSES.ACTIVE : ""}`,
|
|
17145
|
-
onClick: () => (index
|
|
17146
|
-
setCurrentTab(index), onTabChange && onTabChange(index);
|
|
17147
|
-
})(index),
|
|
17686
|
+
onClick: () => handleTabClick(index),
|
|
17148
17687
|
"data-tabindex": index,
|
|
17149
17688
|
role: "tab",
|
|
17150
17689
|
"aria-selected": index === currentTab,
|
|
@@ -17172,9 +17711,19 @@ const Tabs = React.memo((({items: items, activeIndex: activeIndex = TAB.DEFAULT
|
|
|
17172
17711
|
})
|
|
17173
17712
|
}, `tab-panel-${index}`)))
|
|
17174
17713
|
}) ]
|
|
17714
|
+
}) : jsxRuntime.jsx(TabsContext.Provider, {
|
|
17715
|
+
value: {
|
|
17716
|
+
currentTab: currentTab,
|
|
17717
|
+
handleTabClick: handleTabClick
|
|
17718
|
+
},
|
|
17719
|
+
children: children
|
|
17175
17720
|
});
|
|
17176
|
-
|
|
17177
|
-
|
|
17721
|
+
const wrapper = jsxRuntime.jsx("div", {
|
|
17722
|
+
className: `c-tabs js-atomix-tab ${className}`,
|
|
17723
|
+
style: style,
|
|
17724
|
+
children: content
|
|
17725
|
+
});
|
|
17726
|
+
if (glass) {
|
|
17178
17727
|
// Default glass settings for tabs
|
|
17179
17728
|
const defaultGlassProps = {
|
|
17180
17729
|
displacementScale: 60,
|
|
@@ -17189,13 +17738,14 @@ const Tabs = React.memo((({items: items, activeIndex: activeIndex = TAB.DEFAULT
|
|
|
17189
17738
|
};
|
|
17190
17739
|
return jsxRuntime.jsx(AtomixGlass, {
|
|
17191
17740
|
...glassProps,
|
|
17192
|
-
children:
|
|
17741
|
+
children: wrapper
|
|
17193
17742
|
});
|
|
17194
17743
|
}
|
|
17195
|
-
return
|
|
17744
|
+
return wrapper;
|
|
17196
17745
|
}));
|
|
17197
17746
|
|
|
17198
|
-
Tabs.displayName = "Tabs"
|
|
17747
|
+
Tabs.displayName = "Tabs", Tabs.List = TabsList, Tabs.Trigger = TabsTrigger, Tabs.Panels = TabsPanels,
|
|
17748
|
+
Tabs.Panel = TabsPanel;
|
|
17199
17749
|
|
|
17200
17750
|
/**
|
|
17201
17751
|
* Testimonial component for displaying customer quotes and feedback
|