cozy-ui 122.4.0 → 122.6.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/CHANGELOG.md +14 -0
- package/dist/cozy-ui.min.css +1 -1
- package/dist/cozy-ui.utils.min.css +1 -1
- package/package.json +1 -1
- package/react/Nav/index.jsx +8 -7
- package/stylus/cozy-ui/build.styl +4 -2
- package/stylus/utilities/border.styl +8 -0
- package/transpiled/react/Nav/index.d.ts +8 -4
- package/transpiled/react/Nav/index.js +13 -9
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export function NavItem({ children, secondary, ...restProps }: {
|
|
1
|
+
export function NavItem({ className, children, secondary, ...restProps }: {
|
|
2
2
|
[x: string]: any;
|
|
3
|
+
className: any;
|
|
3
4
|
children: any;
|
|
4
5
|
secondary: any;
|
|
5
6
|
}): JSX.Element;
|
|
6
|
-
export function NavText({ children }: {
|
|
7
|
+
export function NavText({ className, children }: {
|
|
8
|
+
className: any;
|
|
7
9
|
children: any;
|
|
8
10
|
}): JSX.Element;
|
|
9
11
|
export namespace NavLink {
|
|
@@ -16,13 +18,15 @@ export function genNavLink(RRNavLink: any): ({ to, children, ...rest }: {
|
|
|
16
18
|
children: any;
|
|
17
19
|
}) => JSX.Element;
|
|
18
20
|
export function genNavLinkForV6(RRNavLink: any): React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
19
|
-
export function NavIcon({ icon }: {
|
|
21
|
+
export function NavIcon({ className, icon }: {
|
|
22
|
+
className: any;
|
|
20
23
|
icon: any;
|
|
21
24
|
}): JSX.Element;
|
|
22
25
|
export const NavDesktopLimiter: any;
|
|
23
26
|
export default Nav;
|
|
24
27
|
import React from "react";
|
|
25
|
-
declare function Nav({ children }: {
|
|
28
|
+
declare function Nav({ className, children }: {
|
|
29
|
+
className: any;
|
|
26
30
|
children: any;
|
|
27
31
|
}): JSX.Element;
|
|
28
32
|
declare namespace Nav {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "secondary"],
|
|
4
|
+
var _excluded = ["className", "children", "secondary"],
|
|
5
5
|
_excluded2 = ["to", "children"];
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import React, { Children, isValidElement, useState, forwardRef } from 'react';
|
|
@@ -22,18 +22,20 @@ import TopIcon from "cozy-ui/transpiled/react/Icons/Top";
|
|
|
22
22
|
import useBreakpoints from "cozy-ui/transpiled/react/providers/Breakpoints";
|
|
23
23
|
import { useI18n } from "cozy-ui/transpiled/react/providers/I18n";
|
|
24
24
|
export var NavItem = function NavItem(_ref) {
|
|
25
|
-
var
|
|
25
|
+
var className = _ref.className,
|
|
26
|
+
children = _ref.children,
|
|
26
27
|
secondary = _ref.secondary,
|
|
27
28
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
|
|
29
30
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
30
|
-
className: cx(styles['c-nav-item'], secondary ? styles['c-nav-item-secondary'] : null)
|
|
31
|
+
className: cx(styles['c-nav-item'], className, secondary ? styles['c-nav-item-secondary'] : null)
|
|
31
32
|
}, restProps), children);
|
|
32
33
|
};
|
|
33
34
|
export var NavText = function NavText(_ref2) {
|
|
34
|
-
var
|
|
35
|
+
var className = _ref2.className,
|
|
36
|
+
children = _ref2.children;
|
|
35
37
|
return /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className: styles['c-nav-text']
|
|
38
|
+
className: cx(styles['c-nav-text'], className)
|
|
37
39
|
}, children);
|
|
38
40
|
};
|
|
39
41
|
export var NavLink = {
|
|
@@ -67,9 +69,10 @@ export var genNavLinkForV6 = function genNavLinkForV6(RRNavLink) {
|
|
|
67
69
|
});
|
|
68
70
|
};
|
|
69
71
|
export var NavIcon = function NavIcon(_ref5) {
|
|
70
|
-
var
|
|
72
|
+
var className = _ref5.className,
|
|
73
|
+
icon = _ref5.icon;
|
|
71
74
|
return /*#__PURE__*/React.createElement("span", {
|
|
72
|
-
className: cx(styles['c-nav-icon'])
|
|
75
|
+
className: cx(styles['c-nav-icon'], className)
|
|
73
76
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
74
77
|
icon: icon,
|
|
75
78
|
"aria-hidden": "true",
|
|
@@ -78,11 +81,12 @@ export var NavIcon = function NavIcon(_ref5) {
|
|
|
78
81
|
};
|
|
79
82
|
|
|
80
83
|
var Nav = function Nav(_ref6) {
|
|
81
|
-
var
|
|
84
|
+
var className = _ref6.className,
|
|
85
|
+
children = _ref6.children;
|
|
82
86
|
return /*#__PURE__*/React.createElement("nav", {
|
|
83
87
|
role: "navigation"
|
|
84
88
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
85
|
-
className: styles['c-nav']
|
|
89
|
+
className: cx(styles['c-nav'], className)
|
|
86
90
|
}, children));
|
|
87
91
|
};
|
|
88
92
|
/**
|