@bolttech/atoms-section-header 0.22.0 → 0.24.2

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.
@@ -1,17 +1,15 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
4
  var jsxRuntime = require('react/jsx-runtime');
7
5
  var react = require('react');
8
6
  var styled = require('styled-components');
9
7
  var frontendFoundations = require('@bolttech/frontend-foundations');
10
8
  var uiUtils = require('@bolttech/ui-utils');
11
9
 
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
13
11
 
14
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
12
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
15
13
 
16
14
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17
15
 
@@ -53,7 +51,7 @@ var fails$7 = fails$9;
53
51
 
54
52
  var functionBindNative = !fails$7(function () {
55
53
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
56
- var test = (function () { /* empty */ }).bind();
54
+ var test = function () { /* empty */ }.bind();
57
55
  // eslint-disable-next-line no-prototype-builtins -- safe
58
56
  return typeof test != 'function' || test.hasOwnProperty('prototype');
59
57
  });
@@ -61,7 +59,7 @@ var functionBindNative = !fails$7(function () {
61
59
  var NATIVE_BIND$1 = functionBindNative;
62
60
 
63
61
  var call$5 = Function.prototype.call;
64
-
62
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
65
63
  var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
66
64
  return call$5.apply(call$5, arguments);
67
65
  };
@@ -95,6 +93,7 @@ var NATIVE_BIND = functionBindNative;
95
93
 
96
94
  var FunctionPrototype$1 = Function.prototype;
97
95
  var call$4 = FunctionPrototype$1.call;
96
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
98
97
  var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
99
98
 
100
99
  var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
@@ -167,7 +166,7 @@ var isCallable$a = typeof documentAll == 'undefined' && documentAll !== undefine
167
166
 
168
167
  var isCallable$9 = isCallable$a;
169
168
 
170
- var isObject$5 = function (it) {
169
+ var isObject$4 = function (it) {
171
170
  return typeof it == 'object' ? it !== null : isCallable$9(it);
172
171
  };
173
172
 
@@ -243,9 +242,9 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(func
243
242
  /* eslint-disable es/no-symbol -- required for testing */
244
243
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
245
244
 
246
- var useSymbolAsUid = NATIVE_SYMBOL$1
247
- && !Symbol.sham
248
- && typeof Symbol.iterator == 'symbol';
245
+ var useSymbolAsUid = NATIVE_SYMBOL$1 &&
246
+ !Symbol.sham &&
247
+ typeof Symbol.iterator == 'symbol';
249
248
 
250
249
  var getBuiltIn$1 = getBuiltIn$2;
251
250
  var isCallable$7 = isCallable$a;
@@ -294,7 +293,7 @@ var getMethod$1 = function (V, P) {
294
293
 
295
294
  var call$3 = functionCall;
296
295
  var isCallable$5 = isCallable$a;
297
- var isObject$4 = isObject$5;
296
+ var isObject$3 = isObject$4;
298
297
 
299
298
  var $TypeError$3 = TypeError;
300
299
 
@@ -302,9 +301,9 @@ var $TypeError$3 = TypeError;
302
301
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
303
302
  var ordinaryToPrimitive$1 = function (input, pref) {
304
303
  var fn, val;
305
- if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
306
- if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
307
- if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
304
+ if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
305
+ if (isCallable$5(fn = input.valueOf) && !isObject$3(val = call$3(fn, input))) return val;
306
+ if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$3(fn, input))) return val;
308
307
  throw new $TypeError$3("Can't convert object to primitive value");
309
308
  };
310
309
 
@@ -330,14 +329,16 @@ var SHARED = '__core-js_shared__';
330
329
  var store$3 = sharedStore.exports = globalThis$6[SHARED] || defineGlobalProperty$2(SHARED, {});
331
330
 
332
331
  (store$3.versions || (store$3.versions = [])).push({
333
- version: '3.38.1',
332
+ version: '3.49.0',
334
333
  mode: 'global',
335
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
336
- license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
334
+ copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
335
+ license: 'https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE',
337
336
  source: 'https://github.com/zloirock/core-js'
338
337
  });
339
338
 
340
- var store$2 = sharedStore.exports;
339
+ var sharedStoreExports = sharedStore.exports;
340
+
341
+ var store$2 = sharedStoreExports;
341
342
 
342
343
  var shared$3 = function (key, value) {
343
344
  return store$2[key] || (store$2[key] = value || {});
@@ -369,7 +370,7 @@ var uncurryThis$5 = functionUncurryThis;
369
370
 
370
371
  var id = 0;
371
372
  var postfix = Math.random();
372
- var toString = uncurryThis$5(1.0.toString);
373
+ var toString = uncurryThis$5(1.1.toString);
373
374
 
374
375
  var uid$2 = function (key) {
375
376
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
@@ -395,7 +396,7 @@ var wellKnownSymbol$1 = function (name) {
395
396
  };
396
397
 
397
398
  var call$2 = functionCall;
398
- var isObject$3 = isObject$5;
399
+ var isObject$2 = isObject$4;
399
400
  var isSymbol$1 = isSymbol$2;
400
401
  var getMethod = getMethod$1;
401
402
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
@@ -407,13 +408,13 @@ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
407
408
  // `ToPrimitive` abstract operation
408
409
  // https://tc39.es/ecma262/#sec-toprimitive
409
410
  var toPrimitive$1 = function (input, pref) {
410
- if (!isObject$3(input) || isSymbol$1(input)) return input;
411
+ if (!isObject$2(input) || isSymbol$1(input)) return input;
411
412
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
412
413
  var result;
413
414
  if (exoticToPrim) {
414
415
  if (pref === undefined) pref = 'default';
415
416
  result = call$2(exoticToPrim, input, pref);
416
- if (!isObject$3(result) || isSymbol$1(result)) return result;
417
+ if (!isObject$2(result) || isSymbol$1(result)) return result;
417
418
  throw new $TypeError$2("Can't convert object to primitive value");
418
419
  }
419
420
  if (pref === undefined) pref = 'number';
@@ -431,11 +432,11 @@ var toPropertyKey$2 = function (argument) {
431
432
  };
432
433
 
433
434
  var globalThis$4 = globalThis_1;
434
- var isObject$2 = isObject$5;
435
+ var isObject$1 = isObject$4;
435
436
 
436
437
  var document$1 = globalThis$4.document;
437
438
  // typeof document.createElement is 'object' in old IE
438
- var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
439
+ var EXISTS$1 = isObject$1(document$1) && isObject$1(document$1.createElement);
439
440
 
440
441
  var documentCreateElement = function (it) {
441
442
  return EXISTS$1 ? document$1.createElement(it) : {};
@@ -491,14 +492,14 @@ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
491
492
  }).prototype !== 42;
492
493
  });
493
494
 
494
- var isObject$1 = isObject$5;
495
+ var isObject = isObject$4;
495
496
 
496
497
  var $String$1 = String;
497
498
  var $TypeError$1 = TypeError;
498
499
 
499
500
  // `Assert: Type(argument) is Object`
500
501
  var anObject$2 = function (argument) {
501
- if (isObject$1(argument)) return argument;
502
+ if (isObject(argument)) return argument;
502
503
  throw new $TypeError$1($String$1(argument) + ' is not an object');
503
504
  };
504
505
 
@@ -567,19 +568,15 @@ var FunctionPrototype = Function.prototype;
567
568
  var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
568
569
 
569
570
  var EXISTS = hasOwn$4(FunctionPrototype, 'name');
570
- // additional protection from minified / mangled / dropped function names
571
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
572
571
  var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
573
572
 
574
573
  var functionName = {
575
- EXISTS: EXISTS,
576
- PROPER: PROPER,
577
574
  CONFIGURABLE: CONFIGURABLE
578
575
  };
579
576
 
580
577
  var uncurryThis$4 = functionUncurryThis;
581
578
  var isCallable$4 = isCallable$a;
582
- var store$1 = sharedStore.exports;
579
+ var store$1 = sharedStoreExports;
583
580
 
584
581
  var functionToString = uncurryThis$4(Function.toString);
585
582
 
@@ -612,10 +609,9 @@ var hiddenKeys$3 = {};
612
609
 
613
610
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
614
611
  var globalThis$2 = globalThis_1;
615
- var isObject = isObject$5;
616
612
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
617
613
  var hasOwn$3 = hasOwnProperty_1;
618
- var shared = sharedStore.exports;
614
+ var shared = sharedStoreExports;
619
615
  var sharedKey = sharedKey$1;
620
616
  var hiddenKeys$2 = hiddenKeys$3;
621
617
 
@@ -628,15 +624,6 @@ var enforce = function (it) {
628
624
  return has(it) ? get(it) : set(it, {});
629
625
  };
630
626
 
631
- var getterFor = function (TYPE) {
632
- return function (it) {
633
- var state;
634
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
635
- throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
636
- } return state;
637
- };
638
- };
639
-
640
627
  if (NATIVE_WEAK_MAP || shared.state) {
641
628
  var store = shared.state || (shared.state = new WeakMap());
642
629
  /* eslint-disable no-self-assign -- prototype methods protection */
@@ -674,12 +661,8 @@ if (NATIVE_WEAK_MAP || shared.state) {
674
661
  }
675
662
 
676
663
  var internalState = {
677
- set: set,
678
664
  get: get,
679
- has: has,
680
- enforce: enforce,
681
- getterFor: getterFor
682
- };
665
+ enforce: enforce};
683
666
 
684
667
  var uncurryThis$3 = functionUncurryThis;
685
668
  var fails$2 = fails$9;
@@ -736,9 +719,11 @@ Function.prototype.toString = makeBuiltIn$1(function toString() {
736
719
  return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
737
720
  }, 'toString');
738
721
 
722
+ var makeBuiltInExports = makeBuiltIn$2.exports;
723
+
739
724
  var isCallable$1 = isCallable$a;
740
725
  var definePropertyModule$1 = objectDefineProperty;
741
- var makeBuiltIn = makeBuiltIn$2.exports;
726
+ var makeBuiltIn = makeBuiltInExports;
742
727
  var defineGlobalProperty$1 = defineGlobalProperty$3;
743
728
 
744
729
  var defineBuiltIn$1 = function (O, key, value, options) {
@@ -845,9 +830,6 @@ var createMethod = function (IS_INCLUDES) {
845
830
  };
846
831
 
847
832
  var arrayIncludes = {
848
- // `Array.prototype.includes` method
849
- // https://tc39.es/ecma262/#sec-array.prototype.includes
850
- includes: createMethod(true),
851
833
  // `Array.prototype.indexOf` method
852
834
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
853
835
  indexOf: createMethod(false)
@@ -1058,6 +1040,7 @@ var objectAssign = !$assign || fails(function () {
1058
1040
  var symbol = Symbol('assign detection');
1059
1041
  var alphabet = 'abcdefghijklmnopqrst';
1060
1042
  A[symbol] = 7;
1043
+ // eslint-disable-next-line es/no-array-prototype-foreach -- safe
1061
1044
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1062
1045
  return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1063
1046
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
@@ -1103,6 +1086,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1103
1086
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1104
1087
  PERFORMANCE OF THIS SOFTWARE.
1105
1088
  ***************************************************************************** */
1089
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1090
+
1106
1091
 
1107
1092
  function __rest(s, e) {
1108
1093
  var t = {};
@@ -1121,7 +1106,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
1121
1106
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1122
1107
  };
1123
1108
 
1124
- const SectionHeaderContainer = /*#__PURE__*/styled__default["default"](frontendFoundations.Row).withConfig({
1109
+ const SectionHeaderContainer = /*#__PURE__*/styled__default.default(frontendFoundations.Row).withConfig({
1125
1110
  displayName: "atoms-section-headerstyle__SectionHeaderContainer",
1126
1111
  componentId: "sc-xtf6u-0"
1127
1112
  })(["justify-content:space-between;flex-wrap:nowrap;box-sizing:border-box;column-gap:0;height:150px;background-color:", ";padding:", ";"], ({
@@ -1129,7 +1114,7 @@ const SectionHeaderContainer = /*#__PURE__*/styled__default["default"](frontendF
1129
1114
  }) => theme.components.sectionHeader.container.color.default, ({
1130
1115
  theme
1131
1116
  }) => `0 ${theme.components.sectionHeader.safeZone}`);
1132
- const SectionHeaderLabel = /*#__PURE__*/styled__default["default"](frontendFoundations.Typography).withConfig({
1117
+ const SectionHeaderLabel = /*#__PURE__*/styled__default.default(frontendFoundations.Typography).withConfig({
1133
1118
  displayName: "atoms-section-headerstyle__SectionHeaderLabel",
1134
1119
  componentId: "sc-xtf6u-1"
1135
1120
  })(["flex:1 1 66%;margin:auto 0;margin-right:", ";color:", ";@media only screen and (max-width:413px){flex:1 1 auto;margin-right:", ";}"], ({
@@ -1139,23 +1124,23 @@ const SectionHeaderLabel = /*#__PURE__*/styled__default["default"](frontendFound
1139
1124
  }) => theme.components.sectionHeader.text.color.default, ({
1140
1125
  theme
1141
1126
  }) => `calc(${theme.components.sectionHeader.gap} + 15%)`);
1142
- const Background = /*#__PURE__*/styled__default["default"].div.withConfig({
1127
+ const Background = /*#__PURE__*/styled__default.default.div.withConfig({
1143
1128
  displayName: "atoms-section-headerstyle__Background",
1144
1129
  componentId: "sc-xtf6u-2"
1145
1130
  })(["display:flex;align-items:flex-end;z-index:0;"]);
1146
- const BackgroundImage = /*#__PURE__*/styled__default["default"].img.withConfig({
1131
+ const BackgroundImage = /*#__PURE__*/styled__default.default.img.withConfig({
1147
1132
  displayName: "atoms-section-headerstyle__BackgroundImage",
1148
1133
  componentId: "sc-xtf6u-3"
1149
1134
  })(["display:flex;align-items:flex-end;z-index:0;max-height:150px;"]);
1150
- const Icon = /*#__PURE__*/styled__default["default"].div.withConfig({
1135
+ const Icon = /*#__PURE__*/styled__default.default.div.withConfig({
1151
1136
  displayName: "atoms-section-headerstyle__Icon",
1152
1137
  componentId: "sc-xtf6u-4"
1153
1138
  })(["position:absolute;display:flex;bottom:0;z-index:1;transform:translate(-50%);"]);
1154
- const IconImage = /*#__PURE__*/styled__default["default"].img.withConfig({
1139
+ const IconImage = /*#__PURE__*/styled__default.default.img.withConfig({
1155
1140
  displayName: "atoms-section-headerstyle__IconImage",
1156
1141
  componentId: "sc-xtf6u-5"
1157
1142
  })(["position:absolute;display:flex;bottom:0;z-index:1;transform:translate(-50%);max-height:150px;width:auto;"]);
1158
- const IlustrationContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
1143
+ const IlustrationContainer = /*#__PURE__*/styled__default.default.div.withConfig({
1159
1144
  displayName: "atoms-section-headerstyle__IlustrationContainer",
1160
1145
  componentId: "sc-xtf6u-6"
1161
1146
  })(["display:flex;position:relative;justify-content:flex-end;align-items:flex-end;@media only screen and (max-width:1431px){width:60%;height:100%;svg{max-width:100%;max-height:100%;height:100%;}}"]);
@@ -1170,10 +1155,12 @@ const SectionHeader = /*#__PURE__*/react.forwardRef((_a, ref) => {
1170
1155
  props = __rest(_a, ["dataTestId", "title", "icon", "background"]);
1171
1156
  const renderIcon = () => {
1172
1157
  if (icon && typeof icon === 'string') return jsxRuntime.jsx(IconImage, {
1158
+ "aria-hidden": "true",
1173
1159
  "data-testid": `${dataTestId}-iconimg`,
1174
1160
  src: icon
1175
1161
  });
1176
1162
  if (icon && typeof icon !== 'string') return jsxRuntime.jsx(Icon, {
1163
+ "aria-hidden": "true",
1177
1164
  "data-testid": `${dataTestId}-icon`,
1178
1165
  children: icon
1179
1166
  });
@@ -1181,10 +1168,12 @@ const SectionHeader = /*#__PURE__*/react.forwardRef((_a, ref) => {
1181
1168
  };
1182
1169
  const renderBackground = () => {
1183
1170
  if (background && typeof background === 'string') return jsxRuntime.jsx(BackgroundImage, {
1171
+ role: "presentation",
1184
1172
  "data-testid": `${dataTestId}-backgroundimg`,
1185
1173
  src: background
1186
1174
  });
1187
1175
  if (background && typeof background !== 'string') return jsxRuntime.jsx(Background, {
1176
+ role: "presentation",
1188
1177
  "data-testid": `${dataTestId}-background`,
1189
1178
  children: background
1190
1179
  });
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@bolttech/atoms-section-header",
3
- "version": "0.22.0",
4
- "main": "./index.cjs",
5
- "type": "commonjs",
6
- "types": "./src/index.d.ts",
3
+ "version": "0.24.2",
7
4
  "dependencies": {
8
- "@bolttech/default-theme": "0.8.0",
9
- "@bolttech/frontend-foundations": "0.9.0",
10
- "@bolttech/ui-utils": "0.4.0",
11
- "react": "18.2.0",
12
- "styled-components": "6.1.1"
5
+ "styled-components": "6.1.1",
6
+ "@bolttech/frontend-foundations": "0.12.3",
7
+ "react": "19.1.2",
8
+ "@bolttech/ui-utils": "0.6.7"
13
9
  },
14
- "peerDependencies": {}
15
- }
10
+ "main": "./index.cjs.js",
11
+ "type": "commonjs",
12
+ "types": "./index.d.ts"
13
+ }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
- export declare const SectionHeader: React.ForwardRefExoticComponent<import("@bolttech/ui-utils").DefaultProps & {
3
- dataTestId?: string | undefined;
1
+ export declare const SectionHeader: import("react").ForwardRefExoticComponent<import("@bolttech/ui-utils").DefaultProps & {
2
+ dataTestId?: string;
4
3
  title: string;
5
- icon?: string | React.ReactElement<SVGElement, string | React.JSXElementConstructor<any>> | undefined;
6
- background?: string | React.ReactElement<SVGElement, string | React.JSXElementConstructor<any>> | undefined;
7
- } & React.RefAttributes<HTMLDivElement>>;
4
+ icon?: string | React.ReactElement<SVGElement>;
5
+ background?: string | React.ReactElement<SVGElement>;
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
8
7
  export default SectionHeader;