@bbl-digital/snorre 2.2.133 → 2.2.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -26284,9 +26284,10 @@
26284
26284
  lightTheme,
26285
26285
  active,
26286
26286
  label,
26287
+ className,
26288
+ showActiveitemLabel,
26287
26289
  onClick,
26288
- onChange,
26289
- showActiveitemLabel
26290
+ onChange
26290
26291
  }) => {
26291
26292
  const theme = react.useTheme();
26292
26293
  const isMobile = useIsMobile();
@@ -26314,6 +26315,7 @@
26314
26315
  css: FocusState(lightTheme ? theme.primary : 'white'),
26315
26316
  trackingName: "Submenu",
26316
26317
  trackingEvent: 'Submenu click: ' + label,
26318
+ className: className,
26317
26319
  children: jsxRuntime$1.jsx(reactTransitionGroup.CSSTransition, {
26318
26320
  in: active,
26319
26321
  classNames: "submenu-item",
@@ -30851,7 +30853,8 @@
30851
30853
  value,
30852
30854
  displayText,
30853
30855
  trackingEvent,
30854
- trackingName
30856
+ trackingName,
30857
+ className
30855
30858
  }) => {
30856
30859
  const theme = react.useTheme();
30857
30860
  const {
@@ -30876,6 +30879,7 @@
30876
30879
  css: t => [isActive && styles$3.active(t)],
30877
30880
  "data-tracking-name": trackingName,
30878
30881
  "data-tracking-event": trackingEvent,
30882
+ className: className,
30879
30883
  children: displayText ? displayText : value
30880
30884
  });
30881
30885
  };
@@ -10,7 +10,8 @@ const TabNavItem = ({
10
10
  value,
11
11
  displayText,
12
12
  trackingEvent,
13
- trackingName
13
+ trackingName,
14
+ className
14
15
  }) => {
15
16
  const theme = useTheme();
16
17
  const {
@@ -35,6 +36,7 @@ const TabNavItem = ({
35
36
  css: t => [isActive && styles.active(t)],
36
37
  "data-tracking-name": trackingName,
37
38
  "data-tracking-event": trackingEvent,
39
+ className: className,
38
40
  children: displayText ? displayText : value
39
41
  });
40
42
  };
@@ -1,5 +1,6 @@
1
1
  const regularExpressions = {
2
2
  phonenumber: new RegExp(/(?:^((?!00|[+])|(?:(?:00|[+])47))(\d{8})$)|(?:^(?:00|[+])(?!47)(\d{7,15})$)/),
3
+ mobilenumber: new RegExp(/(?:^((?!00|[+])|(?:(?:00|[+])47))([49]\d{7})$)|(?:^(?:00|[+])(?!47)(\d{7,15})$)/),
3
4
  exclusiveNumbers: new RegExp(/^\d+$/),
4
5
  date: new RegExp(/^(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{4}|(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})|([01][0-9]|2[0-8])(0[0-9]|1[0-2])[0-9][0-9]|30(0[013-9]|1[0-2])[0-9][0-9]|31(0[13578]|1[02])[0-9][0-9]|29((0[013-9]|1[0-2])[0-9][0-9]|02([0246][048]|[13579][26]))|(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{2}$/),
5
6
  email: new RegExp(/^[^<>()\[\]\\.,;:\s@"]+(?:\.[^<>()\[\]\\.,;:\s@"]+)*@(?:[a-zA-ZæÆøØåÅ0-9-]+\.)+[a-zA-Z]{2,}$/),
@@ -13,9 +13,10 @@ const SubmenuItem = ({
13
13
  lightTheme,
14
14
  active,
15
15
  label,
16
+ className,
17
+ showActiveitemLabel,
16
18
  onClick,
17
- onChange,
18
- showActiveitemLabel
19
+ onChange
19
20
  }) => {
20
21
  const theme = useTheme();
21
22
  const isMobile = useIsMobile();
@@ -43,6 +44,7 @@ const SubmenuItem = ({
43
44
  css: FocusState(lightTheme ? theme.primary : 'white'),
44
45
  trackingName: "Submenu",
45
46
  trackingEvent: 'Submenu click: ' + label,
47
+ className: className,
46
48
  children: _jsx(CSSTransition, {
47
49
  in: active,
48
50
  classNames: "submenu-item",
@@ -8,6 +8,8 @@ export interface IProps {
8
8
  trackingEvent?: string;
9
9
  /** Add a data-tracking-name attribute. */
10
10
  trackingName?: string;
11
+ /** Add a classname tag */
12
+ className?: string;
11
13
  }
12
14
  declare const TabNavItem: React.FC<IProps>;
13
15
  export { TabNavItem };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/core/TabNav/TabNavItem/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAK5D,MAAM,WAAW,MAAM;IACrB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA+BhC,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AAErB,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/core/TabNav/TabNavItem/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAK5D,MAAM,WAAW,MAAM;IACrB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAiChC,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AAErB,eAAe,UAAU,CAAA"}
@@ -10,7 +10,8 @@ const TabNavItem = ({
10
10
  value,
11
11
  displayText,
12
12
  trackingEvent,
13
- trackingName
13
+ trackingName,
14
+ className
14
15
  }) => {
15
16
  const theme = useTheme();
16
17
  const {
@@ -35,6 +36,7 @@ const TabNavItem = ({
35
36
  css: t => [isActive && styles.active(t)],
36
37
  "data-tracking-name": trackingName,
37
38
  "data-tracking-event": trackingEvent,
39
+ className: className,
38
40
  children: displayText ? displayText : value
39
41
  });
40
42
  };
@@ -1,5 +1,6 @@
1
1
  declare const regularExpressions: {
2
2
  phonenumber: RegExp;
3
+ mobilenumber: RegExp;
3
4
  exclusiveNumbers: RegExp;
4
5
  date: RegExp;
5
6
  email: RegExp;
@@ -1 +1 @@
1
- {"version":3,"file":"regularExpressions.d.ts","sourceRoot":"","sources":["../../../src/packages/globals/validation/regularExpressions.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB;;;;;;;CAevB,CAAA;AAED,eAAe,kBAAkB,CAAA"}
1
+ {"version":3,"file":"regularExpressions.d.ts","sourceRoot":"","sources":["../../../src/packages/globals/validation/regularExpressions.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB;;;;;;;;CAkBvB,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -1,5 +1,6 @@
1
1
  const regularExpressions = {
2
2
  phonenumber: new RegExp(/(?:^((?!00|[+])|(?:(?:00|[+])47))(\d{8})$)|(?:^(?:00|[+])(?!47)(\d{7,15})$)/),
3
+ mobilenumber: new RegExp(/(?:^((?!00|[+])|(?:(?:00|[+])47))([49]\d{7})$)|(?:^(?:00|[+])(?!47)(\d{7,15})$)/),
3
4
  exclusiveNumbers: new RegExp(/^\d+$/),
4
5
  date: new RegExp(/^(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{4}|(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})|([01][0-9]|2[0-8])(0[0-9]|1[0-2])[0-9][0-9]|30(0[013-9]|1[0-2])[0-9][0-9]|31(0[13578]|1[02])[0-9][0-9]|29((0[013-9]|1[0-2])[0-9][0-9]|02([0246][048]|[13579][26]))|(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{2}$/),
5
6
  email: new RegExp(/^[^<>()\[\]\\.,;:\s@"]+(?:\.[^<>()\[\]\\.,;:\s@"]+)*@(?:[a-zA-ZæÆøØåÅ0-9-]+\.)+[a-zA-Z]{2,}$/),
@@ -7,12 +7,14 @@ interface IProps {
7
7
  label: string;
8
8
  /** Sets the item as active */
9
9
  active?: boolean;
10
+ /** Return label of active item or null */
11
+ showActiveitemLabel?: boolean;
12
+ /** Add classname to desktop item */
13
+ className?: string;
10
14
  /** CB fired on click */
11
15
  onClick?: () => void;
12
16
  /** CB fired on click */
13
17
  onChange?: () => void;
14
- /** Return label of active item or null */
15
- showActiveitemLabel?: boolean;
16
18
  }
17
19
  declare const SubmenuItem: React.FC<IProps>;
18
20
  export default SubmenuItem;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/layout/Submenu/SubmenuItem/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAmB,MAAM,OAAO,CAAA;AAUvC,UAAU,MAAM;IACd,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,8BAA8B;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,0CAA0C;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAwDjC,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/layout/Submenu/SubmenuItem/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAmB,MAAM,OAAO,CAAA;AAUvC,UAAU,MAAM;IACd,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,8BAA8B;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,0CAA0C;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA0DjC,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -13,9 +13,10 @@ const SubmenuItem = ({
13
13
  lightTheme,
14
14
  active,
15
15
  label,
16
+ className,
17
+ showActiveitemLabel,
16
18
  onClick,
17
- onChange,
18
- showActiveitemLabel
19
+ onChange
19
20
  }) => {
20
21
  const theme = useTheme();
21
22
  const isMobile = useIsMobile();
@@ -43,6 +44,7 @@ const SubmenuItem = ({
43
44
  css: FocusState(lightTheme ? theme.primary : 'white'),
44
45
  trackingName: "Submenu",
45
46
  trackingEvent: 'Submenu click: ' + label,
47
+ className: className,
46
48
  children: _jsx(CSSTransition, {
47
49
  in: active,
48
50
  classNames: "submenu-item",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "2.2.133",
3
+ "version": "2.2.136",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",