@bbl-digital/snorre 4.1.30 → 4.1.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +11 -3
- package/esm/core/Input/index.js +2 -0
- package/esm/layout/Menu/MenuItem/index.js +3 -1
- package/esm/layout/Submenu/SubmenuItem/index.js +6 -2
- package/lib/core/Input/index.d.ts +2 -1
- package/lib/core/Input/index.d.ts.map +1 -1
- package/lib/core/Input/index.js +2 -0
- package/lib/layout/Menu/MenuItem/index.d.ts.map +1 -1
- package/lib/layout/Menu/MenuItem/index.js +3 -1
- package/lib/layout/Submenu/SubmenuItem/index.d.ts.map +1 -1
- package/lib/layout/Submenu/SubmenuItem/index.js +6 -2
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -1324,6 +1324,7 @@
|
|
1324
1324
|
className,
|
1325
1325
|
cardInput,
|
1326
1326
|
variant,
|
1327
|
+
autoComplete,
|
1327
1328
|
getFormattedNumber,
|
1328
1329
|
updateValueOnChange = false,
|
1329
1330
|
...props
|
@@ -1407,6 +1408,7 @@
|
|
1407
1408
|
name: props.name,
|
1408
1409
|
"aria-describedby": props.invalidMessage ? 'input-error-message' : undefined,
|
1409
1410
|
css: theme => [type === 'text' && styles$u.text(theme), type === 'search' && styles$u.search(theme), type === 'password' && styles$u.password(theme), type === 'number' && styles$u.number(theme), type === 'stealth' && styles$u.stealth(theme), props.disabled && styles$u.disabled(theme), cardInput && styles$u.cardInput(theme)],
|
1411
|
+
autoComplete: autoComplete,
|
1410
1412
|
children: React__default["default"].Children.map(props.children, child => {
|
1411
1413
|
if (!child) {
|
1412
1414
|
return null;
|
@@ -28118,8 +28120,10 @@
|
|
28118
28120
|
return null;
|
28119
28121
|
}
|
28120
28122
|
return !isMobile ? jsxRuntime.jsx(ListItem$2, {
|
28121
|
-
role: "menuitem",
|
28122
28123
|
children: jsxRuntime.jsx(Button, {
|
28124
|
+
role: "menuitem",
|
28125
|
+
"aria-current": active ? 'page' : undefined,
|
28126
|
+
"aria-label": `Submenu item: ${label}`,
|
28123
28127
|
nostyle: true,
|
28124
28128
|
onClick: onClick,
|
28125
28129
|
css: FocusState(lightTheme ? theme.primary : 'white'),
|
@@ -28143,8 +28147,10 @@
|
|
28143
28147
|
})
|
28144
28148
|
})
|
28145
28149
|
}) : jsxRuntime.jsx(ListItem$2, {
|
28146
|
-
role: "menuitem",
|
28147
28150
|
children: jsxRuntime.jsx(Button, {
|
28151
|
+
role: "menuitem",
|
28152
|
+
"aria-current": active ? 'page' : undefined,
|
28153
|
+
"aria-label": `Submenu item: ${label}`,
|
28148
28154
|
nostyle: true,
|
28149
28155
|
css: optionButton,
|
28150
28156
|
onClick: handleOptionClick,
|
@@ -28524,9 +28530,11 @@
|
|
28524
28530
|
}) => {
|
28525
28531
|
const theme = react.useTheme();
|
28526
28532
|
return /*#__PURE__*/jsxRuntime$1.jsx(ListItem$1, {
|
28527
|
-
role: "menuitem",
|
28528
28533
|
...props,
|
28529
28534
|
children: /*#__PURE__*/jsxRuntime$1.jsx(Wrapper$m, {
|
28535
|
+
role: "menuitem",
|
28536
|
+
"aria-current": active ? 'page' : undefined,
|
28537
|
+
"aria-label": `Menuitem: ${label}`,
|
28530
28538
|
nostyle: true,
|
28531
28539
|
small: small,
|
28532
28540
|
theme: theme,
|
package/esm/core/Input/index.js
CHANGED
@@ -19,6 +19,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
19
19
|
className,
|
20
20
|
cardInput,
|
21
21
|
variant,
|
22
|
+
autoComplete,
|
22
23
|
getFormattedNumber,
|
23
24
|
updateValueOnChange = false,
|
24
25
|
...props
|
@@ -102,6 +103,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
102
103
|
name: props.name,
|
103
104
|
"aria-describedby": props.invalidMessage ? 'input-error-message' : undefined,
|
104
105
|
css: theme => [type === 'text' && styles.text(theme), type === 'search' && styles.search(theme), type === 'password' && styles.password(theme), type === 'number' && styles.number(theme), type === 'stealth' && styles.stealth(theme), props.disabled && styles.disabled(theme), cardInput && styles.cardInput(theme)],
|
106
|
+
autoComplete: autoComplete,
|
105
107
|
children: React.Children.map(props.children, child => {
|
106
108
|
if (!child) {
|
107
109
|
return null;
|
@@ -14,9 +14,11 @@ const MenuItem = ({
|
|
14
14
|
}) => {
|
15
15
|
const theme = useTheme();
|
16
16
|
return /*#__PURE__*/_jsx(ListItem, {
|
17
|
-
role: "menuitem",
|
18
17
|
...props,
|
19
18
|
children: /*#__PURE__*/_jsx(Wrapper, {
|
19
|
+
role: "menuitem",
|
20
|
+
"aria-current": active ? 'page' : undefined,
|
21
|
+
"aria-label": `Menuitem: ${label}`,
|
20
22
|
nostyle: true,
|
21
23
|
small: small,
|
22
24
|
theme: theme,
|
@@ -33,8 +33,10 @@ const SubmenuItem = ({
|
|
33
33
|
return null;
|
34
34
|
}
|
35
35
|
return !isMobile ? _jsx(ListItem, {
|
36
|
-
role: "menuitem",
|
37
36
|
children: _jsx(Button, {
|
37
|
+
role: "menuitem",
|
38
|
+
"aria-current": active ? 'page' : undefined,
|
39
|
+
"aria-label": `Submenu item: ${label}`,
|
38
40
|
nostyle: true,
|
39
41
|
onClick: onClick,
|
40
42
|
css: FocusState(lightTheme ? theme.primary : 'white'),
|
@@ -58,8 +60,10 @@ const SubmenuItem = ({
|
|
58
60
|
})
|
59
61
|
})
|
60
62
|
}) : _jsx(ListItem, {
|
61
|
-
role: "menuitem",
|
62
63
|
children: _jsx(Button, {
|
64
|
+
role: "menuitem",
|
65
|
+
"aria-current": active ? 'page' : undefined,
|
66
|
+
"aria-label": `Submenu item: ${label}`,
|
63
67
|
nostyle: true,
|
64
68
|
css: optionButton,
|
65
69
|
onClick: handleOptionClick,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
|
-
import React from 'react';
|
2
|
+
import React, { HTMLInputAutoCompleteAttribute } from 'react';
|
3
3
|
export interface InputProps extends React.HTMLAttributes<HTMLInputElement> {
|
4
4
|
/** Input type */
|
5
5
|
type?: 'text' | 'search' | 'number' | 'password' | 'file' | 'stealth';
|
@@ -51,6 +51,7 @@ export interface InputProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
51
51
|
infoPlacement?: 'top' | 'left' | 'right' | 'bottom';
|
52
52
|
/** Styles as card */
|
53
53
|
cardInput?: boolean;
|
54
|
+
autoComplete?: HTMLInputAutoCompleteAttribute;
|
54
55
|
/**
|
55
56
|
* Update internal value if true
|
56
57
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Input/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Input/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAEZ,8BAA8B,EAE/B,MAAM,OAAO,CAAA;AAUd,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACxE,iBAAiB;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAA;IACrE,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB;IACnB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gCAAgC;IAChC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACxD,iCAAiC;IACjC,OAAO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AAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7C;AAED,MAAM,MAAM,GAAG,GAAG,gBAAgB,CAAA;AAElC,QAAA,MAAM,KAAK,qFA8JV,CAAA;AAED,eAAe,KAAK,CAAA"}
|
package/lib/core/Input/index.js
CHANGED
@@ -19,6 +19,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
19
19
|
className,
|
20
20
|
cardInput,
|
21
21
|
variant,
|
22
|
+
autoComplete,
|
22
23
|
getFormattedNumber,
|
23
24
|
updateValueOnChange = false,
|
24
25
|
...props
|
@@ -102,6 +103,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
102
103
|
name: props.name,
|
103
104
|
"aria-describedby": props.invalidMessage ? 'input-error-message' : undefined,
|
104
105
|
css: theme => [type === 'text' && styles.text(theme), type === 'search' && styles.search(theme), type === 'password' && styles.password(theme), type === 'number' && styles.number(theme), type === 'stealth' && styles.stealth(theme), props.disabled && styles.disabled(theme), cardInput && styles.cardInput(theme)],
|
106
|
+
autoComplete: autoComplete,
|
105
107
|
children: React.Children.map(props.children, child => {
|
106
108
|
if (!child) {
|
107
109
|
return null;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/layout/Menu/MenuItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,UAAU,MAAO,SAAQ,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC;IAC1D,uCAAuC;IACvC,KAAK,EAAE,OAAO,CAAA;IACd,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,yBAAyB;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/layout/Menu/MenuItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,UAAU,MAAO,SAAQ,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC;IAC1D,uCAAuC;IACvC,KAAK,EAAE,OAAO,CAAA;IACd,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,yBAAyB;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAuC9B,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
@@ -14,9 +14,11 @@ const MenuItem = ({
|
|
14
14
|
}) => {
|
15
15
|
const theme = useTheme();
|
16
16
|
return /*#__PURE__*/_jsx(ListItem, {
|
17
|
-
role: "menuitem",
|
18
17
|
...props,
|
19
18
|
children: /*#__PURE__*/_jsx(Wrapper, {
|
19
|
+
role: "menuitem",
|
20
|
+
"aria-current": active ? 'page' : undefined,
|
21
|
+
"aria-label": `Menuitem: ${label}`,
|
20
22
|
nostyle: true,
|
21
23
|
small: small,
|
22
24
|
theme: theme,
|
@@ -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,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,
|
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,CAsEjC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
@@ -33,8 +33,10 @@ const SubmenuItem = ({
|
|
33
33
|
return null;
|
34
34
|
}
|
35
35
|
return !isMobile ? _jsx(ListItem, {
|
36
|
-
role: "menuitem",
|
37
36
|
children: _jsx(Button, {
|
37
|
+
role: "menuitem",
|
38
|
+
"aria-current": active ? 'page' : undefined,
|
39
|
+
"aria-label": `Submenu item: ${label}`,
|
38
40
|
nostyle: true,
|
39
41
|
onClick: onClick,
|
40
42
|
css: FocusState(lightTheme ? theme.primary : 'white'),
|
@@ -58,8 +60,10 @@ const SubmenuItem = ({
|
|
58
60
|
})
|
59
61
|
})
|
60
62
|
}) : _jsx(ListItem, {
|
61
|
-
role: "menuitem",
|
62
63
|
children: _jsx(Button, {
|
64
|
+
role: "menuitem",
|
65
|
+
"aria-current": active ? 'page' : undefined,
|
66
|
+
"aria-label": `Submenu item: ${label}`,
|
63
67
|
nostyle: true,
|
64
68
|
css: optionButton,
|
65
69
|
onClick: handleOptionClick,
|