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