@neo4j-ndl/react 5.4.2 → 5.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/button/ButtonBase.js +2 -2
- package/lib/cjs/button/ButtonBase.js.map +1 -1
- package/lib/cjs/button/stories/button-leading-icon.story.js +1 -1
- package/lib/cjs/button/stories/button-leading-icon.story.js.map +1 -1
- package/lib/cjs/button/stories/button-trailing-icon.story.js +31 -0
- package/lib/cjs/button/stories/button-trailing-icon.story.js.map +1 -0
- package/lib/cjs/button/stories/index.js +5 -1
- package/lib/cjs/button/stories/index.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
- package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/cjs/select/stories/select-async.story.js +1 -3
- package/lib/cjs/select/stories/select-async.story.js.map +1 -1
- package/lib/cjs/select/stories/select-clean.story.js +1 -3
- package/lib/cjs/select/stories/select-clean.story.js.map +1 -1
- package/lib/cjs/select/stories/select-controlled.story.js +1 -3
- package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-creatable.story.js +1 -3
- package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js +1 -3
- package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/cjs/select/stories/select-default.story.js +1 -3
- package/lib/cjs/select/stories/select-default.story.js.map +1 -1
- package/lib/cjs/select/stories/select-disabled.story.js +1 -3
- package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-empty.story.js +1 -3
- package/lib/cjs/select/stories/select-empty.story.js.map +1 -1
- package/lib/cjs/select/stories/select-error-state.story.js +1 -3
- package/lib/cjs/select/stories/select-error-state.story.js.map +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -3
- package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/cjs/select/stories/select-menu-positionings.story.js +1 -5
- package/lib/cjs/select/stories/select-menu-positionings.story.js.map +1 -1
- package/lib/cjs/select/stories/select-multi.story.js +1 -3
- package/lib/cjs/select/stories/select-multi.story.js.map +1 -1
- package/lib/cjs/select/stories/select-sizes.story.js +1 -5
- package/lib/cjs/select/stories/select-sizes.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js +3 -9
- package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js +2 -8
- package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-image.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-image.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-label.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-label.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +6 -5
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/esm/button/ButtonBase.js +2 -2
- package/lib/esm/button/ButtonBase.js.map +1 -1
- package/lib/esm/button/stories/button-leading-icon.story.js +2 -2
- package/lib/esm/button/stories/button-leading-icon.story.js.map +1 -1
- package/lib/esm/button/stories/button-trailing-icon.story.js +29 -0
- package/lib/esm/button/stories/button-trailing-icon.story.js.map +1 -0
- package/lib/esm/button/stories/index.js +3 -0
- package/lib/esm/button/stories/index.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
- package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/esm/select/stories/select-async.story.js +1 -3
- package/lib/esm/select/stories/select-async.story.js.map +1 -1
- package/lib/esm/select/stories/select-clean.story.js +1 -3
- package/lib/esm/select/stories/select-clean.story.js.map +1 -1
- package/lib/esm/select/stories/select-controlled.story.js +1 -3
- package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
- package/lib/esm/select/stories/select-creatable.story.js +1 -3
- package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js +1 -3
- package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/esm/select/stories/select-default.story.js +1 -3
- package/lib/esm/select/stories/select-default.story.js.map +1 -1
- package/lib/esm/select/stories/select-disabled.story.js +1 -3
- package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
- package/lib/esm/select/stories/select-empty.story.js +1 -3
- package/lib/esm/select/stories/select-empty.story.js.map +1 -1
- package/lib/esm/select/stories/select-error-state.story.js +1 -3
- package/lib/esm/select/stories/select-error-state.story.js.map +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js +1 -3
- package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/esm/select/stories/select-menu-positionings.story.js +1 -5
- package/lib/esm/select/stories/select-menu-positionings.story.js.map +1 -1
- package/lib/esm/select/stories/select-multi.story.js +1 -3
- package/lib/esm/select/stories/select-multi.story.js.map +1 -1
- package/lib/esm/select/stories/select-sizes.story.js +1 -5
- package/lib/esm/select/stories/select-sizes.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js +4 -10
- package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js +3 -9
- package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-icon.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-image.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-image.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-label.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-label.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +6 -5
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/types/button/ButtonBase.d.ts +3 -1
- package/lib/types/button/ButtonBase.d.ts.map +1 -1
- package/lib/types/button/stories/button-trailing-icon.story.d.ts +24 -0
- package/lib/types/button/stories/button-trailing-icon.story.d.ts.map +1 -0
- package/lib/types/button/stories/index.d.ts +2 -0
- package/lib/types/button/stories/index.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +0 -3
- package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +0 -3
- package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
- package/lib/types/select/stories/select-async.story.d.ts +1 -2
- package/lib/types/select/stories/select-async.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-clean.story.d.ts +1 -2
- package/lib/types/select/stories/select-clean.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-controlled.story.d.ts +2 -2
- package/lib/types/select/stories/select-controlled.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-creatable.story.d.ts +1 -2
- package/lib/types/select/stories/select-creatable.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-custom-label.story.d.ts +1 -2
- package/lib/types/select/stories/select-custom-label.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-default.story.d.ts +1 -2
- package/lib/types/select/stories/select-default.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-disabled.story.d.ts +1 -2
- package/lib/types/select/stories/select-disabled.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-empty.story.d.ts +1 -2
- package/lib/types/select/stories/select-empty.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-error-state.story.d.ts +1 -2
- package/lib/types/select/stories/select-error-state.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-inside-dialog.story.d.ts +1 -2
- package/lib/types/select/stories/select-inside-dialog.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-menu-positionings.story.d.ts +1 -2
- package/lib/types/select/stories/select-menu-positionings.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-multi.story.d.ts +1 -2
- package/lib/types/select/stories/select-multi.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-sizes.story.d.ts +1 -2
- package/lib/types/select/stories/select-sizes.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
- package/package.json +1 -2
- package/skills/ndl-react/SKILL.md +2 -2
- package/skills/ndl-react/components/filled-button.md +1 -0
- package/skills/ndl-react/components/outlined-button.md +1 -0
- package/skills/ndl-react/components/select.md +13 -30
- package/skills/ndl-react/components/spotlight.md +11 -75
- package/skills/ndl-react/components/text-button.md +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight-in-side-nav.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-in-side-nav.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"spotlight-in-side-nav.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-in-side-nav.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE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,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 {\n FilledButton,\n OutlinedButton,\n SideNavigation,\n Spotlight,\n SpotlightTarget,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setActiveSpotlight, setIsOpen } = useSpotlightContext();\n\n const [isSelected, setIsSelected] = useState<string | null>(\n 'aura-db-instances',\n );\n const targetId = `test-target-${themeClassName}`;\n\n const handleClick = (item: string) => {\n setIsSelected(item);\n };\n\n return (\n <div className=\"h-[500px] flex\">\n <SideNavigation isExpanded={true} ariaLabel=\"Main side navigation\">\n <SideNavigation.CategoryHeader>AuraDB</SideNavigation.CategoryHeader>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-instances')}\n isActive={isSelected === 'aura-db-instances'}\n label=\"Instances\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-connect')}\n isActive={isSelected === 'aura-db-connect'}\n label=\"Connect\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-python')}\n isActive={isSelected === 'aura-db-python'}\n label=\"Python\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SpotlightTarget\n id={targetId}\n borderRadius={4}\n indicatorVariant=\"point\"\n indicatorPlacement=\"top-right\"\n shouldRenderAsChild\n >\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-javascript')}\n isActive={isSelected === 'aura-db-javascript'}\n label=\"JavaScript\"\n />\n </SpotlightTarget>\n </SideNavigation.ListItem>\n <SideNavigation.CategoryHeader>AuraDS</SideNavigation.CategoryHeader>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-ds-instances')}\n isActive={isSelected === 'aura-ds-instances'}\n label=\"Instances\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-ds-getting-started')}\n isActive={isSelected === 'aura-ds-getting-started'}\n label=\"Getting Started\"\n />\n </SideNavigation.ListItem>\n </SideNavigation>\n <div className=\"w-full h-full flex flex-col items-center justify-center rounded-md p-token-16\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n </div>\n <Spotlight\n placement=\"top-end-top-start\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -22,18 +22,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, TextButton, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
|
|
24
24
|
import { FingerPrintIconOutline } from '@neo4j-ndl/react/icons';
|
|
25
|
-
|
|
26
|
-
const Component = (props) => {
|
|
25
|
+
const Component = () => {
|
|
27
26
|
const { themeClassName } = useNeedleTheme();
|
|
28
27
|
const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
|
|
29
28
|
const targetId = `test-target-${themeClassName}`;
|
|
30
|
-
|
|
31
|
-
if (props.isChromatic) {
|
|
32
|
-
setActiveSpotlight(targetId);
|
|
33
|
-
setIsOpen(true);
|
|
34
|
-
}
|
|
35
|
-
}, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
|
|
36
|
-
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
29
|
+
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
37
30
|
setIsOpen(false);
|
|
38
31
|
setActiveSpotlight(null);
|
|
39
32
|
}, children: "Close" }), children: [_jsx(Spotlight.IconWrapper, { children: _jsx(FingerPrintIconOutline, {}) }), _jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight-with-icon.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"spotlight-with-icon.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,gBAAgB,EAAC,QAAQ,EACzB,mBAAmB,kBAEnB,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,WAAW,cACpB,KAAC,sBAAsB,KAAG,GACJ,EACxB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { FingerPrintIconOutline } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n indicatorVariant=\"border\"\n shouldRenderAsChild\n >\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.IconWrapper>\n <FingerPrintIconOutline />\n </Spotlight.IconWrapper>\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -21,18 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
21
21
|
*/
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, TextButton, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
|
|
24
|
-
|
|
25
|
-
const Component = (props) => {
|
|
24
|
+
const Component = () => {
|
|
26
25
|
const { themeClassName } = useNeedleTheme();
|
|
27
26
|
const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
|
|
28
27
|
const targetId = `test-target-${themeClassName}`;
|
|
29
|
-
|
|
30
|
-
if (props.isChromatic) {
|
|
31
|
-
setActiveSpotlight(targetId);
|
|
32
|
-
setIsOpen(true);
|
|
33
|
-
}
|
|
34
|
-
}, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
|
|
35
|
-
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
28
|
+
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
36
29
|
setIsOpen(false);
|
|
37
30
|
setActiveSpotlight(null);
|
|
38
31
|
}, children: "Close" }), children: [_jsx(Spotlight.Image, { src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjY2NjIi8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzMzMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkV4YW1wbGUgSW1hZ2U8L3RleHQ+PC9zdmc+", alt: "example image" }), _jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight-with-image.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-image.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"spotlight-with-image.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-image.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IAAC,EAAE,EAAE,QAAQ,EAAE,mBAAmB,kBAChD,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,KAAK,IACd,GAAG,EAAC,wVAAwV,EAC5V,GAAG,EAAC,eAAe,GACnB,EACF,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget id={targetId} shouldRenderAsChild>\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Image\n src=\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjY2NjIi8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzMzMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkV4YW1wbGUgSW1hZ2U8L3RleHQ+PC9zdmc+\"\n alt=\"example image\"\n />\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -21,18 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
21
21
|
*/
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, TextButton, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
|
|
24
|
-
|
|
25
|
-
const Component = (props) => {
|
|
24
|
+
const Component = () => {
|
|
26
25
|
const { themeClassName } = useNeedleTheme();
|
|
27
26
|
const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
|
|
28
27
|
const targetId = `test-target-${themeClassName}`;
|
|
29
|
-
|
|
30
|
-
if (props.isChromatic) {
|
|
31
|
-
setActiveSpotlight(targetId);
|
|
32
|
-
setIsOpen(true);
|
|
33
|
-
}
|
|
34
|
-
}, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
|
|
35
|
-
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
28
|
+
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
36
29
|
setIsOpen(false);
|
|
37
30
|
setActiveSpotlight(null);
|
|
38
31
|
}, children: "Close" }), children: [_jsx(Spotlight.Label, { children: "NEW" }), _jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight-with-label.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-label.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"spotlight-with-label.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-label.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,gBAAgB,EAAC,QAAQ,EACzB,mBAAmB,kBAEnB,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,KAAK,sBAAsB,EACtC,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n indicatorVariant=\"border\"\n shouldRenderAsChild\n >\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Label>NEW</Spotlight.Label>\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -21,18 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
21
21
|
*/
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
|
|
24
|
-
|
|
25
|
-
const Component = (props) => {
|
|
24
|
+
const Component = () => {
|
|
26
25
|
const { themeClassName } = useNeedleTheme();
|
|
27
26
|
const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
|
|
28
27
|
const targetId = `test-target-${themeClassName}`;
|
|
29
|
-
|
|
30
|
-
if (props.isChromatic) {
|
|
31
|
-
setActiveSpotlight(targetId);
|
|
32
|
-
setIsOpen(true);
|
|
33
|
-
}
|
|
34
|
-
}, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
|
|
35
|
-
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, shouldRenderAsChild: true, indicatorVariant: "point", indicatorPlacement: "top-right", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
28
|
+
return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, shouldRenderAsChild: true, indicatorVariant: "point", indicatorPlacement: "top-right", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
|
|
36
29
|
setIsOpen(false);
|
|
37
30
|
setActiveSpotlight(null);
|
|
38
31
|
}, children: "Close" }), children: [_jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight-with-pointer.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-pointer.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"spotlight-with-pointer.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-pointer.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,mBAAmB,QACnB,gBAAgB,EAAC,OAAO,EACxB,kBAAkB,EAAC,WAAW,YAE9B,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACC,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n shouldRenderAsChild\n indicatorVariant=\"point\"\n indicatorPlacement=\"top-right\"\n >\n <FilledButton onClick={() => alert('Target button clicked')}>\n Target\n </FilledButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -138,11 +138,9 @@ export const TimeZonePicker = (_a) => {
|
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
140
|
setTimeout(() => {
|
|
141
|
-
var _a
|
|
142
|
-
(_a =
|
|
143
|
-
const selectedIndex = (_b = filteredOptions.findIndex((opt) => opt.value === value)) !== null && _b !== void 0 ? _b : 0;
|
|
141
|
+
var _a;
|
|
142
|
+
const selectedIndex = (_a = filteredOptions.findIndex((opt) => opt.value === value)) !== null && _a !== void 0 ? _a : 0;
|
|
144
143
|
setFocusedIndex(selectedIndex >= 0 ? selectedIndex : 0);
|
|
145
|
-
setSearchQuery('');
|
|
146
144
|
}, 0);
|
|
147
145
|
}
|
|
148
146
|
}, [focusedIndex, isPopoverOpen, value, setFocusedIndex, filteredOptions]);
|
|
@@ -278,8 +276,11 @@ export const TimeZonePicker = (_a) => {
|
|
|
278
276
|
if (((_a = event.relatedTarget) === null || _a === void 0 ? void 0 : _a.classList.contains('ndl-timezone-picker-popover-item')) === true) {
|
|
279
277
|
return;
|
|
280
278
|
}
|
|
281
|
-
// In UTC mode (utc or both), try to parse custom input on blur
|
|
279
|
+
// In UTC mode (utc or both), try to parse custom input on blur.
|
|
280
|
+
// An empty search query means nothing was typed since the last
|
|
281
|
+
// commit, e.g. the blur that follows selecting with Enter.
|
|
282
282
|
if ((mode === 'utc' || mode === 'both') &&
|
|
283
|
+
searchQuery !== '' &&
|
|
283
284
|
inputValue.trim().toUpperCase().startsWith('UTC')) {
|
|
284
285
|
const parsedOffset = parseCustomUTCOffset(inputValue.trim());
|
|
285
286
|
if (parsedOffset) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeZonePicker.js","sourceRoot":"","sources":["../../../src/timezone-picker/TimeZonePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,UAAU,EAEV,IAAI,EACJ,oBAAoB,EACpB,cAAc,EACd,MAAM,EACN,KAAK,EACL,IAAI,IAAI,cAAc,EACtB,UAAU,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EACL,SAAS,EACT,KAAK,EACL,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAiDjC,MAAM,CAAC,MAAM,cA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CAAC,KAAK,CAAC,CAAC;wCAC9B,CAAC;oCACH,CAAC,YAEA,MAAM,CAAC,KAAK,IA1BR,MAAM,CAAC,KAAK,CA2Bd,CACN,CAAC,CACH,CAAC,CAAC,CAAC,CACF,aAAI,SAAS,EAAC,iEAAiE,mCAE1E,CACN,GACA,CACJ,GACE,IACD,GACe,GACP,CACnB,IACA,CACJ,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 {\n autoUpdate,\n type Boundary,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n offset,\n shift,\n size as sizeMiddleware,\n useDismiss,\n useFloating,\n useInteractions,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { ChevronDownIcon } from '@heroicons/react/24/outline';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport {\n FormFieldLabel,\n FormFieldMessage,\n useFormField,\n} from '../_common/form-control';\nimport { type CommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { useNeedleTheme } from '../theme';\nimport {\n formatTimeZone,\n generateTimeZoneOptions,\n generateUTCTimeZoneOptions,\n isValidUTCFormat,\n parseCustomUTCOffset,\n} from './generate-timezone-options';\nimport {\n useKeyboardNavigation,\n useTimeZonePickerPopover,\n} from './timezone-picker-hooks';\n\nexport type TimeZonePickerProps = {\n /** The value of the timezone picker (IANA timezone identifier) */\n value?: string;\n /** Whether the timezone picker is fluid */\n isFluid?: boolean;\n /** Whether the timezone picker is read only */\n isReadOnly?: boolean;\n /** Whether the timezone picker is required */\n isRequired?: boolean;\n /** Whether the timezone picker is disabled */\n isDisabled?: boolean;\n /** The label of the timezone picker */\n label?: string;\n /** The size of the timezone picker */\n size?: 'small' | 'medium' | 'large';\n /** Assistive text displayed below the input. Replaced by `errorText` or an internal validation error while there is one */\n helpText?: React.ReactNode;\n /** Manually set the error text */\n errorText?: string;\n /** Callback function triggered when the timezone picker value changes */\n onChange?: (timezone: string) => void;\n /** Callback function triggered when the timezone picker encounters an error */\n onError?: (error: string, timezone: string) => void;\n /**\n * Strategy for the dropdown floating element.\n * By default it is absolute, but if the component is inside of a needle Dialog, it is set to fixed.\n * If this prop is set, no auto-detection of Dialog is done.\n */\n floatingStrategy?: 'absolute' | 'fixed';\n /** Whether the dropdown element is rendered in a portal. */\n isPortaled?: boolean;\n /** Reference date for calculating timezone offsets (useful for DST-aware offset display) */\n referenceDate?: Date;\n /**\n * Display mode: 'city', 'utc', or 'both'\n * 'city' - shows city-based timezones, This should be used when the user needs to select a timezone for themselves or if they are selecting a timezone that's related to a date.\n * 'utc' - shows UTC timezones, This should be used when the user needs to select a timezone for a database entry or a technical application.\n * 'both' - shows both city-based and UTC timezones in separate sections, This should be used when the user needs to select a timezone for a database entry or a technical application, but also wants to see the city-based timezones for context for example a zoned date time.\n * @default 'city'\n * @example\n * <TimeZonePicker mode=\"city\" />\n * <TimeZonePicker mode=\"utc\" />\n * <TimeZonePicker mode=\"both\" />\n */\n mode?: 'city' | 'utc' | 'both';\n};\n\nexport const TimeZonePicker = ({\n isDisabled,\n isFluid,\n isReadOnly,\n isRequired,\n value,\n label,\n onChange,\n className,\n onError,\n style,\n size = 'medium',\n helpText,\n errorText,\n htmlAttributes,\n floatingStrategy,\n isPortaled: isPortaledProp,\n referenceDate,\n mode = 'city',\n ref,\n ...restProps\n}: CommonProps<'input', TimeZonePickerProps>) => {\n const [inputValue, setInputValue] = useState<string>(\n value\n ? formatTimeZone(value, referenceDate)\n : formatTimeZone(\n new Date().toISOString().split('T')[1].split('.')[0],\n referenceDate,\n ),\n );\n const [searchQuery, setSearchQuery] = useState<string>('');\n const listRef = useRef<HTMLUListElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => inputRef.current as HTMLInputElement, []);\n const [error, setError] = useState<string | undefined>(undefined);\n const listboxId = useId();\n\n const timezoneOptions = useMemo(() => {\n if (mode === 'utc') {\n return generateUTCTimeZoneOptions(referenceDate);\n } else if (mode === 'city') {\n return generateTimeZoneOptions(referenceDate);\n } else {\n // 'both' mode - combine both lists, excluding UTC from city list to avoid duplication\n return [\n ...generateUTCTimeZoneOptions(referenceDate),\n ...generateTimeZoneOptions(referenceDate, true), // excludeUTC = true\n ];\n }\n }, [referenceDate, mode]);\n\n const { themeClassName } = useNeedleTheme();\n const { isPopoverOpen, setIsPopoverOpen } = useTimeZonePickerPopover(false);\n\n // Filter options based on search query\n const filteredOptions = useMemo(() => {\n if (!searchQuery) {\n return timezoneOptions;\n }\n\n const query = searchQuery.toLowerCase();\n return timezoneOptions.filter(\n (option) =>\n option.label.toLowerCase().includes(query) ||\n option.value.toLowerCase().includes(query),\n );\n }, [timezoneOptions, searchQuery]);\n\n // Split options into UTC and city-based sections for 'both' mode\n const { utcOptions, cityOptions } = useMemo(() => {\n if (mode !== 'both') {\n return { cityOptions: filteredOptions, utcOptions: [] };\n }\n\n const utc: typeof filteredOptions = [];\n const city: typeof filteredOptions = [];\n\n filteredOptions.forEach((option) => {\n // UTC options are those that start with \"UTC\" in their value or label\n if (\n option.value.toUpperCase().startsWith('UTC') ||\n option.label.toUpperCase().startsWith('UTC')\n ) {\n utc.push(option);\n } else {\n city.push(option);\n }\n });\n\n return { cityOptions: city, utcOptions: utc };\n }, [filteredOptions, mode]);\n\n const { focusedIndex, setFocusedIndex, handleArrowNavigation } =\n useKeyboardNavigation(filteredOptions.length);\n\n const errorToShow =\n errorText !== undefined && errorText !== '' ? errorText : error;\n // The shared form field resolves the ids and which message is displayed -\n // an error, set manually or by internal validation, replaces the help text.\n const { field, controlProps } = useFormField({\n errorText: errorToShow,\n helpText,\n isRequired,\n label,\n });\n\n const classes = {\n 'ndl-disabled': isDisabled,\n 'ndl-error': errorToShow !== undefined,\n 'ndl-fluid': isFluid,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n };\n\n const inputWidth = isFluid === true ? '100%' : '16rem';\n\n useEffect(() => {\n if (error !== undefined) {\n onError?.(error, inputValue);\n }\n }, [error, inputValue, onError]);\n\n useEffect(() => {\n setInputValue(value ? formatTimeZone(value, referenceDate) : '');\n }, [value, referenceDate]);\n\n useEffect(() => {\n if (isPopoverOpen) {\n setTimeout(() => {\n listRef.current?.children[focusedIndex]?.scrollIntoView({\n block: 'center',\n inline: 'nearest',\n });\n }, 0);\n } else {\n setTimeout(() => {\n inputRef.current?.blur();\n const selectedIndex =\n filteredOptions.findIndex((opt) => opt.value === value) ?? 0;\n setFocusedIndex(selectedIndex >= 0 ? selectedIndex : 0);\n setSearchQuery('');\n }, 0);\n }\n }, [focusedIndex, isPopoverOpen, value, setFocusedIndex, filteredOptions]);\n\n const handleOnClick = (timezone: string) => {\n if (onChange) {\n onChange(timezone);\n }\n setError(undefined);\n setInputValue(formatTimeZone(timezone, referenceDate));\n setIsPopoverOpen(false);\n setSearchQuery('');\n };\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const query = event.target.value;\n setSearchQuery(query);\n setInputValue(query);\n\n // In UTC mode (utc or both), validate custom UTC input\n if (\n (mode === 'utc' || mode === 'both') &&\n query.trim().toUpperCase().startsWith('UTC')\n ) {\n if (isValidUTCFormat(query.trim())) {\n setError(undefined);\n } else {\n setError('Invalid UTC format. Use UTC+H:MM or UTC-H:MM');\n }\n return;\n }\n\n // Try to find a matching timezone\n const matchingOption = timezoneOptions.find(\n (opt) =>\n opt.label.toLowerCase().includes(query.toLowerCase()) ||\n opt.value.toLowerCase().includes(query.toLowerCase()),\n );\n\n if (matchingOption) {\n setError(undefined);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (isReadOnly === true || isDisabled === true) {\n event.preventDefault();\n return;\n }\n\n if (event.key === 'Escape') {\n setIsPopoverOpen(false);\n setSearchQuery('');\n setInputValue(value ? formatTimeZone(value, referenceDate) : '');\n }\n\n setIsPopoverOpen(true);\n\n if (event.key === 'Enter') {\n // In UTC mode (utc or both), allow custom UTC input\n if (\n (mode === 'utc' || mode === 'both') &&\n inputValue.trim().toUpperCase().startsWith('UTC')\n ) {\n const parsedOffset = parseCustomUTCOffset(inputValue.trim());\n if (parsedOffset) {\n handleOnClick(parsedOffset);\n return;\n }\n }\n\n if (filteredOptions.length > 0) {\n const selectedOption = filteredOptions[focusedIndex];\n if (selectedOption) {\n handleOnClick(selectedOption.value);\n }\n }\n } else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n event.preventDefault();\n handleArrowNavigation(event.key);\n }\n };\n\n /** Custom floating ui solution */\n const isInsideDialog = useIsInsideDialog();\n const isPortaled = isPortaledProp ?? !isInsideDialog;\n // Inside a Dialog the popover is fixed and not portaled. A transformed\n // ancestor (e.g. Popover) can make Floating UI under-measure available\n // space, so use the viewport as the boundary instead.\n const floatingBoundary: Boundary = isInsideDialog ? [] : 'clippingAncestors';\n const containerRef = useRef<HTMLDivElement>(null);\n const { refs, floatingStyles, context } = useFloating({\n elements: {\n reference: containerRef.current,\n },\n middleware: [\n offset(10),\n flip({\n fallbackPlacements: ['top'],\n fallbackStrategy: 'bestFit',\n }),\n shift({ boundary: floatingBoundary, padding: 5 }),\n sizeMiddleware({\n apply({ availableHeight, elements }) {\n Object.assign(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n });\n },\n boundary: floatingBoundary,\n padding: 5,\n }),\n ],\n onOpenChange: (open) => {\n setIsPopoverOpen(open);\n },\n open: isDisabled !== true && isReadOnly !== true && isPopoverOpen,\n placement: 'bottom',\n strategy: floatingStrategy ?? (isInsideDialog ? 'fixed' : 'absolute'),\n whileElementsMounted: autoUpdate,\n });\n const dismiss = useDismiss(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n const mergedRef = useMergeRefs([refs.setReference, containerRef]);\n\n return (\n <>\n <div\n className={classNames('ndl-timezone-picker', className, {\n ...classes,\n })}\n ref={mergedRef}\n {...getReferenceProps()}\n style={{\n width: isFluid === true ? '100%' : 'fit-content',\n }}\n >\n <label className=\"ndl-timezone-picker-label\">\n {label !== undefined && (\n <FormFieldLabel field={field} size={size} association=\"implicit\" />\n )}\n <div\n className=\"ndl-timezone-picker-input-wrapper\"\n style={{\n width: inputWidth,\n ...style,\n }}\n >\n <input\n role=\"combobox\"\n aria-expanded={isPopoverOpen}\n aria-controls={listboxId}\n aria-activedescendant={\n isPopoverOpen && focusedIndex >= 0\n ? `${listboxId}-option-${focusedIndex}`\n : undefined\n }\n aria-label={label}\n {...controlProps}\n className=\"ndl-timezone-picker-input\"\n type=\"text\"\n ref={inputRef}\n value={inputValue}\n disabled={isDisabled}\n readOnly={isReadOnly}\n required={isRequired}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n onClick={(event) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n setIsPopoverOpen(true);\n // Select all text on click for easy searching\n event.currentTarget.select();\n }}\n onFocus={(event) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n // Select all text on focus for easy searching\n event.currentTarget.select();\n }}\n onBlur={(event) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n\n if (\n event.relatedTarget?.classList.contains(\n 'ndl-timezone-picker-popover-item',\n ) === true\n ) {\n return;\n }\n\n // In UTC mode (utc or both), try to parse custom input on blur\n if (\n (mode === 'utc' || mode === 'both') &&\n inputValue.trim().toUpperCase().startsWith('UTC')\n ) {\n const parsedOffset = parseCustomUTCOffset(inputValue.trim());\n if (parsedOffset) {\n handleOnClick(parsedOffset);\n setError(undefined);\n return;\n }\n }\n\n // Reset to the current value if no valid selection was made\n if (value) {\n setInputValue(formatTimeZone(value, referenceDate));\n } else {\n setInputValue('');\n }\n setSearchQuery('');\n setError(undefined);\n }}\n placeholder={\n mode === 'city'\n ? 'Select timezone'\n : mode === 'utc'\n ? 'Select or type UTC offset (e.g., UTC+5:30)'\n : 'Select timezone or type UTC offset'\n }\n {...htmlAttributes}\n {...restProps}\n />\n <ChevronDownIcon className=\"ndl-icon-svg ndl-timezone-picker-icon\" />\n </div>\n </label>\n <FormFieldMessage field={field} size={size} />\n </div>\n\n {context.open && (\n <ConditionalWrap\n shouldWrap={isPortaled}\n wrap={(wrapChildren) => (\n <FloatingPortal>{wrapChildren}</FloatingPortal>\n )}\n >\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n >\n <div\n ref={refs.setFloating}\n className={classNames(\n themeClassName,\n 'ndl-timezone-picker-popover',\n {\n ...classes,\n },\n )}\n style={{\n ...transitionStyles,\n ...floatingStyles,\n width:\n isFluid === true\n ? containerRef.current?.clientWidth\n : undefined,\n }}\n {...getFloatingProps()}\n >\n <ul ref={listRef} role=\"listbox\" id={listboxId} tabIndex={-1}>\n {mode === 'both' ? (\n <>\n {utcOptions.length > 0 && (\n <>\n <li className=\"ndl-timezone-picker-section-header\">\n UTC Offsets\n </li>\n {utcOptions.map((option, index) => (\n <li\n id={`${listboxId}-option-${index}`}\n key={option.value}\n role=\"option\"\n aria-selected={value === option.value}\n value={option.value}\n onClick={(event) => {\n event.stopPropagation();\n event.preventDefault();\n handleOnClick(option.value);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(event) => {\n event.stopPropagation();\n event.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === index ? 'focused' : '',\n 'ndl-timezone-picker-popover-item',\n )}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n handleOnClick(option.value);\n }\n }}\n >\n {option.label}\n </li>\n ))}\n </>\n )}\n {cityOptions.length > 0 && (\n <>\n <li className=\"ndl-timezone-picker-section-header\">\n City-Based Timezones\n </li>\n {cityOptions.map((option, index) => {\n const adjustedIndex = index + utcOptions.length;\n return (\n <li\n id={`${listboxId}-option-${adjustedIndex}`}\n key={option.value}\n role=\"option\"\n aria-selected={value === option.value}\n value={option.value}\n onClick={(event) => {\n event.stopPropagation();\n event.preventDefault();\n handleOnClick(option.value);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(event) => {\n event.stopPropagation();\n event.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === adjustedIndex ? 'focused' : '',\n 'ndl-timezone-picker-popover-item',\n )}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n handleOnClick(option.value);\n }\n }}\n >\n {option.label}\n </li>\n );\n })}\n </>\n )}\n {utcOptions.length === 0 && cityOptions.length === 0 && (\n <li className=\"ndl-timezone-picker-popover-item ndl-timezone-picker-no-results\">\n No timezones found\n </li>\n )}\n </>\n ) : (\n <>\n {filteredOptions.length > 0 ? (\n filteredOptions.map((option, index) => (\n <li\n id={`${listboxId}-option-${index}`}\n key={option.value}\n role=\"option\"\n aria-selected={value === option.value}\n value={option.value}\n onClick={(event) => {\n event.stopPropagation();\n event.preventDefault();\n handleOnClick(option.value);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(event) => {\n event.stopPropagation();\n event.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === index ? 'focused' : '',\n 'ndl-timezone-picker-popover-item',\n )}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n handleOnClick(option.value);\n }\n }}\n >\n {option.label}\n </li>\n ))\n ) : (\n <li className=\"ndl-timezone-picker-popover-item ndl-timezone-picker-no-results\">\n No timezones found\n </li>\n )}\n </>\n )}\n </ul>\n </div>\n </FloatingFocusManager>\n </ConditionalWrap>\n )}\n </>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TimeZonePicker.js","sourceRoot":"","sources":["../../../src/timezone-picker/TimeZonePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,UAAU,EAEV,IAAI,EACJ,oBAAoB,EACpB,cAAc,EACd,MAAM,EACN,KAAK,EACL,IAAI,IAAI,cAAc,EACtB,UAAU,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EACL,SAAS,EACT,KAAK,EACL,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAiDjC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EA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A,MAAM,CAAC,KAAK,IA1BR,MAAM,CAAC,KAAK,CA2Bd,CACN,CAAC,CACH,CAAC,CAAC,CAAC,CACF,aAAI,SAAS,EAAC,iEAAiE,mCAE1E,CACN,GACA,CACJ,GACE,IACD,GACe,GACP,CACnB,IACA,CACJ,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 {\n autoUpdate,\n type Boundary,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n offset,\n shift,\n size as sizeMiddleware,\n useDismiss,\n useFloating,\n useInteractions,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { ChevronDownIcon } from '@heroicons/react/24/outline';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport {\n FormFieldLabel,\n FormFieldMessage,\n useFormField,\n} from '../_common/form-control';\nimport { type CommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { useNeedleTheme } from '../theme';\nimport {\n formatTimeZone,\n generateTimeZoneOptions,\n generateUTCTimeZoneOptions,\n isValidUTCFormat,\n parseCustomUTCOffset,\n} from './generate-timezone-options';\nimport {\n useKeyboardNavigation,\n useTimeZonePickerPopover,\n} from './timezone-picker-hooks';\n\nexport type TimeZonePickerProps = {\n /** The value of the timezone picker (IANA timezone identifier) */\n value?: string;\n /** Whether the timezone picker is fluid */\n isFluid?: boolean;\n /** Whether the timezone picker is read only */\n isReadOnly?: boolean;\n /** Whether the timezone picker is required */\n isRequired?: boolean;\n /** Whether the timezone picker is disabled */\n isDisabled?: boolean;\n /** The label of the timezone picker */\n label?: string;\n /** The size of the timezone picker */\n size?: 'small' | 'medium' | 'large';\n /** Assistive text displayed below the input. Replaced by `errorText` or an internal validation error while there is one */\n helpText?: React.ReactNode;\n /** Manually set the error text */\n errorText?: string;\n /** Callback function triggered when the timezone picker value changes */\n onChange?: (timezone: string) => void;\n /** Callback function triggered when the timezone picker encounters an error */\n onError?: (error: string, timezone: string) => void;\n /**\n * Strategy for the dropdown floating element.\n * By default it is absolute, but if the component is inside of a needle Dialog, it is set to fixed.\n * If this prop is set, no auto-detection of Dialog is done.\n */\n floatingStrategy?: 'absolute' | 'fixed';\n /** Whether the dropdown element is rendered in a portal. */\n isPortaled?: boolean;\n /** Reference date for calculating timezone offsets (useful for DST-aware offset display) */\n referenceDate?: Date;\n /**\n * Display mode: 'city', 'utc', or 'both'\n * 'city' - shows city-based timezones, This should be used when the user needs to select a timezone for themselves or if they are selecting a timezone that's related to a date.\n * 'utc' - shows UTC timezones, This should be used when the user needs to select a timezone for a database entry or a technical application.\n * 'both' - shows both city-based and UTC timezones in separate sections, This should be used when the user needs to select a timezone for a database entry or a technical application, but also wants to see the city-based timezones for context for example a zoned date time.\n * @default 'city'\n * @example\n * <TimeZonePicker mode=\"city\" />\n * <TimeZonePicker mode=\"utc\" />\n * <TimeZonePicker mode=\"both\" />\n */\n mode?: 'city' | 'utc' | 'both';\n};\n\nexport const TimeZonePicker = ({\n isDisabled,\n isFluid,\n isReadOnly,\n isRequired,\n value,\n label,\n onChange,\n className,\n onError,\n style,\n size = 'medium',\n helpText,\n errorText,\n htmlAttributes,\n floatingStrategy,\n isPortaled: isPortaledProp,\n referenceDate,\n mode = 'city',\n ref,\n ...restProps\n}: CommonProps<'input', TimeZonePickerProps>) => {\n const [inputValue, setInputValue] = useState<string>(\n value\n ? formatTimeZone(value, referenceDate)\n : formatTimeZone(\n new Date().toISOString().split('T')[1].split('.')[0],\n referenceDate,\n ),\n );\n const [searchQuery, setSearchQuery] = useState<string>('');\n const listRef = useRef<HTMLUListElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => inputRef.current as HTMLInputElement, []);\n const [error, setError] = useState<string | undefined>(undefined);\n const listboxId = useId();\n\n const timezoneOptions = useMemo(() => {\n if (mode === 'utc') {\n return generateUTCTimeZoneOptions(referenceDate);\n } else if (mode === 'city') {\n return generateTimeZoneOptions(referenceDate);\n } else {\n // 'both' mode - combine both lists, excluding UTC from city list to avoid duplication\n return [\n ...generateUTCTimeZoneOptions(referenceDate),\n ...generateTimeZoneOptions(referenceDate, true), // excludeUTC = true\n ];\n }\n }, [referenceDate, mode]);\n\n const { themeClassName } = useNeedleTheme();\n const { isPopoverOpen, setIsPopoverOpen } = useTimeZonePickerPopover(false);\n\n // Filter options based on search query\n const filteredOptions = useMemo(() => {\n if (!searchQuery) {\n return timezoneOptions;\n }\n\n const query = searchQuery.toLowerCase();\n return timezoneOptions.filter(\n (option) =>\n option.label.toLowerCase().includes(query) ||\n option.value.toLowerCase().includes(query),\n );\n }, [timezoneOptions, searchQuery]);\n\n // Split options into UTC and city-based sections for 'both' mode\n const { utcOptions, cityOptions } = useMemo(() => {\n if (mode !== 'both') {\n return { cityOptions: filteredOptions, utcOptions: [] };\n }\n\n const utc: typeof filteredOptions = [];\n const city: typeof filteredOptions = [];\n\n filteredOptions.forEach((option) => {\n // UTC options are those that start with \"UTC\" in their value or label\n if (\n option.value.toUpperCase().startsWith('UTC') ||\n option.label.toUpperCase().startsWith('UTC')\n ) {\n utc.push(option);\n } else {\n city.push(option);\n }\n });\n\n return { cityOptions: city, utcOptions: utc };\n }, [filteredOptions, mode]);\n\n const { focusedIndex, setFocusedIndex, handleArrowNavigation } =\n useKeyboardNavigation(filteredOptions.length);\n\n const errorToShow =\n errorText !== undefined && errorText !== '' ? errorText : error;\n // The shared form field resolves the ids and which message is displayed -\n // an error, set manually or by internal validation, replaces the help text.\n const { field, controlProps } = useFormField({\n errorText: errorToShow,\n helpText,\n isRequired,\n label,\n });\n\n const classes = {\n 'ndl-disabled': isDisabled,\n 'ndl-error': errorToShow !== undefined,\n 'ndl-fluid': isFluid,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n };\n\n const inputWidth = isFluid === true ? '100%' : '16rem';\n\n useEffect(() => {\n if (error !== undefined) {\n onError?.(error, inputValue);\n }\n }, [error, inputValue, onError]);\n\n useEffect(() => {\n setInputValue(value ? formatTimeZone(value, referenceDate) : '');\n }, [value, referenceDate]);\n\n useEffect(() => {\n if (isPopoverOpen) {\n setTimeout(() => {\n listRef.current?.children[focusedIndex]?.scrollIntoView({\n block: 'center',\n inline: 'nearest',\n });\n }, 0);\n } else {\n setTimeout(() => {\n const selectedIndex =\n filteredOptions.findIndex((opt) => opt.value === value) ?? 0;\n setFocusedIndex(selectedIndex >= 0 ? selectedIndex : 0);\n }, 0);\n }\n }, [focusedIndex, isPopoverOpen, value, setFocusedIndex, filteredOptions]);\n\n const handleOnClick = (timezone: string) => {\n if (onChange) {\n onChange(timezone);\n }\n setError(undefined);\n setInputValue(formatTimeZone(timezone, referenceDate));\n setIsPopoverOpen(false);\n setSearchQuery('');\n };\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const query = event.target.value;\n setSearchQuery(query);\n setInputValue(query);\n\n // In UTC mode (utc or both), validate custom UTC input\n if (\n (mode === 'utc' || mode === 'both') &&\n query.trim().toUpperCase().startsWith('UTC')\n ) {\n if (isValidUTCFormat(query.trim())) {\n setError(undefined);\n } else {\n setError('Invalid UTC format. Use UTC+H:MM or UTC-H:MM');\n }\n return;\n }\n\n // Try to find a matching timezone\n const matchingOption = timezoneOptions.find(\n (opt) =>\n opt.label.toLowerCase().includes(query.toLowerCase()) ||\n opt.value.toLowerCase().includes(query.toLowerCase()),\n );\n\n if (matchingOption) {\n setError(undefined);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (isReadOnly === true || isDisabled === true) {\n event.preventDefault();\n return;\n }\n\n if (event.key === 'Escape') {\n setIsPopoverOpen(false);\n setSearchQuery('');\n setInputValue(value ? formatTimeZone(value, referenceDate) : '');\n }\n\n setIsPopoverOpen(true);\n\n if (event.key === 'Enter') {\n // In UTC mode (utc or both), allow custom UTC input\n if (\n (mode === 'utc' || mode === 'both') &&\n inputValue.trim().toUpperCase().startsWith('UTC')\n ) {\n const parsedOffset = parseCustomUTCOffset(inputValue.trim());\n if (parsedOffset) {\n handleOnClick(parsedOffset);\n return;\n }\n }\n\n if (filteredOptions.length > 0) {\n const selectedOption = filteredOptions[focusedIndex];\n if (selectedOption) {\n handleOnClick(selectedOption.value);\n }\n }\n } else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n event.preventDefault();\n handleArrowNavigation(event.key);\n }\n };\n\n /** Custom floating ui solution */\n const isInsideDialog = useIsInsideDialog();\n const isPortaled = isPortaledProp ?? !isInsideDialog;\n // Inside a Dialog the popover is fixed and not portaled. A transformed\n // ancestor (e.g. Popover) can make Floating UI under-measure available\n // space, so use the viewport as the boundary instead.\n const floatingBoundary: Boundary = isInsideDialog ? [] : 'clippingAncestors';\n const containerRef = useRef<HTMLDivElement>(null);\n const { refs, floatingStyles, context } = useFloating({\n elements: {\n reference: containerRef.current,\n },\n middleware: [\n offset(10),\n flip({\n fallbackPlacements: ['top'],\n fallbackStrategy: 'bestFit',\n }),\n shift({ boundary: floatingBoundary, padding: 5 }),\n sizeMiddleware({\n apply({ availableHeight, elements }) {\n Object.assign(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n });\n },\n boundary: floatingBoundary,\n padding: 5,\n }),\n ],\n onOpenChange: (open) => {\n setIsPopoverOpen(open);\n },\n open: isDisabled !== true && isReadOnly !== true && isPopoverOpen,\n placement: 'bottom',\n strategy: floatingStrategy ?? (isInsideDialog ? 'fixed' : 'absolute'),\n whileElementsMounted: autoUpdate,\n });\n const dismiss = useDismiss(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n const mergedRef = useMergeRefs([refs.setReference, containerRef]);\n\n return (\n <>\n <div\n className={classNames('ndl-timezone-picker', className, {\n ...classes,\n })}\n ref={mergedRef}\n {...getReferenceProps()}\n style={{\n width: isFluid === true ? '100%' : 'fit-content',\n }}\n >\n <label className=\"ndl-timezone-picker-label\">\n {label !== undefined && (\n <FormFieldLabel field={field} size={size} association=\"implicit\" />\n )}\n <div\n className=\"ndl-timezone-picker-input-wrapper\"\n style={{\n width: inputWidth,\n ...style,\n }}\n >\n <input\n role=\"combobox\"\n aria-expanded={isPopoverOpen}\n aria-controls={listboxId}\n aria-activedescendant={\n isPopoverOpen && focusedIndex >= 0\n ? `${listboxId}-option-${focusedIndex}`\n : undefined\n }\n aria-label={label}\n {...controlProps}\n className=\"ndl-timezone-picker-input\"\n type=\"text\"\n ref={inputRef}\n value={inputValue}\n disabled={isDisabled}\n readOnly={isReadOnly}\n required={isRequired}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n onClick={(event) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n setIsPopoverOpen(true);\n // Select all text on click for easy searching\n event.currentTarget.select();\n }}\n onFocus={(event) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n // Select all text on focus for easy searching\n event.currentTarget.select();\n }}\n onBlur={(event) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n\n if (\n event.relatedTarget?.classList.contains(\n 'ndl-timezone-picker-popover-item',\n ) === true\n ) {\n return;\n }\n\n // In UTC mode (utc or both), try to parse custom input on blur.\n // An empty search query means nothing was typed since the last\n // commit, e.g. the blur that follows selecting with Enter.\n if (\n (mode === 'utc' || mode === 'both') &&\n searchQuery !== '' &&\n inputValue.trim().toUpperCase().startsWith('UTC')\n ) {\n const parsedOffset = parseCustomUTCOffset(inputValue.trim());\n if (parsedOffset) {\n handleOnClick(parsedOffset);\n setError(undefined);\n return;\n }\n }\n\n // Reset to the current value if no valid selection was made\n if (value) {\n setInputValue(formatTimeZone(value, referenceDate));\n } else {\n setInputValue('');\n }\n setSearchQuery('');\n setError(undefined);\n }}\n placeholder={\n mode === 'city'\n ? 'Select timezone'\n : mode === 'utc'\n ? 'Select or type UTC offset (e.g., UTC+5:30)'\n : 'Select timezone or type UTC offset'\n }\n {...htmlAttributes}\n {...restProps}\n />\n <ChevronDownIcon className=\"ndl-icon-svg ndl-timezone-picker-icon\" />\n </div>\n </label>\n <FormFieldMessage field={field} size={size} />\n </div>\n\n {context.open && (\n <ConditionalWrap\n shouldWrap={isPortaled}\n wrap={(wrapChildren) => (\n <FloatingPortal>{wrapChildren}</FloatingPortal>\n )}\n >\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n >\n <div\n ref={refs.setFloating}\n className={classNames(\n themeClassName,\n 'ndl-timezone-picker-popover',\n {\n ...classes,\n },\n )}\n style={{\n ...transitionStyles,\n ...floatingStyles,\n width:\n isFluid === true\n ? containerRef.current?.clientWidth\n : undefined,\n }}\n {...getFloatingProps()}\n >\n <ul ref={listRef} role=\"listbox\" id={listboxId} tabIndex={-1}>\n {mode === 'both' ? (\n <>\n {utcOptions.length > 0 && (\n <>\n <li className=\"ndl-timezone-picker-section-header\">\n UTC Offsets\n </li>\n {utcOptions.map((option, index) => (\n <li\n id={`${listboxId}-option-${index}`}\n key={option.value}\n role=\"option\"\n aria-selected={value === option.value}\n value={option.value}\n onClick={(event) => {\n event.stopPropagation();\n event.preventDefault();\n handleOnClick(option.value);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(event) => {\n event.stopPropagation();\n event.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === index ? 'focused' : '',\n 'ndl-timezone-picker-popover-item',\n )}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n handleOnClick(option.value);\n }\n }}\n >\n {option.label}\n </li>\n ))}\n </>\n )}\n {cityOptions.length > 0 && (\n <>\n <li className=\"ndl-timezone-picker-section-header\">\n City-Based Timezones\n </li>\n {cityOptions.map((option, index) => {\n const adjustedIndex = index + utcOptions.length;\n return (\n <li\n id={`${listboxId}-option-${adjustedIndex}`}\n key={option.value}\n role=\"option\"\n aria-selected={value === option.value}\n value={option.value}\n onClick={(event) => {\n event.stopPropagation();\n event.preventDefault();\n handleOnClick(option.value);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(event) => {\n event.stopPropagation();\n event.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === adjustedIndex ? 'focused' : '',\n 'ndl-timezone-picker-popover-item',\n )}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n handleOnClick(option.value);\n }\n }}\n >\n {option.label}\n </li>\n );\n })}\n </>\n )}\n {utcOptions.length === 0 && cityOptions.length === 0 && (\n <li className=\"ndl-timezone-picker-popover-item ndl-timezone-picker-no-results\">\n No timezones found\n </li>\n )}\n </>\n ) : (\n <>\n {filteredOptions.length > 0 ? (\n filteredOptions.map((option, index) => (\n <li\n id={`${listboxId}-option-${index}`}\n key={option.value}\n role=\"option\"\n aria-selected={value === option.value}\n value={option.value}\n onClick={(event) => {\n event.stopPropagation();\n event.preventDefault();\n handleOnClick(option.value);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(event) => {\n event.stopPropagation();\n event.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === index ? 'focused' : '',\n 'ndl-timezone-picker-popover-item',\n )}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n handleOnClick(option.value);\n }\n }}\n >\n {option.label}\n </li>\n ))\n ) : (\n <li className=\"ndl-timezone-picker-popover-item ndl-timezone-picker-no-results\">\n No timezones found\n </li>\n )}\n </>\n )}\n </ul>\n </div>\n </FloatingFocusManager>\n </ConditionalWrap>\n )}\n </>\n );\n};\n"]}
|
|
@@ -33,6 +33,8 @@ export type CommonButtonProps = {
|
|
|
33
33
|
children?: React.ReactNode;
|
|
34
34
|
/** Icon to display before the button content */
|
|
35
35
|
leadingVisual?: React.ReactNode;
|
|
36
|
+
/** Icon to display after the button content */
|
|
37
|
+
trailingVisual?: React.ReactNode;
|
|
36
38
|
/** If the button is doing something Async, it will display a loading spinner */
|
|
37
39
|
isLoading?: boolean;
|
|
38
40
|
/** If the button is in disabled state */
|
|
@@ -72,6 +74,6 @@ type ButtonBaseProps = CommonButtonProps & {
|
|
|
72
74
|
/** fill of the button */
|
|
73
75
|
buttonFill?: 'filled' | 'outlined' | 'text';
|
|
74
76
|
};
|
|
75
|
-
export declare const ButtonBase: <T extends React.ElementType = "button">({ as, buttonFill, children, className, variant, htmlAttributes, isDisabled, isFloating, isFluid, isLoading, leadingVisual, onClick, ref, size, style, type, loadingMessage, ...restProps }: PolymorphicCommonProps<T, ButtonBaseProps>) => import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
export declare const ButtonBase: <T extends React.ElementType = "button">({ as, buttonFill, children, className, variant, htmlAttributes, isDisabled, isFloating, isFluid, isLoading, leadingVisual, trailingVisual, onClick, ref, size, style, type, loadingMessage, ...restProps }: PolymorphicCommonProps<T, ButtonBaseProps>) => import("react/jsx-runtime").JSX.Element;
|
|
76
78
|
export {};
|
|
77
79
|
//# sourceMappingURL=ButtonBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../src/button/ButtonBase.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,KAA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W,CAAC;IACnB,uBAAuB;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC3E,yBAAyB;IACzB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACpE,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;;;GAGC,GAAG,CACF;IACE,EAAE,EAAE,GAAG,CAAC;IACR,qDAAqD;IACrD,IAAI,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;CACxC,GACD;IACE,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,CACJ,CAAC;AAEF,KAAK,eAAe,GAAG,iBAAiB,GAAG;IACzC,yCAAyC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,yBAAyB;IACzB,UAAU,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAAE,4MAoBhE,sBAAsB,CAAC,CAAC,EAAE,eAAe,CAAC,4CA4D5C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Component;
|
|
24
|
+
//# sourceMappingURL=button-trailing-icon.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-trailing-icon.story.d.ts","sourceRoot":"","sources":["../../../../src/button/stories/button-trailing-icon.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+CAMd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
export { default as ButtonSizes } from './button-sizes.story';
|
|
22
22
|
export { default as ButtonLeadingIcon } from './button-leading-icon.story';
|
|
23
|
+
export { default as ButtonTrailingIcon } from './button-trailing-icon.story';
|
|
23
24
|
export { default as ButtonFluid } from './button-fluid.story';
|
|
24
25
|
export { default as ButtonVariants } from './button-variants.story';
|
|
25
26
|
export { default as ButtonLoading } from './button-loading.story';
|
|
@@ -28,6 +29,7 @@ export { default as ButtonFloating } from './button-floating.story';
|
|
|
28
29
|
export { default as ButtonRunningCancel } from './button-running-cancel.story';
|
|
29
30
|
export declare const ButtonSizesSrc: string;
|
|
30
31
|
export declare const ButtonLeadingIconSrc: string;
|
|
32
|
+
export declare const ButtonTrailingIconSrc: string;
|
|
31
33
|
export declare const ButtonFluidSrc: string;
|
|
32
34
|
export declare const ButtonVariantsSrc: string;
|
|
33
35
|
export declare const ButtonLoadingSrc: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/button/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/button/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAa/E,eAAO,MAAM,cAAc,QAAyC,CAAC;AACrE,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,cAAc,QAAyC,CAAC;AACrE,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAA2C,CAAC;AACzE,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,sBAAsB,QAElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datagrid-pinned-columns.stories.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-pinned-columns.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC
|
|
1
|
+
{"version":3,"file":"datagrid-pinned-columns.stories.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-pinned-columns.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUjD,wBAOE;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAkLF,eAAO,MAAM,eAAe,+CAgC3B,CAAC;AAEF,eAAO,MAAM,cAAc,+CA6B1B,CAAC;AAEF,eAAO,MAAM,eAAe,+CA+B3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datagrid-search-and-filters.stories.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-search-and-filters.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC
|
|
1
|
+
{"version":3,"file":"datagrid-search-and-filters.stories.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-search-and-filters.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCjD,wBAOE;AA+CF,eAAO,MAAM,UAAU,+CA6MtB,CAAC;AAEF,eAAO,MAAM,eAAe,+CAkF3B,CAAC"}
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
|
-
|
|
23
|
-
declare const Component: (props: React.ComponentProps<typeof Select>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
24
23
|
export default Component;
|
|
25
24
|
//# sourceMappingURL=select-async.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-async.story.d.ts","sourceRoot":"","sources":["../../../../src/select/stories/select-async.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"select-async.story.d.ts","sourceRoot":"","sources":["../../../../src/select/stories/select-async.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAsBjD,QAAA,MAAM,SAAS,+CAed,CAAC;AAEF,eAAe,SAAS,CAAC"}
|