@neo4j-ndl/react 4.5.0 → 4.5.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/stories/date-picker-with-time-picker.story.js +1 -0
- package/lib/cjs/date-picker/stories/date-picker-with-time-picker.story.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker-with-timezone-both-mode.story.js +6 -3
- package/lib/cjs/date-picker/stories/date-picker-with-timezone-both-mode.story.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-with-time-picker.story.js +1 -0
- package/lib/esm/date-picker/stories/date-picker-with-time-picker.story.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-with-timezone-both-mode.story.js +6 -3
- package/lib/esm/date-picker/stories/date-picker-with-timezone-both-mode.story.js.map +1 -1
- package/lib/types/date-picker/stories/date-picker-with-time-picker.story.d.ts.map +1 -1
- package/lib/types/date-picker/stories/date-picker-with-timezone-both-mode.story.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-with-time-picker.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-time-picker.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA8C;AAC9C,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,kBAAU,IACT,eAAe,EAAE;YACf,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,EAAE;SACjB,EACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE;gBACX,QAAQ,EAAE,OAAO;aAClB;YACD,QAAQ,EAAE,YAAY;YACtB,aAAa,EAAE,IAAI;SACpB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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-27'),\n );\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n return (\n <DatePicker\n timePickerProps={{\n format: 'hh:mm',\n timeInterval: 20,\n }}\n reactDatePickerProps={{\n onChange: handleOnChange,\n popperProps: {\n strategy: 'fixed',\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
1
|
+
{"version":3,"file":"date-picker-with-time-picker.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-time-picker.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA8C;AAC9C,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,kBAAU,IACT,eAAe,EAAE;YACf,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,EAAE;SACjB,EACD,oBAAoB,EAAE;YACpB,UAAU,EAAE,kBAAkB;YAC9B,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE;gBACX,QAAQ,EAAE,OAAO;aAClB;YACD,QAAQ,EAAE,YAAY;YACtB,aAAa,EAAE,IAAI;SACpB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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-27'),\n );\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n return (\n <DatePicker\n timePickerProps={{\n format: 'hh:mm',\n timeInterval: 20,\n }}\n reactDatePickerProps={{\n dateFormat: 'yyyy-MM-dd hh:mm',\n onChange: handleOnChange,\n popperProps: {\n strategy: 'fixed',\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -26,6 +26,7 @@ const react_1 = require("react");
|
|
|
26
26
|
const typography_1 = require("../../typography");
|
|
27
27
|
const DatePicker_1 = require("../DatePicker");
|
|
28
28
|
const DatePickerWithTimeZoneBothMode = () => {
|
|
29
|
+
var _a;
|
|
29
30
|
const [selectedDate, setSelectedDate] = (0, react_1.useState)(
|
|
30
31
|
// Every day is Christmas in Needle :)
|
|
31
32
|
new Date('2025-12-24'));
|
|
@@ -41,18 +42,20 @@ const DatePickerWithTimeZoneBothMode = () => {
|
|
|
41
42
|
},
|
|
42
43
|
value: selectedTimeZone,
|
|
43
44
|
}, reactDatePickerProps: {
|
|
44
|
-
dateFormat: 'yyyy-MM-dd',
|
|
45
|
+
dateFormat: 'yyyy-MM-dd hh:mm',
|
|
45
46
|
onChange: (date) => {
|
|
46
47
|
setSelectedDate(date);
|
|
47
48
|
},
|
|
48
49
|
selected: selectedDate,
|
|
49
50
|
showTimeInput: true,
|
|
50
51
|
} }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
51
|
-
backgroundColor: '
|
|
52
|
+
backgroundColor: 'var(--theme-color-neutral-bg-default)',
|
|
52
53
|
borderRadius: '4px',
|
|
54
|
+
display: 'flex',
|
|
55
|
+
flexDirection: 'column',
|
|
53
56
|
marginTop: '24px',
|
|
54
57
|
padding: '16px',
|
|
55
|
-
}, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: "
|
|
58
|
+
}, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: "label", children: "Selected Values:" }), (0, jsx_runtime_1.jsxs)(typography_1.Typography, { variant: "body-small", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Date: " }), (_a = selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.toISOString()) !== null && _a !== void 0 ? _a : 'None'] }), (0, jsx_runtime_1.jsxs)(typography_1.Typography, { variant: "body-small", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Timezone:" }), " ", selectedTimeZone || 'None'] })] })] }));
|
|
56
59
|
};
|
|
57
60
|
exports.DatePickerWithTimeZoneBothMode = DatePickerWithTimeZoneBothMode;
|
|
58
61
|
exports.default = exports.DatePickerWithTimeZoneBothMode;
|
|
@@ -1 +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,iCAAiC;AAEjC,iDAA8C;AAC9C,8CAA2C;AAEpC,MAAM,8BAA8B,GAAG,GAAG,EAAE
|
|
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,iCAAiC;AAEjC,iDAA8C;AAC9C,8CAA2C;AAEpC,MAAM,8BAA8B,GAAG,GAAG,EAAE;;IACjD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ;IAC9C,sCAAsC;IACtC,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAC3C,IAAA,gBAAQ,EAAS,kBAAkB,CAAC,CAAC;IAEvC,OAAO,CACL,iCAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAChD,uBAAC,uBAAU,IAAC,OAAO,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,qDAEhD,EACb,uBAAC,uBAAU,IAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,uKAIpD,EAEb,uBAAC,uBAAU,IACT,cAAc,EAAE;oBACd,KAAK,EAAE,oCAAoC;iBAC5C,EACD,eAAe,EAAE;oBACf,MAAM,EAAE,OAAO;iBAChB,EACD,mBAAmB,EAAE;oBACnB,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE;wBACf,mBAAmB,CAAC,EAAE,CAAC,CAAC;oBAC1B,CAAC;oBACD,KAAK,EAAE,gBAAgB;iBACxB,EACD,oBAAoB,EAAE;oBACpB,UAAU,EAAE,kBAAkB;oBAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;wBACjB,eAAe,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBACD,QAAQ,EAAE,YAAY;oBACtB,aAAa,EAAE,IAAI;iBACpB,GACD,EAEF,iCACE,KAAK,EAAE;oBACL,eAAe,EAAE,uCAAuC;oBACxD,YAAY,EAAE,KAAK;oBACnB,OAAO,EAAE,MAAM;oBACf,aAAa,EAAE,QAAQ;oBACvB,SAAS,EAAE,MAAM;oBACjB,OAAO,EAAE,MAAM;iBAChB,aAED,uBAAC,uBAAU,IAAC,OAAO,EAAC,OAAO,iCAA8B,EACzD,wBAAC,uBAAU,IAAC,OAAO,EAAC,YAAY,aAC9B,wDAAuB,EACtB,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,EAAE,mCAAI,MAAM,IAC3B,EACb,wBAAC,uBAAU,IAAC,OAAO,EAAC,YAAY,aAC9B,2DAA0B,OAAE,gBAAgB,IAAI,MAAM,IAC3C,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAhEW,QAAA,8BAA8B,kCAgEzC;AAEF,kBAAe,sCAA8B,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 { useState } from 'react';\n\nimport { Typography } from '../../typography';\nimport { DatePicker } from '../DatePicker';\n\nexport const DatePickerWithTimeZoneBothMode = () => {\n const [selectedDate, setSelectedDate] = useState<Date | null>(\n // Every day is Christmas in Needle :)\n new Date('2025-12-24'),\n );\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 hh:mm',\n onChange: (date) => {\n setSelectedDate(date);\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n\n <div\n style={{\n backgroundColor: 'var(--theme-color-neutral-bg-default)',\n borderRadius: '4px',\n display: 'flex',\n flexDirection: 'column',\n marginTop: '24px',\n padding: '16px',\n }}\n >\n <Typography variant=\"label\">Selected Values:</Typography>\n <Typography variant=\"body-small\">\n <strong>Date: </strong>\n {selectedDate?.toISOString() ?? 'None'}\n </Typography>\n <Typography variant=\"body-small\">\n <strong>Timezone:</strong> {selectedTimeZone || 'None'}\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default DatePickerWithTimeZoneBothMode;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-with-time-picker.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-time-picker.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,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,eAAe,EAAE;YACf,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,EAAE;SACjB,EACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE;gBACX,QAAQ,EAAE,OAAO;aAClB;YACD,QAAQ,EAAE,YAAY;YACtB,aAAa,EAAE,IAAI;SACpB,GACD,CACH,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-27'),\n );\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n return (\n <DatePicker\n timePickerProps={{\n format: 'hh:mm',\n timeInterval: 20,\n }}\n reactDatePickerProps={{\n onChange: handleOnChange,\n popperProps: {\n strategy: 'fixed',\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
1
|
+
{"version":3,"file":"date-picker-with-time-picker.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-time-picker.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,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,eAAe,EAAE;YACf,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,EAAE;SACjB,EACD,oBAAoB,EAAE;YACpB,UAAU,EAAE,kBAAkB;YAC9B,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE;gBACX,QAAQ,EAAE,OAAO;aAClB;YACD,QAAQ,EAAE,YAAY;YACtB,aAAa,EAAE,IAAI;SACpB,GACD,CACH,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-27'),\n );\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n return (\n <DatePicker\n timePickerProps={{\n format: 'hh:mm',\n timeInterval: 20,\n }}\n reactDatePickerProps={{\n dateFormat: 'yyyy-MM-dd hh:mm',\n onChange: handleOnChange,\n popperProps: {\n strategy: 'fixed',\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -23,6 +23,7 @@ import { useState } from 'react';
|
|
|
23
23
|
import { Typography } from '../../typography';
|
|
24
24
|
import { DatePicker } from '../DatePicker';
|
|
25
25
|
export const DatePickerWithTimeZoneBothMode = () => {
|
|
26
|
+
var _a;
|
|
26
27
|
const [selectedDate, setSelectedDate] = useState(
|
|
27
28
|
// Every day is Christmas in Needle :)
|
|
28
29
|
new Date('2025-12-24'));
|
|
@@ -38,18 +39,20 @@ export const DatePickerWithTimeZoneBothMode = () => {
|
|
|
38
39
|
},
|
|
39
40
|
value: selectedTimeZone,
|
|
40
41
|
}, reactDatePickerProps: {
|
|
41
|
-
dateFormat: 'yyyy-MM-dd',
|
|
42
|
+
dateFormat: 'yyyy-MM-dd hh:mm',
|
|
42
43
|
onChange: (date) => {
|
|
43
44
|
setSelectedDate(date);
|
|
44
45
|
},
|
|
45
46
|
selected: selectedDate,
|
|
46
47
|
showTimeInput: true,
|
|
47
48
|
} }), _jsxs("div", { style: {
|
|
48
|
-
backgroundColor: '
|
|
49
|
+
backgroundColor: 'var(--theme-color-neutral-bg-default)',
|
|
49
50
|
borderRadius: '4px',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flexDirection: 'column',
|
|
50
53
|
marginTop: '24px',
|
|
51
54
|
padding: '16px',
|
|
52
|
-
}, children: [_jsx(Typography, { variant: "
|
|
55
|
+
}, children: [_jsx(Typography, { variant: "label", children: "Selected Values:" }), _jsxs(Typography, { variant: "body-small", children: [_jsx("strong", { children: "Date: " }), (_a = selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.toISOString()) !== null && _a !== void 0 ? _a : 'None'] }), _jsxs(Typography, { variant: "body-small", children: [_jsx("strong", { children: "Timezone:" }), " ", selectedTimeZone || 'None'] })] })] }));
|
|
53
56
|
};
|
|
54
57
|
export default DatePickerWithTimeZoneBothMode;
|
|
55
58
|
//# sourceMappingURL=date-picker-with-timezone-both-mode.story.js.map
|
|
@@ -1 +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
|
|
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;IAC9C,sCAAsC;IACtC,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,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,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,uKAIpD,EAEb,KAAC,UAAU,IACT,cAAc,EAAE;oBACd,KAAK,EAAE,oCAAoC;iBAC5C,EACD,eAAe,EAAE;oBACf,MAAM,EAAE,OAAO;iBAChB,EACD,mBAAmB,EAAE;oBACnB,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE;wBACf,mBAAmB,CAAC,EAAE,CAAC,CAAC;oBAC1B,CAAC;oBACD,KAAK,EAAE,gBAAgB;iBACxB,EACD,oBAAoB,EAAE;oBACpB,UAAU,EAAE,kBAAkB;oBAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;wBACjB,eAAe,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBACD,QAAQ,EAAE,YAAY;oBACtB,aAAa,EAAE,IAAI;iBACpB,GACD,EAEF,eACE,KAAK,EAAE;oBACL,eAAe,EAAE,uCAAuC;oBACxD,YAAY,EAAE,KAAK;oBACnB,OAAO,EAAE,MAAM;oBACf,aAAa,EAAE,QAAQ;oBACvB,SAAS,EAAE,MAAM;oBACjB,OAAO,EAAE,MAAM;iBAChB,aAED,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,iCAA8B,EACzD,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,aAC9B,sCAAuB,EACtB,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,EAAE,mCAAI,MAAM,IAC3B,EACb,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,aAC9B,yCAA0B,OAAE,gBAAgB,IAAI,MAAM,IAC3C,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,8BAA8B,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 { useState } from 'react';\n\nimport { Typography } from '../../typography';\nimport { DatePicker } from '../DatePicker';\n\nexport const DatePickerWithTimeZoneBothMode = () => {\n const [selectedDate, setSelectedDate] = useState<Date | null>(\n // Every day is Christmas in Needle :)\n new Date('2025-12-24'),\n );\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 hh:mm',\n onChange: (date) => {\n setSelectedDate(date);\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n\n <div\n style={{\n backgroundColor: 'var(--theme-color-neutral-bg-default)',\n borderRadius: '4px',\n display: 'flex',\n flexDirection: 'column',\n marginTop: '24px',\n padding: '16px',\n }}\n >\n <Typography variant=\"label\">Selected Values:</Typography>\n <Typography variant=\"body-small\">\n <strong>Date: </strong>\n {selectedDate?.toISOString() ?? 'None'}\n </Typography>\n <Typography variant=\"body-small\">\n <strong>Timezone:</strong> {selectedTimeZone || 'None'}\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default DatePickerWithTimeZoneBothMode;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-with-time-picker.story.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-time-picker.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+
|
|
1
|
+
{"version":3,"file":"date-picker-with-time-picker.story.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-time-picker.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+CAyBd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-with-timezone-both-mode.story.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-timezone-both-mode.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,eAAO,MAAM,8BAA8B,+
|
|
1
|
+
{"version":3,"file":"date-picker-with-timezone-both-mode.story.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-with-timezone-both-mode.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,eAAO,MAAM,8BAA8B,+CAgE1C,CAAC;AAEF,eAAe,8BAA8B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@tanstack/react-table": "8.21.3",
|
|
86
86
|
"react": ">=19.0.0",
|
|
87
87
|
"react-dom": ">=19.0.0",
|
|
88
|
-
"@neo4j-ndl/base": "^4.5.
|
|
88
|
+
"@neo4j-ndl/base": "^4.5.1"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
91
|
"@dnd-kit/core": "6.3.1",
|