@neo4j-ndl/react 0.3.0 → 0.3.1
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/lib/cjs/button/Button.js +15 -6
- package/lib/cjs/button/Button.js.map +1 -1
- package/lib/cjs/label/Label.js +3 -1
- package/lib/cjs/label/Label.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js +4 -3
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/esm/button/Button.js +15 -6
- package/lib/esm/button/Button.js.map +1 -1
- package/lib/esm/label/Label.js +3 -1
- package/lib/esm/label/Label.js.map +1 -1
- package/lib/esm/tabs/Tabs.js +4 -3
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/types/alert/Alert.d.ts +1 -1
- package/lib/types/button/Button.d.ts +2 -0
- package/lib/types/tabs/Tabs.d.ts +3 -4
- package/package.json +3 -4
package/lib/cjs/button/Button.js
CHANGED
|
@@ -45,7 +45,7 @@ exports.removeNewlines = removeNewlines;
|
|
|
45
45
|
const removeSpaces = (input) => input.replace(/\s+/g, ' ').trim();
|
|
46
46
|
exports.removeSpaces = removeSpaces;
|
|
47
47
|
exports.Button = react_1.default.forwardRef(function Button(_a, ref) {
|
|
48
|
-
var { children, as, type = 'button', loading = false, color = 'primary', disabled = false, fill = 'filled', rectangle = false, buttonSize = 'regular', className, onClick, tabIndex = 0 } = _a, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "className", "onClick", "tabIndex"]);
|
|
48
|
+
var { children, as, type = 'button', loading = false, color = 'primary', disabled = false, fill = 'filled', rectangle = false, buttonSize = 'regular', className, onClick, floating = false, tabIndex = 0 } = _a, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "className", "onClick", "floating", "tabIndex"]);
|
|
49
49
|
let Component = as || 'button';
|
|
50
50
|
if (!as && props.href) {
|
|
51
51
|
Component = 'a';
|
|
@@ -55,6 +55,7 @@ exports.Button = react_1.default.forwardRef(function Button(_a, ref) {
|
|
|
55
55
|
disabled: disabled,
|
|
56
56
|
loading: loading,
|
|
57
57
|
rectangle: rectangle,
|
|
58
|
+
'floating-btn': floating,
|
|
58
59
|
/** Now check button is outlined or filled */
|
|
59
60
|
/**
|
|
60
61
|
* Notice:
|
|
@@ -65,11 +66,15 @@ exports.Button = react_1.default.forwardRef(function Button(_a, ref) {
|
|
|
65
66
|
${color === 'neutral'
|
|
66
67
|
? `n-bg-light-${color}-bg-strongest`
|
|
67
68
|
: `n-bg-light-${color}-bg-strong`}
|
|
68
|
-
${interactable &&
|
|
69
|
+
${interactable &&
|
|
70
|
+
`hover:n-bg-light-${color}-hover-strong
|
|
71
|
+
active:n-bg-light-${color}-pressed-strong`}
|
|
69
72
|
`]: fill === 'filled',
|
|
70
73
|
[`
|
|
71
74
|
n-text-light-${color}-text
|
|
72
|
-
${interactable &&
|
|
75
|
+
${interactable &&
|
|
76
|
+
`hover:n-bg-light-${color}-hover-weak
|
|
77
|
+
active:n-bg-light-${color}-pressed-weak`}
|
|
73
78
|
n-border-light-${color}-bg-strong
|
|
74
79
|
`]: fill === 'outlined' && color !== 'neutral',
|
|
75
80
|
/**
|
|
@@ -77,14 +82,18 @@ exports.Button = react_1.default.forwardRef(function Button(_a, ref) {
|
|
|
77
82
|
* the same principles with colored variations
|
|
78
83
|
*/
|
|
79
84
|
[`
|
|
80
|
-
|
|
85
|
+
n-text-light-neutral-text-weak
|
|
81
86
|
n-bg-${color}-10
|
|
82
87
|
${interactable && `hover:n-bg-${color}-20`}
|
|
83
|
-
n-border
|
|
88
|
+
n-border-light-neutral-border-strong
|
|
89
|
+
active:n-bg-light-neutral-pressed
|
|
84
90
|
`]: fill === 'outlined' && color === 'neutral',
|
|
85
91
|
[`
|
|
86
92
|
n-text-${color}-50
|
|
87
|
-
${interactable &&
|
|
93
|
+
${interactable &&
|
|
94
|
+
`hover:n-bg-${color}-10
|
|
95
|
+
active:n-bg-light-${color}-pressed-weak
|
|
96
|
+
`}
|
|
88
97
|
`]: fill === 'text' && color !== 'neutral',
|
|
89
98
|
[`
|
|
90
99
|
n-text-light-neutral-text-weak
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,4DAAoC;AAEpC,wDAAoD;AAG7C,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAC9C,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AADzB,QAAA,cAAc,kBACW;AAEtC,qCAAqC;AAC9B,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAC5C,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AADvB,QAAA,YAAY,gBACW;
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,4DAAoC;AAEpC,wDAAoD;AAG7C,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAC9C,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AADzB,QAAA,cAAc,kBACW;AAEtC,qCAAqC;AAC9B,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAC5C,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AADvB,QAAA,YAAY,gBACW;AAgCvB,QAAA,MAAM,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,MAAM,CACpD,EAec,EACd,GAAG;QAhBH,EACE,QAAQ,EACR,EAAE,EACF,IAAI,GAAG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ACC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/cjs/label/Label.js
CHANGED
|
@@ -97,7 +97,9 @@ exports.Label = react_1.default.forwardRef(function Label(_a, ref) {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
const classes = (0, classnames_1.default)('ndl-label', base, className, fill);
|
|
100
|
-
return ((0, jsx_runtime_1.jsx)("span", Object.assign({ role: "status", "aria-label": "label", className: classes }, rest, { ref: ref }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "label-content" }, { children: [icon, (0, jsx_runtime_1.jsx)("span", Object.assign({
|
|
100
|
+
return ((0, jsx_runtime_1.jsx)("span", Object.assign({ role: "status", "aria-label": "label", className: classes }, rest, { ref: ref }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "label-content" }, { children: [icon, (0, jsx_runtime_1.jsx)("span", Object.assign({
|
|
101
|
+
// To enable native tooltip on hover if the children is a string
|
|
102
|
+
title: typeof children === 'string' ? children : 'label', className: "label-text" }, { children: children }))] })) })));
|
|
101
103
|
});
|
|
102
104
|
exports.default = exports.Label;
|
|
103
105
|
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/label/Label.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,4DAAoC;AACpC,iDAAkE;AAElE;;;;;;GAMG;AAEU,QAAA,WAAW,GAAG;IACzB,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAC;AAiBE,QAAA,KAAK,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,KAAK,CAClD,EAOsB,EACtB,GAAwC;QARxC,EACE,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,QAAQ,GAAG,KAAK,OAEI,EADjB,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,gBAER,+CAAK,SAAS,EAAC,eAAe,iBAC3B,IAAI,EACL;oBACE,gEAAgE;oBAChE,KAAK,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EACxD,SAAS,EAAC,YAAY,gBAErB,QAAQ,IACJ,KACH,IACD,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,aAAK,CAAC"}
|
package/lib/cjs/tabs/Tabs.js
CHANGED
|
@@ -61,6 +61,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
61
61
|
*/
|
|
62
62
|
const react_1 = __importStar(require("react"));
|
|
63
63
|
const classnames_1 = __importDefault(require("classnames"));
|
|
64
|
+
const helpers_1 = require("../helpers");
|
|
64
65
|
const TabsContext = react_1.default.createContext(null);
|
|
65
66
|
const useTabsContext = () => {
|
|
66
67
|
const context = (0, react_1.useContext)(TabsContext);
|
|
@@ -74,11 +75,11 @@ const getGeneralTabClasses = (size, fill) => {
|
|
|
74
75
|
return {
|
|
75
76
|
large: size === 'large',
|
|
76
77
|
small: size === 'small',
|
|
77
|
-
filled: fill === 'filled',
|
|
78
|
-
underline: fill === 'underline',
|
|
78
|
+
'filled-tab': fill === 'filled',
|
|
79
|
+
'underline-tab': fill === 'underline',
|
|
79
80
|
};
|
|
80
81
|
};
|
|
81
|
-
exports.Tabs =
|
|
82
|
+
exports.Tabs = (0, helpers_1.forwardRef)(function Tabs(_a, ref) {
|
|
82
83
|
var { children, size = 'large', fill = 'underline', onChange, value, className, as = 'div' } = _a, rest = __rest(_a, ["children", "size", "fill", "onChange", "value", "className", "as"]);
|
|
83
84
|
const classes = (0, classnames_1.default)('ndl-tabs', getGeneralTabClasses(size, fill), className);
|
|
84
85
|
const Component = as;
|
package/lib/cjs/tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.ts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AE,YAAY,EACrB,IAAI,EAAC,KAAK,mBACK,aAAa,CAAC,KAAK,CAAC,IAC/B,IAAI,IACR,GAAG,EAAE,GAAG,iBAEP,QAAQ,EACR,IAAI,KAAK,WAAW,IAAI,iCAAM,SAAS,EAAC,eAAe,GAAG,KACjD,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAqBU,QAAA,QAAQ,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,QAAQ,CACxD,EAA8D,EAC9D,GAAG;QADH,EAAE,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,OAA0B,EAArB,IAAI,cAA7C,oCAA+C,CAAF;IAG7C,MAAM,SAAS,GAAG,EAAE,CAAC;IAErB,OAAO,CACL,2DACG,KAAK,KAAK,KAAK,IAAI,CAClB,uBAAC,SAAS,kBACR,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,IACpB,IAAI,IACR,GAAG,EAAE,GAAG,gBAEP,QAAQ,IACC,CACb,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/esm/button/Button.js
CHANGED
|
@@ -37,7 +37,7 @@ export const removeNewlines = (input) => input.replace(/(\r\n|\n|\r)/gm, '');
|
|
|
37
37
|
/** Remove extra spaces from sting */
|
|
38
38
|
export const removeSpaces = (input) => input.replace(/\s+/g, ' ').trim();
|
|
39
39
|
export const Button = React.forwardRef(function Button(_a, ref) {
|
|
40
|
-
var { children, as, type = 'button', loading = false, color = 'primary', disabled = false, fill = 'filled', rectangle = false, buttonSize = 'regular', className, onClick, tabIndex = 0 } = _a, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "className", "onClick", "tabIndex"]);
|
|
40
|
+
var { children, as, type = 'button', loading = false, color = 'primary', disabled = false, fill = 'filled', rectangle = false, buttonSize = 'regular', className, onClick, floating = false, tabIndex = 0 } = _a, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "className", "onClick", "floating", "tabIndex"]);
|
|
41
41
|
let Component = as || 'button';
|
|
42
42
|
if (!as && props.href) {
|
|
43
43
|
Component = 'a';
|
|
@@ -47,6 +47,7 @@ export const Button = React.forwardRef(function Button(_a, ref) {
|
|
|
47
47
|
disabled: disabled,
|
|
48
48
|
loading: loading,
|
|
49
49
|
rectangle: rectangle,
|
|
50
|
+
'floating-btn': floating,
|
|
50
51
|
/** Now check button is outlined or filled */
|
|
51
52
|
/**
|
|
52
53
|
* Notice:
|
|
@@ -57,11 +58,15 @@ export const Button = React.forwardRef(function Button(_a, ref) {
|
|
|
57
58
|
${color === 'neutral'
|
|
58
59
|
? `n-bg-light-${color}-bg-strongest`
|
|
59
60
|
: `n-bg-light-${color}-bg-strong`}
|
|
60
|
-
${interactable &&
|
|
61
|
+
${interactable &&
|
|
62
|
+
`hover:n-bg-light-${color}-hover-strong
|
|
63
|
+
active:n-bg-light-${color}-pressed-strong`}
|
|
61
64
|
`]: fill === 'filled',
|
|
62
65
|
[`
|
|
63
66
|
n-text-light-${color}-text
|
|
64
|
-
${interactable &&
|
|
67
|
+
${interactable &&
|
|
68
|
+
`hover:n-bg-light-${color}-hover-weak
|
|
69
|
+
active:n-bg-light-${color}-pressed-weak`}
|
|
65
70
|
n-border-light-${color}-bg-strong
|
|
66
71
|
`]: fill === 'outlined' && color !== 'neutral',
|
|
67
72
|
/**
|
|
@@ -69,14 +74,18 @@ export const Button = React.forwardRef(function Button(_a, ref) {
|
|
|
69
74
|
* the same principles with colored variations
|
|
70
75
|
*/
|
|
71
76
|
[`
|
|
72
|
-
|
|
77
|
+
n-text-light-neutral-text-weak
|
|
73
78
|
n-bg-${color}-10
|
|
74
79
|
${interactable && `hover:n-bg-${color}-20`}
|
|
75
|
-
n-border
|
|
80
|
+
n-border-light-neutral-border-strong
|
|
81
|
+
active:n-bg-light-neutral-pressed
|
|
76
82
|
`]: fill === 'outlined' && color === 'neutral',
|
|
77
83
|
[`
|
|
78
84
|
n-text-${color}-50
|
|
79
|
-
${interactable &&
|
|
85
|
+
${interactable &&
|
|
86
|
+
`hover:n-bg-${color}-10
|
|
87
|
+
active:n-bg-light-${color}-pressed-weak
|
|
88
|
+
`}
|
|
80
89
|
`]: fill === 'text' && color !== 'neutral',
|
|
81
90
|
[`
|
|
82
91
|
n-text-light-neutral-text-weak
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAC9C,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAEtC,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAC5C,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAC9C,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAEtC,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EA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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,iBAEtC,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,cAAc,IAAC,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAC,OAAO,GAAG,CAC7D,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,KACC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/esm/label/Label.js
CHANGED
|
@@ -91,7 +91,9 @@ export const Label = React.forwardRef(function Label(_a, ref) {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
const classes = classnames('ndl-label', base, className, fill);
|
|
94
|
-
return (_jsx("span", Object.assign({ role: "status", "aria-label": "label", className: classes }, rest, { ref: ref }, { children: _jsxs("div", Object.assign({ className: "label-content" }, { children: [icon, _jsx("span", Object.assign({
|
|
94
|
+
return (_jsx("span", Object.assign({ role: "status", "aria-label": "label", className: classes }, rest, { ref: ref }, { children: _jsxs("div", Object.assign({ className: "label-content" }, { children: [icon, _jsx("span", Object.assign({
|
|
95
|
+
// To enable native tooltip on hover if the children is a string
|
|
96
|
+
title: typeof children === 'string' ? children : 'label', className: "label-text" }, { children: children }))] })) })));
|
|
95
97
|
});
|
|
96
98
|
export default Label;
|
|
97
99
|
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/label/Label.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAC;AAiBX,MA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ACxB,CAAC,mBAAmB,CAAC,EAAE,IAAI,KAAK,OAAO;aACxC,CAAC,CAAC;KACN;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAE/D,OAAO,CACL,6BACE,IAAI,EAAC,QAAQ,gBACF,OAAO,EAClB,SAAS,EAAE,OAAO,IACd,IAAI,IACR,GAAG,EAAE,GAAG,gBAER,6BAAK,SAAS,EAAC,eAAe,iBAC3B,IAAI,EACL;oBACE,gEAAgE;oBAChE,KAAK,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EACxD,SAAS,EAAC,YAAY,gBAErB,QAAQ,IACJ,KACH,IACD,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/lib/esm/tabs/Tabs.js
CHANGED
|
@@ -32,6 +32,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
32
32
|
*/
|
|
33
33
|
import React, { useContext } from 'react';
|
|
34
34
|
import classnames from 'classnames';
|
|
35
|
+
import { forwardRef } from '../helpers';
|
|
35
36
|
const TabsContext = React.createContext(null);
|
|
36
37
|
const useTabsContext = () => {
|
|
37
38
|
const context = useContext(TabsContext);
|
|
@@ -45,11 +46,11 @@ const getGeneralTabClasses = (size, fill) => {
|
|
|
45
46
|
return {
|
|
46
47
|
large: size === 'large',
|
|
47
48
|
small: size === 'small',
|
|
48
|
-
filled: fill === 'filled',
|
|
49
|
-
underline: fill === 'underline',
|
|
49
|
+
'filled-tab': fill === 'filled',
|
|
50
|
+
'underline-tab': fill === 'underline',
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
|
-
export const Tabs =
|
|
53
|
+
export const Tabs = forwardRef(function Tabs(_a, ref) {
|
|
53
54
|
var { children, size = 'large', fill = 'underline', onChange, value, className, as = 'div' } = _a, rest = __rest(_a, ["children", "size", "fill", "onChange", "value", "className", "as"]);
|
|
54
55
|
const classes = classnames('ndl-tabs', getGeneralTabClasses(size, fill), className);
|
|
55
56
|
const Component = as;
|
package/lib/esm/tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAoCxC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAA8B,IAAI,CAAC,CAAC;AAE3E,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAExC,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,YAAY,KAAK,EAAE,CAAC;AAE5D,MAAM,oBAAoB,GAAG,CAAC,IAAU,EAAE,IAAU,EAAE,EAAE;IACtD,OAAO;QACL,KAAK,EAAE,IAAI,KAAK,OAAO;QACvB,KAAK,EAAE,IAAI,KAAK,OAAO;QACvB,YAAY,EAAE,IAAI,KAAK,Q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B,mGAAmG;IACnG,2HAA2H;IAC3H,8HAA8H;IAC9H,MAAM,YAAY,GAAG,QAA8B,CAAC;IAEpD,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CAAC,QAAQ,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IAE5D,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAEnD,OAAO,CACL,MAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,YAAY,EACrB,IAAI,EAAC,KAAK,mBACK,aAAa,CAAC,KAAK,CAAC,IAC/B,IAAI,IACR,GAAG,EAAE,GAAG,iBAEP,QAAQ,EACR,IAAI,KAAK,WAAW,IAAI,eAAM,SAAS,EAAC,eAAe,GAAG,KACjD,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAqBH,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,QAAQ,CACxD,EAA8D,EAC9D,GAAG;QADH,EAAE,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,OAA0B,EAArB,IAAI,cAA7C,oCAA+C,CAAF;IAG7C,MAAM,SAAS,GAAG,EAAE,CAAC;IAErB,OAAO,CACL,4BACG,KAAK,KAAK,KAAK,IAAI,CAClB,KAAC,SAAS,kBACR,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,IACpB,IAAI,IACR,GAAG,EAAE,GAAG,gBAEP,QAAQ,IACC,CACb,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -71,5 +71,5 @@ declare type AlertCloseProps = CloseableAlertProps | NonCloseableAlertProps;
|
|
|
71
71
|
export declare type AlertProps = AlertCommonProps & AlertCloseProps;
|
|
72
72
|
export declare type AlertType = 'info' | 'success' | 'warning' | 'danger';
|
|
73
73
|
export declare const AlertAction: ({ label, ...props }: AlertActionProps) => JSX.Element;
|
|
74
|
-
declare const Alert: React.ForwardRefExoticComponent<(Pick<AlertCommonProps & CloseableAlertProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "icon" | "actions" | "floating" | "description" | keyof CloseableAlertProps> | Pick<AlertCommonProps & NonCloseableAlertProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "icon" | "actions" | "floating" | "description" | keyof NonCloseableAlertProps>) & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
+
declare const Alert: React.ForwardRefExoticComponent<(Pick<AlertCommonProps & CloseableAlertProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "floating" | "icon" | "actions" | "description" | keyof CloseableAlertProps> | Pick<AlertCommonProps & NonCloseableAlertProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "floating" | "icon" | "actions" | "description" | keyof NonCloseableAlertProps>) & React.RefAttributes<HTMLDivElement>>;
|
|
75
75
|
export default Alert;
|
|
@@ -47,6 +47,8 @@ export interface ButtonProps extends ElementBase<HTMLButtonElement> {
|
|
|
47
47
|
buttonSize?: 'regular' | 'small' | 'large';
|
|
48
48
|
/** Rectanle (for icon usage mainly) */
|
|
49
49
|
rectangle?: boolean;
|
|
50
|
+
/** If the button is in floating state */
|
|
51
|
+
floating?: boolean;
|
|
50
52
|
}
|
|
51
53
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
|
|
52
54
|
export {};
|
package/lib/types/tabs/Tabs.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import React from 'react';
|
|
|
22
22
|
declare type TabId = string | number;
|
|
23
23
|
declare type Size = 'small' | 'large';
|
|
24
24
|
declare type Fill = 'underline' | 'filled';
|
|
25
|
-
interface BaseTabsProps<T extends TabId> {
|
|
25
|
+
export interface BaseTabsProps<T extends TabId> {
|
|
26
26
|
/**
|
|
27
27
|
* The currently active tabId
|
|
28
28
|
*/
|
|
@@ -31,7 +31,7 @@ interface BaseTabsProps<T extends TabId> {
|
|
|
31
31
|
* Event when a new tab is selected. Receives the newly selected
|
|
32
32
|
* tabId as the value
|
|
33
33
|
*/
|
|
34
|
-
onChange: (
|
|
34
|
+
onChange: (e: T) => void;
|
|
35
35
|
children: React.ReactNode | string;
|
|
36
36
|
fill?: Fill;
|
|
37
37
|
size?: Size;
|
|
@@ -41,8 +41,7 @@ interface BaseTabsProps<T extends TabId> {
|
|
|
41
41
|
*/
|
|
42
42
|
as?: string | React.ComponentType<any>;
|
|
43
43
|
}
|
|
44
|
-
export declare
|
|
45
|
-
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<unknown>>;
|
|
44
|
+
export declare const Tabs: <T extends TabId>(props: BaseTabsProps<T> & React.RefAttributes<unknown>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
46
45
|
interface TabProps<T extends TabId> {
|
|
47
46
|
tabId: T;
|
|
48
47
|
children: React.ReactNode | string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "React implementation of Neo4j Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"button",
|
|
@@ -67,10 +67,9 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@heroicons/react": "^1.0.5",
|
|
70
|
-
"@neo4j-ndl/base": "^0.3.
|
|
70
|
+
"@neo4j-ndl/base": "^0.3.1",
|
|
71
71
|
"classnames": "^2.3.1",
|
|
72
72
|
"react-dropzone": "^12.0.4",
|
|
73
73
|
"react-table": "^7.7.0"
|
|
74
|
-
}
|
|
75
|
-
"gitHead": "40d840bea97d8d42c563808e27b57f4f0c9b7011"
|
|
74
|
+
}
|
|
76
75
|
}
|