@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/core.js
CHANGED
|
@@ -1,15 +1,380 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
|
|
3
|
-
import React, { useState, useRef, useEffect, memo, forwardRef, useMemo, useCallback, useId } from "react";
|
|
3
|
+
import React, { useState, useRef, useEffect, memo, forwardRef, useMemo, useCallback, useId, Children, isValidElement, cloneElement } from "react";
|
|
4
4
|
|
|
5
5
|
import * as PhosphorIcons from "@phosphor-icons/react";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
var commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
|
|
8
|
+
|
|
9
|
+
function getDefaultExportFromCjs(x) {
|
|
10
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var fails$8 = function(exec) {
|
|
14
|
+
try {
|
|
15
|
+
return !!exec();
|
|
16
|
+
} catch (error) {
|
|
17
|
+
return !0;
|
|
18
|
+
}
|
|
19
|
+
}, functionBindNative = !fails$8((function() {
|
|
20
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
21
|
+
var test = function() {/* empty */}.bind();
|
|
22
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
23
|
+
return "function" != typeof test || test.hasOwnProperty("prototype");
|
|
24
|
+
})), 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) {
|
|
25
|
+
return function() {
|
|
26
|
+
return call$5.apply(fn, arguments);
|
|
27
|
+
};
|
|
28
|
+
}, objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf), check = function(it) {
|
|
29
|
+
return it && it.Math === Math && it;
|
|
30
|
+
}, globalThis_1 =
|
|
31
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
32
|
+
check("object" == typeof globalThis && globalThis) || check("object" == typeof window && window) ||
|
|
33
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
34
|
+
check("object" == typeof self && self) || check("object" == typeof commonjsGlobal && commonjsGlobal) || check("object" == typeof commonjsGlobal && commonjsGlobal) ||
|
|
35
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
36
|
+
function() {
|
|
37
|
+
return this;
|
|
38
|
+
}() || 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() {
|
|
39
|
+
return call$4.apply(apply$1, arguments);
|
|
40
|
+
}), uncurryThis$7 = functionUncurryThis, toString$3 = uncurryThis$7({}.toString), stringSlice = uncurryThis$7("".slice), classofRaw$2 = function(it) {
|
|
41
|
+
return stringSlice(toString$3(it), 8, -1);
|
|
42
|
+
}, classofRaw$1 = classofRaw$2, uncurryThis$6 = functionUncurryThis, functionUncurryThisClause = function(fn) {
|
|
43
|
+
// Nashorn bug:
|
|
44
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
45
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
46
|
+
if ("Function" === classofRaw$1(fn)) return uncurryThis$6(fn);
|
|
47
|
+
}, documentAll = "object" == typeof document && document.all, isCallable$8 = void 0 === documentAll && void 0 !== documentAll ? function(argument) {
|
|
48
|
+
return "function" == typeof argument || argument === documentAll;
|
|
49
|
+
} : function(argument) {
|
|
50
|
+
return "function" == typeof argument;
|
|
51
|
+
}, objectGetOwnPropertyDescriptor = {}, descriptors = !fails$8((function() {
|
|
52
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
53
|
+
return 7 !== Object.defineProperty({}, 1, {
|
|
54
|
+
get: function() {
|
|
55
|
+
return 7;
|
|
56
|
+
}
|
|
57
|
+
})[1];
|
|
58
|
+
})), NATIVE_BIND$1 = functionBindNative, call$3 = Function.prototype.call, functionCall = NATIVE_BIND$1 ? call$3.bind(call$3) : function() {
|
|
59
|
+
return call$3.apply(call$3, arguments);
|
|
60
|
+
}, objectPropertyIsEnumerable = {}, $propertyIsEnumerable = {}.propertyIsEnumerable, getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
|
|
61
|
+
1: 2
|
|
62
|
+
}, 1);
|
|
63
|
+
|
|
64
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
65
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
66
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function(V) {
|
|
67
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
68
|
+
return !!descriptor && descriptor.enumerable;
|
|
69
|
+
} : $propertyIsEnumerable;
|
|
70
|
+
|
|
71
|
+
var match, version, createPropertyDescriptor$2 = function(bitmap, value) {
|
|
72
|
+
return {
|
|
73
|
+
enumerable: !(1 & bitmap),
|
|
74
|
+
configurable: !(2 & bitmap),
|
|
75
|
+
writable: !(4 & bitmap),
|
|
76
|
+
value: value
|
|
77
|
+
};
|
|
78
|
+
}, fails$5 = fails$8, classof$3 = classofRaw$2, $Object$3 = Object, split = functionUncurryThis("".split), indexedObject = fails$5((function() {
|
|
79
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
80
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
81
|
+
return !$Object$3("z").propertyIsEnumerable(0);
|
|
82
|
+
})) ? function(it) {
|
|
83
|
+
return "String" === classof$3(it) ? split(it, "") : $Object$3(it);
|
|
84
|
+
} : $Object$3, isNullOrUndefined$2 = function(it) {
|
|
85
|
+
return null == it;
|
|
86
|
+
}, isNullOrUndefined$1 = isNullOrUndefined$2, $TypeError$6 = TypeError, requireObjectCoercible$3 = function(it) {
|
|
87
|
+
if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
|
|
88
|
+
return it;
|
|
89
|
+
}, IndexedObject = indexedObject, requireObjectCoercible$2 = requireObjectCoercible$3, toIndexedObject$2 = function(it) {
|
|
90
|
+
return IndexedObject(requireObjectCoercible$2(it));
|
|
91
|
+
}, isCallable$7 = isCallable$8, isObject$5 = function(it) {
|
|
92
|
+
return "object" == typeof it ? null !== it : isCallable$7(it);
|
|
93
|
+
}, path$3 = {}, path$2 = path$3, globalThis$a = globalThis_1, isCallable$6 = isCallable$8, aFunction = function(variable) {
|
|
94
|
+
return isCallable$6(variable) ? variable : void 0;
|
|
95
|
+
}, navigator = globalThis_1.navigator, userAgent$1 = navigator && navigator.userAgent, globalThis$8 = globalThis_1, userAgent = userAgent$1 ? String(userAgent$1) : "", process$1 = globalThis$8.process, Deno = globalThis$8.Deno, versions = process$1 && process$1.versions || Deno && Deno.version, v8 = versions && versions.v8;
|
|
96
|
+
|
|
97
|
+
v8 && (
|
|
98
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
99
|
+
// but their correct versions are not interesting for us
|
|
100
|
+
version = (match = v8.split("."))[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1])),
|
|
101
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
102
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
103
|
+
!version && userAgent && (!(match = userAgent.match(/Edge\/(\d+)/)) || match[1] >= 74) && (match = userAgent.match(/Chrome\/(\d+)/)) && (version = +match[1]);
|
|
104
|
+
|
|
105
|
+
var V8_VERSION = version, fails$4 = fails$8, $String$3 = globalThis_1.String, symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$4((function() {
|
|
106
|
+
var symbol = Symbol("symbol detection");
|
|
107
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
108
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
109
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
110
|
+
// of course, fail.
|
|
111
|
+
return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
112
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
113
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
114
|
+
})), useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && "symbol" == typeof Symbol.iterator, isCallable$5 = isCallable$8, isPrototypeOf$1 = objectIsPrototypeOf, $Object$2 = Object, isSymbol$2 = useSymbolAsUid ? function(it) {
|
|
115
|
+
return "symbol" == typeof it;
|
|
116
|
+
} : function(it) {
|
|
117
|
+
var $Symbol = function(namespace, method) {
|
|
118
|
+
return arguments.length < 2 ? aFunction(path$2[namespace]) || aFunction(globalThis$a[namespace]) : path$2[namespace] && path$2[namespace][method] || globalThis$a[namespace] && globalThis$a[namespace][method];
|
|
119
|
+
}("Symbol");
|
|
120
|
+
return isCallable$5($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
|
|
121
|
+
}, $String$2 = String, isCallable$4 = isCallable$8, $TypeError$5 = TypeError, aCallable$2 = function(argument) {
|
|
122
|
+
if (isCallable$4(argument)) return argument;
|
|
123
|
+
throw new $TypeError$5(function(argument) {
|
|
124
|
+
try {
|
|
125
|
+
return $String$2(argument);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
return "Object";
|
|
128
|
+
}
|
|
129
|
+
}(argument) + " is not a function");
|
|
130
|
+
}, aCallable$1 = aCallable$2, isNullOrUndefined = isNullOrUndefined$2, call$2 = functionCall, isCallable$3 = isCallable$8, isObject$4 = isObject$5, $TypeError$4 = TypeError, sharedStore = {
|
|
131
|
+
exports: {}
|
|
132
|
+
}, globalThis$6 = globalThis_1, defineProperty = Object.defineProperty, globalThis$5 = globalThis_1, store$1 = sharedStore.exports = globalThis$5["__core-js_shared__"] || function(key, value) {
|
|
133
|
+
try {
|
|
134
|
+
defineProperty(globalThis$6, key, {
|
|
135
|
+
value: value,
|
|
136
|
+
configurable: !0,
|
|
137
|
+
writable: !0
|
|
138
|
+
});
|
|
139
|
+
} catch (error) {
|
|
140
|
+
globalThis$6[key] = value;
|
|
141
|
+
}
|
|
142
|
+
return value;
|
|
143
|
+
}("__core-js_shared__", {});
|
|
144
|
+
|
|
145
|
+
/* eslint-disable es/no-symbol -- required for testing */ (store$1.versions || (store$1.versions = [])).push({
|
|
146
|
+
version: "3.43.0",
|
|
147
|
+
mode: "pure",
|
|
148
|
+
copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)",
|
|
149
|
+
license: "https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",
|
|
150
|
+
source: "https://github.com/zloirock/core-js"
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
var key, value, store = sharedStore.exports, requireObjectCoercible$1 = requireObjectCoercible$3, $Object$1 = Object, hasOwnProperty = functionUncurryThis({}.hasOwnProperty), hasOwnProperty_1 = Object.hasOwn || function(it, key) {
|
|
154
|
+
return hasOwnProperty($Object$1(requireObjectCoercible$1(it)), key);
|
|
155
|
+
}, 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) {
|
|
156
|
+
return "Symbol(" + (void 0 === key ? "" : key) + ")_" + toString$2(++id + postfix, 36);
|
|
157
|
+
}, wellKnownSymbol$5 = function(name) {
|
|
158
|
+
return hasOwn$2(WellKnownSymbolsStore, name) || (WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$2(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol("Symbol." + name)),
|
|
159
|
+
WellKnownSymbolsStore[name];
|
|
160
|
+
}, call$1 = functionCall, isObject$3 = isObject$5, isSymbol$1 = isSymbol$2, $TypeError$3 = TypeError, TO_PRIMITIVE = wellKnownSymbol$5("toPrimitive"), toPrimitive = function(input, pref) {
|
|
161
|
+
if (!isObject$3(input) || isSymbol$1(input)) return input;
|
|
162
|
+
var result, func, exoticToPrim = (func = input[TO_PRIMITIVE], isNullOrUndefined(func) ? void 0 : aCallable$1(func));
|
|
163
|
+
if (exoticToPrim) {
|
|
164
|
+
if (void 0 === pref && (pref = "default"), result = call$1(exoticToPrim, input, pref),
|
|
165
|
+
!isObject$3(result) || isSymbol$1(result)) return result;
|
|
166
|
+
throw new $TypeError$3("Can't convert object to primitive value");
|
|
167
|
+
}
|
|
168
|
+
return void 0 === pref && (pref = "number"), function(input, pref) {
|
|
169
|
+
var fn, val;
|
|
170
|
+
if ("string" === pref && isCallable$3(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
|
|
171
|
+
if (isCallable$3(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
|
|
172
|
+
if ("string" !== pref && isCallable$3(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
|
|
173
|
+
throw new $TypeError$4("Can't convert object to primitive value");
|
|
174
|
+
}(input, pref);
|
|
175
|
+
}, isSymbol = isSymbol$2, toPropertyKey$2 = function(argument) {
|
|
176
|
+
var key = toPrimitive(argument, "string");
|
|
177
|
+
return isSymbol(key) ? key : key + "";
|
|
178
|
+
}, isObject$2 = isObject$5, document$1 = globalThis_1.document, EXISTS = isObject$2(document$1) && isObject$2(document$1.createElement), ie8DomDefine = !descriptors && !fails$8((function() {
|
|
179
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
180
|
+
return 7 !== Object.defineProperty((it = "div", EXISTS ? document$1.createElement(it) : {}), "a", {
|
|
181
|
+
get: function() {
|
|
182
|
+
return 7;
|
|
183
|
+
}
|
|
184
|
+
}).a;
|
|
185
|
+
var it;
|
|
186
|
+
})), 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;
|
|
187
|
+
|
|
188
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
189
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
190
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor$1 : function(O, P) {
|
|
191
|
+
if (O = toIndexedObject$1(O), P = toPropertyKey$1(P), IE8_DOM_DEFINE$1) try {
|
|
192
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
193
|
+
} catch (error) {/* empty */}
|
|
194
|
+
if (hasOwn$1(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var fails$2 = fails$8, isCallable$2 = isCallable$8, replacement = /#|\.prototype\./, isForced$1 = function(feature, detection) {
|
|
198
|
+
var value = data[normalize(feature)];
|
|
199
|
+
return value === POLYFILL || value !== NATIVE && (isCallable$2(detection) ? fails$2(detection) : !!detection);
|
|
200
|
+
}, normalize = isForced$1.normalize = function(string) {
|
|
201
|
+
return String(string).replace(replacement, ".").toLowerCase();
|
|
202
|
+
}, data = isForced$1.data = {}, NATIVE = isForced$1.NATIVE = "N", POLYFILL = isForced$1.POLYFILL = "P", isForced_1 = isForced$1, aCallable = aCallable$2, NATIVE_BIND = functionBindNative, bind$1 = functionUncurryThisClause(functionUncurryThisClause.bind), objectDefineProperty = {}, v8PrototypeDefineBug = descriptors && fails$8((function() {
|
|
203
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
204
|
+
return 42 !== Object.defineProperty((function() {/* empty */}), "prototype", {
|
|
205
|
+
value: 42,
|
|
206
|
+
writable: !1
|
|
207
|
+
}).prototype;
|
|
208
|
+
})), isObject$1 = isObject$5, $String$1 = String, $TypeError$2 = TypeError, DESCRIPTORS$1 = descriptors, IE8_DOM_DEFINE = ie8DomDefine, V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug, anObject = function(argument) {
|
|
209
|
+
if (isObject$1(argument)) return argument;
|
|
210
|
+
throw new $TypeError$2($String$1(argument) + " is not an object");
|
|
211
|
+
}, toPropertyKey = toPropertyKey$2, $TypeError$1 = TypeError, $defineProperty = Object.defineProperty, $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
212
|
+
|
|
213
|
+
// `Object.defineProperty` method
|
|
214
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
215
|
+
objectDefineProperty.f = DESCRIPTORS$1 ? V8_PROTOTYPE_DEFINE_BUG ? function(O, P, Attributes) {
|
|
216
|
+
if (anObject(O), P = toPropertyKey(P), anObject(Attributes), "function" == typeof O && "prototype" === P && "value" in Attributes && "writable" in Attributes && !Attributes.writable) {
|
|
217
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
218
|
+
current && current.writable && (O[P] = Attributes.value, Attributes = {
|
|
219
|
+
configurable: "configurable" in Attributes ? Attributes.configurable : current.configurable,
|
|
220
|
+
enumerable: "enumerable" in Attributes ? Attributes.enumerable : current.enumerable,
|
|
221
|
+
writable: !1
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return $defineProperty(O, P, Attributes);
|
|
225
|
+
} : $defineProperty : function(O, P, Attributes) {
|
|
226
|
+
if (anObject(O), P = toPropertyKey(P), anObject(Attributes), IE8_DOM_DEFINE) try {
|
|
227
|
+
return $defineProperty(O, P, Attributes);
|
|
228
|
+
} catch (error) {/* empty */}
|
|
229
|
+
if ("get" in Attributes || "set" in Attributes) throw new $TypeError$1("Accessors not supported");
|
|
230
|
+
return "value" in Attributes && (O[P] = Attributes.value), O;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
var definePropertyModule = objectDefineProperty, createPropertyDescriptor = createPropertyDescriptor$2, createNonEnumerableProperty$1 = descriptors ? function(object, key, value) {
|
|
234
|
+
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
235
|
+
} : function(object, key, value) {
|
|
236
|
+
return object[key] = value, object;
|
|
237
|
+
}, globalThis$2 = globalThis_1, apply = functionApply, uncurryThis$1 = functionUncurryThisClause, isCallable$1 = isCallable$8, getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f, isForced = isForced_1, path$1 = path$3, bind = function(fn, that) {
|
|
238
|
+
return aCallable(fn), void 0 === that ? fn : NATIVE_BIND ? bind$1(fn, that) : function() {
|
|
239
|
+
return fn.apply(that, arguments);
|
|
240
|
+
};
|
|
241
|
+
}, createNonEnumerableProperty = createNonEnumerableProperty$1, hasOwn = hasOwnProperty_1, wrapConstructor = function(NativeConstructor) {
|
|
242
|
+
var Wrapper = function(a, b, c) {
|
|
243
|
+
if (this instanceof Wrapper) {
|
|
244
|
+
switch (arguments.length) {
|
|
245
|
+
case 0:
|
|
246
|
+
return new NativeConstructor;
|
|
247
|
+
|
|
248
|
+
case 1:
|
|
249
|
+
return new NativeConstructor(a);
|
|
250
|
+
|
|
251
|
+
case 2:
|
|
252
|
+
return new NativeConstructor(a, b);
|
|
253
|
+
}
|
|
254
|
+
return new NativeConstructor(a, b, c);
|
|
255
|
+
}
|
|
256
|
+
return apply(NativeConstructor, this, arguments);
|
|
257
|
+
};
|
|
258
|
+
return Wrapper.prototype = NativeConstructor.prototype, Wrapper;
|
|
259
|
+
}, _export = function(options, source) {
|
|
260
|
+
var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE, key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor, TARGET = options.target, GLOBAL = options.global, STATIC = options.stat, PROTO = options.proto, nativeSource = GLOBAL ? globalThis$2 : STATIC ? globalThis$2[TARGET] : globalThis$2[TARGET] && globalThis$2[TARGET].prototype, target = GLOBAL ? path$1 : path$1[TARGET] || createNonEnumerableProperty(path$1, TARGET, {})[TARGET], targetPrototype = target.prototype;
|
|
261
|
+
for (key in source)
|
|
262
|
+
// contains in native
|
|
263
|
+
USE_NATIVE = !(FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced)) && nativeSource && hasOwn(nativeSource, key),
|
|
264
|
+
targetProperty = target[key], USE_NATIVE && (nativeProperty = options.dontCallGetSet ? (descriptor = getOwnPropertyDescriptor(nativeSource, key)) && descriptor.value : nativeSource[key]),
|
|
265
|
+
// export native or implementation
|
|
266
|
+
sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key], (FORCED || PROTO || typeof targetProperty != typeof sourceProperty) && (
|
|
267
|
+
// bind methods to global for calling from export context
|
|
268
|
+
resultProperty = options.bind && USE_NATIVE ? bind(sourceProperty, globalThis$2) : options.wrap && USE_NATIVE ? wrapConstructor(sourceProperty) : PROTO && isCallable$1(sourceProperty) ? uncurryThis$1(sourceProperty) : sourceProperty,
|
|
269
|
+
// add a flag to not completely full polyfills
|
|
270
|
+
(options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) && createNonEnumerableProperty(resultProperty, "sham", !0),
|
|
271
|
+
createNonEnumerableProperty(target, key, resultProperty), PROTO && (hasOwn(path$1, VIRTUAL_PROTOTYPE = TARGET + "Prototype") || createNonEnumerableProperty(path$1, VIRTUAL_PROTOTYPE, {}),
|
|
272
|
+
// export virtual prototype methods
|
|
273
|
+
createNonEnumerableProperty(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty),
|
|
274
|
+
// export real prototype methods
|
|
275
|
+
options.real && targetPrototype && (FORCED || !targetPrototype[key]) && createNonEnumerableProperty(targetPrototype, key, sourceProperty)));
|
|
276
|
+
}, ceil = Math.ceil, floor = Math.floor, trunc = Math.trunc || function(x) {
|
|
277
|
+
var n = +x;
|
|
278
|
+
return (n > 0 ? floor : ceil)(n);
|
|
279
|
+
}, toIntegerOrInfinity$2 = function(argument) {
|
|
280
|
+
var number = +argument;
|
|
281
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
282
|
+
return number != number || 0 === number ? 0 : trunc(number);
|
|
283
|
+
}, toIntegerOrInfinity$1 = toIntegerOrInfinity$2, max = Math.max, min$1 = Math.min, toIntegerOrInfinity = toIntegerOrInfinity$2, min = Math.min, toIndexedObject = toIndexedObject$2, lengthOfArrayLike = function(obj) {
|
|
284
|
+
return argument = obj.length, (len = toIntegerOrInfinity(argument)) > 0 ? min(len, 9007199254740991) : 0;
|
|
285
|
+
var argument, len;
|
|
286
|
+
}, createMethod = function(IS_INCLUDES) {
|
|
287
|
+
return function($this, el, fromIndex) {
|
|
288
|
+
var O = toIndexedObject($this), length = lengthOfArrayLike(O);
|
|
289
|
+
if (0 === length) return !IS_INCLUDES && -1;
|
|
290
|
+
var value, index = function(index, length) {
|
|
291
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
292
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
293
|
+
}(fromIndex, length);
|
|
294
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
295
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
296
|
+
if (IS_INCLUDES && el != el) {
|
|
297
|
+
for (;length > index; )
|
|
298
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
299
|
+
if ((value = O[index++]) != value) return !0;
|
|
300
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
301
|
+
} else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
302
|
+
return !IS_INCLUDES && -1;
|
|
303
|
+
};
|
|
304
|
+
}, $includes = [ createMethod(!0), createMethod(!1) ][0];
|
|
305
|
+
|
|
306
|
+
// `Array.prototype.includes` method
|
|
307
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
308
|
+
_export({
|
|
309
|
+
target: "Array",
|
|
310
|
+
proto: !0,
|
|
311
|
+
forced: fails$8((function() {
|
|
312
|
+
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
313
|
+
return !Array(1).includes();
|
|
314
|
+
}))
|
|
315
|
+
}, {
|
|
316
|
+
includes: function(el /* , fromIndex = 0 */) {
|
|
317
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
var globalThis$1 = globalThis_1, path = path$3, getBuiltInPrototypeMethod$2 = function(CONSTRUCTOR, METHOD) {
|
|
322
|
+
var Namespace = path[CONSTRUCTOR + "Prototype"], pureMethod = Namespace && Namespace[METHOD];
|
|
323
|
+
if (pureMethod) return pureMethod;
|
|
324
|
+
var NativeConstructor = globalThis$1[CONSTRUCTOR], NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
|
325
|
+
return NativePrototype && NativePrototype[METHOD];
|
|
326
|
+
}, includes$4 = getBuiltInPrototypeMethod$2("Array", "includes"), isObject = isObject$5, classof$2 = classofRaw$2, MATCH$1 = wellKnownSymbol$5("match"), $TypeError = TypeError, test = {};
|
|
327
|
+
|
|
328
|
+
test[wellKnownSymbol$5("toStringTag")] = "z";
|
|
329
|
+
|
|
330
|
+
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() {
|
|
331
|
+
return arguments;
|
|
332
|
+
}()), classof = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
|
|
333
|
+
var O, tag, result;
|
|
334
|
+
return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (tag = function(it, key) {
|
|
335
|
+
try {
|
|
336
|
+
return it[key];
|
|
337
|
+
} catch (error) {/* empty */}
|
|
338
|
+
}(O = $Object(it), TO_STRING_TAG)) ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : "Object" === (result = classofRaw(O)) && isCallable(O.callee) ? "Arguments" : result;
|
|
339
|
+
}, $String = String, MATCH = wellKnownSymbol$5("match"), $ = _export, notARegExp = function(it) {
|
|
340
|
+
if (function(it) {
|
|
341
|
+
var isRegExp;
|
|
342
|
+
return isObject(it) && (void 0 !== (isRegExp = it[MATCH$1]) ? !!isRegExp : "RegExp" === classof$2(it));
|
|
343
|
+
}(it)) throw new $TypeError("The method doesn't accept regular expressions");
|
|
344
|
+
return it;
|
|
345
|
+
}, requireObjectCoercible = requireObjectCoercible$3, toString = function(argument) {
|
|
346
|
+
if ("Symbol" === classof(argument)) throw new TypeError("Cannot convert a Symbol value to a string");
|
|
347
|
+
return $String(argument);
|
|
348
|
+
}, stringIndexOf = functionUncurryThis("".indexOf);
|
|
349
|
+
|
|
350
|
+
// `String.prototype.includes` method
|
|
351
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
352
|
+
$({
|
|
353
|
+
target: "String",
|
|
354
|
+
proto: !0,
|
|
355
|
+
forced: !function(METHOD_NAME) {
|
|
356
|
+
var regexp = /./;
|
|
357
|
+
try {
|
|
358
|
+
"/./"[METHOD_NAME](regexp);
|
|
359
|
+
} catch (error1) {
|
|
360
|
+
try {
|
|
361
|
+
return regexp[MATCH] = !1, "/./"[METHOD_NAME](regexp);
|
|
362
|
+
} catch (error2) {/* empty */}
|
|
363
|
+
}
|
|
364
|
+
return !1;
|
|
365
|
+
}("includes")
|
|
366
|
+
}, {
|
|
367
|
+
includes: function(searchString /* , position = 0 */) {
|
|
368
|
+
return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
var includes$3 = getBuiltInPrototypeMethod$2("String", "includes"), isPrototypeOf = objectIsPrototypeOf, arrayMethod = includes$4, stringMethod = includes$3, ArrayPrototype = Array.prototype, StringPrototype = String.prototype;
|
|
373
|
+
|
|
374
|
+
const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
|
|
375
|
+
var own = it.includes;
|
|
376
|
+
return it === ArrayPrototype || isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes ? arrayMethod : "string" == typeof it || it === StringPrototype || isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes ? stringMethod : own;
|
|
377
|
+
})), BUTTON = {
|
|
13
378
|
BASE_CLASS: "c-btn",
|
|
14
379
|
ICON_CLASS: "c-btn__icon",
|
|
15
380
|
LABEL_CLASS: "c-btn__label",
|
|
@@ -591,7 +956,12 @@ import * as PhosphorIcons from "@phosphor-icons/react";
|
|
|
591
956
|
})
|
|
592
957
|
});
|
|
593
958
|
|
|
594
|
-
|
|
959
|
+
/**
|
|
960
|
+
* Default theme colors for components
|
|
961
|
+
*/
|
|
962
|
+
/**
|
|
963
|
+
* Button-specific constants
|
|
964
|
+
*/ GlassFilterComponent.displayName = "GlassFilter";
|
|
595
965
|
|
|
596
966
|
// Memoize component to prevent unnecessary re-renders
|
|
597
967
|
const GlassFilter = memo(GlassFilterComponent, ((prevProps, nextProps) => prevProps.id === nextProps.id && prevProps.displacementScale === nextProps.displacementScale && prevProps.aberrationIntensity === nextProps.aberrationIntensity && prevProps.mode === nextProps.mode && prevProps.shaderMapUrl === nextProps.shaderMapUrl && prevProps.blurAmount === nextProps.blurAmount));
|
|
@@ -951,7 +1321,7 @@ class {
|
|
|
951
1321
|
* Composable hook for AtomixGlass component logic
|
|
952
1322
|
* Manages all state, calculations, and event handlers
|
|
953
1323
|
*/
|
|
954
|
-
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,
|
|
1324
|
+
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}) {
|
|
955
1325
|
// State
|
|
956
1326
|
const [isHovered, setIsHovered] = useState(!1), [isActive, setIsActive] = useState(!1), [glassSize, setGlassSize] = useState({
|
|
957
1327
|
width: 270,
|
|
@@ -1152,9 +1522,8 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
1152
1522
|
if (effectiveDisableEffects) return;
|
|
1153
1523
|
const container = mouseContainer?.current || glassRef.current;
|
|
1154
1524
|
if (!container) return;
|
|
1155
|
-
enablePerformanceMonitoring && performance.now();
|
|
1156
1525
|
// Use cached rect if available, otherwise get new one
|
|
1157
|
-
|
|
1526
|
+
let rect = cachedRectRef.current;
|
|
1158
1527
|
if (rect && 0 !== rect.width && 0 !== rect.height || (rect = container.getBoundingClientRect(),
|
|
1159
1528
|
cachedRectRef.current = rect), 0 === rect.width || 0 === rect.height) return;
|
|
1160
1529
|
const center = calculateElementCenter(rect), newOffset = {
|
|
@@ -1163,8 +1532,8 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
1163
1532
|
};
|
|
1164
1533
|
// Calculate offset relative to this container
|
|
1165
1534
|
// React 18 automatically batches these updates
|
|
1166
|
-
setInternalMouseOffset(newOffset), setInternalGlobalMousePosition(globalPos)
|
|
1167
|
-
}), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects
|
|
1535
|
+
setInternalMouseOffset(newOffset), setInternalGlobalMousePosition(globalPos);
|
|
1536
|
+
}), [ mouseContainer, glassRef, externalGlobalMousePosition, externalMouseOffset, effectiveDisableEffects ]);
|
|
1168
1537
|
// Subscribe to shared mouse tracker
|
|
1169
1538
|
useEffect((() => {
|
|
1170
1539
|
if (externalGlobalMousePosition && externalMouseOffset)
|
|
@@ -1604,7 +1973,69 @@ function useAtomixGlass({glassRef: glassRef, contentRef: contentRef, cornerRadiu
|
|
|
1604
1973
|
});
|
|
1605
1974
|
}
|
|
1606
1975
|
|
|
1607
|
-
|
|
1976
|
+
// Default icon
|
|
1977
|
+
const DefaultIcon = () => jsx("i", {
|
|
1978
|
+
className: "c-accordion__icon",
|
|
1979
|
+
"aria-hidden": "true",
|
|
1980
|
+
children: jsx("svg", {
|
|
1981
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1982
|
+
width: "24",
|
|
1983
|
+
height: "24",
|
|
1984
|
+
viewBox: "0 0 24 24",
|
|
1985
|
+
fill: "none",
|
|
1986
|
+
stroke: "currentColor",
|
|
1987
|
+
strokeWidth: "2",
|
|
1988
|
+
strokeLinecap: "round",
|
|
1989
|
+
strokeLinejoin: "round",
|
|
1990
|
+
"aria-hidden": "true",
|
|
1991
|
+
focusable: "false",
|
|
1992
|
+
children: jsx("polyline", {
|
|
1993
|
+
points: "6 9 12 15 18 9"
|
|
1994
|
+
})
|
|
1995
|
+
})
|
|
1996
|
+
}), AccordionHeader = forwardRef((({title: title, icon: icon, iconPosition: iconPosition = "right", isOpen: isOpen, children: children, className: className = "", ...props}, ref) => {
|
|
1997
|
+
// Determine icon to render. Explicit check for undefined to allow null/false to hide icon.
|
|
1998
|
+
const iconElement = void 0 === icon ? jsx(DefaultIcon, {}) : icon;
|
|
1999
|
+
return jsxs("button", {
|
|
2000
|
+
ref: ref,
|
|
2001
|
+
type: "button",
|
|
2002
|
+
className: className,
|
|
2003
|
+
...props,
|
|
2004
|
+
children: [ title && jsx("span", {
|
|
2005
|
+
className: "c-accordion__title",
|
|
2006
|
+
children: title
|
|
2007
|
+
}), children, iconElement ]
|
|
2008
|
+
});
|
|
2009
|
+
}));
|
|
2010
|
+
|
|
2011
|
+
AccordionHeader.displayName = "AccordionHeader";
|
|
2012
|
+
|
|
2013
|
+
const AccordionBody = forwardRef((({children: children, className: className = "", panelRef: panelRef, contentRef: contentRef, ...props}, ref) => {
|
|
2014
|
+
const mergedPanelRef = React.useMemo((() =>
|
|
2015
|
+
// Helper to merge refs
|
|
2016
|
+
function(...refs) {
|
|
2017
|
+
return node => {
|
|
2018
|
+
refs.forEach((ref => {
|
|
2019
|
+
"function" == typeof ref ? ref(node) : null != ref && (ref.current = node);
|
|
2020
|
+
}));
|
|
2021
|
+
};
|
|
2022
|
+
}(ref, panelRef)), [ ref, panelRef ]);
|
|
2023
|
+
return jsx("div", {
|
|
2024
|
+
ref: mergedPanelRef,
|
|
2025
|
+
className: className,
|
|
2026
|
+
role: "region",
|
|
2027
|
+
...props,
|
|
2028
|
+
children: jsx("div", {
|
|
2029
|
+
className: ACCORDION.SELECTORS.BODY.replace(".", ""),
|
|
2030
|
+
ref: contentRef,
|
|
2031
|
+
children: children
|
|
2032
|
+
})
|
|
2033
|
+
});
|
|
2034
|
+
}));
|
|
2035
|
+
|
|
2036
|
+
AccordionBody.displayName = "AccordionBody";
|
|
2037
|
+
|
|
2038
|
+
const AccordionImpl = memo((({title: title, children: children, defaultOpen: defaultOpen = !1, isOpen: controlledOpen, onOpenChange: onOpenChange, onOpen: onOpen, onClose: onClose, disabled: disabled = !1, iconPosition: iconPosition = "right", icon: icon, className: className = "", style: style, glass: glass}) => {
|
|
1608
2039
|
// Generate unique IDs for accessibility
|
|
1609
2040
|
const instanceId = useId(), buttonId = `accordion-header-${instanceId}`, panelId = `accordion-panel-${instanceId}`, {state: state, toggle: toggle, updatePanelHeight: updatePanelHeight, panelRef: panelRef, contentRef: contentRef, generateClassNames: generateClassNames, generateHeaderClassNames: generateHeaderClassNames} =
|
|
1610
2041
|
/**
|
|
@@ -1667,53 +2098,59 @@ const Accordion = memo((({title: title, children: children, defaultOpen: defaul
|
|
|
1667
2098
|
onOpenChange: onOpenChange,
|
|
1668
2099
|
onOpen: onOpen,
|
|
1669
2100
|
onClose: onClose
|
|
1670
|
-
}),
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
width: "24",
|
|
1676
|
-
height: "24",
|
|
1677
|
-
viewBox: "0 0 24 24",
|
|
1678
|
-
fill: "none",
|
|
1679
|
-
stroke: "currentColor",
|
|
1680
|
-
strokeWidth: "2",
|
|
1681
|
-
strokeLinecap: "round",
|
|
1682
|
-
strokeLinejoin: "round",
|
|
1683
|
-
"aria-hidden": "true",
|
|
1684
|
-
focusable: "false",
|
|
1685
|
-
children: jsx("polyline", {
|
|
1686
|
-
points: "6 9 12 15 18 9"
|
|
1687
|
-
})
|
|
1688
|
-
})
|
|
1689
|
-
}), accordionContent = jsxs("div", {
|
|
2101
|
+
}), headerClassNames = generateHeaderClassNames(), panelClassNames = ACCORDION.SELECTORS.PANEL.replace(".", ""), hasCompoundComponents = React.Children.toArray(children).some((child => {
|
|
2102
|
+
var _context;
|
|
2103
|
+
|
|
2104
|
+
return React.isValidElement(child) && _includesInstanceProperty(_context = [ "AccordionHeader", "AccordionBody" ]).call(_context, child.type.displayName);
|
|
2105
|
+
})), content = jsx("div", {
|
|
1690
2106
|
className: generateClassNames(className) + (glass ? " c-accordion--glass" : ""),
|
|
1691
2107
|
style: style,
|
|
1692
|
-
children:
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
2108
|
+
children: hasCompoundComponents ? React.Children.map(children, (child => {
|
|
2109
|
+
if ( React.isValidElement(child)) {
|
|
2110
|
+
if ("AccordionHeader" === child.type.displayName)
|
|
2111
|
+
return React.cloneElement(child, {
|
|
2112
|
+
id: buttonId,
|
|
2113
|
+
className: `${headerClassNames} ${child.props.className || ""}`.trim(),
|
|
2114
|
+
onClick: e => {
|
|
2115
|
+
toggle(), child.props.onClick?.(e);
|
|
2116
|
+
},
|
|
2117
|
+
"aria-expanded": state.isOpen,
|
|
2118
|
+
"aria-controls": panelId,
|
|
2119
|
+
"aria-disabled": disabled,
|
|
2120
|
+
disabled: disabled,
|
|
2121
|
+
iconPosition: child.props.iconPosition || iconPosition
|
|
2122
|
+
});
|
|
2123
|
+
if ("AccordionBody" === child.type.displayName)
|
|
2124
|
+
return React.cloneElement(child, {
|
|
2125
|
+
id: panelId,
|
|
2126
|
+
className: `${panelClassNames} ${child.props.className || ""}`.trim(),
|
|
2127
|
+
"aria-labelledby": buttonId,
|
|
2128
|
+
panelRef: panelRef,
|
|
2129
|
+
contentRef: contentRef
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
return child;
|
|
2133
|
+
})) : jsxs(Fragment, {
|
|
2134
|
+
children: [ jsx(AccordionHeader, {
|
|
2135
|
+
id: buttonId,
|
|
2136
|
+
className: headerClassNames,
|
|
2137
|
+
onClick: toggle,
|
|
2138
|
+
"aria-expanded": state.isOpen,
|
|
2139
|
+
"aria-controls": panelId,
|
|
2140
|
+
"aria-disabled": disabled,
|
|
2141
|
+
disabled: disabled,
|
|
2142
|
+
title: title,
|
|
2143
|
+
icon: icon,
|
|
2144
|
+
iconPosition: iconPosition
|
|
2145
|
+
}), jsx(AccordionBody, {
|
|
2146
|
+
id: panelId,
|
|
2147
|
+
className: panelClassNames,
|
|
2148
|
+
"aria-labelledby": buttonId,
|
|
2149
|
+
panelRef: panelRef,
|
|
2150
|
+
contentRef: contentRef,
|
|
1714
2151
|
children: children
|
|
1715
|
-
})
|
|
1716
|
-
})
|
|
2152
|
+
}) ]
|
|
2153
|
+
})
|
|
1717
2154
|
});
|
|
1718
2155
|
if (glass) {
|
|
1719
2156
|
// Default glass settings for accordions
|
|
@@ -1726,16 +2163,20 @@ const Accordion = memo((({title: title, children: children, defaultOpen: defaul
|
|
|
1726
2163
|
};
|
|
1727
2164
|
return jsx(AtomixGlass, {
|
|
1728
2165
|
...glassProps,
|
|
1729
|
-
children:
|
|
2166
|
+
children: content
|
|
1730
2167
|
});
|
|
1731
2168
|
}
|
|
1732
|
-
return
|
|
2169
|
+
return content;
|
|
1733
2170
|
}));
|
|
1734
2171
|
|
|
1735
|
-
|
|
1736
|
-
|
|
2172
|
+
AccordionImpl.displayName = "Accordion";
|
|
2173
|
+
|
|
2174
|
+
// Attach subcomponents
|
|
2175
|
+
const AccordionWithSubcomponents = AccordionImpl;
|
|
1737
2176
|
|
|
1738
|
-
|
|
2177
|
+
AccordionWithSubcomponents.Header = AccordionHeader, AccordionWithSubcomponents.Body = AccordionBody;
|
|
2178
|
+
|
|
2179
|
+
const Accordion = AccordionWithSubcomponents, Badge = memo((({label: label, variant: variant = "primary", size: size = "md", disabled: disabled = !1, icon: icon, onRemove: onRemove, "aria-label": ariaLabel, className: className = "", glass: glass, style: style}) => {
|
|
1739
2180
|
const {generateBadgeClass: generateBadgeClass} =
|
|
1740
2181
|
/**
|
|
1741
2182
|
* Badge state and functionality
|
|
@@ -1915,42 +2356,80 @@ const Block = forwardRef((({children: children, as: Component = "section", spac
|
|
|
1915
2356
|
* ```
|
|
1916
2357
|
*/ Block.displayName = "Block";
|
|
1917
2358
|
|
|
1918
|
-
const
|
|
2359
|
+
const BreadcrumbItem = forwardRef((({children: children, href: href, active: active, icon: icon, onClick: onClick, className: className = "", style: style, linkAs: LinkComponent, linkProps: linkProps = {}, ...props}, ref) => {
|
|
2360
|
+
const itemClasses = [ BREADCRUMB.CLASSES.ITEM, active ? BREADCRUMB.CLASSES.ACTIVE : "", className ].filter(Boolean).join(" "), linkContent = jsxs(Fragment, {
|
|
2361
|
+
children: [ icon && jsx("span", {
|
|
2362
|
+
className: "c-breadcrumb__icon",
|
|
2363
|
+
children: icon
|
|
2364
|
+
}), children ]
|
|
2365
|
+
}), commonLinkProps = {
|
|
2366
|
+
className: BREADCRUMB.CLASSES.LINK,
|
|
2367
|
+
onClick: onClick,
|
|
2368
|
+
style: style,
|
|
2369
|
+
// Apply style to the link as per legacy behavior
|
|
2370
|
+
...linkProps
|
|
2371
|
+
};
|
|
2372
|
+
return jsx("li", {
|
|
2373
|
+
ref: ref,
|
|
2374
|
+
className: itemClasses,
|
|
2375
|
+
style: style,
|
|
2376
|
+
...props,
|
|
2377
|
+
children: href && !active ? jsx(LinkComponent || "a", {
|
|
2378
|
+
href: href,
|
|
2379
|
+
...commonLinkProps,
|
|
2380
|
+
children: linkContent
|
|
2381
|
+
}) : jsx("span", {
|
|
2382
|
+
className: BREADCRUMB.CLASSES.LINK,
|
|
2383
|
+
children: linkContent
|
|
2384
|
+
})
|
|
2385
|
+
});
|
|
2386
|
+
}));
|
|
2387
|
+
|
|
2388
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
2389
|
+
|
|
2390
|
+
const Breadcrumb = memo((({items: items, divider: divider, className: className = "", "aria-label": ariaLabel = "Breadcrumb", LinkComponent: LinkComponent, style: style, children: children}) => {
|
|
1919
2391
|
const breadcrumbClasses = [ BREADCRUMB.CLASSES.BASE, className ].filter(Boolean).join(" ");
|
|
2392
|
+
let content;
|
|
2393
|
+
if (items && items.length > 0)
|
|
2394
|
+
// Legacy rendering
|
|
2395
|
+
content = items.map(((item, index) => {
|
|
2396
|
+
const isLast = index === items.length - 1;
|
|
2397
|
+
return jsx(BreadcrumbItem, {
|
|
2398
|
+
href: item.href,
|
|
2399
|
+
active: item.active || isLast,
|
|
2400
|
+
icon: item.icon,
|
|
2401
|
+
onClick: item.onClick,
|
|
2402
|
+
className: item.className,
|
|
2403
|
+
style: item.style,
|
|
2404
|
+
linkAs: LinkComponent,
|
|
2405
|
+
children: item.label
|
|
2406
|
+
}, index);
|
|
2407
|
+
})); else {
|
|
2408
|
+
// Compound rendering
|
|
2409
|
+
const childrenCount = Children.count(children);
|
|
2410
|
+
content = Children.map(children, ((child, index) => {
|
|
2411
|
+
if ( isValidElement(child)) {
|
|
2412
|
+
const isLast = index === childrenCount - 1, childProps = child.props;
|
|
2413
|
+
|
|
2414
|
+
return cloneElement(child, {
|
|
2415
|
+
active: childProps.active ?? (!!isLast || void 0),
|
|
2416
|
+
linkAs: childProps.linkAs ?? LinkComponent
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
return child;
|
|
2420
|
+
}));
|
|
2421
|
+
}
|
|
1920
2422
|
return jsx("nav", {
|
|
1921
2423
|
"aria-label": ariaLabel,
|
|
1922
2424
|
style: style,
|
|
1923
2425
|
children: jsx("ol", {
|
|
1924
2426
|
className: breadcrumbClasses,
|
|
1925
|
-
children:
|
|
1926
|
-
const isLast = index === items.length - 1, itemClasses = [ BREADCRUMB.CLASSES.ITEM, item.active || isLast ? BREADCRUMB.CLASSES.ACTIVE : "" ].filter(Boolean).join(" "), linkContent = jsxs(Fragment, {
|
|
1927
|
-
children: [ item.icon && jsx("span", {
|
|
1928
|
-
className: "c-breadcrumb__icon",
|
|
1929
|
-
children: item.icon
|
|
1930
|
-
}), item.label ]
|
|
1931
|
-
}), linkProps = {
|
|
1932
|
-
href: item.href,
|
|
1933
|
-
className: BREADCRUMB.CLASSES.LINK,
|
|
1934
|
-
onClick: item.onClick,
|
|
1935
|
-
style: item.style
|
|
1936
|
-
};
|
|
1937
|
-
return jsx("li", {
|
|
1938
|
-
className: itemClasses,
|
|
1939
|
-
style: item.style,
|
|
1940
|
-
children: item.href && !item.active ? jsx(LinkComponent || "a", {
|
|
1941
|
-
...linkProps,
|
|
1942
|
-
children: linkContent
|
|
1943
|
-
}) : jsx("span", {
|
|
1944
|
-
className: BREADCRUMB.CLASSES.LINK,
|
|
1945
|
-
children: linkContent
|
|
1946
|
-
})
|
|
1947
|
-
}, index);
|
|
1948
|
-
}))
|
|
2427
|
+
children: content
|
|
1949
2428
|
})
|
|
1950
2429
|
});
|
|
1951
2430
|
}));
|
|
1952
2431
|
|
|
1953
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
2432
|
+
Breadcrumb.displayName = "Breadcrumb", Breadcrumb.Item = BreadcrumbItem;
|
|
1954
2433
|
|
|
1955
2434
|
const Spinner = memo((({size: size = "md", variant: variant = "primary", fullscreen: fullscreen = !1, className: className = "", style: style, glass: glass, "aria-label": ariaLabel, role: role = "status"}) => {
|
|
1956
2435
|
const {generateSpinnerClass: generateSpinnerClass} =
|
|
@@ -2069,7 +2548,7 @@ class ThemeNaming {
|
|
|
2069
2548
|
* Convert camelCase to kebab-case for CSS variables
|
|
2070
2549
|
* @param str - String to convert
|
|
2071
2550
|
*/ static camelToKebab(str) {
|
|
2072
|
-
return str.replace(/([a-z0-9]
|
|
2551
|
+
return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2073
2552
|
}
|
|
2074
2553
|
/**
|
|
2075
2554
|
* Convert kebab-case to camelCase for JavaScript properties
|
|
@@ -2477,402 +2956,102 @@ const ElevationCard = ({elevationClass: elevationClass = "is-elevated", classNam
|
|
|
2477
2956
|
elevationClass: elevationClass,
|
|
2478
2957
|
clickable: Boolean(onClick),
|
|
2479
2958
|
onClick: onClick,
|
|
2480
|
-
focusEffect: !0
|
|
2481
|
-
}), cardProps = getCardProps();
|
|
2482
|
-
return jsx("div", {
|
|
2483
|
-
className: `${className} ${cardProps.className}`,
|
|
2484
|
-
ref: cardProps.ref,
|
|
2485
|
-
style: style,
|
|
2486
|
-
tabIndex: cardProps.tabIndex,
|
|
2487
|
-
role: cardProps.role,
|
|
2488
|
-
onMouseEnter: cardProps.onMouseEnter,
|
|
2489
|
-
onMouseLeave: cardProps.onMouseLeave,
|
|
2490
|
-
onFocus: cardProps.onFocus,
|
|
2491
|
-
onBlur: cardProps.onBlur,
|
|
2492
|
-
onClick: cardProps.onClick,
|
|
2493
|
-
onKeyDown: cardProps.onKeyDown,
|
|
2494
|
-
children: jsx(Card, {
|
|
2495
|
-
...props,
|
|
2496
|
-
className: "",
|
|
2497
|
-
onClick: void 0,
|
|
2498
|
-
children: children
|
|
2499
|
-
})
|
|
2500
|
-
});
|
|
2501
|
-
};
|
|
2502
|
-
|
|
2503
|
-
ElevationCard.displayName = "ElevationCard";
|
|
2504
|
-
|
|
2505
|
-
var commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
|
|
2506
|
-
|
|
2507
|
-
function getDefaultExportFromCjs(x) {
|
|
2508
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
|
-
var fails$8 = function(exec) {
|
|
2512
|
-
try {
|
|
2513
|
-
return !!exec();
|
|
2514
|
-
} catch (error) {
|
|
2515
|
-
return !0;
|
|
2516
|
-
}
|
|
2517
|
-
}, functionBindNative = !fails$8((function() {
|
|
2518
|
-
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
2519
|
-
var test = function() {/* empty */}.bind();
|
|
2520
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
2521
|
-
return "function" != typeof test || test.hasOwnProperty("prototype");
|
|
2522
|
-
})), 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) {
|
|
2523
|
-
return function() {
|
|
2524
|
-
return call$5.apply(fn, arguments);
|
|
2525
|
-
};
|
|
2526
|
-
}, objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf), check = function(it) {
|
|
2527
|
-
return it && it.Math === Math && it;
|
|
2528
|
-
}, globalThis_1 =
|
|
2529
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
2530
|
-
check("object" == typeof globalThis && globalThis) || check("object" == typeof window && window) ||
|
|
2531
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
2532
|
-
check("object" == typeof self && self) || check("object" == typeof commonjsGlobal && commonjsGlobal) || check("object" == typeof commonjsGlobal && commonjsGlobal) ||
|
|
2533
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
2534
|
-
function() {
|
|
2535
|
-
return this;
|
|
2536
|
-
}() || 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() {
|
|
2537
|
-
return call$4.apply(apply$1, arguments);
|
|
2538
|
-
}), uncurryThis$7 = functionUncurryThis, toString$3 = uncurryThis$7({}.toString), stringSlice = uncurryThis$7("".slice), classofRaw$2 = function(it) {
|
|
2539
|
-
return stringSlice(toString$3(it), 8, -1);
|
|
2540
|
-
}, classofRaw$1 = classofRaw$2, uncurryThis$6 = functionUncurryThis, functionUncurryThisClause = function(fn) {
|
|
2541
|
-
// Nashorn bug:
|
|
2542
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
2543
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
2544
|
-
if ("Function" === classofRaw$1(fn)) return uncurryThis$6(fn);
|
|
2545
|
-
}, documentAll = "object" == typeof document && document.all, isCallable$8 = void 0 === documentAll && void 0 !== documentAll ? function(argument) {
|
|
2546
|
-
return "function" == typeof argument || argument === documentAll;
|
|
2547
|
-
} : function(argument) {
|
|
2548
|
-
return "function" == typeof argument;
|
|
2549
|
-
}, objectGetOwnPropertyDescriptor = {}, descriptors = !fails$8((function() {
|
|
2550
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2551
|
-
return 7 !== Object.defineProperty({}, 1, {
|
|
2552
|
-
get: function() {
|
|
2553
|
-
return 7;
|
|
2554
|
-
}
|
|
2555
|
-
})[1];
|
|
2556
|
-
})), NATIVE_BIND$1 = functionBindNative, call$3 = Function.prototype.call, functionCall = NATIVE_BIND$1 ? call$3.bind(call$3) : function() {
|
|
2557
|
-
return call$3.apply(call$3, arguments);
|
|
2558
|
-
}, objectPropertyIsEnumerable = {}, $propertyIsEnumerable = {}.propertyIsEnumerable, getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
|
|
2559
|
-
1: 2
|
|
2560
|
-
}, 1);
|
|
2561
|
-
|
|
2562
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
2563
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
2564
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function(V) {
|
|
2565
|
-
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
2566
|
-
return !!descriptor && descriptor.enumerable;
|
|
2567
|
-
} : $propertyIsEnumerable;
|
|
2568
|
-
|
|
2569
|
-
var match, version, createPropertyDescriptor$2 = function(bitmap, value) {
|
|
2570
|
-
return {
|
|
2571
|
-
enumerable: !(1 & bitmap),
|
|
2572
|
-
configurable: !(2 & bitmap),
|
|
2573
|
-
writable: !(4 & bitmap),
|
|
2574
|
-
value: value
|
|
2575
|
-
};
|
|
2576
|
-
}, fails$5 = fails$8, classof$3 = classofRaw$2, $Object$3 = Object, split = functionUncurryThis("".split), indexedObject = fails$5((function() {
|
|
2577
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
2578
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
2579
|
-
return !$Object$3("z").propertyIsEnumerable(0);
|
|
2580
|
-
})) ? function(it) {
|
|
2581
|
-
return "String" === classof$3(it) ? split(it, "") : $Object$3(it);
|
|
2582
|
-
} : $Object$3, isNullOrUndefined$2 = function(it) {
|
|
2583
|
-
return null == it;
|
|
2584
|
-
}, isNullOrUndefined$1 = isNullOrUndefined$2, $TypeError$6 = TypeError, requireObjectCoercible$3 = function(it) {
|
|
2585
|
-
if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
|
|
2586
|
-
return it;
|
|
2587
|
-
}, IndexedObject = indexedObject, requireObjectCoercible$2 = requireObjectCoercible$3, toIndexedObject$2 = function(it) {
|
|
2588
|
-
return IndexedObject(requireObjectCoercible$2(it));
|
|
2589
|
-
}, isCallable$7 = isCallable$8, isObject$5 = function(it) {
|
|
2590
|
-
return "object" == typeof it ? null !== it : isCallable$7(it);
|
|
2591
|
-
}, path$3 = {}, path$2 = path$3, globalThis$a = globalThis_1, isCallable$6 = isCallable$8, aFunction = function(variable) {
|
|
2592
|
-
return isCallable$6(variable) ? variable : void 0;
|
|
2593
|
-
}, navigator = globalThis_1.navigator, userAgent$1 = navigator && navigator.userAgent, globalThis$8 = globalThis_1, userAgent = userAgent$1 ? String(userAgent$1) : "", process$1 = globalThis$8.process, Deno = globalThis$8.Deno, versions = process$1 && process$1.versions || Deno && Deno.version, v8 = versions && versions.v8;
|
|
2594
|
-
|
|
2595
|
-
v8 && (
|
|
2596
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
2597
|
-
// but their correct versions are not interesting for us
|
|
2598
|
-
version = (match = v8.split("."))[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1])),
|
|
2599
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
2600
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
2601
|
-
!version && userAgent && (!(match = userAgent.match(/Edge\/(\d+)/)) || match[1] >= 74) && (match = userAgent.match(/Chrome\/(\d+)/)) && (version = +match[1]);
|
|
2602
|
-
|
|
2603
|
-
var V8_VERSION = version, fails$4 = fails$8, $String$3 = globalThis_1.String, symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$4((function() {
|
|
2604
|
-
var symbol = Symbol("symbol detection");
|
|
2605
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
2606
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
2607
|
-
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
2608
|
-
// of course, fail.
|
|
2609
|
-
return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
2610
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
2611
|
-
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
2612
|
-
})), useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && "symbol" == typeof Symbol.iterator, isCallable$5 = isCallable$8, isPrototypeOf$1 = objectIsPrototypeOf, $Object$2 = Object, isSymbol$2 = useSymbolAsUid ? function(it) {
|
|
2613
|
-
return "symbol" == typeof it;
|
|
2614
|
-
} : function(it) {
|
|
2615
|
-
var $Symbol = function(namespace, method) {
|
|
2616
|
-
return arguments.length < 2 ? aFunction(path$2[namespace]) || aFunction(globalThis$a[namespace]) : path$2[namespace] && path$2[namespace][method] || globalThis$a[namespace] && globalThis$a[namespace][method];
|
|
2617
|
-
}("Symbol");
|
|
2618
|
-
return isCallable$5($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
|
|
2619
|
-
}, $String$2 = String, isCallable$4 = isCallable$8, $TypeError$5 = TypeError, aCallable$2 = function(argument) {
|
|
2620
|
-
if (isCallable$4(argument)) return argument;
|
|
2621
|
-
throw new $TypeError$5(function(argument) {
|
|
2622
|
-
try {
|
|
2623
|
-
return $String$2(argument);
|
|
2624
|
-
} catch (error) {
|
|
2625
|
-
return "Object";
|
|
2626
|
-
}
|
|
2627
|
-
}(argument) + " is not a function");
|
|
2628
|
-
}, aCallable$1 = aCallable$2, isNullOrUndefined = isNullOrUndefined$2, call$2 = functionCall, isCallable$3 = isCallable$8, isObject$4 = isObject$5, $TypeError$4 = TypeError, sharedStore = {
|
|
2629
|
-
exports: {}
|
|
2630
|
-
}, globalThis$6 = globalThis_1, defineProperty = Object.defineProperty, globalThis$5 = globalThis_1, store$1 = sharedStore.exports = globalThis$5["__core-js_shared__"] || function(key, value) {
|
|
2631
|
-
try {
|
|
2632
|
-
defineProperty(globalThis$6, key, {
|
|
2633
|
-
value: value,
|
|
2634
|
-
configurable: !0,
|
|
2635
|
-
writable: !0
|
|
2636
|
-
});
|
|
2637
|
-
} catch (error) {
|
|
2638
|
-
globalThis$6[key] = value;
|
|
2639
|
-
}
|
|
2640
|
-
return value;
|
|
2641
|
-
}("__core-js_shared__", {});
|
|
2959
|
+
focusEffect: !0
|
|
2960
|
+
}), cardProps = getCardProps();
|
|
2961
|
+
return jsx("div", {
|
|
2962
|
+
className: `${className} ${cardProps.className}`,
|
|
2963
|
+
ref: cardProps.ref,
|
|
2964
|
+
style: style,
|
|
2965
|
+
tabIndex: cardProps.tabIndex,
|
|
2966
|
+
role: cardProps.role,
|
|
2967
|
+
onMouseEnter: cardProps.onMouseEnter,
|
|
2968
|
+
onMouseLeave: cardProps.onMouseLeave,
|
|
2969
|
+
onFocus: cardProps.onFocus,
|
|
2970
|
+
onBlur: cardProps.onBlur,
|
|
2971
|
+
onClick: cardProps.onClick,
|
|
2972
|
+
onKeyDown: cardProps.onKeyDown,
|
|
2973
|
+
children: jsx(Card, {
|
|
2974
|
+
...props,
|
|
2975
|
+
className: "",
|
|
2976
|
+
onClick: void 0,
|
|
2977
|
+
children: children
|
|
2978
|
+
})
|
|
2979
|
+
});
|
|
2980
|
+
};
|
|
2642
2981
|
|
|
2643
|
-
|
|
2644
|
-
version: "3.43.0",
|
|
2645
|
-
mode: "pure",
|
|
2646
|
-
copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)",
|
|
2647
|
-
license: "https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",
|
|
2648
|
-
source: "https://github.com/zloirock/core-js"
|
|
2649
|
-
});
|
|
2982
|
+
ElevationCard.displayName = "ElevationCard";
|
|
2650
2983
|
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
}, call$1 = functionCall, isObject$3 = isObject$5, isSymbol$1 = isSymbol$2, $TypeError$3 = TypeError, TO_PRIMITIVE = wellKnownSymbol$5("toPrimitive"), toPrimitive = function(input, pref) {
|
|
2659
|
-
if (!isObject$3(input) || isSymbol$1(input)) return input;
|
|
2660
|
-
var result, func, exoticToPrim = (func = input[TO_PRIMITIVE], isNullOrUndefined(func) ? void 0 : aCallable$1(func));
|
|
2661
|
-
if (exoticToPrim) {
|
|
2662
|
-
if (void 0 === pref && (pref = "default"), result = call$1(exoticToPrim, input, pref),
|
|
2663
|
-
!isObject$3(result) || isSymbol$1(result)) return result;
|
|
2664
|
-
throw new $TypeError$3("Can't convert object to primitive value");
|
|
2665
|
-
}
|
|
2666
|
-
return void 0 === pref && (pref = "number"), function(input, pref) {
|
|
2667
|
-
var fn, val;
|
|
2668
|
-
if ("string" === pref && isCallable$3(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
|
|
2669
|
-
if (isCallable$3(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
|
|
2670
|
-
if ("string" !== pref && isCallable$3(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
|
|
2671
|
-
throw new $TypeError$4("Can't convert object to primitive value");
|
|
2672
|
-
}(input, pref);
|
|
2673
|
-
}, isSymbol = isSymbol$2, toPropertyKey$2 = function(argument) {
|
|
2674
|
-
var key = toPrimitive(argument, "string");
|
|
2675
|
-
return isSymbol(key) ? key : key + "";
|
|
2676
|
-
}, isObject$2 = isObject$5, document$1 = globalThis_1.document, EXISTS = isObject$2(document$1) && isObject$2(document$1.createElement), ie8DomDefine = !descriptors && !fails$8((function() {
|
|
2677
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2678
|
-
return 7 !== Object.defineProperty((it = "div", EXISTS ? document$1.createElement(it) : {}), "a", {
|
|
2679
|
-
get: function() {
|
|
2680
|
-
return 7;
|
|
2681
|
-
}
|
|
2682
|
-
}).a;
|
|
2683
|
-
var it;
|
|
2684
|
-
})), 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;
|
|
2984
|
+
// Subcomponents
|
|
2985
|
+
const CalloutIcon = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
|
|
2986
|
+
ref: ref,
|
|
2987
|
+
className: `c-callout__icon ${className}`.trim(),
|
|
2988
|
+
...props,
|
|
2989
|
+
children: children
|
|
2990
|
+
})));
|
|
2685
2991
|
|
|
2686
|
-
|
|
2687
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
2688
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor$1 : function(O, P) {
|
|
2689
|
-
if (O = toIndexedObject$1(O), P = toPropertyKey$1(P), IE8_DOM_DEFINE$1) try {
|
|
2690
|
-
return $getOwnPropertyDescriptor$1(O, P);
|
|
2691
|
-
} catch (error) {/* empty */}
|
|
2692
|
-
if (hasOwn$1(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
2693
|
-
};
|
|
2992
|
+
CalloutIcon.displayName = "CalloutIcon";
|
|
2694
2993
|
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
}
|
|
2701
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2702
|
-
return 42 !== Object.defineProperty((function() {/* empty */}), "prototype", {
|
|
2703
|
-
value: 42,
|
|
2704
|
-
writable: !1
|
|
2705
|
-
}).prototype;
|
|
2706
|
-
})), isObject$1 = isObject$5, $String$1 = String, $TypeError$2 = TypeError, DESCRIPTORS$1 = descriptors, IE8_DOM_DEFINE = ie8DomDefine, V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug, anObject = function(argument) {
|
|
2707
|
-
if (isObject$1(argument)) return argument;
|
|
2708
|
-
throw new $TypeError$2($String$1(argument) + " is not an object");
|
|
2709
|
-
}, toPropertyKey = toPropertyKey$2, $TypeError$1 = TypeError, $defineProperty = Object.defineProperty, $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2994
|
+
const CalloutMessage = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
|
|
2995
|
+
ref: ref,
|
|
2996
|
+
className: `c-callout__message ${className}`.trim(),
|
|
2997
|
+
...props,
|
|
2998
|
+
children: children
|
|
2999
|
+
})));
|
|
2710
3000
|
|
|
2711
|
-
|
|
2712
|
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
2713
|
-
objectDefineProperty.f = DESCRIPTORS$1 ? V8_PROTOTYPE_DEFINE_BUG ? function(O, P, Attributes) {
|
|
2714
|
-
if (anObject(O), P = toPropertyKey(P), anObject(Attributes), "function" == typeof O && "prototype" === P && "value" in Attributes && "writable" in Attributes && !Attributes.writable) {
|
|
2715
|
-
var current = $getOwnPropertyDescriptor(O, P);
|
|
2716
|
-
current && current.writable && (O[P] = Attributes.value, Attributes = {
|
|
2717
|
-
configurable: "configurable" in Attributes ? Attributes.configurable : current.configurable,
|
|
2718
|
-
enumerable: "enumerable" in Attributes ? Attributes.enumerable : current.enumerable,
|
|
2719
|
-
writable: !1
|
|
2720
|
-
});
|
|
2721
|
-
}
|
|
2722
|
-
return $defineProperty(O, P, Attributes);
|
|
2723
|
-
} : $defineProperty : function(O, P, Attributes) {
|
|
2724
|
-
if (anObject(O), P = toPropertyKey(P), anObject(Attributes), IE8_DOM_DEFINE) try {
|
|
2725
|
-
return $defineProperty(O, P, Attributes);
|
|
2726
|
-
} catch (error) {/* empty */}
|
|
2727
|
-
if ("get" in Attributes || "set" in Attributes) throw new $TypeError$1("Accessors not supported");
|
|
2728
|
-
return "value" in Attributes && (O[P] = Attributes.value), O;
|
|
2729
|
-
};
|
|
3001
|
+
CalloutMessage.displayName = "CalloutMessage";
|
|
2730
3002
|
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
return fn.apply(that, arguments);
|
|
2738
|
-
};
|
|
2739
|
-
}, createNonEnumerableProperty = createNonEnumerableProperty$1, hasOwn = hasOwnProperty_1, wrapConstructor = function(NativeConstructor) {
|
|
2740
|
-
var Wrapper = function(a, b, c) {
|
|
2741
|
-
if (this instanceof Wrapper) {
|
|
2742
|
-
switch (arguments.length) {
|
|
2743
|
-
case 0:
|
|
2744
|
-
return new NativeConstructor;
|
|
3003
|
+
const CalloutTitle = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
|
|
3004
|
+
ref: ref,
|
|
3005
|
+
className: `c-callout__title ${className}`.trim(),
|
|
3006
|
+
...props,
|
|
3007
|
+
children: children
|
|
3008
|
+
})));
|
|
2745
3009
|
|
|
2746
|
-
|
|
2747
|
-
return new NativeConstructor(a);
|
|
3010
|
+
CalloutTitle.displayName = "CalloutTitle";
|
|
2748
3011
|
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
};
|
|
2756
|
-
return Wrapper.prototype = NativeConstructor.prototype, Wrapper;
|
|
2757
|
-
}, _export = function(options, source) {
|
|
2758
|
-
var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE, key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor, TARGET = options.target, GLOBAL = options.global, STATIC = options.stat, PROTO = options.proto, nativeSource = GLOBAL ? globalThis$2 : STATIC ? globalThis$2[TARGET] : globalThis$2[TARGET] && globalThis$2[TARGET].prototype, target = GLOBAL ? path$1 : path$1[TARGET] || createNonEnumerableProperty(path$1, TARGET, {})[TARGET], targetPrototype = target.prototype;
|
|
2759
|
-
for (key in source)
|
|
2760
|
-
// contains in native
|
|
2761
|
-
USE_NATIVE = !(FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced)) && nativeSource && hasOwn(nativeSource, key),
|
|
2762
|
-
targetProperty = target[key], USE_NATIVE && (nativeProperty = options.dontCallGetSet ? (descriptor = getOwnPropertyDescriptor(nativeSource, key)) && descriptor.value : nativeSource[key]),
|
|
2763
|
-
// export native or implementation
|
|
2764
|
-
sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key], (FORCED || PROTO || typeof targetProperty != typeof sourceProperty) && (
|
|
2765
|
-
// bind methods to global for calling from export context
|
|
2766
|
-
resultProperty = options.bind && USE_NATIVE ? bind(sourceProperty, globalThis$2) : options.wrap && USE_NATIVE ? wrapConstructor(sourceProperty) : PROTO && isCallable$1(sourceProperty) ? uncurryThis$1(sourceProperty) : sourceProperty,
|
|
2767
|
-
// add a flag to not completely full polyfills
|
|
2768
|
-
(options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) && createNonEnumerableProperty(resultProperty, "sham", !0),
|
|
2769
|
-
createNonEnumerableProperty(target, key, resultProperty), PROTO && (hasOwn(path$1, VIRTUAL_PROTOTYPE = TARGET + "Prototype") || createNonEnumerableProperty(path$1, VIRTUAL_PROTOTYPE, {}),
|
|
2770
|
-
// export virtual prototype methods
|
|
2771
|
-
createNonEnumerableProperty(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty),
|
|
2772
|
-
// export real prototype methods
|
|
2773
|
-
options.real && targetPrototype && (FORCED || !targetPrototype[key]) && createNonEnumerableProperty(targetPrototype, key, sourceProperty)));
|
|
2774
|
-
}, ceil = Math.ceil, floor = Math.floor, trunc = Math.trunc || function(x) {
|
|
2775
|
-
var n = +x;
|
|
2776
|
-
return (n > 0 ? floor : ceil)(n);
|
|
2777
|
-
}, toIntegerOrInfinity$2 = function(argument) {
|
|
2778
|
-
var number = +argument;
|
|
2779
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
2780
|
-
return number != number || 0 === number ? 0 : trunc(number);
|
|
2781
|
-
}, toIntegerOrInfinity$1 = toIntegerOrInfinity$2, max = Math.max, min$1 = Math.min, toIntegerOrInfinity = toIntegerOrInfinity$2, min = Math.min, toIndexedObject = toIndexedObject$2, lengthOfArrayLike = function(obj) {
|
|
2782
|
-
return argument = obj.length, (len = toIntegerOrInfinity(argument)) > 0 ? min(len, 9007199254740991) : 0;
|
|
2783
|
-
var argument, len;
|
|
2784
|
-
}, createMethod = function(IS_INCLUDES) {
|
|
2785
|
-
return function($this, el, fromIndex) {
|
|
2786
|
-
var O = toIndexedObject($this), length = lengthOfArrayLike(O);
|
|
2787
|
-
if (0 === length) return !IS_INCLUDES && -1;
|
|
2788
|
-
var value, index = function(index, length) {
|
|
2789
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
2790
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
2791
|
-
}(fromIndex, length);
|
|
2792
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
2793
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
2794
|
-
if (IS_INCLUDES && el != el) {
|
|
2795
|
-
for (;length > index; )
|
|
2796
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
2797
|
-
if ((value = O[index++]) != value) return !0;
|
|
2798
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
2799
|
-
} else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
2800
|
-
return !IS_INCLUDES && -1;
|
|
2801
|
-
};
|
|
2802
|
-
}, $includes = [ createMethod(!0), createMethod(!1) ][0];
|
|
3012
|
+
const CalloutText = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
|
|
3013
|
+
ref: ref,
|
|
3014
|
+
className: `c-callout__text ${className}`.trim(),
|
|
3015
|
+
...props,
|
|
3016
|
+
children: children
|
|
3017
|
+
})));
|
|
2803
3018
|
|
|
2804
|
-
|
|
2805
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
2806
|
-
_export({
|
|
2807
|
-
target: "Array",
|
|
2808
|
-
proto: !0,
|
|
2809
|
-
forced: fails$8((function() {
|
|
2810
|
-
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
2811
|
-
return !Array(1).includes();
|
|
2812
|
-
}))
|
|
2813
|
-
}, {
|
|
2814
|
-
includes: function(el /* , fromIndex = 0 */) {
|
|
2815
|
-
return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
|
|
2816
|
-
}
|
|
2817
|
-
});
|
|
3019
|
+
CalloutText.displayName = "CalloutText";
|
|
2818
3020
|
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
}
|
|
3021
|
+
const CalloutActions = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
|
|
3022
|
+
ref: ref,
|
|
3023
|
+
className: `c-callout__actions ${className}`.trim(),
|
|
3024
|
+
...props,
|
|
3025
|
+
children: children
|
|
3026
|
+
})));
|
|
2825
3027
|
|
|
2826
|
-
|
|
3028
|
+
CalloutActions.displayName = "CalloutActions";
|
|
3029
|
+
|
|
3030
|
+
const CalloutCloseButton = forwardRef((({onClick: onClick, className: className = "", ...props}, ref) => jsx("button", {
|
|
3031
|
+
ref: ref,
|
|
3032
|
+
className: `c-callout__close-btn ${className}`.trim(),
|
|
3033
|
+
onClick: onClick,
|
|
3034
|
+
"aria-label": "Close",
|
|
3035
|
+
...props,
|
|
3036
|
+
children: jsx(Icon, {
|
|
3037
|
+
name: "X",
|
|
3038
|
+
size: "md"
|
|
3039
|
+
})
|
|
3040
|
+
})));
|
|
2827
3041
|
|
|
2828
|
-
|
|
2829
|
-
return arguments;
|
|
2830
|
-
}()), classof = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
|
|
2831
|
-
var O, tag, result;
|
|
2832
|
-
return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (tag = function(it, key) {
|
|
2833
|
-
try {
|
|
2834
|
-
return it[key];
|
|
2835
|
-
} catch (error) {/* empty */}
|
|
2836
|
-
}(O = $Object(it), TO_STRING_TAG)) ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : "Object" === (result = classofRaw(O)) && isCallable(O.callee) ? "Arguments" : result;
|
|
2837
|
-
}, $String = String, MATCH = wellKnownSymbol$5("match"), $ = _export, notARegExp = function(it) {
|
|
2838
|
-
if (function(it) {
|
|
2839
|
-
var isRegExp;
|
|
2840
|
-
return isObject(it) && (void 0 !== (isRegExp = it[MATCH$1]) ? !!isRegExp : "RegExp" === classof$2(it));
|
|
2841
|
-
}(it)) throw new $TypeError("The method doesn't accept regular expressions");
|
|
2842
|
-
return it;
|
|
2843
|
-
}, requireObjectCoercible = requireObjectCoercible$3, toString = function(argument) {
|
|
2844
|
-
if ("Symbol" === classof(argument)) throw new TypeError("Cannot convert a Symbol value to a string");
|
|
2845
|
-
return $String(argument);
|
|
2846
|
-
}, stringIndexOf = functionUncurryThis("".indexOf);
|
|
3042
|
+
CalloutCloseButton.displayName = "CalloutCloseButton";
|
|
2847
3043
|
|
|
2848
|
-
//
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
try {
|
|
2856
|
-
"/./"[METHOD_NAME](regexp);
|
|
2857
|
-
} catch (error1) {
|
|
2858
|
-
try {
|
|
2859
|
-
return regexp[MATCH] = !1, "/./"[METHOD_NAME](regexp);
|
|
2860
|
-
} catch (error2) {/* empty */}
|
|
2861
|
-
}
|
|
2862
|
-
return !1;
|
|
2863
|
-
}("includes")
|
|
2864
|
-
}, {
|
|
2865
|
-
includes: function(searchString /* , position = 0 */) {
|
|
2866
|
-
return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
|
|
2867
|
-
}
|
|
2868
|
-
});
|
|
3044
|
+
// Wrapper for content (icon + message)
|
|
3045
|
+
const CalloutContent = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("div", {
|
|
3046
|
+
ref: ref,
|
|
3047
|
+
className: `c-callout__content ${className}`.trim(),
|
|
3048
|
+
...props,
|
|
3049
|
+
children: children
|
|
3050
|
+
})));
|
|
2869
3051
|
|
|
2870
|
-
|
|
3052
|
+
CalloutContent.displayName = "CalloutContent";
|
|
2871
3053
|
|
|
2872
|
-
const
|
|
2873
|
-
var own = it.includes;
|
|
2874
|
-
return it === ArrayPrototype || isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes ? arrayMethod : "string" == typeof it || it === StringPrototype || isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes ? stringMethod : own;
|
|
2875
|
-
})), 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}) => {
|
|
3054
|
+
const Callout = memo((({title: title, children: children, icon: icon, variant: variant = "primary", onClose: onClose, actions: actions, compact: compact = !1, isToast: isToast = !1, glass: glass, className: className, style: style, ...props}) => {
|
|
2876
3055
|
const {generateCalloutClass: generateCalloutClass, handleClose: handleClose} =
|
|
2877
3056
|
/**
|
|
2878
3057
|
* Callout state and functionality
|
|
@@ -2902,10 +3081,7 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
|
|
|
2902
3081
|
handler && handler();
|
|
2903
3082
|
}
|
|
2904
3083
|
};
|
|
2905
|
-
}
|
|
2906
|
-
/**
|
|
2907
|
-
* Callout component for displaying important messages, notifications, or alerts
|
|
2908
|
-
*/ ({
|
|
3084
|
+
}({
|
|
2909
3085
|
variant: variant,
|
|
2910
3086
|
compact: compact,
|
|
2911
3087
|
isToast: isToast,
|
|
@@ -2921,7 +3097,11 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
|
|
|
2921
3097
|
return isToast ? (baseAttributes.role = "alert", baseAttributes["aria-live"] = "polite") : _includesInstanceProperty(_context = [ "warning", "error" ]).call(_context, variant) ? (baseAttributes.role = "alert",
|
|
2922
3098
|
baseAttributes["aria-live"] = "assertive") : _includesInstanceProperty(_context2 = [ "info", "success" ]).call(_context2, variant) && (baseAttributes.role = "status",
|
|
2923
3099
|
baseAttributes["aria-live"] = "polite"), baseAttributes;
|
|
2924
|
-
}, calloutContent =
|
|
3100
|
+
}, calloutContent = React.Children.toArray(children).some((child => {
|
|
3101
|
+
var _context3;
|
|
3102
|
+
|
|
3103
|
+
return React.isValidElement(child) && _includesInstanceProperty(_context3 = [ "CalloutIcon", "CalloutMessage", "CalloutTitle", "CalloutText", "CalloutActions", "CalloutContent" ]).call(_context3, child.type.displayName);
|
|
3104
|
+
})) ? children : jsxs(Fragment, {
|
|
2925
3105
|
children: [ jsxs("div", {
|
|
2926
3106
|
className: "c-callout__content",
|
|
2927
3107
|
children: [ icon && jsx("div", {
|
|
@@ -2997,9 +3177,22 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
|
|
|
2997
3177
|
style: style,
|
|
2998
3178
|
children: calloutContent
|
|
2999
3179
|
});
|
|
3000
|
-
};
|
|
3180
|
+
}));
|
|
3181
|
+
|
|
3182
|
+
Callout.displayName = "Callout",
|
|
3183
|
+
// Attach subcomponents
|
|
3184
|
+
Callout.Icon = CalloutIcon, Callout.Message = CalloutMessage, Callout.Title = CalloutTitle,
|
|
3185
|
+
Callout.Text = CalloutText, Callout.Actions = CalloutActions, Callout.CloseButton = CalloutCloseButton,
|
|
3186
|
+
Callout.Content = CalloutContent;
|
|
3187
|
+
|
|
3188
|
+
const ListItem = forwardRef((({children: children, className: className = "", ...props}, ref) => jsx("li", {
|
|
3189
|
+
ref: ref,
|
|
3190
|
+
className: `${LIST.ITEM_CLASS} ${className}`.trim(),
|
|
3191
|
+
...props,
|
|
3192
|
+
children: children
|
|
3193
|
+
})));
|
|
3001
3194
|
|
|
3002
|
-
|
|
3195
|
+
ListItem.displayName = "ListItem";
|
|
3003
3196
|
|
|
3004
3197
|
const List = memo((({children: children, variant: variant = "default", className: className = "", style: style, ...props}) => {
|
|
3005
3198
|
var _context;
|
|
@@ -3010,14 +3203,14 @@ const List = memo((({children: children, variant: variant = "default", classNam
|
|
|
3010
3203
|
className: listClasses,
|
|
3011
3204
|
style: style,
|
|
3012
3205
|
...props,
|
|
3013
|
-
children: React.Children.map(children, (child => jsx("li", {
|
|
3206
|
+
children: React.Children.map(children, (child => React.isValidElement(child) && child.type === ListItem ? child : jsx("li", {
|
|
3014
3207
|
className: "c-list__item",
|
|
3015
3208
|
children: child
|
|
3016
3209
|
})))
|
|
3017
3210
|
});
|
|
3018
3211
|
}));
|
|
3019
3212
|
|
|
3020
|
-
List.displayName = "List";
|
|
3213
|
+
List.displayName = "List", List.Item = ListItem;
|
|
3021
3214
|
|
|
3022
3215
|
const ListGroup = ({children: children, className: className = "", style: style, variant: variant = "default"}) => {
|
|
3023
3216
|
// Generate CSS classes
|