@bolttech/ob-atoms-backdrop 1.0.0

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/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Bolttech Frontend UI Library
2
+
3
+ ## Create a new Library (Local Only):
4
+
5
+ ```bash
6
+ npx nx g @nx/react:lib ${lib_name}
7
+ ```
8
+
9
+ ## Create a new Publishable Library:
10
+
11
+ ```bash
12
+ npx nx g @nx/react:lib atoms/COMPONENT_NAME --publishable --importPath @bolttech/atoms-COMPONENT_NAME
13
+ ```
14
+
15
+ ## Create a new component inside library:
16
+
17
+ ```bash
18
+ npx nx g @nx/react:component ${component_name} --project ${lib_name}
19
+ ```
20
+
21
+ ## Add storybook to lib:
22
+
23
+ ```bash
24
+ npx nx g @nx/react:storybook-configuration atoms-COMPONENT_NAME
25
+ ```
26
+
27
+ ## Run Storybook
28
+
29
+ ```bash
30
+ npx nx run storybook:storybook
31
+ ```
package/index.cjs.js ADDED
@@ -0,0 +1,1132 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var classNames = require('classnames');
5
+ var react = require('react');
6
+ var reactDom = require('react-dom');
7
+ var uiUtils = require('@bolttech/ui-utils');
8
+
9
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
+
11
+ var check = function (it) {
12
+ return it && it.Math === Math && it;
13
+ };
14
+
15
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
16
+ var globalThis_1 =
17
+ // eslint-disable-next-line es/no-global-this -- safe
18
+ check(typeof globalThis == 'object' && globalThis) ||
19
+ check(typeof window == 'object' && window) ||
20
+ // eslint-disable-next-line no-restricted-globals -- safe
21
+ check(typeof self == 'object' && self) ||
22
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
23
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
24
+ // eslint-disable-next-line no-new-func -- fallback
25
+ (function () { return this; })() || Function('return this')();
26
+
27
+ var objectGetOwnPropertyDescriptor = {};
28
+
29
+ var fails$9 = function (exec) {
30
+ try {
31
+ return !!exec();
32
+ } catch (error) {
33
+ return true;
34
+ }
35
+ };
36
+
37
+ var fails$8 = fails$9;
38
+
39
+ // Detect IE8's incomplete defineProperty implementation
40
+ var descriptors = !fails$8(function () {
41
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
42
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
43
+ });
44
+
45
+ var fails$7 = fails$9;
46
+
47
+ var functionBindNative = !fails$7(function () {
48
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
49
+ var test = (function () { /* empty */ }).bind();
50
+ // eslint-disable-next-line no-prototype-builtins -- safe
51
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
52
+ });
53
+
54
+ var NATIVE_BIND$1 = functionBindNative;
55
+
56
+ var call$5 = Function.prototype.call;
57
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
58
+ var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
59
+ return call$5.apply(call$5, arguments);
60
+ };
61
+
62
+ var objectPropertyIsEnumerable = {};
63
+
64
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
65
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
66
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
67
+
68
+ // Nashorn ~ JDK8 bug
69
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
70
+
71
+ // `Object.prototype.propertyIsEnumerable` method implementation
72
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
73
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
74
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
75
+ return !!descriptor && descriptor.enumerable;
76
+ } : $propertyIsEnumerable;
77
+
78
+ var createPropertyDescriptor$2 = function (bitmap, value) {
79
+ return {
80
+ enumerable: !(bitmap & 1),
81
+ configurable: !(bitmap & 2),
82
+ writable: !(bitmap & 4),
83
+ value: value
84
+ };
85
+ };
86
+
87
+ var NATIVE_BIND = functionBindNative;
88
+
89
+ var FunctionPrototype$1 = Function.prototype;
90
+ var call$4 = FunctionPrototype$1.call;
91
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
92
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
93
+
94
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
95
+ return function () {
96
+ return call$4.apply(fn, arguments);
97
+ };
98
+ };
99
+
100
+ var uncurryThis$9 = functionUncurryThis;
101
+
102
+ var toString$1 = uncurryThis$9({}.toString);
103
+ var stringSlice$1 = uncurryThis$9(''.slice);
104
+
105
+ var classofRaw = function (it) {
106
+ return stringSlice$1(toString$1(it), 8, -1);
107
+ };
108
+
109
+ var uncurryThis$8 = functionUncurryThis;
110
+ var fails$6 = fails$9;
111
+ var classof = classofRaw;
112
+
113
+ var $Object$2 = Object;
114
+ var split = uncurryThis$8(''.split);
115
+
116
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
117
+ var indexedObject = fails$6(function () {
118
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
119
+ // eslint-disable-next-line no-prototype-builtins -- safe
120
+ return !$Object$2('z').propertyIsEnumerable(0);
121
+ }) ? function (it) {
122
+ return classof(it) === 'String' ? split(it, '') : $Object$2(it);
123
+ } : $Object$2;
124
+
125
+ // we can't use just `it == null` since of `document.all` special case
126
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
127
+ var isNullOrUndefined$2 = function (it) {
128
+ return it === null || it === undefined;
129
+ };
130
+
131
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
132
+
133
+ var $TypeError$5 = TypeError;
134
+
135
+ // `RequireObjectCoercible` abstract operation
136
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
137
+ var requireObjectCoercible$2 = function (it) {
138
+ if (isNullOrUndefined$1(it)) throw new $TypeError$5("Can't call method on " + it);
139
+ return it;
140
+ };
141
+
142
+ // toObject with fallback for non-array-like ES3 strings
143
+ var IndexedObject$1 = indexedObject;
144
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
145
+
146
+ var toIndexedObject$3 = function (it) {
147
+ return IndexedObject$1(requireObjectCoercible$1(it));
148
+ };
149
+
150
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
151
+ var documentAll = typeof document == 'object' && document.all;
152
+
153
+ // `IsCallable` abstract operation
154
+ // https://tc39.es/ecma262/#sec-iscallable
155
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
156
+ var isCallable$a = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
157
+ return typeof argument == 'function' || argument === documentAll;
158
+ } : function (argument) {
159
+ return typeof argument == 'function';
160
+ };
161
+
162
+ var isCallable$9 = isCallable$a;
163
+
164
+ var isObject$4 = function (it) {
165
+ return typeof it == 'object' ? it !== null : isCallable$9(it);
166
+ };
167
+
168
+ var globalThis$b = globalThis_1;
169
+ var isCallable$8 = isCallable$a;
170
+
171
+ var aFunction = function (argument) {
172
+ return isCallable$8(argument) ? argument : undefined;
173
+ };
174
+
175
+ var getBuiltIn$2 = function (namespace, method) {
176
+ return arguments.length < 2 ? aFunction(globalThis$b[namespace]) : globalThis$b[namespace] && globalThis$b[namespace][method];
177
+ };
178
+
179
+ var uncurryThis$7 = functionUncurryThis;
180
+
181
+ var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
182
+
183
+ var globalThis$a = globalThis_1;
184
+
185
+ var navigator = globalThis$a.navigator;
186
+ var userAgent$1 = navigator && navigator.userAgent;
187
+
188
+ var environmentUserAgent = userAgent$1 ? String(userAgent$1) : '';
189
+
190
+ var globalThis$9 = globalThis_1;
191
+ var userAgent = environmentUserAgent;
192
+
193
+ var process = globalThis$9.process;
194
+ var Deno = globalThis$9.Deno;
195
+ var versions = process && process.versions || Deno && Deno.version;
196
+ var v8 = versions && versions.v8;
197
+ var match, version;
198
+
199
+ if (v8) {
200
+ match = v8.split('.');
201
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
202
+ // but their correct versions are not interesting for us
203
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
204
+ }
205
+
206
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
207
+ // so check `userAgent` even if `.v8` exists, but 0
208
+ if (!version && userAgent) {
209
+ match = userAgent.match(/Edge\/(\d+)/);
210
+ if (!match || match[1] >= 74) {
211
+ match = userAgent.match(/Chrome\/(\d+)/);
212
+ if (match) version = +match[1];
213
+ }
214
+ }
215
+
216
+ var environmentV8Version = version;
217
+
218
+ /* eslint-disable es/no-symbol -- required for testing */
219
+ var V8_VERSION = environmentV8Version;
220
+ var fails$5 = fails$9;
221
+ var globalThis$8 = globalThis_1;
222
+
223
+ var $String$3 = globalThis$8.String;
224
+
225
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
226
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
227
+ var symbol = Symbol('symbol detection');
228
+ // Chrome 38 Symbol has incorrect toString conversion
229
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
230
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
231
+ // of course, fail.
232
+ return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
233
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
234
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
235
+ });
236
+
237
+ /* eslint-disable es/no-symbol -- required for testing */
238
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
239
+
240
+ var useSymbolAsUid = NATIVE_SYMBOL$1 &&
241
+ !Symbol.sham &&
242
+ typeof Symbol.iterator == 'symbol';
243
+
244
+ var getBuiltIn$1 = getBuiltIn$2;
245
+ var isCallable$7 = isCallable$a;
246
+ var isPrototypeOf = objectIsPrototypeOf;
247
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
248
+
249
+ var $Object$1 = Object;
250
+
251
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
252
+ return typeof it == 'symbol';
253
+ } : function (it) {
254
+ var $Symbol = getBuiltIn$1('Symbol');
255
+ return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
256
+ };
257
+
258
+ var $String$2 = String;
259
+
260
+ var tryToString$1 = function (argument) {
261
+ try {
262
+ return $String$2(argument);
263
+ } catch (error) {
264
+ return 'Object';
265
+ }
266
+ };
267
+
268
+ var isCallable$6 = isCallable$a;
269
+ var tryToString = tryToString$1;
270
+
271
+ var $TypeError$4 = TypeError;
272
+
273
+ // `Assert: IsCallable(argument) is true`
274
+ var aCallable$1 = function (argument) {
275
+ if (isCallable$6(argument)) return argument;
276
+ throw new $TypeError$4(tryToString(argument) + ' is not a function');
277
+ };
278
+
279
+ var aCallable = aCallable$1;
280
+ var isNullOrUndefined = isNullOrUndefined$2;
281
+
282
+ // `GetMethod` abstract operation
283
+ // https://tc39.es/ecma262/#sec-getmethod
284
+ var getMethod$1 = function (V, P) {
285
+ var func = V[P];
286
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
287
+ };
288
+
289
+ var call$3 = functionCall;
290
+ var isCallable$5 = isCallable$a;
291
+ var isObject$3 = isObject$4;
292
+
293
+ var $TypeError$3 = TypeError;
294
+
295
+ // `OrdinaryToPrimitive` abstract operation
296
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
297
+ var ordinaryToPrimitive$1 = function (input, pref) {
298
+ var fn, val;
299
+ if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
300
+ if (isCallable$5(fn = input.valueOf) && !isObject$3(val = call$3(fn, input))) return val;
301
+ if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
302
+ throw new $TypeError$3("Can't convert object to primitive value");
303
+ };
304
+
305
+ var sharedStore = {exports: {}};
306
+
307
+ var globalThis$7 = globalThis_1;
308
+
309
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
310
+ var defineProperty$2 = Object.defineProperty;
311
+
312
+ var defineGlobalProperty$3 = function (key, value) {
313
+ try {
314
+ defineProperty$2(globalThis$7, key, { value: value, configurable: true, writable: true });
315
+ } catch (error) {
316
+ globalThis$7[key] = value;
317
+ } return value;
318
+ };
319
+
320
+ var globalThis$6 = globalThis_1;
321
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
322
+
323
+ var SHARED = '__core-js_shared__';
324
+ var store$3 = sharedStore.exports = globalThis$6[SHARED] || defineGlobalProperty$2(SHARED, {});
325
+
326
+ (store$3.versions || (store$3.versions = [])).push({
327
+ version: '3.48.0',
328
+ mode: 'global',
329
+ copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
330
+ license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
331
+ source: 'https://github.com/zloirock/core-js'
332
+ });
333
+
334
+ var sharedStoreExports = sharedStore.exports;
335
+
336
+ var store$2 = sharedStoreExports;
337
+
338
+ var shared$3 = function (key, value) {
339
+ return store$2[key] || (store$2[key] = value || {});
340
+ };
341
+
342
+ var requireObjectCoercible = requireObjectCoercible$2;
343
+
344
+ var $Object = Object;
345
+
346
+ // `ToObject` abstract operation
347
+ // https://tc39.es/ecma262/#sec-toobject
348
+ var toObject$2 = function (argument) {
349
+ return $Object(requireObjectCoercible(argument));
350
+ };
351
+
352
+ var uncurryThis$6 = functionUncurryThis;
353
+ var toObject$1 = toObject$2;
354
+
355
+ var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
356
+
357
+ // `HasOwnProperty` abstract operation
358
+ // https://tc39.es/ecma262/#sec-hasownproperty
359
+ // eslint-disable-next-line es/no-object-hasown -- safe
360
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
361
+ return hasOwnProperty(toObject$1(it), key);
362
+ };
363
+
364
+ var uncurryThis$5 = functionUncurryThis;
365
+
366
+ var id = 0;
367
+ var postfix = Math.random();
368
+ var toString = uncurryThis$5(1.1.toString);
369
+
370
+ var uid$2 = function (key) {
371
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
372
+ };
373
+
374
+ var globalThis$5 = globalThis_1;
375
+ var shared$2 = shared$3;
376
+ var hasOwn$6 = hasOwnProperty_1;
377
+ var uid$1 = uid$2;
378
+ var NATIVE_SYMBOL = symbolConstructorDetection;
379
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
380
+
381
+ var Symbol$1 = globalThis$5.Symbol;
382
+ var WellKnownSymbolsStore = shared$2('wks');
383
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
384
+
385
+ var wellKnownSymbol$1 = function (name) {
386
+ if (!hasOwn$6(WellKnownSymbolsStore, name)) {
387
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)
388
+ ? Symbol$1[name]
389
+ : createWellKnownSymbol('Symbol.' + name);
390
+ } return WellKnownSymbolsStore[name];
391
+ };
392
+
393
+ var call$2 = functionCall;
394
+ var isObject$2 = isObject$4;
395
+ var isSymbol$1 = isSymbol$2;
396
+ var getMethod = getMethod$1;
397
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
398
+ var wellKnownSymbol = wellKnownSymbol$1;
399
+
400
+ var $TypeError$2 = TypeError;
401
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
402
+
403
+ // `ToPrimitive` abstract operation
404
+ // https://tc39.es/ecma262/#sec-toprimitive
405
+ var toPrimitive$1 = function (input, pref) {
406
+ if (!isObject$2(input) || isSymbol$1(input)) return input;
407
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
408
+ var result;
409
+ if (exoticToPrim) {
410
+ if (pref === undefined) pref = 'default';
411
+ result = call$2(exoticToPrim, input, pref);
412
+ if (!isObject$2(result) || isSymbol$1(result)) return result;
413
+ throw new $TypeError$2("Can't convert object to primitive value");
414
+ }
415
+ if (pref === undefined) pref = 'number';
416
+ return ordinaryToPrimitive(input, pref);
417
+ };
418
+
419
+ var toPrimitive = toPrimitive$1;
420
+ var isSymbol = isSymbol$2;
421
+
422
+ // `ToPropertyKey` abstract operation
423
+ // https://tc39.es/ecma262/#sec-topropertykey
424
+ var toPropertyKey$2 = function (argument) {
425
+ var key = toPrimitive(argument, 'string');
426
+ return isSymbol(key) ? key : key + '';
427
+ };
428
+
429
+ var globalThis$4 = globalThis_1;
430
+ var isObject$1 = isObject$4;
431
+
432
+ var document$1 = globalThis$4.document;
433
+ // typeof document.createElement is 'object' in old IE
434
+ var EXISTS$1 = isObject$1(document$1) && isObject$1(document$1.createElement);
435
+
436
+ var documentCreateElement = function (it) {
437
+ return EXISTS$1 ? document$1.createElement(it) : {};
438
+ };
439
+
440
+ var DESCRIPTORS$7 = descriptors;
441
+ var fails$4 = fails$9;
442
+ var createElement = documentCreateElement;
443
+
444
+ // Thanks to IE8 for its funny defineProperty
445
+ var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
446
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
447
+ return Object.defineProperty(createElement('div'), 'a', {
448
+ get: function () { return 7; }
449
+ }).a !== 7;
450
+ });
451
+
452
+ var DESCRIPTORS$6 = descriptors;
453
+ var call$1 = functionCall;
454
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
455
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
456
+ var toIndexedObject$2 = toIndexedObject$3;
457
+ var toPropertyKey$1 = toPropertyKey$2;
458
+ var hasOwn$5 = hasOwnProperty_1;
459
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
460
+
461
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
462
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
463
+
464
+ // `Object.getOwnPropertyDescriptor` method
465
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
466
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
467
+ O = toIndexedObject$2(O);
468
+ P = toPropertyKey$1(P);
469
+ if (IE8_DOM_DEFINE$1) try {
470
+ return $getOwnPropertyDescriptor$1(O, P);
471
+ } catch (error) { /* empty */ }
472
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
473
+ };
474
+
475
+ var objectDefineProperty = {};
476
+
477
+ var DESCRIPTORS$5 = descriptors;
478
+ var fails$3 = fails$9;
479
+
480
+ // V8 ~ Chrome 36-
481
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
482
+ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
483
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
484
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
485
+ value: 42,
486
+ writable: false
487
+ }).prototype !== 42;
488
+ });
489
+
490
+ var isObject = isObject$4;
491
+
492
+ var $String$1 = String;
493
+ var $TypeError$1 = TypeError;
494
+
495
+ // `Assert: Type(argument) is Object`
496
+ var anObject$2 = function (argument) {
497
+ if (isObject(argument)) return argument;
498
+ throw new $TypeError$1($String$1(argument) + ' is not an object');
499
+ };
500
+
501
+ var DESCRIPTORS$4 = descriptors;
502
+ var IE8_DOM_DEFINE = ie8DomDefine;
503
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
504
+ var anObject$1 = anObject$2;
505
+ var toPropertyKey = toPropertyKey$2;
506
+
507
+ var $TypeError = TypeError;
508
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
509
+ var $defineProperty = Object.defineProperty;
510
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
511
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
512
+ var ENUMERABLE = 'enumerable';
513
+ var CONFIGURABLE$1 = 'configurable';
514
+ var WRITABLE = 'writable';
515
+
516
+ // `Object.defineProperty` method
517
+ // https://tc39.es/ecma262/#sec-object.defineproperty
518
+ objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
519
+ anObject$1(O);
520
+ P = toPropertyKey(P);
521
+ anObject$1(Attributes);
522
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
523
+ var current = $getOwnPropertyDescriptor(O, P);
524
+ if (current && current[WRITABLE]) {
525
+ O[P] = Attributes.value;
526
+ Attributes = {
527
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
528
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
529
+ writable: false
530
+ };
531
+ }
532
+ } return $defineProperty(O, P, Attributes);
533
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
534
+ anObject$1(O);
535
+ P = toPropertyKey(P);
536
+ anObject$1(Attributes);
537
+ if (IE8_DOM_DEFINE) try {
538
+ return $defineProperty(O, P, Attributes);
539
+ } catch (error) { /* empty */ }
540
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
541
+ if ('value' in Attributes) O[P] = Attributes.value;
542
+ return O;
543
+ };
544
+
545
+ var DESCRIPTORS$3 = descriptors;
546
+ var definePropertyModule$2 = objectDefineProperty;
547
+ var createPropertyDescriptor = createPropertyDescriptor$2;
548
+
549
+ var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
550
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
551
+ } : function (object, key, value) {
552
+ object[key] = value;
553
+ return object;
554
+ };
555
+
556
+ var makeBuiltIn$2 = {exports: {}};
557
+
558
+ var DESCRIPTORS$2 = descriptors;
559
+ var hasOwn$4 = hasOwnProperty_1;
560
+
561
+ var FunctionPrototype = Function.prototype;
562
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
563
+ var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
564
+
565
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
566
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
567
+
568
+ var functionName = {
569
+ CONFIGURABLE: CONFIGURABLE
570
+ };
571
+
572
+ var uncurryThis$4 = functionUncurryThis;
573
+ var isCallable$4 = isCallable$a;
574
+ var store$1 = sharedStoreExports;
575
+
576
+ var functionToString = uncurryThis$4(Function.toString);
577
+
578
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
579
+ if (!isCallable$4(store$1.inspectSource)) {
580
+ store$1.inspectSource = function (it) {
581
+ return functionToString(it);
582
+ };
583
+ }
584
+
585
+ var inspectSource$1 = store$1.inspectSource;
586
+
587
+ var globalThis$3 = globalThis_1;
588
+ var isCallable$3 = isCallable$a;
589
+
590
+ var WeakMap$1 = globalThis$3.WeakMap;
591
+
592
+ var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
593
+
594
+ var shared$1 = shared$3;
595
+ var uid = uid$2;
596
+
597
+ var keys = shared$1('keys');
598
+
599
+ var sharedKey$1 = function (key) {
600
+ return keys[key] || (keys[key] = uid(key));
601
+ };
602
+
603
+ var hiddenKeys$3 = {};
604
+
605
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
606
+ var globalThis$2 = globalThis_1;
607
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
608
+ var hasOwn$3 = hasOwnProperty_1;
609
+ var shared = sharedStoreExports;
610
+ var sharedKey = sharedKey$1;
611
+ var hiddenKeys$2 = hiddenKeys$3;
612
+
613
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
614
+ var TypeError$1 = globalThis$2.TypeError;
615
+ var WeakMap = globalThis$2.WeakMap;
616
+ var set, get, has;
617
+
618
+ var enforce = function (it) {
619
+ return has(it) ? get(it) : set(it, {});
620
+ };
621
+
622
+ if (NATIVE_WEAK_MAP || shared.state) {
623
+ var store = shared.state || (shared.state = new WeakMap());
624
+ /* eslint-disable no-self-assign -- prototype methods protection */
625
+ store.get = store.get;
626
+ store.has = store.has;
627
+ store.set = store.set;
628
+ /* eslint-enable no-self-assign -- prototype methods protection */
629
+ set = function (it, metadata) {
630
+ if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
631
+ metadata.facade = it;
632
+ store.set(it, metadata);
633
+ return metadata;
634
+ };
635
+ get = function (it) {
636
+ return store.get(it) || {};
637
+ };
638
+ has = function (it) {
639
+ return store.has(it);
640
+ };
641
+ } else {
642
+ var STATE = sharedKey('state');
643
+ hiddenKeys$2[STATE] = true;
644
+ set = function (it, metadata) {
645
+ if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
646
+ metadata.facade = it;
647
+ createNonEnumerableProperty$1(it, STATE, metadata);
648
+ return metadata;
649
+ };
650
+ get = function (it) {
651
+ return hasOwn$3(it, STATE) ? it[STATE] : {};
652
+ };
653
+ has = function (it) {
654
+ return hasOwn$3(it, STATE);
655
+ };
656
+ }
657
+
658
+ var internalState = {
659
+ get: get,
660
+ enforce: enforce};
661
+
662
+ var uncurryThis$3 = functionUncurryThis;
663
+ var fails$2 = fails$9;
664
+ var isCallable$2 = isCallable$a;
665
+ var hasOwn$2 = hasOwnProperty_1;
666
+ var DESCRIPTORS$1 = descriptors;
667
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
668
+ var inspectSource = inspectSource$1;
669
+ var InternalStateModule = internalState;
670
+
671
+ var enforceInternalState = InternalStateModule.enforce;
672
+ var getInternalState = InternalStateModule.get;
673
+ var $String = String;
674
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
675
+ var defineProperty$1 = Object.defineProperty;
676
+ var stringSlice = uncurryThis$3(''.slice);
677
+ var replace = uncurryThis$3(''.replace);
678
+ var join = uncurryThis$3([].join);
679
+
680
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
681
+ return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
682
+ });
683
+
684
+ var TEMPLATE = String(String).split('String');
685
+
686
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
687
+ if (stringSlice($String(name), 0, 7) === 'Symbol(') {
688
+ name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
689
+ }
690
+ if (options && options.getter) name = 'get ' + name;
691
+ if (options && options.setter) name = 'set ' + name;
692
+ if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
693
+ if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
694
+ else value.name = name;
695
+ }
696
+ if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
697
+ defineProperty$1(value, 'length', { value: options.arity });
698
+ }
699
+ try {
700
+ if (options && hasOwn$2(options, 'constructor') && options.constructor) {
701
+ if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
702
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
703
+ } else if (value.prototype) value.prototype = undefined;
704
+ } catch (error) { /* empty */ }
705
+ var state = enforceInternalState(value);
706
+ if (!hasOwn$2(state, 'source')) {
707
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
708
+ } return value;
709
+ };
710
+
711
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
712
+ // eslint-disable-next-line no-extend-native -- required
713
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
714
+ return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
715
+ }, 'toString');
716
+
717
+ var makeBuiltInExports = makeBuiltIn$2.exports;
718
+
719
+ var isCallable$1 = isCallable$a;
720
+ var definePropertyModule$1 = objectDefineProperty;
721
+ var makeBuiltIn = makeBuiltInExports;
722
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
723
+
724
+ var defineBuiltIn$1 = function (O, key, value, options) {
725
+ if (!options) options = {};
726
+ var simple = options.enumerable;
727
+ var name = options.name !== undefined ? options.name : key;
728
+ if (isCallable$1(value)) makeBuiltIn(value, name, options);
729
+ if (options.global) {
730
+ if (simple) O[key] = value;
731
+ else defineGlobalProperty$1(key, value);
732
+ } else {
733
+ try {
734
+ if (!options.unsafe) delete O[key];
735
+ else if (O[key]) simple = true;
736
+ } catch (error) { /* empty */ }
737
+ if (simple) O[key] = value;
738
+ else definePropertyModule$1.f(O, key, {
739
+ value: value,
740
+ enumerable: false,
741
+ configurable: !options.nonConfigurable,
742
+ writable: !options.nonWritable
743
+ });
744
+ } return O;
745
+ };
746
+
747
+ var objectGetOwnPropertyNames = {};
748
+
749
+ var ceil = Math.ceil;
750
+ var floor = Math.floor;
751
+
752
+ // `Math.trunc` method
753
+ // https://tc39.es/ecma262/#sec-math.trunc
754
+ // eslint-disable-next-line es/no-math-trunc -- safe
755
+ var mathTrunc = Math.trunc || function trunc(x) {
756
+ var n = +x;
757
+ return (n > 0 ? floor : ceil)(n);
758
+ };
759
+
760
+ var trunc = mathTrunc;
761
+
762
+ // `ToIntegerOrInfinity` abstract operation
763
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
764
+ var toIntegerOrInfinity$2 = function (argument) {
765
+ var number = +argument;
766
+ // eslint-disable-next-line no-self-compare -- NaN check
767
+ return number !== number || number === 0 ? 0 : trunc(number);
768
+ };
769
+
770
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
771
+
772
+ var max = Math.max;
773
+ var min$1 = Math.min;
774
+
775
+ // Helper for a popular repeating case of the spec:
776
+ // Let integer be ? ToInteger(index).
777
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
778
+ var toAbsoluteIndex$1 = function (index, length) {
779
+ var integer = toIntegerOrInfinity$1(index);
780
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
781
+ };
782
+
783
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
784
+
785
+ var min = Math.min;
786
+
787
+ // `ToLength` abstract operation
788
+ // https://tc39.es/ecma262/#sec-tolength
789
+ var toLength$1 = function (argument) {
790
+ var len = toIntegerOrInfinity(argument);
791
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
792
+ };
793
+
794
+ var toLength = toLength$1;
795
+
796
+ // `LengthOfArrayLike` abstract operation
797
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
798
+ var lengthOfArrayLike$1 = function (obj) {
799
+ return toLength(obj.length);
800
+ };
801
+
802
+ var toIndexedObject$1 = toIndexedObject$3;
803
+ var toAbsoluteIndex = toAbsoluteIndex$1;
804
+ var lengthOfArrayLike = lengthOfArrayLike$1;
805
+
806
+ // `Array.prototype.{ indexOf, includes }` methods implementation
807
+ var createMethod = function (IS_INCLUDES) {
808
+ return function ($this, el, fromIndex) {
809
+ var O = toIndexedObject$1($this);
810
+ var length = lengthOfArrayLike(O);
811
+ if (length === 0) return !IS_INCLUDES && -1;
812
+ var index = toAbsoluteIndex(fromIndex, length);
813
+ var value;
814
+ // Array#includes uses SameValueZero equality algorithm
815
+ // eslint-disable-next-line no-self-compare -- NaN check
816
+ if (IS_INCLUDES && el !== el) while (length > index) {
817
+ value = O[index++];
818
+ // eslint-disable-next-line no-self-compare -- NaN check
819
+ if (value !== value) return true;
820
+ // Array#indexOf ignores holes, Array#includes - not
821
+ } else for (;length > index; index++) {
822
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
823
+ } return !IS_INCLUDES && -1;
824
+ };
825
+ };
826
+
827
+ var arrayIncludes = {
828
+ // `Array.prototype.indexOf` method
829
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
830
+ indexOf: createMethod(false)
831
+ };
832
+
833
+ var uncurryThis$2 = functionUncurryThis;
834
+ var hasOwn$1 = hasOwnProperty_1;
835
+ var toIndexedObject = toIndexedObject$3;
836
+ var indexOf = arrayIncludes.indexOf;
837
+ var hiddenKeys$1 = hiddenKeys$3;
838
+
839
+ var push = uncurryThis$2([].push);
840
+
841
+ var objectKeysInternal = function (object, names) {
842
+ var O = toIndexedObject(object);
843
+ var i = 0;
844
+ var result = [];
845
+ var key;
846
+ for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
847
+ // Don't enum bug & hidden keys
848
+ while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
849
+ ~indexOf(result, key) || push(result, key);
850
+ }
851
+ return result;
852
+ };
853
+
854
+ // IE8- don't enum bug keys
855
+ var enumBugKeys$2 = [
856
+ 'constructor',
857
+ 'hasOwnProperty',
858
+ 'isPrototypeOf',
859
+ 'propertyIsEnumerable',
860
+ 'toLocaleString',
861
+ 'toString',
862
+ 'valueOf'
863
+ ];
864
+
865
+ var internalObjectKeys$1 = objectKeysInternal;
866
+ var enumBugKeys$1 = enumBugKeys$2;
867
+
868
+ var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
869
+
870
+ // `Object.getOwnPropertyNames` method
871
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
872
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
873
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
874
+ return internalObjectKeys$1(O, hiddenKeys);
875
+ };
876
+
877
+ var objectGetOwnPropertySymbols = {};
878
+
879
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
880
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
881
+
882
+ var getBuiltIn = getBuiltIn$2;
883
+ var uncurryThis$1 = functionUncurryThis;
884
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
885
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
886
+ var anObject = anObject$2;
887
+
888
+ var concat$1 = uncurryThis$1([].concat);
889
+
890
+ // all object keys, includes non-enumerable and symbols
891
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
892
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
893
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
894
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
895
+ };
896
+
897
+ var hasOwn = hasOwnProperty_1;
898
+ var ownKeys = ownKeys$1;
899
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
900
+ var definePropertyModule = objectDefineProperty;
901
+
902
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
903
+ var keys = ownKeys(source);
904
+ var defineProperty = definePropertyModule.f;
905
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
906
+ for (var i = 0; i < keys.length; i++) {
907
+ var key = keys[i];
908
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
909
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
910
+ }
911
+ }
912
+ };
913
+
914
+ var fails$1 = fails$9;
915
+ var isCallable = isCallable$a;
916
+
917
+ var replacement = /#|\.prototype\./;
918
+
919
+ var isForced$1 = function (feature, detection) {
920
+ var value = data[normalize(feature)];
921
+ return value === POLYFILL ? true
922
+ : value === NATIVE ? false
923
+ : isCallable(detection) ? fails$1(detection)
924
+ : !!detection;
925
+ };
926
+
927
+ var normalize = isForced$1.normalize = function (string) {
928
+ return String(string).replace(replacement, '.').toLowerCase();
929
+ };
930
+
931
+ var data = isForced$1.data = {};
932
+ var NATIVE = isForced$1.NATIVE = 'N';
933
+ var POLYFILL = isForced$1.POLYFILL = 'P';
934
+
935
+ var isForced_1 = isForced$1;
936
+
937
+ var globalThis$1 = globalThis_1;
938
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
939
+ var createNonEnumerableProperty = createNonEnumerableProperty$2;
940
+ var defineBuiltIn = defineBuiltIn$1;
941
+ var defineGlobalProperty = defineGlobalProperty$3;
942
+ var copyConstructorProperties = copyConstructorProperties$1;
943
+ var isForced = isForced_1;
944
+
945
+ /*
946
+ options.target - name of the target object
947
+ options.global - target is the global object
948
+ options.stat - export as static methods of target
949
+ options.proto - export as prototype methods of target
950
+ options.real - real prototype method for the `pure` version
951
+ options.forced - export even if the native feature is available
952
+ options.bind - bind methods to the target, required for the `pure` version
953
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
954
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
955
+ options.sham - add a flag to not completely full polyfills
956
+ options.enumerable - export as enumerable property
957
+ options.dontCallGetSet - prevent calling a getter on target
958
+ options.name - the .name of the function if it does not match the key
959
+ */
960
+ var _export = function (options, source) {
961
+ var TARGET = options.target;
962
+ var GLOBAL = options.global;
963
+ var STATIC = options.stat;
964
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
965
+ if (GLOBAL) {
966
+ target = globalThis$1;
967
+ } else if (STATIC) {
968
+ target = globalThis$1[TARGET] || defineGlobalProperty(TARGET, {});
969
+ } else {
970
+ target = globalThis$1[TARGET] && globalThis$1[TARGET].prototype;
971
+ }
972
+ if (target) for (key in source) {
973
+ sourceProperty = source[key];
974
+ if (options.dontCallGetSet) {
975
+ descriptor = getOwnPropertyDescriptor(target, key);
976
+ targetProperty = descriptor && descriptor.value;
977
+ } else targetProperty = target[key];
978
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
979
+ // contained in target
980
+ if (!FORCED && targetProperty !== undefined) {
981
+ if (typeof sourceProperty == typeof targetProperty) continue;
982
+ copyConstructorProperties(sourceProperty, targetProperty);
983
+ }
984
+ // add a flag to not completely full polyfills
985
+ if (options.sham || (targetProperty && targetProperty.sham)) {
986
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
987
+ }
988
+ defineBuiltIn(target, key, sourceProperty, options);
989
+ }
990
+ };
991
+
992
+ var internalObjectKeys = objectKeysInternal;
993
+ var enumBugKeys = enumBugKeys$2;
994
+
995
+ // `Object.keys` method
996
+ // https://tc39.es/ecma262/#sec-object.keys
997
+ // eslint-disable-next-line es/no-object-keys -- safe
998
+ var objectKeys$1 = Object.keys || function keys(O) {
999
+ return internalObjectKeys(O, enumBugKeys);
1000
+ };
1001
+
1002
+ var DESCRIPTORS = descriptors;
1003
+ var uncurryThis = functionUncurryThis;
1004
+ var call = functionCall;
1005
+ var fails = fails$9;
1006
+ var objectKeys = objectKeys$1;
1007
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1008
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1009
+ var toObject = toObject$2;
1010
+ var IndexedObject = indexedObject;
1011
+
1012
+ // eslint-disable-next-line es/no-object-assign -- safe
1013
+ var $assign = Object.assign;
1014
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1015
+ var defineProperty = Object.defineProperty;
1016
+ var concat = uncurryThis([].concat);
1017
+
1018
+ // `Object.assign` method
1019
+ // https://tc39.es/ecma262/#sec-object.assign
1020
+ var objectAssign = !$assign || fails(function () {
1021
+ // should have correct order of operations (Edge bug)
1022
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1023
+ enumerable: true,
1024
+ get: function () {
1025
+ defineProperty(this, 'b', {
1026
+ value: 3,
1027
+ enumerable: false
1028
+ });
1029
+ }
1030
+ }), { b: 2 })).b !== 1) return true;
1031
+ // should work with symbols and should have deterministic property order (V8 bug)
1032
+ var A = {};
1033
+ var B = {};
1034
+ // eslint-disable-next-line es/no-symbol -- safe
1035
+ var symbol = Symbol('assign detection');
1036
+ var alphabet = 'abcdefghijklmnopqrst';
1037
+ A[symbol] = 7;
1038
+ // eslint-disable-next-line es/no-array-prototype-foreach -- safe
1039
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1040
+ return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1041
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1042
+ var T = toObject(target);
1043
+ var argumentsLength = arguments.length;
1044
+ var index = 1;
1045
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1046
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1047
+ while (argumentsLength > index) {
1048
+ var S = IndexedObject(arguments[index++]);
1049
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1050
+ var length = keys.length;
1051
+ var j = 0;
1052
+ var key;
1053
+ while (length > j) {
1054
+ key = keys[j++];
1055
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1056
+ }
1057
+ } return T;
1058
+ } : $assign;
1059
+
1060
+ var $ = _export;
1061
+ var assign = objectAssign;
1062
+
1063
+ // `Object.assign` method
1064
+ // https://tc39.es/ecma262/#sec-object.assign
1065
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1066
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1067
+ assign: assign
1068
+ });
1069
+
1070
+ /******************************************************************************
1071
+ Copyright (c) Microsoft Corporation.
1072
+
1073
+ Permission to use, copy, modify, and/or distribute this software for any
1074
+ purpose with or without fee is hereby granted.
1075
+
1076
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1077
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1078
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1079
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1080
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1081
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1082
+ PERFORMANCE OF THIS SOFTWARE.
1083
+ ***************************************************************************** */
1084
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1085
+
1086
+
1087
+ function __rest(s, e) {
1088
+ var t = {};
1089
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1090
+ t[p] = s[p];
1091
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1092
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1093
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1094
+ t[p[i]] = s[p[i]];
1095
+ }
1096
+ return t;
1097
+ }
1098
+
1099
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1100
+ var e = new Error(message);
1101
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1102
+ };
1103
+
1104
+ const Backdrop = /*#__PURE__*/react.forwardRef((_a, ref) => {
1105
+ var {
1106
+ id = 'backdrop-id',
1107
+ dataTestId = 'backdrop-data-testid',
1108
+ onClick,
1109
+ appendTo,
1110
+ className,
1111
+ children
1112
+ } = _a,
1113
+ props = __rest(_a, ["id", "dataTestId", "onClick", "appendTo", "className", "children"]);
1114
+ const handleClick = event => {
1115
+ if (!onClick || event.currentTarget !== event.target) return;
1116
+ onClick(event);
1117
+ return;
1118
+ };
1119
+ const backdrop = react.useMemo(() => jsxRuntime.jsx("div", Object.assign({
1120
+ ref: ref,
1121
+ id: id,
1122
+ "data-testid": dataTestId,
1123
+ onClick: handleClick,
1124
+ className: classNames('w-screen h-screen fixed inset-0 bg-black/30 z-4', className)
1125
+ }, uiUtils.applyDataAttributes(props), {
1126
+ children: children
1127
+ })), [className, children, onClick, id]);
1128
+ if (!appendTo) return backdrop;
1129
+ return /*#__PURE__*/reactDom.createPortal(backdrop, appendTo);
1130
+ });
1131
+
1132
+ exports.Backdrop = Backdrop;
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@bolttech/ob-atoms-backdrop",
3
+ "version": "1.0.0",
4
+ "dependencies": {
5
+ "@bolttech/ui-utils": "0.6.5",
6
+ "classnames": "^2.5.1",
7
+ "react": "19.1.2",
8
+ "react-dom": "19.1.2",
9
+ "@bolttech/ob-atoms-icon": "1.0.0"
10
+ },
11
+ "main": "./index.cjs.js",
12
+ "type": "commonjs",
13
+ "types": "./index.d.ts"
14
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/backdrop';
@@ -0,0 +1,2 @@
1
+ import { IBackdropProps } from './backdrop.interface';
2
+ export declare const Backdrop: import("react").ForwardRefExoticComponent<IBackdropProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,37 @@
1
+ import { DefaultProps } from '@bolttech/ui-utils';
2
+ import { ReactNode } from 'react';
3
+ /**
4
+ * @interface IBackdropProps Backdrop component props
5
+ * @property {string | undefined} id - component identification
6
+ * @property {string | undefined} dataTestId - react-testing-library identification
7
+ * @property {HTMLElement | undefined} appendTo - html element reference that the backdrop will be attached to using react portal
8
+ * @property {function | undefined} onClick - function that will run when user clicks on backdrop
9
+ * @property {string | undefined} className - classname for allowing customization
10
+ * @property {string | React.ReactElement | React.ReactElement[] | undefined} children - children component that will render inside the backdrop
11
+ */
12
+ export interface IBackdropProps extends DefaultProps {
13
+ /** Component identification */
14
+ id?: string;
15
+ /** React-testing-library identification */
16
+ dataTestId?: string;
17
+ /** HTML Element reference that the backdrop will be attached to using react portal */
18
+ appendTo?: HTMLElement;
19
+ /** Function that will run when user clicks on backdrop
20
+ *
21
+ * NOTE: this function will not run when clicking on the content of the children component, only when clicking on the `Backdrop`
22
+ *
23
+ *
24
+ * @example
25
+ * ```ts
26
+ *<Backdrop onClick={(event) => setIsOpen(false)}>
27
+ <h1>Backdrop content</h1>
28
+ </Backdrop>
29
+ * ```
30
+ *
31
+ */
32
+ onClick?: (event: React.MouseEvent) => void;
33
+ /** Classname for allowing customization */
34
+ className?: string;
35
+ /** Children component that will render inside the backdrop */
36
+ children?: ReactNode;
37
+ }
@@ -0,0 +1,5 @@
1
+ import type { Meta } from '@storybook/react';
2
+ import { Backdrop } from './backdrop';
3
+ declare const Story: Meta<typeof Backdrop>;
4
+ export default Story;
5
+ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./backdrop.interface").IBackdropProps & import("react").RefAttributes<HTMLDivElement>>;