@neo4j-ndl/react 1.8.20 → 1.10.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 +22 -0
- package/lib/LICENSES.txt +53 -1
- package/lib/NOTICE.txt +9 -0
- package/lib/cjs/accordion/Accordion.js +241 -0
- package/lib/cjs/accordion/Accordion.js.map +1 -0
- package/lib/cjs/accordion/index.js +38 -0
- package/lib/cjs/accordion/index.js.map +1 -0
- package/lib/cjs/date-picker/DatePicker.js +91 -0
- package/lib/cjs/date-picker/DatePicker.js.map +1 -0
- package/lib/cjs/date-picker/index.js +38 -0
- package/lib/cjs/date-picker/index.js.map +1 -0
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/accordion/Accordion.js +237 -0
- package/lib/esm/accordion/Accordion.js.map +1 -0
- package/lib/esm/accordion/index.js +22 -0
- package/lib/esm/accordion/index.js.map +1 -0
- package/lib/esm/date-picker/DatePicker.js +85 -0
- package/lib/esm/date-picker/DatePicker.js.map +1 -0
- package/lib/esm/date-picker/index.js +22 -0
- package/lib/esm/date-picker/index.js.map +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/accordion/Accordion.d.ts +60 -0
- package/lib/types/accordion/index.d.ts +21 -0
- package/lib/types/date-picker/DatePicker.d.ts +35 -0
- package/lib/types/date-picker/index.d.ts +21 -0
- package/lib/types/graph-label/GraphLabel.d.ts +1 -1
- package/lib/types/index.d.ts +2 -0
- package/lib/types/side-navigation/SideNavigation.d.ts +2 -2
- package/lib/types/table/Table.d.ts +1 -1
- package/lib/types/table-deprecated/Table.d.ts +1 -1
- package/lib/types/typography/Typography.d.ts +1 -1
- package/lib/types/view-selector/ViewSelector.d.ts +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import classNames from 'classnames';
|
|
34
|
+
import { useCallback, useRef, useImperativeHandle, createContext, useContext, } from 'react';
|
|
35
|
+
import { forwardRef } from '../helpers';
|
|
36
|
+
import { ChevronDownIconOutline } from '../icons';
|
|
37
|
+
import { Typography } from '@neo4j-ndl/react/src';
|
|
38
|
+
const getAccordionItem = (activeElement, accordionElement, iterator) => {
|
|
39
|
+
var _a;
|
|
40
|
+
const accordionItemElement = activeElement.parentElement;
|
|
41
|
+
let newItemElement = iterator(accordionElement, accordionItemElement);
|
|
42
|
+
let childItemElement = null;
|
|
43
|
+
// Iterate over next element until we find a menu item
|
|
44
|
+
// Iterate a maximum of 10 times looking for an element
|
|
45
|
+
for (let i = 0; i < 10; i++) {
|
|
46
|
+
// Can't find new element, break
|
|
47
|
+
if (!newItemElement) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
const role = (_a = newItemElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.getAttribute('role');
|
|
51
|
+
if (role === 'heading') {
|
|
52
|
+
childItemElement = newItemElement;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
newItemElement = iterator(accordionElement, newItemElement);
|
|
56
|
+
}
|
|
57
|
+
return childItemElement;
|
|
58
|
+
};
|
|
59
|
+
// Gets next sibling child, looping at the end
|
|
60
|
+
const nextElement = (accordionElement, currentElement) => {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
if (currentElement === accordionElement ||
|
|
63
|
+
!(currentElement === null || currentElement === void 0 ? void 0 : currentElement.nextElementSibling)) {
|
|
64
|
+
const nextItem = accordionElement.firstChild;
|
|
65
|
+
const firstAccordionItemHeaderElement = (_a = accordionElement === null || accordionElement === void 0 ? void 0 : accordionElement.firstElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild;
|
|
66
|
+
return (firstAccordionItemHeaderElement === null || firstAccordionItemHeaderElement === void 0 ? void 0 : firstAccordionItemHeaderElement.className.includes('ndl-accordion-item-header-disabled'))
|
|
67
|
+
? nextElement(accordionElement, nextItem)
|
|
68
|
+
: nextItem;
|
|
69
|
+
}
|
|
70
|
+
else if (currentElement === null || currentElement === void 0 ? void 0 : currentElement.nextElementSibling) {
|
|
71
|
+
const nextItem = currentElement.nextElementSibling;
|
|
72
|
+
return ((_b = currentElement.nextElementSibling.firstElementChild) === null || _b === void 0 ? void 0 : _b.className.includes('ndl-accordion-item-header-disabled'))
|
|
73
|
+
? nextElement(accordionElement, nextItem)
|
|
74
|
+
: nextItem;
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
};
|
|
78
|
+
// Gets prev sibling child, looping at the top
|
|
79
|
+
const previousElement = (accordionElement, currentElement) => {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
if (currentElement === accordionElement ||
|
|
82
|
+
!(currentElement === null || currentElement === void 0 ? void 0 : currentElement.previousElementSibling)) {
|
|
83
|
+
const prevItem = accordionElement.lastElementChild;
|
|
84
|
+
const lastAccordionItemHeaderElement = (_a = accordionElement === null || accordionElement === void 0 ? void 0 : accordionElement.lastElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild;
|
|
85
|
+
return (lastAccordionItemHeaderElement === null || lastAccordionItemHeaderElement === void 0 ? void 0 : lastAccordionItemHeaderElement.className.includes('ndl-accordion-item-header-disabled'))
|
|
86
|
+
? previousElement(accordionElement, prevItem)
|
|
87
|
+
: prevItem;
|
|
88
|
+
}
|
|
89
|
+
else if (currentElement === null || currentElement === void 0 ? void 0 : currentElement.previousElementSibling) {
|
|
90
|
+
const prevItem = currentElement.previousElementSibling;
|
|
91
|
+
return ((_b = currentElement.previousElementSibling.firstElementChild) === null || _b === void 0 ? void 0 : _b.className.includes('ndl-accordion-item-header-disabled'))
|
|
92
|
+
? previousElement(accordionElement, prevItem)
|
|
93
|
+
: prevItem;
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
};
|
|
97
|
+
const AccordionContext = createContext(null);
|
|
98
|
+
const useAccordionContext = () => {
|
|
99
|
+
const context = useContext(AccordionContext);
|
|
100
|
+
if (context === null) {
|
|
101
|
+
throw new Error('Accordion used without context');
|
|
102
|
+
}
|
|
103
|
+
return context;
|
|
104
|
+
};
|
|
105
|
+
const Accordion = forwardRef(function Accordion(_a, ref) {
|
|
106
|
+
var { as = 'div', children, className } = _a, restProps = __rest(_a, ["as", "children", "className"]);
|
|
107
|
+
const accordionRef = useRef(null);
|
|
108
|
+
// The following function includes code needed to be
|
|
109
|
+
// able to navigate with the arrow keys (not tab).
|
|
110
|
+
const handleKeyDown = (event) => {
|
|
111
|
+
const accordionElement = accordionRef.current;
|
|
112
|
+
if (!accordionElement) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const activeElement = document.activeElement;
|
|
116
|
+
if (event.key == 'ArrowDown') {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
const newFocusedElement = getAccordionItem(activeElement, accordionElement, nextElement);
|
|
120
|
+
const newHeader = newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.firstElementChild;
|
|
121
|
+
newHeader.focus();
|
|
122
|
+
}
|
|
123
|
+
else if (event.key == 'ArrowUp') {
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
event.stopPropagation();
|
|
126
|
+
const newFocusedElement = getAccordionItem(activeElement, accordionElement, previousElement);
|
|
127
|
+
const newHeader = newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.firstElementChild;
|
|
128
|
+
newHeader.focus();
|
|
129
|
+
}
|
|
130
|
+
else if (event.key == ' ' || event.key == 'Enter') {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
event.stopPropagation();
|
|
133
|
+
const buttonElement = activeElement.getElementsByClassName('ndl-accordion-item-header-button')[0];
|
|
134
|
+
buttonElement.click();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
useImperativeHandle(ref, () => accordionRef.current);
|
|
138
|
+
const classes = classNames('ndl-accordion', className);
|
|
139
|
+
const Component = as;
|
|
140
|
+
const { onChange, multiple } = restProps, rootProps = __rest(restProps, ["onChange", "multiple"]);
|
|
141
|
+
const contextValue = multiple
|
|
142
|
+
? {
|
|
143
|
+
onChange,
|
|
144
|
+
multiple,
|
|
145
|
+
expandedItemIds: restProps.expandedItemIds,
|
|
146
|
+
}
|
|
147
|
+
: {
|
|
148
|
+
onChange,
|
|
149
|
+
multiple,
|
|
150
|
+
expandedItemId: restProps.expandedItemId,
|
|
151
|
+
};
|
|
152
|
+
return (_jsx(Component, Object.assign({}, rootProps, { className: classes, ref: accordionRef, onKeyDown: handleKeyDown }, { children: _jsx(AccordionContext.Provider, Object.assign({ value: contextValue }, { children: children })) })));
|
|
153
|
+
});
|
|
154
|
+
const createItemId = (type, id) => `ndl-accordionitem${type}id-${id}`;
|
|
155
|
+
const Item = (_a) => {
|
|
156
|
+
var { itemId, children, title, className = '', arrowPosition = 'right', disabled = false, onExpandedChange } = _a, restProps = __rest(_a, ["itemId", "children", "title", "className", "arrowPosition", "disabled", "onExpandedChange"]);
|
|
157
|
+
const contentRef = useRef(null);
|
|
158
|
+
const innerContentRef = useRef(null);
|
|
159
|
+
const itemElementId = createItemId('item', itemId);
|
|
160
|
+
const headerElementId = createItemId('header', itemId);
|
|
161
|
+
const buttonElementId = createItemId('button', itemId);
|
|
162
|
+
const panelElementId = createItemId('panel', itemId);
|
|
163
|
+
const context = useAccordionContext();
|
|
164
|
+
const { multiple } = context;
|
|
165
|
+
const isExpanded = multiple
|
|
166
|
+
? context.expandedItemIds.includes(itemId)
|
|
167
|
+
: context.expandedItemId === itemId;
|
|
168
|
+
const handleOnClick = useCallback(() => {
|
|
169
|
+
var _a, _b;
|
|
170
|
+
if (disabled)
|
|
171
|
+
return;
|
|
172
|
+
// Custom callback to call.
|
|
173
|
+
if (onExpandedChange !== undefined)
|
|
174
|
+
onExpandedChange(!isExpanded);
|
|
175
|
+
if (multiple) {
|
|
176
|
+
const { expandedItemIds, onChange } = context;
|
|
177
|
+
// Multiple expanded.
|
|
178
|
+
if (isExpanded) {
|
|
179
|
+
// Remove from list.
|
|
180
|
+
const newArray = expandedItemIds.filter((activeId) => activeId !== itemId);
|
|
181
|
+
onChange(newArray);
|
|
182
|
+
}
|
|
183
|
+
else if (!isExpanded) {
|
|
184
|
+
// Add to list.
|
|
185
|
+
const newArray = [...expandedItemIds];
|
|
186
|
+
newArray.push(itemId);
|
|
187
|
+
onChange(newArray);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
const { onChange } = context;
|
|
192
|
+
// Single expanded.
|
|
193
|
+
if (isExpanded) {
|
|
194
|
+
// Set null.
|
|
195
|
+
onChange(null);
|
|
196
|
+
}
|
|
197
|
+
else if (!isExpanded) {
|
|
198
|
+
// Set to id.
|
|
199
|
+
onChange(itemId);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// The W3 WAI-ARIA states that focus can only happen on the header not the header button.
|
|
203
|
+
(_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
204
|
+
}, [isExpanded, multiple, disabled, itemId, onExpandedChange, context]);
|
|
205
|
+
const classes = classNames('ndl-accordion-item', className, {
|
|
206
|
+
'ndl-accordion-item-disabled': disabled,
|
|
207
|
+
});
|
|
208
|
+
const headerClasses = classNames('ndl-accordion-item-header', {
|
|
209
|
+
'ndl-accordion-item-header-disabled': disabled,
|
|
210
|
+
});
|
|
211
|
+
const iconClasses = classNames('ndl-accordion-item-header-icon-wrapper', {
|
|
212
|
+
'ndl-accordion-item-header-icon-wrapper-right': arrowPosition === 'right',
|
|
213
|
+
});
|
|
214
|
+
const buttonClasses = classNames('ndl-accordion-item-header-button', {
|
|
215
|
+
'ndl-accordion-item-header-button-disabled': disabled,
|
|
216
|
+
});
|
|
217
|
+
const titleClasses = classNames('ndl-accordion-item-header-button-title', {
|
|
218
|
+
'ndl-accordion-item-header-button-title': disabled,
|
|
219
|
+
'ndl-accordion-item-header-button-title-right': arrowPosition === 'right',
|
|
220
|
+
});
|
|
221
|
+
const contentClasses = classNames('ndl-accordion-item-content', {
|
|
222
|
+
'ndl-accordion-item-content-expanded': isExpanded,
|
|
223
|
+
'ndl-accordion-item-content-right': arrowPosition === 'right',
|
|
224
|
+
});
|
|
225
|
+
const headerTitle = _jsx("span", Object.assign({ className: titleClasses }, { children: title }));
|
|
226
|
+
return (_jsxs("div", Object.assign({}, restProps, { className: classes, id: itemElementId }, { children: [_jsx(Typography, Object.assign({ variant: "subheading-medium", className: headerClasses, role: "heading", tabIndex: disabled ? -1 : 0, id: headerElementId, "aria-level": "2" }, { children: _jsx("button", Object.assign({ id: buttonElementId, onClick: handleOnClick, className: buttonClasses, "aria-expanded": isExpanded, "aria-disabled": disabled, "aria-label": title, "aria-controls": panelElementId, tabIndex: -1 }, { children: _jsxs("span", Object.assign({ className: iconClasses }, { children: [headerTitle, _jsx(ChevronDownIconOutline, { className: classNames('ndl-accordion-item-header-icon', {
|
|
227
|
+
'-n-rotate-180': isExpanded,
|
|
228
|
+
}) })] })) })) })), _jsx("div", Object.assign({ id: panelElementId, ref: contentRef, className: contentClasses, "aria-hidden": !isExpanded, "aria-labelledby": buttonElementId, role: "region" }, { children: _jsx("div", Object.assign({ ref: innerContentRef, className: "ndl-accordion-item-content-inner" }, { children: _jsx(Typography, Object.assign({ variant: "body-medium", className: "n-text-palette-neutral-text-weak", as: "div" }, { children: children })) })) }))] })));
|
|
229
|
+
};
|
|
230
|
+
// Issue with TypeScript forwardRef and subcomponents: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757#issuecomment-894053907
|
|
231
|
+
// Fixes issue with: Accordion.Item = Item;
|
|
232
|
+
const AccordionNamespace = Object.assign(Accordion, { Item });
|
|
233
|
+
// Can now use <Accordion ...> and <Accordion.Item ...>
|
|
234
|
+
// TODO: This should be fixed in other places of code.
|
|
235
|
+
export { AccordionNamespace as Accordion };
|
|
236
|
+
export default Accordion;
|
|
237
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/accordion/Accordion.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,WAAW,EACX,MAAM,EACN,mBAAmB,EAC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ACb,4BACE,EAAE,EAAE,cAAc,EAClB,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,cAAc,iBACZ,CAAC,UAAU,qBACP,eAAe,EAChC,IAAI,EAAC,QAAQ,gBAEb,4BAAK,GAAG,EAAE,eAAe,EAAE,SAAS,EAAC,kCAAkC,gBACrE,KAAC,UAAU,kBACT,OAAO,EAAC,aAAa,EACrB,SAAS,EAAC,kCAAkC,EAC5C,EAAE,EAAC,KAAK,gBAEP,QAAQ,IACE,IACT,IACF,KACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,6IAA6I;AAC7I,2CAA2C;AAC3C,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,uDAAuD;AACvD,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,CAAC;AAE3C,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Accordion';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accordion/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { useRef, useState, useCallback } from 'react';
|
|
23
|
+
import ReactDatePicker from 'react-datepicker';
|
|
24
|
+
import classnames from 'classnames';
|
|
25
|
+
import { ArrowLeftIconOutline, ArrowRightIconOutline, CalendarIconOutline, ChevronUpIconOutline, } from '../icons';
|
|
26
|
+
import { TextInput } from '../text-input';
|
|
27
|
+
import { forwardRef } from '../helpers';
|
|
28
|
+
import { IconButton } from '../button';
|
|
29
|
+
import { Typography } from '../typography';
|
|
30
|
+
import { format } from 'date-fns';
|
|
31
|
+
export const DatePicker = forwardRef(function DatePicker(props, ref) {
|
|
32
|
+
const { reactDatePickerProps, textInputProps, disabled, className } = props;
|
|
33
|
+
const classes = classnames(`ndl-datepicker`, className, {});
|
|
34
|
+
const datetimeRef = useRef(null);
|
|
35
|
+
const [picker, setPicker] = useState('day');
|
|
36
|
+
const headerAction = useCallback((action) => {
|
|
37
|
+
picker === action ? setPicker('day') : setPicker(action);
|
|
38
|
+
}, [picker]);
|
|
39
|
+
const CustomHeader = useCallback((props) => {
|
|
40
|
+
const { decreaseMonth, increaseMonth, increaseYear, decreaseYear, nextMonthButtonDisabled, nextYearButtonDisabled, prevMonthButtonDisabled, prevYearButtonDisabled, } = props;
|
|
41
|
+
const prevCallback = picker === 'year' ? decreaseYear : decreaseMonth;
|
|
42
|
+
const nextCallback = picker === 'year' ? increaseYear : increaseMonth;
|
|
43
|
+
const prevDisabled = picker === 'year' ? prevYearButtonDisabled : prevMonthButtonDisabled;
|
|
44
|
+
const nextDisabled = picker === 'year' ? nextYearButtonDisabled : nextMonthButtonDisabled;
|
|
45
|
+
return (_jsxs("div", Object.assign({ className: "ndl-datepicker-header" }, { children: [_jsxs("div", Object.assign({ className: "ndl-datepicker-selects" }, { children: [_jsx("button", Object.assign({ className: "ndl-datepicker-header", onClick: () => headerAction('month') }, { children: _jsxs("div", Object.assign({ className: "n-flex n-items-center" }, { children: [_jsx(Typography, Object.assign({ variant: "label", className: "n-p-2" }, { children: format(props.date, 'MMMM') })), _jsx(ChevronUpIconOutline, { className: classnames('ndl-datepicker-chevron', {
|
|
46
|
+
'n-rotate-180': picker === 'month',
|
|
47
|
+
}), "aria-label": "Chevron icon" })] })) })), _jsx("button", Object.assign({ className: "ndl-datepicker-header", onClick: () => headerAction('year') }, { children: _jsxs("div", Object.assign({ className: "n-flex n-items-center" }, { children: [_jsx(Typography, Object.assign({ variant: "label", className: "n-p-2" }, { children: format(props.date, 'yyyy') })), _jsx(ChevronUpIconOutline, { className: classnames('ndl-datepicker-chevron', {
|
|
48
|
+
'n-rotate-180': picker === 'year',
|
|
49
|
+
}), "aria-label": "Chevron icon" })] })) }))] })), picker !== 'month' && (_jsxs("div", { children: [_jsx(IconButton, Object.assign({ "aria-label": "Previous period", clean: true, onClick: prevCallback, disabled: prevDisabled }, { children: _jsx(ArrowLeftIconOutline, {}) })), _jsx(IconButton, Object.assign({ "aria-label": "Next period", clean: true, onClick: nextCallback, disabled: nextDisabled }, { children: _jsx(ArrowRightIconOutline, {}) }))] }))] })));
|
|
50
|
+
}, [picker, headerAction]);
|
|
51
|
+
/**
|
|
52
|
+
* Intercept onChange so we can work with
|
|
53
|
+
* Month and Year pickers
|
|
54
|
+
*/
|
|
55
|
+
const interceptedChange = useCallback((...args) => {
|
|
56
|
+
if (picker !== 'day') {
|
|
57
|
+
reactDatePickerProps === null || reactDatePickerProps === void 0 ? void 0 : reactDatePickerProps.onChange(...args);
|
|
58
|
+
setPicker('day');
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
reactDatePickerProps === null || reactDatePickerProps === void 0 ? void 0 : reactDatePickerProps.onChange(...args);
|
|
62
|
+
}
|
|
63
|
+
}, [picker, reactDatePickerProps]);
|
|
64
|
+
/**
|
|
65
|
+
* Intercept onCalendarClose so we can
|
|
66
|
+
* switch to "day" picker if we close on "month" or "year"
|
|
67
|
+
* view
|
|
68
|
+
*/
|
|
69
|
+
const interceptedOnCalendarClose = useCallback(() => {
|
|
70
|
+
var _a;
|
|
71
|
+
if (picker !== 'day') {
|
|
72
|
+
setPicker('day');
|
|
73
|
+
}
|
|
74
|
+
(_a = reactDatePickerProps === null || reactDatePickerProps === void 0 ? void 0 : reactDatePickerProps.onCalendarClose) === null || _a === void 0 ? void 0 : _a.call(reactDatePickerProps);
|
|
75
|
+
}, [picker, reactDatePickerProps]);
|
|
76
|
+
return (_jsx("div", Object.assign({ className: classes }, { children: _jsx(ReactDatePicker, Object.assign({ ref: datetimeRef, customInput: _jsx(TextInput, Object.assign({ ref: ref, "aria-label": "Date picker input", rightIcon: _jsx(CalendarIconOutline, { onClick: (e) => {
|
|
77
|
+
var _a;
|
|
78
|
+
if ((_a = datetimeRef.current) === null || _a === void 0 ? void 0 : _a.isCalendarOpen()) {
|
|
79
|
+
datetimeRef.current.setOpen(false);
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
e.stopPropagation();
|
|
82
|
+
}
|
|
83
|
+
}, "aria-label": "Calender Icon" }) }, textInputProps, { disabled: disabled })), disabled: disabled, showMonthYearPicker: picker === 'month', showYearPicker: picker === 'year', shouldCloseOnSelect: picker === 'day', dayClassName: () => 'ndl-datepicker-day', renderCustomHeader: CustomHeader }, reactDatePickerProps, { onChange: interceptedChange, onCalendarClose: interceptedOnCalendarClose })) })));
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAgB,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,eAGN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAe,UAAU,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAwBlC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS,UAAU,CACtD,KAAyB,EACzB,GAAmC;IAEnC,MAAM,EAAE,oBAAoB,EAAE,cAAc,EAAE,QAAQ,EAAE,S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,CAAC,oBAAoB,EACxC,kBAAkB,EAAE,YAAY,IAC5B,oBAAoB,IACxB,QAAQ,EAAE,iBAAiB,EAC3B,eAAe,EAAE,0BAA0B,IAC3C,IACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './DatePicker';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/date-picker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,cAAc,CAAC"}
|
package/lib/esm/index.js
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
+
export * from './accordion';
|
|
21
22
|
export * from './button';
|
|
22
23
|
export * from './label';
|
|
23
24
|
export * from './banner';
|
|
@@ -26,6 +27,7 @@ export * from './checkbox';
|
|
|
26
27
|
export * from './switch';
|
|
27
28
|
export * from './radio';
|
|
28
29
|
export * from './context-menu';
|
|
30
|
+
export * from './date-picker';
|
|
29
31
|
export * from './dialog';
|
|
30
32
|
export * from './modal';
|
|
31
33
|
export * from './loading-spinner';
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
/// <reference types="react" />
|
|
22
|
+
import { ElementBase } from '../helpers';
|
|
23
|
+
export declare type AccordionItemId = string | number;
|
|
24
|
+
export interface AccordionBase extends ElementBase<HTMLDivElement> {
|
|
25
|
+
children: React.ReactNode | string;
|
|
26
|
+
className?: string;
|
|
27
|
+
as?: string | React.ComponentType<any>;
|
|
28
|
+
}
|
|
29
|
+
interface IsNotMultiple<T extends AccordionItemId> {
|
|
30
|
+
multiple: false | undefined;
|
|
31
|
+
expandedItemId: T | null;
|
|
32
|
+
onChange: (expandedItemId: T | null) => void;
|
|
33
|
+
}
|
|
34
|
+
interface IsMultiple<T extends AccordionItemId> {
|
|
35
|
+
multiple: true;
|
|
36
|
+
expandedItemIds: T[];
|
|
37
|
+
onChange: (expandedItemIds: T[]) => void;
|
|
38
|
+
}
|
|
39
|
+
declare type AccordionIsMultiple<T extends AccordionItemId> = AccordionBase & IsMultiple<T>;
|
|
40
|
+
declare type AccordionIsNotMultiple<T extends AccordionItemId> = AccordionBase & IsNotMultiple<T>;
|
|
41
|
+
export declare type AccordionProps<T extends AccordionItemId> = AccordionIsMultiple<T> | AccordionIsNotMultiple<T>;
|
|
42
|
+
declare const Accordion: <T extends AccordionItemId>(props: AccordionProps<T> & import("react").RefAttributes<unknown>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
43
|
+
export declare type AccordionArrowPosition = 'left' | 'right';
|
|
44
|
+
export interface AccordionItemProps<T extends AccordionItemId> extends ElementBase<HTMLDivElement> {
|
|
45
|
+
/** The component item id. */
|
|
46
|
+
itemId: T;
|
|
47
|
+
/** The title. */
|
|
48
|
+
title: string;
|
|
49
|
+
/** Callback function on component item expand/collapse change. */
|
|
50
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
51
|
+
/** Which side the accordion arrow will appear. */
|
|
52
|
+
arrowPosition?: AccordionArrowPosition;
|
|
53
|
+
/** If the component item is disabled. */
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
declare const AccordionNamespace: (<T extends AccordionItemId>(props: AccordionProps<T> & import("react").RefAttributes<unknown>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null) & {
|
|
57
|
+
Item: <T_1 extends AccordionItemId>({ itemId, children, title, className, arrowPosition, disabled, onExpandedChange, ...restProps }: AccordionItemProps<T_1>) => JSX.Element;
|
|
58
|
+
};
|
|
59
|
+
export { AccordionNamespace as Accordion };
|
|
60
|
+
export default Accordion;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Accordion';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
/// <reference types="react" />
|
|
22
|
+
import { ReactDatePickerProps } from 'react-datepicker';
|
|
23
|
+
import { TextInputProperties } from '../text-input/TextInput';
|
|
24
|
+
import { ElementBase } from '../helpers';
|
|
25
|
+
export interface DatePickerProps<WithRange extends boolean = false> extends ElementBase<'div'> {
|
|
26
|
+
/** Add Component type here */
|
|
27
|
+
textInputProps?: TextInputProperties;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Props passed to the react-datepicker component
|
|
31
|
+
* https://reactdatepicker.com/
|
|
32
|
+
*/
|
|
33
|
+
reactDatePickerProps: ReactDatePickerProps<string, WithRange>;
|
|
34
|
+
}
|
|
35
|
+
export declare const DatePicker: <T extends boolean>(props: DatePickerProps<T> & import("react").RefAttributes<HTMLInputElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './DatePicker';
|
|
@@ -29,7 +29,7 @@ declare const GraphLabel: React.ForwardRefExoticComponent<{
|
|
|
29
29
|
className?: string | undefined;
|
|
30
30
|
/** If the element is selected */
|
|
31
31
|
selected?: boolean | undefined;
|
|
32
|
-
} & Omit<React.HTMLProps<HTMLButtonElement>, "
|
|
32
|
+
} & Omit<React.HTMLProps<HTMLButtonElement>, "as" | "selected" | "size" | "onChange" | "ref"> & {
|
|
33
33
|
as?: string | React.ComponentType<any> | undefined;
|
|
34
34
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
35
35
|
export default GraphLabel;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
+
export * from './accordion';
|
|
21
22
|
export * from './button';
|
|
22
23
|
export * from './label';
|
|
23
24
|
export * from './banner';
|
|
@@ -26,6 +27,7 @@ export * from './checkbox';
|
|
|
26
27
|
export * from './switch';
|
|
27
28
|
export * from './radio';
|
|
28
29
|
export * from './context-menu';
|
|
30
|
+
export * from './date-picker';
|
|
29
31
|
export * from './dialog';
|
|
30
32
|
export * from './modal';
|
|
31
33
|
export * from './loading-spinner';
|
|
@@ -33,7 +33,7 @@ export interface SideNavigationProps extends ElementBase<HTMLDivElement> {
|
|
|
33
33
|
}
|
|
34
34
|
export declare const SideNavigation: React.ForwardRefExoticComponent<SideNavigationProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
35
|
export declare type SideNavigationListProps = ElementBase<HTMLUListElement>;
|
|
36
|
-
export declare const SideNavigationList: (props: Omit<React.HTMLProps<HTMLUListElement>, "
|
|
36
|
+
export declare const SideNavigationList: (props: Omit<React.HTMLProps<HTMLUListElement>, "as" | "selected" | "size" | "onChange" | "ref"> & {
|
|
37
37
|
as?: string | React.ComponentType<any> | undefined;
|
|
38
38
|
} & React.RefAttributes<HTMLUListElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
39
39
|
export interface SideNavigationItemProps extends ElementBase<HTMLAnchorElement> {
|
|
@@ -45,7 +45,7 @@ export interface SideNavigationItemProps extends ElementBase<HTMLAnchorElement>
|
|
|
45
45
|
}
|
|
46
46
|
export declare const SideNavigationItem: (props: SideNavigationItemProps & React.RefAttributes<any>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
47
47
|
export declare type SideNavigationGroupHeaderProps = ElementBase<HTMLParagraphElement>;
|
|
48
|
-
export declare const SideNavigationGroupHeader: (props: Omit<React.HTMLProps<HTMLParagraphElement>, "
|
|
48
|
+
export declare const SideNavigationGroupHeader: (props: Omit<React.HTMLProps<HTMLParagraphElement>, "as" | "selected" | "size" | "onChange" | "ref"> & {
|
|
49
49
|
as?: string | React.ComponentType<any> | undefined;
|
|
50
50
|
} & React.RefAttributes<HTMLParagraphElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
51
51
|
export default SideNavigation;
|
|
@@ -52,7 +52,7 @@ declare const TableNameSpace: (<T extends unknown>(props: {
|
|
|
52
52
|
focusableCells?: boolean | undefined;
|
|
53
53
|
tableProps: TableType<T>;
|
|
54
54
|
components?: TableComponentsInterface<T> | undefined;
|
|
55
|
-
} & Omit<ElementBase<HTMLDivElement>, "
|
|
55
|
+
} & Omit<ElementBase<HTMLDivElement>, "as" | "controls" | "data" | "headers" | "rows"> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null) & {
|
|
56
56
|
RowActions: (props: ElementBase<HTMLDivElement>) => JSX.Element;
|
|
57
57
|
};
|
|
58
58
|
export default TableNameSpace;
|