@neo4j-ndl/react 4.1.7 → 4.1.9
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/icons/manual/Neo4JAiColor.js +1 -1
- package/lib/cjs/icons/manual/Neo4JAiColor.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/cjs/tooltip/use-tooltip.js +1 -0
- package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
- package/lib/esm/icons/manual/Neo4JAiColor.js +1 -1
- package/lib/esm/icons/manual/Neo4JAiColor.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/esm/tooltip/use-tooltip.js +2 -1
- package/lib/esm/tooltip/use-tooltip.js.map +1 -1
- package/lib/types/icons/manual/Neo4JAiColor.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -1
- package/lib/types/tooltip/use-tooltip.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -40,7 +40,7 @@ const Neo4JAiColor = (_a) => {
|
|
|
40
40
|
var { theme, className, style, ref, htmlAttributes } = _a, restProps = __rest(_a, ["theme", "className", "style", "ref", "htmlAttributes"]);
|
|
41
41
|
const uniqueId = (0, react_1.useId)();
|
|
42
42
|
const gradientId = `neo4j-ai-color-gradient-${theme}-${uniqueId}`;
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, ref: ref, style: style }, restProps, htmlAttributes, { children: [(0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("linearGradient", { id: `neo4j-ai-color-gradient-light-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { stopColor: "#0A6190" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "#754EC8" })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: `neo4j-ai-color-gradient-dark-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { stopColor: "#8FE3E8" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "#CCB4FF" })] })] }), (0, jsx_runtime_1.jsx)("circle", { cx: 5.5, cy: 5.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), (0, jsx_runtime_1.jsx)("circle", { cx: 18.5, cy: 18.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), (0, jsx_runtime_1.jsx)("path", { d: "M12.7885 15.6345L12 18L11.2115 15.6345C10.7636 14.2908 9.70919 13.2364 8.36546 12.7885L6 12L8.36546 11.2115C9.70919 10.7636 10.7636 9.70919 11.2115 8.36546L12 6L12.7885 8.36546C13.2364 9.70919 14.2908 10.7636 15.6345 11.2115L18 12L15.6345 12.7885C14.2908 13.2364 13.2364 14.2908 12.7885 15.6345Z", stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M15 21.418C15 21.418 9.56707 23.7462 4.91039 19.0895C0.253721 14.4328 2.58211 9 2.58211 9", stroke: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinecap: "round"
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, ref: ref, style: style }, restProps, htmlAttributes, { children: [(0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("linearGradient", { id: `neo4j-ai-color-gradient-light-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { stopColor: "#0A6190" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "#754EC8" })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: `neo4j-ai-color-gradient-dark-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { stopColor: "#8FE3E8" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "#CCB4FF" })] })] }), (0, jsx_runtime_1.jsx)("circle", { cx: 5.5, cy: 5.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), (0, jsx_runtime_1.jsx)("circle", { cx: 18.5, cy: 18.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), (0, jsx_runtime_1.jsx)("path", { d: "M12.7885 15.6345L12 18L11.2115 15.6345C10.7636 14.2908 9.70919 13.2364 8.36546 12.7885L6 12L8.36546 11.2115C9.70919 10.7636 10.7636 9.70919 11.2115 8.36546L12 6L12.7885 8.36546C13.2364 9.70919 14.2908 10.7636 15.6345 11.2115L18 12L15.6345 12.7885C14.2908 13.2364 13.2364 14.2908 12.7885 15.6345Z", stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M15 21.418C15 21.418 9.56707 23.7462 4.91039 19.0895C0.253721 14.4328 2.58211 9 2.58211 9", stroke: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinecap: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M9 2.58204C9 2.58204 14.4329 0.253777 19.0896 4.9105C23.7463 9.56722 21.4179 15 21.4179 15", stroke: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinecap: "round" })] })));
|
|
44
44
|
};
|
|
45
45
|
const Neo4JAiColorLightComponent = (props) => {
|
|
46
46
|
return (0, jsx_runtime_1.jsx)(Neo4JAiColor, Object.assign({ theme: "light" }, props));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Neo4JAiColor.js","sourceRoot":"","sources":["../../../../src/icons/manual/Neo4JAiColor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA,iCAA8B;AAE9B,0CAAuC;AAMvC,MAAM,YAAY,GAAG,CAAC,EAOkB,EAAE,EAAE;QAPtB,EACpB,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,EACH,cAAc,OAEwB,EADnC,SAAS,cANQ,wDAOrB,CADa;IAEZ,MAAM,QAAQ,GAAG,IAAA,aAAK,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,2BAA2B,KAAK,IAAI,QAAQ,EAAE,CAAC;IAElE,OAAO,CACL,+CACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,6CACE,4CACE,EAAE,EAAE,iCAAiC,QAAQ,EAAE,EAC/C,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,aAAa,EAAC,gBAAgB,aAE9B,iCAAM,SAAS,EAAC,SAAS,GAAG,EAC5B,iCAAM,MAAM,EAAC,GAAG,EAAC,SAAS,EAAC,SAAS,GAAG,IACxB,EACjB,4CACE,EAAE,EAAE,gCAAgC,QAAQ,EAAE,EAC9C,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,aAAa,EAAC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AC,2FAA2F,EAC7F,MAAM,EAAE,QAAQ,UAAU,GAAG,EAC7B,WAAW,EAAE,GAAG,EAChB,aAAa,EAAC,OAAO,GACrB,EACF,iCACE,CAAC,EAAC,4FAA4F,EAC9F,MAAM,EAAE,QAAQ,UAAU,GAAG,EAC7B,WAAW,EAAE,GAAG,EAChB,aAAa,EAAC,OAAO,GACrB,KACE,CACP,CAAC;AACJ,CAAC,CAAC;AAIF,MAAM,0BAA0B,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3D,OAAO,uBAAC,YAAY,kBAAC,KAAK,EAAC,OAAO,IAAK,KAAK,EAAI,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC1D,OAAO,uBAAC,YAAY,kBAAC,KAAK,EAAC,MAAM,IAAK,KAAK,EAAI,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,IAAA,mBAAQ,EAAC,0BAA0B,CAAC,CAAC;AAGtD,8CAAiB;AAF1B,MAAM,gBAAgB,GAAG,IAAA,mBAAQ,EAAC,yBAAyB,CAAC,CAAC;AAEjC,4CAAgB","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 CommonProps } from '@neo4j-ndl/react/_common/types';\nimport { useId } from 'react';\n\nimport { wrapIcon } from '../wrapIcon';\n\ntype Neo4JAiColorProps = {\n theme: 'light' | 'dark';\n};\n\nconst Neo4JAiColor = ({\n theme,\n className,\n style,\n ref,\n htmlAttributes,\n ...restProps\n}: CommonProps<'svg', Neo4JAiColorProps>) => {\n const uniqueId = useId();\n const gradientId = `neo4j-ai-color-gradient-${theme}-${uniqueId}`;\n\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <defs>\n <linearGradient\n id={`neo4j-ai-color-gradient-light-${uniqueId}`}\n x1=\"9.5\"\n y1=\"1.5\"\n x2=\"19\"\n y2=\"16\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#0A6190\" />\n <stop offset=\"1\" stopColor=\"#754EC8\" />\n </linearGradient>\n <linearGradient\n id={`neo4j-ai-color-gradient-dark-${uniqueId}`}\n x1=\"9.5\"\n y1=\"1.5\"\n x2=\"19\"\n y2=\"16\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#8FE3E8\" />\n <stop offset=\"1\" stopColor=\"#CCB4FF\" />\n </linearGradient>\n </defs>\n <circle\n cx={5.5}\n cy={5.5}\n r={1.5}\n stroke={`url(#${gradientId})`}\n fill={`url(#${gradientId})`}\n strokeWidth={1.5}\n />\n <circle\n cx={18.5}\n cy={18.5}\n r={1.5}\n stroke={`url(#${gradientId})`}\n fill={`url(#${gradientId})`}\n strokeWidth={1.5}\n />\n <path\n d=\"M12.7885 15.6345L12 18L11.2115 15.6345C10.7636 14.2908 9.70919 13.2364 8.36546 12.7885L6 12L8.36546 11.2115C9.70919 10.7636 10.7636 9.70919 11.2115 8.36546L12 6L12.7885 8.36546C13.2364 9.70919 14.2908 10.7636 15.6345 11.2115L18 12L15.6345 12.7885C14.2908 13.2364 13.2364 14.2908 12.7885 15.6345Z\"\n stroke={`url(#${gradientId})`}\n fill={`url(#${gradientId})`}\n strokeWidth={1.5}\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M15 21.418C15 21.418 9.56707 23.7462 4.91039 19.0895C0.253721 14.4328 2.58211 9 2.58211 9\"\n stroke={`url(#${gradientId})`}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n />\n <path\n d=\"M9 2.58204C9 2.58204 14.4329 0.253777 19.0896 4.9105C23.7463 9.56722 21.4179 15 21.4179 15\"\n stroke={`url(#${gradientId})`}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n};\n\ntype ComponentProps = Omit<React.ComponentProps<typeof Neo4JAiColor>, 'theme'>;\n\nconst Neo4JAiColorLightComponent = (props: ComponentProps) => {\n return <Neo4JAiColor theme=\"light\" {...props} />;\n};\n\nconst Neo4JAiColorDarkComponent = (props: ComponentProps) => {\n return <Neo4JAiColor theme=\"dark\" {...props} />;\n};\n\nconst Neo4JAiColorLight = wrapIcon(Neo4JAiColorLightComponent);\nconst Neo4JAiColorDark = wrapIcon(Neo4JAiColorDarkComponent);\n\nexport { Neo4JAiColorLight, Neo4JAiColorDark };\n"]}
|
|
@@ -26,7 +26,7 @@ const react_1 = require("@neo4j-ndl/react");
|
|
|
26
26
|
const react_2 = require("react");
|
|
27
27
|
const Component = () => {
|
|
28
28
|
const [selectedTimeZone, setSelectedTimeZone] = (0, react_2.useState)('Europe/Stockholm');
|
|
29
|
-
const [referenceDate, setReferenceDate] = (0, react_2.useState)(new Date());
|
|
29
|
+
const [referenceDate, setReferenceDate] = (0, react_2.useState)(new Date('2025-01-01'));
|
|
30
30
|
// Create summer and winter dates for DST demonstration
|
|
31
31
|
const summerDate = new Date('2024-07-15T12:00:00'); // July (DST in effect)
|
|
32
32
|
const winterDate = new Date('2024-01-15T12:00:00'); // January (Standard time)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone-picker-dst-aware.story.js","sourceRoot":"","sources":["../../../../src/timezone-picker/stories/timezone-picker-dst-aware.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkD;AAClD,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAC3C,IAAA,gBAAQ,EAAS,kBAAkB,CAAC,CAAC;IACvC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,
|
|
1
|
+
{"version":3,"file":"timezone-picker-dst-aware.story.js","sourceRoot":"","sources":["../../../../src/timezone-picker/stories/timezone-picker-dst-aware.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkD;AAClD,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAC3C,IAAA,gBAAQ,EAAS,kBAAkB,CAAC,CAAC;IACvC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAChD,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IAEF,uDAAuD;IACvD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,uBAAuB;IAC3E,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,0BAA0B;IAE9E,OAAO,CACL,iCAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aACnE,4CACE,+BAAI,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,+CAAqC,EACxE,8BAAG,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,6GAG7C,IACA,EAEN,iCAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,a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j 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 { TimeZonePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedTimeZone, setSelectedTimeZone] =\n useState<string>('Europe/Stockholm');\n const [referenceDate, setReferenceDate] = useState<Date>(\n new Date('2025-01-01'),\n );\n\n // Create summer and winter dates for DST demonstration\n const summerDate = new Date('2024-07-15T12:00:00'); // July (DST in effect)\n const winterDate = new Date('2024-01-15T12:00:00'); // January (Standard time)\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>\n <div>\n <h3 style={{ marginBottom: '1rem' }}>DST-Aware Timezone Picker Demo</h3>\n <p style={{ marginBottom: '1rem', color: '#666' }}>\n The timezone offsets change based on the reference date to account for\n Daylight Saving Time.\n </p>\n </div>\n\n <div style={{ display: 'flex', gap: '1rem', marginBottom: '1rem' }}>\n <button\n onClick={() => setReferenceDate(summerDate)}\n style={{\n padding: '0.5rem 1rem',\n border: '1px solid #ccc',\n borderRadius: '4px',\n cursor: 'pointer',\n backgroundColor: referenceDate === summerDate ? '#0066cc' : 'white',\n color: referenceDate === summerDate ? 'white' : 'black',\n }}\n >\n Summer Date (July 15, 2024)\n </button>\n <button\n onClick={() => setReferenceDate(winterDate)}\n style={{\n padding: '0.5rem 1rem',\n border: '1px solid #ccc',\n borderRadius: '4px',\n cursor: 'pointer',\n backgroundColor: referenceDate === winterDate ? '#0066cc' : 'white',\n color: referenceDate === winterDate ? 'white' : 'black',\n }}\n >\n Winter Date (January 15, 2024)\n </button>\n </div>\n\n <TimeZonePicker\n label=\"Select Timezone\"\n value={selectedTimeZone}\n onChange={setSelectedTimeZone}\n referenceDate={referenceDate}\n />\n\n <div\n style={{\n backgroundColor: '#f5f5f5',\n borderRadius: '4px',\n\n padding: '1rem',\n }}\n >\n <p>\n <strong>Selected Timezone:</strong> {selectedTimeZone}\n </p>\n <p>\n <strong>Reference Date:</strong> {referenceDate.toLocaleDateString()}\n </p>\n <p>\n <strong>Example:</strong> New York shows GMT-4 in summer (EDT) and\n GMT-5 in winter (EST)\n </p>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -52,6 +52,7 @@ function useTooltip({ isInitialOpen = false, placement = 'top', isOpen: controll
|
|
|
52
52
|
move: false,
|
|
53
53
|
delay: hoverDelay,
|
|
54
54
|
enabled: type === 'simple',
|
|
55
|
+
handleClose: (0, react_1.safePolygon)(),
|
|
55
56
|
});
|
|
56
57
|
const click = (0, react_1.useClick)(context, {
|
|
57
58
|
enabled: type === 'rich',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/use-tooltip.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"use-tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/use-tooltip.ts"],"names":[],"mappings":";;;AA0DA,gCAiFC;AA3ID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8CAmB4B;AAC5B,iCAAqE;AAkBrE,SAAgB,UAAU,CAAC,EACzB,aAAa,GAAG,KAAK,EACrB,SAAS,GAAG,KAAK,EACjB,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,iBAAiB,EAC/B,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,UAAU,EACrB,UAAU,GAAG,SAAS,EACtB,2BAA2B,GAAG,KAAK,EAC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AG,IAAA,gBAAQ,EAAC,OAAO,EAAE;QAC9B,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,IAAI,KAAK,QAAQ;KAC3B,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,OAAO,EAAE;QAClC,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,IAAI;QACf,cAAc,EAAE,2BAA2B;KAC5C,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,IAAA,eAAO,EAAC,OAAO,EAAE;QAC5B,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;KAC/C,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,IAAA,uBAAe,EAAC,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAE3E,OAAO,IAAA,eAAO,EACZ,GAAG,EAAE,CAAC,+BACJ,MAAM;QACN,OAAO;QACP,IAAI;QACJ,UAAU,IACP,YAAY,GACZ,IAAI,EACP,EACF,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,CACxD,CAAC;AACJ,CAAC;AAGY,QAAA,cAAc,GAAG,IAAA,qBAAa,EAAc,IAAI,CAAC,CAAC;AAExD,MAAM,iBAAiB,GAAG,GAAkC,EAAE;IACnE,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,sBAAc,CAAC,CAAC;IAE3C,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B","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 {\n autoUpdate,\n type AutoUpdateOptions,\n flip,\n offset,\n type Placement,\n type ReferenceType,\n safePolygon,\n shift,\n useClick,\n useDismiss,\n useFloating,\n type UseFloatingOptions,\n type UseFloatingReturn,\n useFocus,\n useHover,\n useInteractions,\n type UseInteractionsReturn,\n useRole,\n} from '@floating-ui/react';\nimport { createContext, useContext, useMemo, useState } from 'react';\n\nexport interface TooltipOptions {\n isInitialOpen?: boolean;\n placement?: Placement;\n isOpen?: boolean;\n onOpenChange?: UseFloatingOptions['onOpenChange'];\n type?: 'simple' | 'rich';\n isPortaled?: boolean;\n strategy?: 'fixed' | 'absolute';\n hoverDelay?: {\n open: number;\n close: number;\n };\n shouldCloseOnReferenceClick?: boolean;\n autoUpdateOptions?: AutoUpdateOptions;\n}\n\nexport function useTooltip({\n isInitialOpen = false,\n placement = 'top',\n isOpen: controlledOpen,\n onOpenChange: setControlledOpen,\n type = 'simple',\n isPortaled = true,\n strategy = 'absolute',\n hoverDelay = undefined,\n shouldCloseOnReferenceClick = false,\n autoUpdateOptions,\n}: TooltipOptions = {}): {\n isOpen: boolean;\n setOpen: (open: boolean) => void;\n type: 'simple' | 'rich';\n isPortaled: boolean;\n} & UseInteractionsReturn &\n UseFloatingReturn<ReferenceType> {\n const [isUncontrolledOpen, setIsUncontrolledOpen] = useState(isInitialOpen);\n const isOpen = controlledOpen ?? isUncontrolledOpen;\n const setOpen = setControlledOpen ?? setIsUncontrolledOpen;\n\n const data = useFloating({\n placement,\n open: isOpen,\n onOpenChange: setOpen,\n whileElementsMounted(referenceEl, floatingEl, update) {\n const cleanup = autoUpdate(referenceEl, floatingEl, update, {\n ...autoUpdateOptions,\n });\n return cleanup;\n },\n middleware: [\n offset(5),\n flip({\n crossAxis: placement.includes('-'),\n fallbackAxisSideDirection: 'start',\n padding: 5,\n }),\n shift({ padding: 5 }),\n ],\n strategy,\n });\n\n const context = data.context;\n\n const hover = useHover(context, {\n move: false,\n delay: hoverDelay,\n enabled: type === 'simple',\n handleClose: safePolygon(),\n });\n const click = useClick(context, {\n enabled: type === 'rich',\n });\n const focus = useFocus(context, {\n visibleOnly: true,\n enabled: type === 'simple',\n });\n const dismiss = useDismiss(context, {\n outsidePress: true,\n escapeKey: true,\n referencePress: shouldCloseOnReferenceClick,\n });\n const role = useRole(context, {\n role: type === 'simple' ? 'tooltip' : 'dialog',\n });\n\n const interactions = useInteractions([hover, focus, dismiss, role, click]);\n\n return useMemo(\n () => ({\n isOpen,\n setOpen,\n type,\n isPortaled,\n ...interactions,\n ...data,\n }),\n [isOpen, setOpen, type, isPortaled, interactions, data],\n );\n}\n\ntype ContextType = ReturnType<typeof useTooltip> | null;\nexport const TooltipContext = createContext<ContextType>(null);\n\nexport const useTooltipContext = (): ReturnType<typeof useTooltip> => {\n const context = useContext(TooltipContext);\n\n if (context === null) {\n throw new Error('Tooltip components must be wrapped in <Tooltip />');\n }\n\n return context;\n};\n"]}
|
|
@@ -37,7 +37,7 @@ const Neo4JAiColor = (_a) => {
|
|
|
37
37
|
var { theme, className, style, ref, htmlAttributes } = _a, restProps = __rest(_a, ["theme", "className", "style", "ref", "htmlAttributes"]);
|
|
38
38
|
const uniqueId = useId();
|
|
39
39
|
const gradientId = `neo4j-ai-color-gradient-${theme}-${uniqueId}`;
|
|
40
|
-
return (_jsxs("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, ref: ref, style: style }, restProps, htmlAttributes, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `neo4j-ai-color-gradient-light-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#0A6190" }), _jsx("stop", { offset: "1", stopColor: "#754EC8" })] }), _jsxs("linearGradient", { id: `neo4j-ai-color-gradient-dark-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#8FE3E8" }), _jsx("stop", { offset: "1", stopColor: "#CCB4FF" })] })] }), _jsx("circle", { cx: 5.5, cy: 5.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), _jsx("circle", { cx: 18.5, cy: 18.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), _jsx("path", { d: "M12.7885 15.6345L12 18L11.2115 15.6345C10.7636 14.2908 9.70919 13.2364 8.36546 12.7885L6 12L8.36546 11.2115C9.70919 10.7636 10.7636 9.70919 11.2115 8.36546L12 6L12.7885 8.36546C13.2364 9.70919 14.2908 10.7636 15.6345 11.2115L18 12L15.6345 12.7885C14.2908 13.2364 13.2364 14.2908 12.7885 15.6345Z", stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinejoin: "round" }), _jsx("path", { d: "M15 21.418C15 21.418 9.56707 23.7462 4.91039 19.0895C0.253721 14.4328 2.58211 9 2.58211 9", stroke: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinecap: "round"
|
|
40
|
+
return (_jsxs("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, ref: ref, style: style }, restProps, htmlAttributes, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `neo4j-ai-color-gradient-light-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#0A6190" }), _jsx("stop", { offset: "1", stopColor: "#754EC8" })] }), _jsxs("linearGradient", { id: `neo4j-ai-color-gradient-dark-${uniqueId}`, x1: "9.5", y1: "1.5", x2: "19", y2: "16", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#8FE3E8" }), _jsx("stop", { offset: "1", stopColor: "#CCB4FF" })] })] }), _jsx("circle", { cx: 5.5, cy: 5.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), _jsx("circle", { cx: 18.5, cy: 18.5, r: 1.5, stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5 }), _jsx("path", { d: "M12.7885 15.6345L12 18L11.2115 15.6345C10.7636 14.2908 9.70919 13.2364 8.36546 12.7885L6 12L8.36546 11.2115C9.70919 10.7636 10.7636 9.70919 11.2115 8.36546L12 6L12.7885 8.36546C13.2364 9.70919 14.2908 10.7636 15.6345 11.2115L18 12L15.6345 12.7885C14.2908 13.2364 13.2364 14.2908 12.7885 15.6345Z", stroke: `url(#${gradientId})`, fill: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinejoin: "round" }), _jsx("path", { d: "M15 21.418C15 21.418 9.56707 23.7462 4.91039 19.0895C0.253721 14.4328 2.58211 9 2.58211 9", stroke: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinecap: "round" }), _jsx("path", { d: "M9 2.58204C9 2.58204 14.4329 0.253777 19.0896 4.9105C23.7463 9.56722 21.4179 15 21.4179 15", stroke: `url(#${gradientId})`, strokeWidth: 1.5, strokeLinecap: "round" })] })));
|
|
41
41
|
};
|
|
42
42
|
const Neo4JAiColorLightComponent = (props) => {
|
|
43
43
|
return _jsx(Neo4JAiColor, Object.assign({ theme: "light" }, props));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Neo4JAiColor.js","sourceRoot":"","sources":["../../../../src/icons/manual/Neo4JAiColor.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,OAAO,EAAE,KAAK,EAAE,MAAM,OA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CAAC,CAAC;AAIF,MAAM,0BAA0B,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3D,OAAO,KAAC,YAAY,kBAAC,KAAK,EAAC,OAAO,IAAK,KAAK,EAAI,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC1D,OAAO,KAAC,YAAY,kBAAC,KAAK,EAAC,MAAM,IAAK,KAAK,EAAI,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,QAAQ,CAAC,0BAA0B,CAAC,CAAC;AAC/D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,yBAAyB,CAAC,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,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 { type CommonProps } from '@neo4j-ndl/react/_common/types';\nimport { useId } from 'react';\n\nimport { wrapIcon } from '../wrapIcon';\n\ntype Neo4JAiColorProps = {\n theme: 'light' | 'dark';\n};\n\nconst Neo4JAiColor = ({\n theme,\n className,\n style,\n ref,\n htmlAttributes,\n ...restProps\n}: CommonProps<'svg', Neo4JAiColorProps>) => {\n const uniqueId = useId();\n const gradientId = `neo4j-ai-color-gradient-${theme}-${uniqueId}`;\n\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <defs>\n <linearGradient\n id={`neo4j-ai-color-gradient-light-${uniqueId}`}\n x1=\"9.5\"\n y1=\"1.5\"\n x2=\"19\"\n y2=\"16\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#0A6190\" />\n <stop offset=\"1\" stopColor=\"#754EC8\" />\n </linearGradient>\n <linearGradient\n id={`neo4j-ai-color-gradient-dark-${uniqueId}`}\n x1=\"9.5\"\n y1=\"1.5\"\n x2=\"19\"\n y2=\"16\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#8FE3E8\" />\n <stop offset=\"1\" stopColor=\"#CCB4FF\" />\n </linearGradient>\n </defs>\n <circle\n cx={5.5}\n cy={5.5}\n r={1.5}\n stroke={`url(#${gradientId})`}\n fill={`url(#${gradientId})`}\n strokeWidth={1.5}\n />\n <circle\n cx={18.5}\n cy={18.5}\n r={1.5}\n stroke={`url(#${gradientId})`}\n fill={`url(#${gradientId})`}\n strokeWidth={1.5}\n />\n <path\n d=\"M12.7885 15.6345L12 18L11.2115 15.6345C10.7636 14.2908 9.70919 13.2364 8.36546 12.7885L6 12L8.36546 11.2115C9.70919 10.7636 10.7636 9.70919 11.2115 8.36546L12 6L12.7885 8.36546C13.2364 9.70919 14.2908 10.7636 15.6345 11.2115L18 12L15.6345 12.7885C14.2908 13.2364 13.2364 14.2908 12.7885 15.6345Z\"\n stroke={`url(#${gradientId})`}\n fill={`url(#${gradientId})`}\n strokeWidth={1.5}\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M15 21.418C15 21.418 9.56707 23.7462 4.91039 19.0895C0.253721 14.4328 2.58211 9 2.58211 9\"\n stroke={`url(#${gradientId})`}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n />\n <path\n d=\"M9 2.58204C9 2.58204 14.4329 0.253777 19.0896 4.9105C23.7463 9.56722 21.4179 15 21.4179 15\"\n stroke={`url(#${gradientId})`}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n};\n\ntype ComponentProps = Omit<React.ComponentProps<typeof Neo4JAiColor>, 'theme'>;\n\nconst Neo4JAiColorLightComponent = (props: ComponentProps) => {\n return <Neo4JAiColor theme=\"light\" {...props} />;\n};\n\nconst Neo4JAiColorDarkComponent = (props: ComponentProps) => {\n return <Neo4JAiColor theme=\"dark\" {...props} />;\n};\n\nconst Neo4JAiColorLight = wrapIcon(Neo4JAiColorLightComponent);\nconst Neo4JAiColorDark = wrapIcon(Neo4JAiColorDarkComponent);\n\nexport { Neo4JAiColorLight, Neo4JAiColorDark };\n"]}
|
|
@@ -24,7 +24,7 @@ import { TimeZonePicker } from '@neo4j-ndl/react';
|
|
|
24
24
|
import { useState } from 'react';
|
|
25
25
|
const Component = () => {
|
|
26
26
|
const [selectedTimeZone, setSelectedTimeZone] = useState('Europe/Stockholm');
|
|
27
|
-
const [referenceDate, setReferenceDate] = useState(new Date());
|
|
27
|
+
const [referenceDate, setReferenceDate] = useState(new Date('2025-01-01'));
|
|
28
28
|
// Create summer and winter dates for DST demonstration
|
|
29
29
|
const summerDate = new Date('2024-07-15T12:00:00'); // July (DST in effect)
|
|
30
30
|
const winterDate = new Date('2024-01-15T12:00:00'); // January (Standard time)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone-picker-dst-aware.story.js","sourceRoot":"","sources":["../../../../src/timezone-picker/stories/timezone-picker-dst-aware.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAC3C,QAAQ,CAAS,kBAAkB,CAAC,CAAC;IACvC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"timezone-picker-dst-aware.story.js","sourceRoot":"","sources":["../../../../src/timezone-picker/stories/timezone-picker-dst-aware.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAC3C,QAAQ,CAAS,kBAAkB,CAAC,CAAC;IACvC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAChD,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IAEF,uDAAuD;IACvD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,uBAAuB;IAC3E,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,0BAA0B;IAE9E,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aACnE,0BACE,aAAI,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,+CAAqC,EACxE,YAAG,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,6GAG7C,IACA,EAEN,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAChE,iBACE,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAC3C,KAAK,EAAE;4BACL,OAAO,EAAE,aAAa;4BACtB,MAAM,EAAE,gBAAgB;4BACxB,YAAY,EAAE,KAAK;4BACnB,MAAM,EAAE,SAAS;4BACjB,eAAe,EAAE,aAAa,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;4BACnE,KAAK,EAAE,aAAa,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;yBACxD,4CAGM,EACT,iBACE,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAC3C,KAAK,EAAE;4BACL,OAAO,EAAE,aAAa;4BACtB,MAAM,EAAE,gBAAgB;4BACxB,YAAY,EAAE,KAAK;4BACnB,MAAM,EAAE,SAAS;4BACjB,eAAe,EAAE,aAAa,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;4BACnE,KAAK,EAAE,aAAa,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;yBACxD,+CAGM,IACL,EAEN,KAAC,cAAc,IACb,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,aAAa,GAC5B,EAEF,eACE,KAAK,EAAE;oBACL,eAAe,EAAE,SAAS;oBAC1B,YAAY,EAAE,KAAK;oBAEnB,OAAO,EAAE,MAAM;iBAChB,aAED,wBACE,kDAAmC,OAAE,gBAAgB,IACnD,EACJ,wBACE,+CAAgC,OAAE,aAAa,CAAC,kBAAkB,EAAE,IAClE,EACJ,wBACE,wCAAyB,uEAEvB,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 { TimeZonePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedTimeZone, setSelectedTimeZone] =\n useState<string>('Europe/Stockholm');\n const [referenceDate, setReferenceDate] = useState<Date>(\n new Date('2025-01-01'),\n );\n\n // Create summer and winter dates for DST demonstration\n const summerDate = new Date('2024-07-15T12:00:00'); // July (DST in effect)\n const winterDate = new Date('2024-01-15T12:00:00'); // January (Standard time)\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>\n <div>\n <h3 style={{ marginBottom: '1rem' }}>DST-Aware Timezone Picker Demo</h3>\n <p style={{ marginBottom: '1rem', color: '#666' }}>\n The timezone offsets change based on the reference date to account for\n Daylight Saving Time.\n </p>\n </div>\n\n <div style={{ display: 'flex', gap: '1rem', marginBottom: '1rem' }}>\n <button\n onClick={() => setReferenceDate(summerDate)}\n style={{\n padding: '0.5rem 1rem',\n border: '1px solid #ccc',\n borderRadius: '4px',\n cursor: 'pointer',\n backgroundColor: referenceDate === summerDate ? '#0066cc' : 'white',\n color: referenceDate === summerDate ? 'white' : 'black',\n }}\n >\n Summer Date (July 15, 2024)\n </button>\n <button\n onClick={() => setReferenceDate(winterDate)}\n style={{\n padding: '0.5rem 1rem',\n border: '1px solid #ccc',\n borderRadius: '4px',\n cursor: 'pointer',\n backgroundColor: referenceDate === winterDate ? '#0066cc' : 'white',\n color: referenceDate === winterDate ? 'white' : 'black',\n }}\n >\n Winter Date (January 15, 2024)\n </button>\n </div>\n\n <TimeZonePicker\n label=\"Select Timezone\"\n value={selectedTimeZone}\n onChange={setSelectedTimeZone}\n referenceDate={referenceDate}\n />\n\n <div\n style={{\n backgroundColor: '#f5f5f5',\n borderRadius: '4px',\n\n padding: '1rem',\n }}\n >\n <p>\n <strong>Selected Timezone:</strong> {selectedTimeZone}\n </p>\n <p>\n <strong>Reference Date:</strong> {referenceDate.toLocaleDateString()}\n </p>\n <p>\n <strong>Example:</strong> New York shows GMT-4 in summer (EDT) and\n GMT-5 in winter (EST)\n </p>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
import { autoUpdate, flip, offset, shift, useClick, useDismiss, useFloating, useFocus, useHover, useInteractions, useRole, } from '@floating-ui/react';
|
|
21
|
+
import { autoUpdate, flip, offset, safePolygon, shift, useClick, useDismiss, useFloating, useFocus, useHover, useInteractions, useRole, } from '@floating-ui/react';
|
|
22
22
|
import { createContext, useContext, useMemo, useState } from 'react';
|
|
23
23
|
export function useTooltip({ isInitialOpen = false, placement = 'top', isOpen: controlledOpen, onOpenChange: setControlledOpen, type = 'simple', isPortaled = true, strategy = 'absolute', hoverDelay = undefined, shouldCloseOnReferenceClick = false, autoUpdateOptions, } = {}) {
|
|
24
24
|
const [isUncontrolledOpen, setIsUncontrolledOpen] = useState(isInitialOpen);
|
|
@@ -48,6 +48,7 @@ export function useTooltip({ isInitialOpen = false, placement = 'top', isOpen: c
|
|
|
48
48
|
move: false,
|
|
49
49
|
delay: hoverDelay,
|
|
50
50
|
enabled: type === 'simple',
|
|
51
|
+
handleClose: safePolygon(),
|
|
51
52
|
});
|
|
52
53
|
const click = useClick(context, {
|
|
53
54
|
enabled: type === 'rich',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/use-tooltip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;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C;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAkC,EAAE;IACnE,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3C,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,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 {\n autoUpdate,\n type AutoUpdateOptions,\n flip,\n offset,\n type Placement,\n type ReferenceType,\n shift,\n useClick,\n useDismiss,\n useFloating,\n type UseFloatingOptions,\n type UseFloatingReturn,\n useFocus,\n useHover,\n useInteractions,\n type UseInteractionsReturn,\n useRole,\n} from '@floating-ui/react';\nimport { createContext, useContext, useMemo, useState } from 'react';\n\nexport interface TooltipOptions {\n isInitialOpen?: boolean;\n placement?: Placement;\n isOpen?: boolean;\n onOpenChange?: UseFloatingOptions['onOpenChange'];\n type?: 'simple' | 'rich';\n isPortaled?: boolean;\n strategy?: 'fixed' | 'absolute';\n hoverDelay?: {\n open: number;\n close: number;\n };\n shouldCloseOnReferenceClick?: boolean;\n autoUpdateOptions?: AutoUpdateOptions;\n}\n\nexport function useTooltip({\n isInitialOpen = false,\n placement = 'top',\n isOpen: controlledOpen,\n onOpenChange: setControlledOpen,\n type = 'simple',\n isPortaled = true,\n strategy = 'absolute',\n hoverDelay = undefined,\n shouldCloseOnReferenceClick = false,\n autoUpdateOptions,\n}: TooltipOptions = {}): {\n isOpen: boolean;\n setOpen: (open: boolean) => void;\n type: 'simple' | 'rich';\n isPortaled: boolean;\n} & UseInteractionsReturn &\n UseFloatingReturn<ReferenceType> {\n const [isUncontrolledOpen, setIsUncontrolledOpen] = useState(isInitialOpen);\n const isOpen = controlledOpen ?? isUncontrolledOpen;\n const setOpen = setControlledOpen ?? setIsUncontrolledOpen;\n\n const data = useFloating({\n placement,\n open: isOpen,\n onOpenChange: setOpen,\n whileElementsMounted(referenceEl, floatingEl, update) {\n const cleanup = autoUpdate(referenceEl, floatingEl, update, {\n ...autoUpdateOptions,\n });\n return cleanup;\n },\n middleware: [\n offset(5),\n flip({\n crossAxis: placement.includes('-'),\n fallbackAxisSideDirection: 'start',\n padding: 5,\n }),\n shift({ padding: 5 }),\n ],\n strategy,\n });\n\n const context = data.context;\n\n const hover = useHover(context, {\n move: false,\n delay: hoverDelay,\n enabled: type === 'simple',\n });\n const click = useClick(context, {\n enabled: type === 'rich',\n });\n const focus = useFocus(context, {\n visibleOnly: true,\n enabled: type === 'simple',\n });\n const dismiss = useDismiss(context, {\n outsidePress: true,\n escapeKey: true,\n referencePress: shouldCloseOnReferenceClick,\n });\n const role = useRole(context, {\n role: type === 'simple' ? 'tooltip' : 'dialog',\n });\n\n const interactions = useInteractions([hover, focus, dismiss, role, click]);\n\n return useMemo(\n () => ({\n isOpen,\n setOpen,\n type,\n isPortaled,\n ...interactions,\n ...data,\n }),\n [isOpen, setOpen, type, isPortaled, interactions, data],\n );\n}\n\ntype ContextType = ReturnType<typeof useTooltip> | null;\nexport const TooltipContext = createContext<ContextType>(null);\n\nexport const useTooltipContext = (): ReturnType<typeof useTooltip> => {\n const context = useContext(TooltipContext);\n\n if (context === null) {\n throw new Error('Tooltip components must be wrapped in <Tooltip />');\n }\n\n return context;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"use-tooltip.js","sourceRoot":"","sources":["../../../src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AE,IAAI,CAAC,CACxD,CAAC;AACJ,CAAC;AAGD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAc,IAAI,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAkC,EAAE;IACnE,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3C,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,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 {\n autoUpdate,\n type AutoUpdateOptions,\n flip,\n offset,\n type Placement,\n type ReferenceType,\n safePolygon,\n shift,\n useClick,\n useDismiss,\n useFloating,\n type UseFloatingOptions,\n type UseFloatingReturn,\n useFocus,\n useHover,\n useInteractions,\n type UseInteractionsReturn,\n useRole,\n} from '@floating-ui/react';\nimport { createContext, useContext, useMemo, useState } from 'react';\n\nexport interface TooltipOptions {\n isInitialOpen?: boolean;\n placement?: Placement;\n isOpen?: boolean;\n onOpenChange?: UseFloatingOptions['onOpenChange'];\n type?: 'simple' | 'rich';\n isPortaled?: boolean;\n strategy?: 'fixed' | 'absolute';\n hoverDelay?: {\n open: number;\n close: number;\n };\n shouldCloseOnReferenceClick?: boolean;\n autoUpdateOptions?: AutoUpdateOptions;\n}\n\nexport function useTooltip({\n isInitialOpen = false,\n placement = 'top',\n isOpen: controlledOpen,\n onOpenChange: setControlledOpen,\n type = 'simple',\n isPortaled = true,\n strategy = 'absolute',\n hoverDelay = undefined,\n shouldCloseOnReferenceClick = false,\n autoUpdateOptions,\n}: TooltipOptions = {}): {\n isOpen: boolean;\n setOpen: (open: boolean) => void;\n type: 'simple' | 'rich';\n isPortaled: boolean;\n} & UseInteractionsReturn &\n UseFloatingReturn<ReferenceType> {\n const [isUncontrolledOpen, setIsUncontrolledOpen] = useState(isInitialOpen);\n const isOpen = controlledOpen ?? isUncontrolledOpen;\n const setOpen = setControlledOpen ?? setIsUncontrolledOpen;\n\n const data = useFloating({\n placement,\n open: isOpen,\n onOpenChange: setOpen,\n whileElementsMounted(referenceEl, floatingEl, update) {\n const cleanup = autoUpdate(referenceEl, floatingEl, update, {\n ...autoUpdateOptions,\n });\n return cleanup;\n },\n middleware: [\n offset(5),\n flip({\n crossAxis: placement.includes('-'),\n fallbackAxisSideDirection: 'start',\n padding: 5,\n }),\n shift({ padding: 5 }),\n ],\n strategy,\n });\n\n const context = data.context;\n\n const hover = useHover(context, {\n move: false,\n delay: hoverDelay,\n enabled: type === 'simple',\n handleClose: safePolygon(),\n });\n const click = useClick(context, {\n enabled: type === 'rich',\n });\n const focus = useFocus(context, {\n visibleOnly: true,\n enabled: type === 'simple',\n });\n const dismiss = useDismiss(context, {\n outsidePress: true,\n escapeKey: true,\n referencePress: shouldCloseOnReferenceClick,\n });\n const role = useRole(context, {\n role: type === 'simple' ? 'tooltip' : 'dialog',\n });\n\n const interactions = useInteractions([hover, focus, dismiss, role, click]);\n\n return useMemo(\n () => ({\n isOpen,\n setOpen,\n type,\n isPortaled,\n ...interactions,\n ...data,\n }),\n [isOpen, setOpen, type, isPortaled, interactions, data],\n );\n}\n\ntype ContextType = ReturnType<typeof useTooltip> | null;\nexport const TooltipContext = createContext<ContextType>(null);\n\nexport const useTooltipContext = (): ReturnType<typeof useTooltip> => {\n const context = useContext(TooltipContext);\n\n if (context === null) {\n throw new Error('Tooltip components must be wrapped in <Tooltip />');\n }\n\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Neo4JAiColor.d.ts","sourceRoot":"","sources":["../../../../src/icons/manual/Neo4JAiColor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAKlE,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,gEAOnB,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"Neo4JAiColor.d.ts","sourceRoot":"","sources":["../../../../src/icons/manual/Neo4JAiColor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAKlE,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,gEAOnB,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,4CA4EvC,CAAC;AAEF,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAU/E,QAAA,MAAM,iBAAiB;;;qFARoB,cAAc;;8CAQK,CAAC;AAC/D,QAAA,MAAM,gBAAgB;;;qFALoB,cAAc;;8CAKI,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone-picker-dst-aware.story.d.ts","sourceRoot":"","sources":["../../../../src/timezone-picker/stories/timezone-picker-dst-aware.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+
|
|
1
|
+
{"version":3,"file":"timezone-picker-dst-aware.story.d.ts","sourceRoot":"","sources":["../../../../src/timezone-picker/stories/timezone-picker-dst-aware.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+CA8Ed,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tooltip.d.ts","sourceRoot":"","sources":["../../../src/tooltip/use-tooltip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAEL,KAAK,iBAAiB,EAGtB,KAAK,SAAS,EACd,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"use-tooltip.d.ts","sourceRoot":"","sources":["../../../src/tooltip/use-tooltip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAEL,KAAK,iBAAiB,EAGtB,KAAK,SAAS,EACd,KAAK,aAAa,EAMlB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAItB,KAAK,qBAAqB,EAE3B,MAAM,oBAAoB,CAAC;AAG5B,MAAM,WAAW,cAAc;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,wBAAgB,UAAU,CAAC,EACzB,aAAqB,EACrB,SAAiB,EACjB,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,iBAAiB,EAC/B,IAAe,EACf,UAAiB,EACjB,QAAqB,EACrB,UAAsB,EACtB,2BAAmC,EACnC,iBAAiB,GAClB,GAAE,cAAmB,GAAG;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,qBAAqB,GACvB,iBAAiB,CAAC,aAAa,CAAC,CAgEjC;AAED,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC;AACxD,eAAO,MAAM,cAAc,sCAAmC,CAAC;AAE/D,eAAO,MAAM,iBAAiB,QAAO,UAAU,CAAC,OAAO,UAAU,CAQhE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.9",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@tanstack/react-table": "8.21.3",
|
|
87
87
|
"react": ">=19.0.0",
|
|
88
88
|
"react-dom": ">=19.0.0",
|
|
89
|
-
"@neo4j-ndl/base": "^4.1.
|
|
89
|
+
"@neo4j-ndl/base": "^4.1.5"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@dnd-kit/core": "6.3.1",
|