@neo4j-ndl/react 4.0.18 → 4.1.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/date-picker/DatePicker.js +11 -3
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker-with-timezone-both-mode.story.js +57 -0
- package/lib/cjs/date-picker/stories/date-picker-with-timezone-both-mode.story.js.map +1 -0
- package/lib/cjs/date-picker/stories/date-picker-with-timezone.story.js +52 -0
- package/lib/cjs/date-picker/stories/date-picker-with-timezone.story.js.map +1 -0
- package/lib/cjs/date-picker/stories/date-picker.stories.js +27 -1
- package/lib/cjs/date-picker/stories/date-picker.stories.js.map +1 -1
- package/lib/cjs/date-picker/stories/index.js +9 -1
- package/lib/cjs/date-picker/stories/index.js.map +1 -1
- package/lib/cjs/dropzone/Dropzone.js +1 -1
- package/lib/cjs/dropzone/Dropzone.js.map +1 -1
- package/lib/cjs/icon-button-base/IconButtonBase.js +4 -1
- package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/cjs/index.js +4 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +330 -0
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -0
- package/lib/cjs/timezone-picker/generate-timezone-options.js +256 -0
- package/lib/cjs/timezone-picker/generate-timezone-options.js.map +1 -0
- package/lib/cjs/timezone-picker/index.js +39 -0
- package/lib/cjs/timezone-picker/index.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/index.js +60 -0
- package/lib/cjs/timezone-picker/stories/index.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js +41 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js +35 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js +30 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +54 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +30 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js +47 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-sizes.story.js +32 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js +49 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js +145 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js.map +1 -0
- package/lib/cjs/timezone-picker/timezone-picker-hooks.js +52 -0
- package/lib/cjs/timezone-picker/timezone-picker-hooks.js.map +1 -0
- package/lib/esm/date-picker/DatePicker.js +11 -3
- package/lib/esm/date-picker/DatePicker.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-with-timezone-both-mode.story.js +53 -0
- package/lib/esm/date-picker/stories/date-picker-with-timezone-both-mode.story.js.map +1 -0
- package/lib/esm/date-picker/stories/date-picker-with-timezone.story.js +50 -0
- package/lib/esm/date-picker/stories/date-picker-with-timezone.story.js.map +1 -0
- package/lib/esm/date-picker/stories/date-picker.stories.js +27 -1
- package/lib/esm/date-picker/stories/date-picker.stories.js.map +1 -1
- package/lib/esm/date-picker/stories/index.js +6 -0
- package/lib/esm/date-picker/stories/index.js.map +1 -1
- package/lib/esm/dropzone/Dropzone.js +1 -1
- package/lib/esm/dropzone/Dropzone.js.map +1 -1
- package/lib/esm/icon-button-base/IconButtonBase.js +4 -1
- package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +323 -0
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -0
- package/lib/esm/timezone-picker/generate-timezone-options.js +247 -0
- package/lib/esm/timezone-picker/generate-timezone-options.js.map +1 -0
- package/lib/esm/timezone-picker/index.js +23 -0
- package/lib/esm/timezone-picker/index.js.map +1 -0
- package/lib/esm/timezone-picker/stories/index.js +46 -0
- package/lib/esm/timezone-picker/stories/index.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js +37 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js +33 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js +28 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +52 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +28 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js +45 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-sizes.story.js +30 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js +47 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker.stories.js +142 -0
- package/lib/esm/timezone-picker/stories/timezone-picker.stories.js.map +1 -0
- package/lib/esm/timezone-picker/timezone-picker-hooks.js +47 -0
- package/lib/esm/timezone-picker/timezone-picker-hooks.js.map +1 -0
- package/lib/types/date-picker/DatePicker.d.ts +4 -1
- package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
- package/lib/types/date-picker/stories/date-picker-with-timezone-both-mode.story.d.ts +23 -0
- package/lib/types/date-picker/stories/date-picker-with-timezone-both-mode.story.d.ts.map +1 -0
- package/lib/types/date-picker/stories/date-picker-with-timezone.story.d.ts +24 -0
- package/lib/types/date-picker/stories/date-picker-with-timezone.story.d.ts.map +1 -0
- package/lib/types/date-picker/stories/date-picker.stories.d.ts +2 -0
- package/lib/types/date-picker/stories/date-picker.stories.d.ts.map +1 -1
- package/lib/types/date-picker/stories/index.d.ts +4 -0
- package/lib/types/date-picker/stories/index.d.ts.map +1 -1
- package/lib/types/dropzone/Dropzone.d.ts.map +1 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/timezone-picker/TimeZonePicker.d.ts +68 -0
- package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -0
- package/lib/types/timezone-picker/generate-timezone-options.d.ts +61 -0
- package/lib/types/timezone-picker/generate-timezone-options.d.ts.map +1 -0
- package/lib/types/timezone-picker/index.d.ts +23 -0
- package/lib/types/timezone-picker/index.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/index.d.ts +37 -0
- package/lib/types/timezone-picker/stories/index.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-both-mode.story.d.ts +23 -0
- package/lib/types/timezone-picker/stories/timezone-picker-both-mode.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-default.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-default.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-disabled.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-disabled.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-fluid.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-fluid.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-in-dialog.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-in-dialog.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-sizes.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-sizes.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-utc-only.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-utc-only.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker.stories.d.ts +34 -0
- package/lib/types/timezone-picker/stories/timezone-picker.stories.d.ts.map +1 -0
- package/lib/types/timezone-picker/timezone-picker-hooks.d.ts +31 -0
- package/lib/types/timezone-picker/timezone-picker-hooks.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
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 { useState } from 'react';
|
|
23
|
+
import { Typography } from '../../typography';
|
|
24
|
+
import { DatePicker } from '../DatePicker';
|
|
25
|
+
export const DatePickerWithTimeZoneBothMode = () => {
|
|
26
|
+
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
27
|
+
const [selectedTimeZone, setSelectedTimeZone] = useState('America/New_York');
|
|
28
|
+
return (_jsxs("div", { style: { maxWidth: '400px', padding: '20px' }, children: [_jsx(Typography, { variant: "title-4", style: { marginBottom: '16px' }, children: "DatePicker with TimeZone (Both Mode)" }), _jsx(Typography, { variant: "body-medium", style: { marginBottom: '24px' }, children: "This example shows the DatePicker with the TimeZonePicker in \"both\" mode, displaying both UTC offsets and city-based timezones in separate sections." }), _jsx(DatePicker, { textInputProps: {
|
|
29
|
+
label: 'Select Date and Time with Timezone',
|
|
30
|
+
}, timePickerProps: {
|
|
31
|
+
format: 'hh:mm',
|
|
32
|
+
}, timeZonePickerProps: {
|
|
33
|
+
mode: 'both',
|
|
34
|
+
onChange: (tz) => {
|
|
35
|
+
setSelectedTimeZone(tz);
|
|
36
|
+
},
|
|
37
|
+
value: selectedTimeZone,
|
|
38
|
+
}, reactDatePickerProps: {
|
|
39
|
+
dateFormat: 'yyyy-MM-dd',
|
|
40
|
+
onChange: (date) => {
|
|
41
|
+
setSelectedDate(date);
|
|
42
|
+
},
|
|
43
|
+
selected: selectedDate,
|
|
44
|
+
showTimeInput: true,
|
|
45
|
+
} }), _jsxs("div", { style: {
|
|
46
|
+
backgroundColor: '#f5f5f5',
|
|
47
|
+
borderRadius: '4px',
|
|
48
|
+
marginTop: '24px',
|
|
49
|
+
padding: '16px',
|
|
50
|
+
}, children: [_jsx(Typography, { variant: "body-small", style: { fontWeight: 600, marginBottom: '8px' }, children: "Selected Values:" }), _jsxs(Typography, { variant: "body-medium", children: [_jsx("strong", { children: "Date:" }), ' ', (selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.toISOString()) !== null || 'None'] }), _jsxs(Typography, { variant: "body-medium", style: { marginTop: '8px' }, children: [_jsx("strong", { children: "Timezone:" }), " ", selectedTimeZone || 'None'] })] })] }));
|
|
51
|
+
};
|
|
52
|
+
export default DatePickerWithTimeZoneBothMode;
|
|
53
|
+
//# sourceMappingURL=date-picker-with-timezone-both-mode.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker-with-timezone-both-mode.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-timezone-both-mode.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE;IACjD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAc,IAAI,IAAI,EAAE,CAAC,CAAC;IAC1E,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAC3C,QAAQ,CAAS,kBAAkB,CAAC,CAAC;IAEvC,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAChD,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,qDAEhD,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,EAAC,KAAK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* This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useState } from 'react';\n\nimport { Typography } from '../../typography';\nimport { DatePicker } from '../DatePicker';\n\nexport const DatePickerWithTimeZoneBothMode = () => {\n const [selectedDate, setSelectedDate] = useState<Date | null>(new Date());\n const [selectedTimeZone, setSelectedTimeZone] =\n useState<string>('America/New_York');\n\n return (\n <div style={{ maxWidth: '400px', padding: '20px' }}>\n <Typography variant=\"title-4\" style={{ marginBottom: '16px' }}>\n DatePicker with TimeZone (Both Mode)\n </Typography>\n <Typography variant=\"body-medium\" style={{ marginBottom: '24px' }}>\n This example shows the DatePicker with the TimeZonePicker in\n "both" mode, displaying both UTC offsets and city-based\n timezones in separate sections.\n </Typography>\n\n <DatePicker\n textInputProps={{\n label: 'Select Date and Time with Timezone',\n }}\n timePickerProps={{\n format: 'hh:mm',\n }}\n timeZonePickerProps={{\n mode: 'both',\n onChange: (tz) => {\n setSelectedTimeZone(tz);\n },\n value: selectedTimeZone,\n }}\n reactDatePickerProps={{\n dateFormat: 'yyyy-MM-dd',\n onChange: (date) => {\n setSelectedDate(date);\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n\n <div\n style={{\n backgroundColor: '#f5f5f5',\n borderRadius: '4px',\n marginTop: '24px',\n padding: '16px',\n }}\n >\n <Typography\n variant=\"body-small\"\n style={{ fontWeight: 600, marginBottom: '8px' }}\n >\n Selected Values:\n </Typography>\n <Typography variant=\"body-medium\">\n <strong>Date:</strong>{' '}\n {selectedDate?.toISOString() !== null || 'None'}\n </Typography>\n <Typography variant=\"body-medium\" style={{ marginTop: '8px' }}>\n <strong>Timezone:</strong> {selectedTimeZone || 'None'}\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default DatePickerWithTimeZoneBothMode;\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { DatePicker } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const [selectedDate, setSelectedDate] = useState(new Date('2023-05-27T14:30:00'));
|
|
27
|
+
const [selectedTimeZone, setSelectedTimeZone] = useState('UTC');
|
|
28
|
+
const handleOnChange = (date) => {
|
|
29
|
+
setSelectedDate(date);
|
|
30
|
+
};
|
|
31
|
+
const handleTimeZoneChange = (timezone) => {
|
|
32
|
+
setSelectedTimeZone(timezone);
|
|
33
|
+
};
|
|
34
|
+
return (_jsxs("div", { children: [_jsx(DatePicker, { timePickerProps: {
|
|
35
|
+
format: 'hh:mm',
|
|
36
|
+
timeInterval: 15,
|
|
37
|
+
}, timeZonePickerProps: {
|
|
38
|
+
onChange: handleTimeZoneChange,
|
|
39
|
+
value: selectedTimeZone,
|
|
40
|
+
}, reactDatePickerProps: {
|
|
41
|
+
onChange: handleOnChange,
|
|
42
|
+
popperProps: {
|
|
43
|
+
strategy: 'fixed',
|
|
44
|
+
},
|
|
45
|
+
selected: selectedDate,
|
|
46
|
+
showTimeInput: true,
|
|
47
|
+
} }), _jsxs("div", { style: { marginTop: '1rem' }, children: [_jsxs("p", { children: [_jsx("strong", { children: "Selected Date:" }), ' ', selectedDate ? selectedDate.toISOString() : 'None'] }), _jsxs("p", { children: [_jsx("strong", { children: "Selected Timezone:" }), " ", selectedTimeZone] })] })] }));
|
|
48
|
+
};
|
|
49
|
+
export default Component;
|
|
50
|
+
//# sourceMappingURL=date-picker-with-timezone.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker-with-timezone.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-timezone.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAChC,CAAC;IACF,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,CAAC;IAExE,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM,oBAAoB,GAAG,CAAC,QAAgB,EAAE,EAAE;QAChD,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,OAAO,CACL,0BACE,KAAC,UAAU,IACT,eAAe,EAAE;oBACf,MAAM,EAAE,OAAO;oBACf,YAAY,EAAE,EAAE;iBACjB,EACD,mBAAmB,EAAE;oBACnB,QAAQ,EAAE,oBAAoB;oBAC9B,KAAK,EAAE,gBAAgB;iBACxB,EACD,oBAAoB,EAAE;oBACpB,QAAQ,EAAE,cAAc;oBACxB,WAAW,EAAE;wBACX,QAAQ,EAAE,OAAO;qBAClB;oBACD,QAAQ,EAAE,YAAY;oBACtB,aAAa,EAAE,IAAI;iBACpB,GACD,EACF,eAAK,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,aAC/B,wBACE,8CAA+B,EAAC,GAAG,EAClC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM,IACjD,EACJ,wBACE,kDAAmC,OAAE,gBAAgB,IACnD,IACA,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { DatePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedDate, setSelectedDate] = useState<Date | null>(\n new Date('2023-05-27T14:30:00'),\n );\n const [selectedTimeZone, setSelectedTimeZone] = useState<string>('UTC');\n\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n const handleTimeZoneChange = (timezone: string) => {\n setSelectedTimeZone(timezone);\n };\n\n return (\n <div>\n <DatePicker\n timePickerProps={{\n format: 'hh:mm',\n timeInterval: 15,\n }}\n timeZonePickerProps={{\n onChange: handleTimeZoneChange,\n value: selectedTimeZone,\n }}\n reactDatePickerProps={{\n onChange: handleOnChange,\n popperProps: {\n strategy: 'fixed',\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n <div style={{ marginTop: '1rem' }}>\n <p>\n <strong>Selected Date:</strong>{' '}\n {selectedDate ? selectedDate.toISOString() : 'None'}\n </p>\n <p>\n <strong>Selected Timezone:</strong> {selectedTimeZone}\n </p>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
import { DatePicker } from '../DatePicker';
|
|
24
|
-
import { DatePickerDefault, DatePickerDefaultSource, DatePickerDisabled, DatePickerDisabledSource, DatePickerFull, DatePickerFullSource, DatePickerInDialog, DatePickerInDialogSource, DatePickerMinMaxDate, DatePickerMinMaxDateSource, DatePickerOpensToDate, DatePickerOpensToDateSource, DatePickerPortaled, DatePickerPortaledSource, DatePickerRange, DatePickerRangeSource, DatePickerStartsOnMonday, DatePickerStartsOnMondaySource, DatePickerTextInputProps, DatePickerTextInputPropsSource, DatePickerWithTimePicker, DatePickerWithTimePickerSource, } from './';
|
|
24
|
+
import { DatePickerDefault, DatePickerDefaultSource, DatePickerDisabled, DatePickerDisabledSource, DatePickerFull, DatePickerFullSource, DatePickerInDialog, DatePickerInDialogSource, DatePickerMinMaxDate, DatePickerMinMaxDateSource, DatePickerOpensToDate, DatePickerOpensToDateSource, DatePickerPortaled, DatePickerPortaledSource, DatePickerRange, DatePickerRangeSource, DatePickerStartsOnMonday, DatePickerStartsOnMondaySource, DatePickerTextInputProps, DatePickerTextInputPropsSource, DatePickerWithTimePicker, DatePickerWithTimePickerSource, DatePickerWithTimeZone, DatePickerWithTimeZoneBothMode, DatePickerWithTimeZoneBothModeSource, DatePickerWithTimeZoneSource, } from './';
|
|
25
25
|
const componentMeta = {
|
|
26
26
|
component: DatePicker,
|
|
27
27
|
decorators: [
|
|
@@ -113,6 +113,19 @@ export const WithTimePicker = {
|
|
|
113
113
|
},
|
|
114
114
|
render: DatePickerWithTimePicker,
|
|
115
115
|
};
|
|
116
|
+
export const WithTimeZone = {
|
|
117
|
+
args: {},
|
|
118
|
+
parameters: {
|
|
119
|
+
docs: {
|
|
120
|
+
source: {
|
|
121
|
+
code: DatePickerWithTimeZoneSource,
|
|
122
|
+
language: 'tsx',
|
|
123
|
+
type: 'code',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
render: DatePickerWithTimeZone,
|
|
128
|
+
};
|
|
116
129
|
export const Disabled = {
|
|
117
130
|
args: {},
|
|
118
131
|
parameters: {
|
|
@@ -178,4 +191,17 @@ export const Portaled = {
|
|
|
178
191
|
},
|
|
179
192
|
render: DatePickerPortaled,
|
|
180
193
|
};
|
|
194
|
+
export const WithTimeZoneBothMode = {
|
|
195
|
+
args: {},
|
|
196
|
+
parameters: {
|
|
197
|
+
docs: {
|
|
198
|
+
source: {
|
|
199
|
+
code: DatePickerWithTimeZoneBothModeSource,
|
|
200
|
+
language: 'tsx',
|
|
201
|
+
type: 'code',
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
render: DatePickerWithTimeZoneBothMode,
|
|
206
|
+
};
|
|
181
207
|
//# sourceMappingURL=date-picker.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.stories.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,wBAAwB,EACxB,8BAA8B,EAC9B,wBAAwB,EACxB,8BAA8B,
|
|
1
|
+
{"version":3,"file":"date-picker.stories.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,wBAAwB,EACxB,8BAA8B,EAC9B,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,8BAA8B,EAC9B,oCAAoC,EACpC,4BAA4B,GAC7B,MAAM,IAAI,CAAC;AAEZ,MAAM,aAAa,GAA4B;IAC7C,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,wBAAwB;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,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;IACD,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,wBAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,kBAAkB;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAU;IACzC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oCAAoC;gBAC1C,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,8BAA8B;CACvC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { DatePicker } from '../DatePicker';\nimport {\n DatePickerDefault,\n DatePickerDefaultSource,\n DatePickerDisabled,\n DatePickerDisabledSource,\n DatePickerFull,\n DatePickerFullSource,\n DatePickerInDialog,\n DatePickerInDialogSource,\n DatePickerMinMaxDate,\n DatePickerMinMaxDateSource,\n DatePickerOpensToDate,\n DatePickerOpensToDateSource,\n DatePickerPortaled,\n DatePickerPortaledSource,\n DatePickerRange,\n DatePickerRangeSource,\n DatePickerStartsOnMonday,\n DatePickerStartsOnMondaySource,\n DatePickerTextInputProps,\n DatePickerTextInputPropsSource,\n DatePickerWithTimePicker,\n DatePickerWithTimePickerSource,\n DatePickerWithTimeZone,\n DatePickerWithTimeZoneBothMode,\n DatePickerWithTimeZoneBothModeSource,\n DatePickerWithTimeZoneSource,\n} from './';\n\nconst componentMeta: Meta<typeof DatePicker> = {\n component: DatePicker,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-date-picker',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/DatePicker',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerDefault,\n};\n\nexport const StartsOnMonday: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerStartsOnMondaySource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerStartsOnMonday,\n};\n\nexport const MinMaxDate: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerMinMaxDateSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerMinMaxDate,\n};\n\nexport const OpensToDate: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerOpensToDateSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerOpensToDate,\n};\n\nexport const TextInputProps: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerTextInputPropsSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerTextInputProps,\n};\n\nexport const WithTimePicker: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerWithTimePickerSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerWithTimePicker,\n};\n\nexport const WithTimeZone: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerWithTimeZoneSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerWithTimeZone,\n};\n\nexport const Disabled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerDisabledSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerDisabled,\n};\n\nexport const InDialog: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerInDialogSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerInDialog,\n};\n\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerFullSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerFull,\n};\n\nexport const Range: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerRangeSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerRange,\n};\n\nexport const Portaled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerPortaledSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerPortaled,\n};\n\nexport const WithTimeZoneBothMode: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DatePickerWithTimeZoneBothModeSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DatePickerWithTimeZoneBothMode,\n};\n"]}
|
|
@@ -24,6 +24,8 @@ export { default as DatePickerMinMaxDate } from './date-picker-min-max-date.stor
|
|
|
24
24
|
export { default as DatePickerOpensToDate } from './date-picker-opens-to-date.story';
|
|
25
25
|
export { default as DatePickerTextInputProps } from './date-picker-text-input-props.story';
|
|
26
26
|
export { default as DatePickerWithTimePicker } from './date-picker-with-time-picker.story';
|
|
27
|
+
export { default as DatePickerWithTimeZone } from './date-picker-with-timezone.story';
|
|
28
|
+
export { default as DatePickerWithTimeZoneBothMode } from './date-picker-with-timezone-both-mode.story';
|
|
27
29
|
export { default as DatePickerDisabled } from './date-picker-disabled.story';
|
|
28
30
|
export { default as DatePickerInDialog } from './date-picker-in-dialog.story';
|
|
29
31
|
export { default as DatePickerFull } from './date-picker-full.story';
|
|
@@ -41,12 +43,16 @@ import DatePickerRangeSourceRaw from './date-picker-range.story.tsx?raw';
|
|
|
41
43
|
import DatePickerStartsOnMondaySourceRaw from './date-picker-starts-on-monday.story.tsx?raw';
|
|
42
44
|
import DatePickerTextInputPropsSourceRaw from './date-picker-text-input-props.story.tsx?raw';
|
|
43
45
|
import DatePickerWithTimePickerSourceRaw from './date-picker-with-time-picker.story.tsx?raw';
|
|
46
|
+
import DatePickerWithTimeZoneSourceRaw from './date-picker-with-timezone.story.tsx?raw';
|
|
47
|
+
import DatePickerWithTimeZoneBothModeSourceRaw from './date-picker-with-timezone-both-mode.story.tsx?raw';
|
|
44
48
|
export const DatePickerDefaultSource = removeLicenseHeader(DatePickerDefaultSourceRaw);
|
|
45
49
|
export const DatePickerStartsOnMondaySource = removeLicenseHeader(DatePickerStartsOnMondaySourceRaw);
|
|
46
50
|
export const DatePickerMinMaxDateSource = removeLicenseHeader(DatePickerMinMaxDateSourceRaw);
|
|
47
51
|
export const DatePickerOpensToDateSource = removeLicenseHeader(DatePickerOpensToDateSourceRaw);
|
|
48
52
|
export const DatePickerTextInputPropsSource = removeLicenseHeader(DatePickerTextInputPropsSourceRaw);
|
|
49
53
|
export const DatePickerWithTimePickerSource = removeLicenseHeader(DatePickerWithTimePickerSourceRaw);
|
|
54
|
+
export const DatePickerWithTimeZoneSource = removeLicenseHeader(DatePickerWithTimeZoneSourceRaw);
|
|
55
|
+
export const DatePickerWithTimeZoneBothModeSource = removeLicenseHeader(DatePickerWithTimeZoneBothModeSourceRaw);
|
|
50
56
|
export const DatePickerDisabledSource = removeLicenseHeader(DatePickerDisabledSourceRaw);
|
|
51
57
|
export const DatePickerInDialogSource = removeLicenseHeader(DatePickerInDialogSourceRaw);
|
|
52
58
|
export const DatePickerFullSource = removeLicenseHeader(DatePickerFullSourceRaw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,0BAA0B,MAAM,qCAAqC,CAAC;AAC7E,OAAO,2BAA2B,MAAM,sCAAsC,CAAC;AAC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,MAAM,oCAAoC,GAAG,mBAAmB,CACrE,uCAAuC,CACxC,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC;AACF,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as DatePickerDefault } from './date-picker-default.story';\nexport { default as DatePickerStartsOnMonday } from './date-picker-starts-on-monday.story';\nexport { default as DatePickerMinMaxDate } from './date-picker-min-max-date.story';\nexport { default as DatePickerOpensToDate } from './date-picker-opens-to-date.story';\nexport { default as DatePickerTextInputProps } from './date-picker-text-input-props.story';\nexport { default as DatePickerWithTimePicker } from './date-picker-with-time-picker.story';\nexport { default as DatePickerWithTimeZone } from './date-picker-with-timezone.story';\nexport { default as DatePickerWithTimeZoneBothMode } from './date-picker-with-timezone-both-mode.story';\nexport { default as DatePickerDisabled } from './date-picker-disabled.story';\nexport { default as DatePickerInDialog } from './date-picker-in-dialog.story';\nexport { default as DatePickerFull } from './date-picker-full.story';\nexport { default as DatePickerPortaled } from './date-picker-portaled.story';\nexport { default as DatePickerRange } from './date-picker-range.story';\n\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport DatePickerDefaultSourceRaw from './date-picker-default.story.tsx?raw';\nimport DatePickerDisabledSourceRaw from './date-picker-disabled.story.tsx?raw';\nimport DatePickerFullSourceRaw from './date-picker-full.story.tsx?raw';\nimport DatePickerInDialogSourceRaw from './date-picker-in-dialog.story.tsx?raw';\nimport DatePickerMinMaxDateSourceRaw from './date-picker-min-max-date.story.tsx?raw';\nimport DatePickerOpensToDateSourceRaw from './date-picker-opens-to-date.story.tsx?raw';\nimport DatePickerPortaledSourceRaw from './date-picker-portaled.story.tsx?raw';\nimport DatePickerRangeSourceRaw from './date-picker-range.story.tsx?raw';\nimport DatePickerStartsOnMondaySourceRaw from './date-picker-starts-on-monday.story.tsx?raw';\nimport DatePickerTextInputPropsSourceRaw from './date-picker-text-input-props.story.tsx?raw';\nimport DatePickerWithTimePickerSourceRaw from './date-picker-with-time-picker.story.tsx?raw';\nimport DatePickerWithTimeZoneSourceRaw from './date-picker-with-timezone.story.tsx?raw';\nimport DatePickerWithTimeZoneBothModeSourceRaw from './date-picker-with-timezone-both-mode.story.tsx?raw';\n\nexport const DatePickerDefaultSource = removeLicenseHeader(\n DatePickerDefaultSourceRaw,\n);\nexport const DatePickerStartsOnMondaySource = removeLicenseHeader(\n DatePickerStartsOnMondaySourceRaw,\n);\nexport const DatePickerMinMaxDateSource = removeLicenseHeader(\n DatePickerMinMaxDateSourceRaw,\n);\nexport const DatePickerOpensToDateSource = removeLicenseHeader(\n DatePickerOpensToDateSourceRaw,\n);\nexport const DatePickerTextInputPropsSource = removeLicenseHeader(\n DatePickerTextInputPropsSourceRaw,\n);\nexport const DatePickerWithTimePickerSource = removeLicenseHeader(\n DatePickerWithTimePickerSourceRaw,\n);\nexport const DatePickerWithTimeZoneSource = removeLicenseHeader(\n DatePickerWithTimeZoneSourceRaw,\n);\nexport const DatePickerWithTimeZoneBothModeSource = removeLicenseHeader(\n DatePickerWithTimeZoneBothModeSourceRaw,\n);\nexport const DatePickerDisabledSource = removeLicenseHeader(\n DatePickerDisabledSourceRaw,\n);\nexport const DatePickerInDialogSource = removeLicenseHeader(\n DatePickerInDialogSourceRaw,\n);\nexport const DatePickerFullSource = removeLicenseHeader(\n DatePickerFullSourceRaw,\n);\nexport const DatePickerPortaledSource = removeLicenseHeader(\n DatePickerPortaledSourceRaw,\n);\nexport const DatePickerRangeSource = removeLicenseHeader(\n DatePickerRangeSourceRaw,\n);\n"]}
|
|
@@ -101,7 +101,7 @@ const DropzoneComponent = (_a) => {
|
|
|
101
101
|
}
|
|
102
102
|
}, [isDragActive, isRejected]);
|
|
103
103
|
return (_jsxs(_Fragment, { children: [isRejected && (_jsxs(Banner, { className: "ndl-dropzone-error-alert", variant: "danger", children: [_jsx(Banner.Header, { children: "Error" }), _jsx(Banner.Description, { children: Boolean(rejectedText) || 'File extension not supported.' })] })), _jsx("div", Object.assign({ ref: mergedRef, className: wrapperClasses, style: style }, restProps, htmlAttributes, { children: _jsxs("div", Object.assign({ className: "ndl-dropzone-inner-wrapper" }, getRootProps(), { children: [_jsx("input", Object.assign({ "aria-label": "Drag and drop area" }, getInputProps())), _jsxs("div", { className: "ndl-dropzone-inner", children: [width !== undefined && width > 230 && (_jsx(_Fragment, { children: isDragActive && !isSafari ? (computedFileImage) : (_jsx(DocumentArrowUpIconOutline, { className: "ndl-dropzone-upload-icon" })) })), !isUploading && (_jsxs("div", { className: "ndl-dnd-title-container", children: [_jsx(Typography, { variant: "subheading-medium", children: titleText ||
|
|
104
|
-
(heading !== null && heading !== void 0 ? heading : (_jsxs(_Fragment, { children: ["Drag ", _jsx("span", { className: "n-font-light", children: "&" }), " Drop"] }))) }), !isDragReject && (_jsxs("div", { className: "ndl-dnd-subtitle", children: [_jsx(Typography, { variant: "body-medium", children: "or" }), ' ', _jsx("button", { className: "ndl-dnd-browse-link", onClick: () => open(), disabled: isDisabled, children: "Browse" })] }))] })), _jsxs("div", { className: "ndl-dropzone-footer", children: [isUploading && _jsx(_Fragment, { children: loadingElement }), !isUploading && (_jsx("div", { className: "ndl-file-support-text", children: supportedFilesDescription }))] })] })] })) }))] }));
|
|
104
|
+
(heading !== null && heading !== void 0 ? heading : (_jsxs(_Fragment, { children: ["Drag ", _jsx("span", { className: "n-font-light", children: "&" }), " Drop"] }))) }), !isDragReject && (_jsxs("div", { className: "ndl-dnd-subtitle", children: [_jsx(Typography, { variant: "body-medium", children: "or" }), ' ', _jsx("button", { className: "ndl-dnd-browse-link", onClick: () => open(), disabled: isDisabled, type: "button", children: "Browse" })] }))] })), _jsxs("div", { className: "ndl-dropzone-footer", children: [isUploading && _jsx(_Fragment, { children: loadingElement }), !isUploading && (_jsx("div", { className: "ndl-file-support-text", children: supportedFilesDescription }))] })] })] })) }))] }));
|
|
105
105
|
};
|
|
106
106
|
const DropzoneLoadingProgressBarComponent = (_a) => {
|
|
107
107
|
var { progressBarPrecentage, progressBarMinute, htmlAttributes, className, style, ref } = _a, restProps = __rest(_a, ["progressBarPrecentage", "progressBarMinute", "htmlAttributes", "className", "style", "ref"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropzone.js","sourceRoot":"","sources":["../../../src/dropzone/Dropzone.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAkB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAIL,WAAW,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,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E,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { useMergeRefs } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport { detect } from 'detect-browser';\nimport { type RefObject, useMemo, useRef, useState } from 'react';\nimport {\n type DropEvent,\n type DropzoneOptions,\n type FileRejection,\n useDropzone,\n} from 'react-dropzone';\nimport { useResizeObserver } from 'usehooks-ts';\n\nimport { type CommonProps } from '../_common/types';\nimport { Banner } from '../banner';\nimport {\n DocumentArrowUpIconOutline,\n DocumentArrowUpIconSolid,\n XCircleIconSolid,\n} from '../icons';\nimport { ProgressBar } from '../progress-bar';\nimport { Typography } from '../typography';\n\n/**\n *\n *\n * Types\n *\n *\n */\ntype DropzoneProps = {\n /** Props for the underlying `react-dropzone` component. Don't use `accept`. If using custom file extensions as this option is broken. Instead use the `acceptedFileExtensions` property. */\n dropZoneOptions: DropzoneOptions;\n\n /** Informational text that highlights the supported file types, will be displayed in the footer. */\n supportedFilesDescription?: React.ReactNode;\n\n /** Element to display when uploading the file.*/\n loadingElement?: React.ReactNode;\n\n /** Use when wanting a custom heading. */\n heading?: React.ReactNode;\n\n /** Message to be shown when file is rejected. */\n rejectedText?: React.ReactNode;\n\n /** The accepted file extensions for the Drag-and-Drop. */\n acceptedFileExtensions?: string[];\n};\n\ntype DropzoneLoadingProgressBarProps = {\n /** The percentage of the progress bar. */\n progressBarPrecentage: number;\n\n /** The time in minute left to upload the file. */\n progressBarMinute?: number;\n};\n\n/**\n *\n *\n * Helpers\n *\n *\n */\n\nconst browser = detect();\n\nconst isSafari = browser?.name === 'safari';\n\nconst DropzoneComponent = ({\n dropZoneOptions,\n supportedFilesDescription,\n loadingElement,\n heading,\n rejectedText,\n acceptedFileExtensions,\n htmlAttributes,\n style,\n className,\n ref,\n ...restProps\n}: CommonProps<'div', DropzoneProps>) => {\n /**\n * We intercept the onDrop function in order to enforce\n * custom file extensions. Before calling the onDrop props we check\n * if the custom file extensions is acceptable. If the extension\n * conforms to acceptedFileExtensions, we call onDrop. Otherwise, we\n * present an error message.\n */\n function onDropInterceptor<T extends File>(\n acceptedFiles: T[],\n fileRejections: FileRejection[],\n event: DropEvent,\n ) {\n if (acceptedFileExtensions && acceptedFileExtensions.length > 0) {\n for (const file of acceptedFiles) {\n const isAccepted = acceptedFileExtensions.some((extension) => {\n if (file.name.endsWith(extension)) return true;\n });\n if (!isAccepted) {\n setIsRejected(true);\n return;\n }\n }\n }\n setIsRejected(false);\n dropZoneOptions.onDrop?.(acceptedFiles, fileRejections, event);\n }\n\n const [isRejected, setIsRejected] = useState(false);\n const dropZoneRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([dropZoneRef, ref]);\n const isDisabled = dropZoneOptions?.disabled || Boolean(loadingElement);\n\n const {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragAccept,\n isDragReject,\n open,\n } = useDropzone({\n ...dropZoneOptions,\n disabled: isDisabled,\n noClick: true,\n onDrop: onDropInterceptor,\n });\n\n const { width } = useResizeObserver({\n ref: dropZoneRef as RefObject<HTMLElement>,\n });\n\n const isUploading = Boolean(loadingElement);\n\n const titleText =\n isDragActive && isDragReject\n ? 'Format not supported'\n : isDragActive && !isDragReject\n ? 'Drop file'\n : null;\n\n const computedFileImage =\n (isDragActive && isDragAccept) || isUploading ? (\n <DocumentArrowUpIconSolid className=\"n-size-token-48 n-text-primary-bg-strong\" />\n ) : (\n <XCircleIconSolid className=\"n-size-token-48 n-text-danger-bg-strong\" />\n );\n\n const wrapperClasses = classNames('ndl-dropzone', className, {\n 'ndl-drag-active': isDragActive,\n 'ndl-drag-disabled': dropZoneOptions?.disabled,\n 'ndl-file-invalid': isDragActive && isDragReject,\n });\n\n useMemo(() => {\n if (isDragActive && isRejected) {\n setIsRejected(false);\n }\n }, [isDragActive, isRejected]);\n\n return (\n <>\n {isRejected && (\n <Banner className=\"ndl-dropzone-error-alert\" variant=\"danger\">\n <Banner.Header>Error</Banner.Header>\n <Banner.Description>\n {Boolean(rejectedText) || 'File extension not supported.'}\n </Banner.Description>\n </Banner>\n )}\n <div\n ref={mergedRef}\n className={wrapperClasses}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-dropzone-inner-wrapper\" {...getRootProps()}>\n <input aria-label=\"Drag and drop area\" {...getInputProps()} />\n <div className=\"ndl-dropzone-inner\">\n {/* Illustration should be visible only after arbitrary width */}\n {width !== undefined && width > 230 && (\n <>\n {isDragActive && !isSafari ? (\n computedFileImage\n ) : (\n <DocumentArrowUpIconOutline className=\"ndl-dropzone-upload-icon\" />\n )}\n </>\n )}\n {!isUploading && (\n <div className=\"ndl-dnd-title-container\">\n <Typography variant=\"subheading-medium\">\n {titleText ||\n (heading ?? (\n <>\n Drag <span className=\"n-font-light\">&</span> Drop\n </>\n ))}\n </Typography>\n {!isDragReject && (\n <div className=\"ndl-dnd-subtitle\">\n <Typography variant=\"body-medium\">or</Typography>{' '}\n <button\n className=\"ndl-dnd-browse-link\"\n onClick={() => open()}\n disabled={isDisabled}\n >\n Browse\n </button>\n </div>\n )}\n </div>\n )}\n <div className=\"ndl-dropzone-footer\">\n {isUploading && <>{loadingElement}</>}\n {!isUploading && (\n <div className=\"ndl-file-support-text\">\n {supportedFilesDescription}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </>\n );\n};\n\nconst DropzoneLoadingProgressBarComponent = ({\n progressBarPrecentage,\n progressBarMinute,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'div', DropzoneLoadingProgressBarProps>) => {\n return (\n <div className=\"ndl-dropzone-loading-progress-bar-wrapper\">\n <div className=\"ndl-dropzone-loading-progress-bar-indicators\">\n <Typography\n className=\"ndl-dropzone-loading-progress-bar-precentage\"\n variant=\"subheading-small\"\n >\n {progressBarPrecentage + '%'}\n </Typography>\n {Boolean(progressBarMinute) && (\n <Typography\n className=\"ndl-dropzone-loading-progress-bar-minute\"\n variant=\"body-medium\"\n >{`(${progressBarMinute} minutes left)`}</Typography>\n )}\n </div>\n <ProgressBar\n className={classNames('ndl-dropzone-loading-progress-bar', className)}\n value={progressBarPrecentage}\n size=\"large\"\n htmlAttributes={htmlAttributes}\n ref={ref}\n style={style}\n {...restProps}\n />\n </div>\n );\n};\n\nconst Dropzone = Object.assign(DropzoneComponent, {\n LoadingProgressBar: DropzoneLoadingProgressBarComponent,\n});\n\nexport { Dropzone };\n"]}
|
|
1
|
+
{"version":3,"file":"Dropzone.js","sourceRoot":"","sources":["../../../src/dropzone/Dropzone.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAkB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAIL,WAAW,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE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K,SAAS,EAAC,qBAAqB,aACjC,WAAW,IAAI,4BAAG,cAAc,GAAI,EACpC,CAAC,WAAW,IAAI,CACf,cAAK,SAAS,EAAC,uBAAuB,YACnC,yBAAyB,GACtB,CACP,IACG,IACF,KACF,IACF,IACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,mCAAmC,GAAG,CAAC,EAQS,EAAE,EAAE;QARb,EAC3C,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,KAAK,EACL,GAAG,OAEiD,EADjD,SAAS,cAP+B,6FAQ5C,CADa;IAEZ,OAAO,CACL,eAAK,SAAS,EAAC,2CAA2C,aACxD,eAAK,SAAS,EAAC,8CAA8C,aAC3D,KAAC,UAAU,IACT,SAAS,EAAC,8CAA8C,EACxD,OAAO,EAAC,kBAAkB,YAEzB,qBAAqB,GAAG,GAAG,GACjB,EACZ,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAC7B,KAAC,UAAU,IACT,SAAS,EAAC,0CAA0C,EACpD,OAAO,EAAC,aAAa,YACrB,IAAI,iBAAiB,gBAAgB,GAAc,CACtD,IACG,EACN,KAAC,WAAW,kBACV,SAAS,EAAE,UAAU,CAAC,mCAAmC,EAAE,SAAS,CAAC,EACrE,KAAK,EAAE,qBAAqB,EAC5B,IAAI,EAAC,OAAO,EACZ,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACb,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;IAChD,kBAAkB,EAAE,mCAAmC;CACxD,CAAC,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { useMergeRefs } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport { detect } from 'detect-browser';\nimport { type RefObject, useMemo, useRef, useState } from 'react';\nimport {\n type DropEvent,\n type DropzoneOptions,\n type FileRejection,\n useDropzone,\n} from 'react-dropzone';\nimport { useResizeObserver } from 'usehooks-ts';\n\nimport { type CommonProps } from '../_common/types';\nimport { Banner } from '../banner';\nimport {\n DocumentArrowUpIconOutline,\n DocumentArrowUpIconSolid,\n XCircleIconSolid,\n} from '../icons';\nimport { ProgressBar } from '../progress-bar';\nimport { Typography } from '../typography';\n\n/**\n *\n *\n * Types\n *\n *\n */\ntype DropzoneProps = {\n /** Props for the underlying `react-dropzone` component. Don't use `accept`. If using custom file extensions as this option is broken. Instead use the `acceptedFileExtensions` property. */\n dropZoneOptions: DropzoneOptions;\n\n /** Informational text that highlights the supported file types, will be displayed in the footer. */\n supportedFilesDescription?: React.ReactNode;\n\n /** Element to display when uploading the file.*/\n loadingElement?: React.ReactNode;\n\n /** Use when wanting a custom heading. */\n heading?: React.ReactNode;\n\n /** Message to be shown when file is rejected. */\n rejectedText?: React.ReactNode;\n\n /** The accepted file extensions for the Drag-and-Drop. */\n acceptedFileExtensions?: string[];\n};\n\ntype DropzoneLoadingProgressBarProps = {\n /** The percentage of the progress bar. */\n progressBarPrecentage: number;\n\n /** The time in minute left to upload the file. */\n progressBarMinute?: number;\n};\n\n/**\n *\n *\n * Helpers\n *\n *\n */\n\nconst browser = detect();\n\nconst isSafari = browser?.name === 'safari';\n\nconst DropzoneComponent = ({\n dropZoneOptions,\n supportedFilesDescription,\n loadingElement,\n heading,\n rejectedText,\n acceptedFileExtensions,\n htmlAttributes,\n style,\n className,\n ref,\n ...restProps\n}: CommonProps<'div', DropzoneProps>) => {\n /**\n * We intercept the onDrop function in order to enforce\n * custom file extensions. Before calling the onDrop props we check\n * if the custom file extensions is acceptable. If the extension\n * conforms to acceptedFileExtensions, we call onDrop. Otherwise, we\n * present an error message.\n */\n function onDropInterceptor<T extends File>(\n acceptedFiles: T[],\n fileRejections: FileRejection[],\n event: DropEvent,\n ) {\n if (acceptedFileExtensions && acceptedFileExtensions.length > 0) {\n for (const file of acceptedFiles) {\n const isAccepted = acceptedFileExtensions.some((extension) => {\n if (file.name.endsWith(extension)) return true;\n });\n if (!isAccepted) {\n setIsRejected(true);\n return;\n }\n }\n }\n setIsRejected(false);\n dropZoneOptions.onDrop?.(acceptedFiles, fileRejections, event);\n }\n\n const [isRejected, setIsRejected] = useState(false);\n const dropZoneRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([dropZoneRef, ref]);\n const isDisabled = dropZoneOptions?.disabled || Boolean(loadingElement);\n\n const {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragAccept,\n isDragReject,\n open,\n } = useDropzone({\n ...dropZoneOptions,\n disabled: isDisabled,\n noClick: true,\n onDrop: onDropInterceptor,\n });\n\n const { width } = useResizeObserver({\n ref: dropZoneRef as RefObject<HTMLElement>,\n });\n\n const isUploading = Boolean(loadingElement);\n\n const titleText =\n isDragActive && isDragReject\n ? 'Format not supported'\n : isDragActive && !isDragReject\n ? 'Drop file'\n : null;\n\n const computedFileImage =\n (isDragActive && isDragAccept) || isUploading ? (\n <DocumentArrowUpIconSolid className=\"n-size-token-48 n-text-primary-bg-strong\" />\n ) : (\n <XCircleIconSolid className=\"n-size-token-48 n-text-danger-bg-strong\" />\n );\n\n const wrapperClasses = classNames('ndl-dropzone', className, {\n 'ndl-drag-active': isDragActive,\n 'ndl-drag-disabled': dropZoneOptions?.disabled,\n 'ndl-file-invalid': isDragActive && isDragReject,\n });\n\n useMemo(() => {\n if (isDragActive && isRejected) {\n setIsRejected(false);\n }\n }, [isDragActive, isRejected]);\n\n return (\n <>\n {isRejected && (\n <Banner className=\"ndl-dropzone-error-alert\" variant=\"danger\">\n <Banner.Header>Error</Banner.Header>\n <Banner.Description>\n {Boolean(rejectedText) || 'File extension not supported.'}\n </Banner.Description>\n </Banner>\n )}\n <div\n ref={mergedRef}\n className={wrapperClasses}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-dropzone-inner-wrapper\" {...getRootProps()}>\n <input aria-label=\"Drag and drop area\" {...getInputProps()} />\n <div className=\"ndl-dropzone-inner\">\n {/* Illustration should be visible only after arbitrary width */}\n {width !== undefined && width > 230 && (\n <>\n {isDragActive && !isSafari ? (\n computedFileImage\n ) : (\n <DocumentArrowUpIconOutline className=\"ndl-dropzone-upload-icon\" />\n )}\n </>\n )}\n {!isUploading && (\n <div className=\"ndl-dnd-title-container\">\n <Typography variant=\"subheading-medium\">\n {titleText ||\n (heading ?? (\n <>\n Drag <span className=\"n-font-light\">&</span> Drop\n </>\n ))}\n </Typography>\n {!isDragReject && (\n <div className=\"ndl-dnd-subtitle\">\n <Typography variant=\"body-medium\">or</Typography>{' '}\n <button\n className=\"ndl-dnd-browse-link\"\n onClick={() => open()}\n disabled={isDisabled}\n type=\"button\"\n >\n Browse\n </button>\n </div>\n )}\n </div>\n )}\n <div className=\"ndl-dropzone-footer\">\n {isUploading && <>{loadingElement}</>}\n {!isUploading && (\n <div className=\"ndl-file-support-text\">\n {supportedFilesDescription}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </>\n );\n};\n\nconst DropzoneLoadingProgressBarComponent = ({\n progressBarPrecentage,\n progressBarMinute,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'div', DropzoneLoadingProgressBarProps>) => {\n return (\n <div className=\"ndl-dropzone-loading-progress-bar-wrapper\">\n <div className=\"ndl-dropzone-loading-progress-bar-indicators\">\n <Typography\n className=\"ndl-dropzone-loading-progress-bar-precentage\"\n variant=\"subheading-small\"\n >\n {progressBarPrecentage + '%'}\n </Typography>\n {Boolean(progressBarMinute) && (\n <Typography\n className=\"ndl-dropzone-loading-progress-bar-minute\"\n variant=\"body-medium\"\n >{`(${progressBarMinute} minutes left)`}</Typography>\n )}\n </div>\n <ProgressBar\n className={classNames('ndl-dropzone-loading-progress-bar', className)}\n value={progressBarPrecentage}\n size=\"large\"\n htmlAttributes={htmlAttributes}\n ref={ref}\n style={style}\n {...restProps}\n />\n </div>\n );\n};\n\nconst Dropzone = Object.assign(DropzoneComponent, {\n LoadingProgressBar: DropzoneLoadingProgressBarComponent,\n});\n\nexport { Dropzone };\n"]}
|
|
@@ -71,6 +71,9 @@ export const IconButtonBase = (_a) => {
|
|
|
71
71
|
onClick(e);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
return (_jsxs(Tooltip, Object.assign({
|
|
74
|
+
return (_jsxs(Tooltip, Object.assign({ hoverDelay: {
|
|
75
|
+
close: 0,
|
|
76
|
+
open: 500,
|
|
77
|
+
} }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple", isDisabled: description === null || isDisabled, children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { hasButtonWrapper: true, children: _jsx(Component, Object.assign({ onClick: handleClick, disabled: isDisabled, "aria-disabled": !isInteractable, "aria-label": description, "aria-pressed": isActive, className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: _jsx("div", { className: "ndl-icon-btn-inner", children: isLoading ? (_jsx(LoadingSpinner, { size: "small" })) : (_jsx("div", { className: "ndl-icon", children: children })) }) })) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: description }))] })));
|
|
75
78
|
};
|
|
76
79
|
//# sourceMappingURL=IconButtonBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|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e,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,CAAC,CAAC,CAAC;QACb,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,OAAO,kBACN,UAAU,EAAE;YACV,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,GAAG;SACV,IACG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,IACtB,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,WAAW,KAAK,IAAI,IAAI,UAAU,aAE9C,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,IAAE,gBAAgB,kBAC1D,KAAC,SAAS,kBACR,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,mBACL,CAAC,cAAc,gBAClB,WAAW,kBACT,QAAQ,EACtB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,cAAK,SAAS,EAAC,oBAAoB,YAChC,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,GAAG,CAChC,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,UAAU,YAAE,QAAQ,GAAO,CAC3C,GACG,IACI,IACI,EAClB,KAAC,OAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,WAAW,IACI,KACV,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type PolymorphicCommonProps,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport { type ButtonSizes } from '../button';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Tooltip } from '../tooltip';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\nexport type IconButtonBaseProps = {\n children?: React.ReactNode;\n\n /** If the icon button is in disabled state */\n isDisabled?: boolean;\n\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n\n /** Size of button */\n size?: ButtonSizes;\n\n /** If the button is in floating state */\n isFloating?: boolean;\n\n /** Active - used for open context menus for example */\n isActive?: boolean;\n\n /** A string that will be shown as a tooltip when hovering over the button it also acts as an aria-label- {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label} */\n description: string | null;\n\n /** Variant of the button */\n variant?: 'neutral' | 'danger';\n\n /** Variant of the button */\n iconButtonVariant?: 'default' | 'clean';\n\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: TooltipObjectProps;\n\n /** Click handler */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n};\n\nexport const IconButtonBase = <T extends React.ElementType = 'button'>({\n children,\n as,\n iconButtonVariant = 'default',\n isLoading = false,\n isDisabled = false,\n size = 'medium',\n isFloating = false,\n isActive = false,\n description,\n tooltipProps,\n className,\n style,\n variant = 'neutral',\n htmlAttributes,\n onClick,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, IconButtonBaseProps>) => {\n const Component: React.ElementType = as ?? 'button';\n\n const isInteractable = !isDisabled && !isLoading;\n\n const isClean = iconButtonVariant === 'clean';\n const isDanger = variant === 'danger';\n\n const classes = classNames('ndl-icon-btn', className, {\n 'ndl-active': isActive,\n 'ndl-clean': isClean,\n 'ndl-danger': isDanger,\n 'ndl-disabled': isDisabled,\n 'ndl-floating': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-loading': isLoading,\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n if (isClean && isFloating) {\n throw new Error(\n 'BaseIconButton: Cannot use isFloating and iconButtonVariant=\"clean\" at the same time.',\n );\n }\n\n if (!description && !htmlAttributes?.['aria-label']) {\n needleWarningMessage(\n 'Icon buttons do not have text, be sure to include a description or an aria-label for screen readers link: https://dequeuniversity.com/rules/axe/4.4/button-name?application=axeAPI',\n );\n }\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n if (!isInteractable) {\n // By default, a <button /> element with disabled set to true will not get its\n // on click handler called. To support the same behavior on <a /> tags we\n // swallow the event here when disabled, since the <a /> tag with disabled set to\n // true will have its onClick handler called\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tooltip\n hoverDelay={{\n close: 0,\n open: 500,\n }}\n {...tooltipProps?.root}\n type=\"simple\"\n isDisabled={description === null || isDisabled}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <Component\n onClick={handleClick}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n aria-label={description}\n aria-pressed={isActive}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-icon-btn-inner\">\n {isLoading ? (\n <LoadingSpinner size=\"small\" />\n ) : (\n <div className=\"ndl-icon\">{children}</div>\n )}\n </div>\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n"]}
|
package/lib/esm/index.js
CHANGED
|
@@ -63,6 +63,7 @@ export { ToasterControlled, Toaster, toast } from './toast';
|
|
|
63
63
|
export { Tooltip } from './tooltip';
|
|
64
64
|
export { Skeleton } from './skeleton';
|
|
65
65
|
export { TimePicker, NeedleTime } from './time-picker';
|
|
66
|
+
export { TimeZonePicker } from './timezone-picker';
|
|
66
67
|
export { Spotlight, SpotlightProvider, SpotlightTarget, SpotlightTour, useSpotlightContext, } from './spotlight';
|
|
67
68
|
export { LoadingBar } from './loading-bar';
|
|
68
69
|
export { IconButton } from './icon-button';
|
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,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,WAAW,GACZ,M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AAM,SAAS,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,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iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\n"]}
|