@neo4j-ndl/react 4.2.13 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/lib/cjs/index.js +3 -1
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/cjs/select-icon-button/SelectIconButton.js +64 -0
  4. package/lib/cjs/select-icon-button/SelectIconButton.js.map +1 -0
  5. package/lib/cjs/select-icon-button/index.js +38 -0
  6. package/lib/cjs/select-icon-button/index.js.map +1 -0
  7. package/lib/cjs/select-icon-button/stories/index.js +44 -0
  8. package/lib/cjs/select-icon-button/stories/index.js.map +1 -0
  9. package/lib/cjs/select-icon-button/stories/select-icon-button-default.story.js +31 -0
  10. package/lib/cjs/select-icon-button/stories/select-icon-button-default.story.js.map +1 -0
  11. package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js +31 -0
  12. package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -0
  13. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js +31 -0
  14. package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js.map +1 -0
  15. package/lib/cjs/select-icon-button/stories/select-icon-button-with-menu.story.js +41 -0
  16. package/lib/cjs/select-icon-button/stories/select-icon-button-with-menu.story.js.map +1 -0
  17. package/lib/cjs/select-icon-button/stories/select-icon-button.stories.js +89 -0
  18. package/lib/cjs/select-icon-button/stories/select-icon-button.stories.js.map +1 -0
  19. package/lib/esm/index.js +1 -0
  20. package/lib/esm/index.js.map +1 -1
  21. package/lib/esm/select-icon-button/SelectIconButton.js +57 -0
  22. package/lib/esm/select-icon-button/SelectIconButton.js.map +1 -0
  23. package/lib/esm/select-icon-button/index.js +22 -0
  24. package/lib/esm/select-icon-button/index.js.map +1 -0
  25. package/lib/esm/select-icon-button/stories/index.js +34 -0
  26. package/lib/esm/select-icon-button/stories/index.js.map +1 -0
  27. package/lib/esm/select-icon-button/stories/select-icon-button-default.story.js +29 -0
  28. package/lib/esm/select-icon-button/stories/select-icon-button-default.story.js.map +1 -0
  29. package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js +29 -0
  30. package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -0
  31. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js +29 -0
  32. package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js.map +1 -0
  33. package/lib/esm/select-icon-button/stories/select-icon-button-with-menu.story.js +39 -0
  34. package/lib/esm/select-icon-button/stories/select-icon-button-with-menu.story.js.map +1 -0
  35. package/lib/esm/select-icon-button/stories/select-icon-button.stories.js +86 -0
  36. package/lib/esm/select-icon-button/stories/select-icon-button.stories.js.map +1 -0
  37. package/lib/types/index.d.ts +1 -0
  38. package/lib/types/index.d.ts.map +1 -1
  39. package/lib/types/select-icon-button/SelectIconButton.d.ts +49 -0
  40. package/lib/types/select-icon-button/SelectIconButton.d.ts.map +1 -0
  41. package/lib/types/select-icon-button/index.d.ts +22 -0
  42. package/lib/types/select-icon-button/index.d.ts.map +1 -0
  43. package/lib/types/select-icon-button/stories/index.d.ts +29 -0
  44. package/lib/types/select-icon-button/stories/index.d.ts.map +1 -0
  45. package/lib/types/select-icon-button/stories/select-icon-button-default.story.d.ts +24 -0
  46. package/lib/types/select-icon-button/stories/select-icon-button-default.story.d.ts.map +1 -0
  47. package/lib/types/select-icon-button/stories/select-icon-button-sizes.story.d.ts +24 -0
  48. package/lib/types/select-icon-button/stories/select-icon-button-sizes.story.d.ts.map +1 -0
  49. package/lib/types/select-icon-button/stories/select-icon-button-states.story.d.ts +24 -0
  50. package/lib/types/select-icon-button/stories/select-icon-button-states.story.d.ts.map +1 -0
  51. package/lib/types/select-icon-button/stories/select-icon-button-with-menu.story.d.ts +24 -0
  52. package/lib/types/select-icon-button/stories/select-icon-button-with-menu.story.d.ts.map +1 -0
  53. package/lib/types/select-icon-button/stories/select-icon-button.stories.d.ts +30 -0
  54. package/lib/types/select-icon-button/stories/select-icon-button.stories.d.ts.map +1 -0
  55. package/package.json +2 -2
package/lib/cjs/index.js CHANGED
@@ -35,7 +35,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
35
35
  };
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.TimeZonePicker = exports.NeedleTime = exports.TimePicker = exports.Skeleton = exports.Tooltip = exports.toast = exports.Toaster = exports.ToasterControlled = exports.Divider = exports.DropdownButton = exports.InlineEdit = exports.Slider = exports.ClipboardButton = exports.Logo = exports.Avatar = exports.Flex = exports.Box = exports.Breadcrumbs = exports.Drawer = exports.Typography = exports.SideNavigation = exports.StatusIndicator = exports.CodeBlock = exports.GraphLabel = exports.Wizard = exports.Tag = exports.Select = exports.TextLink = exports.TextArea = exports.TextInput = exports.DataGridNav = exports.dataGridUtils = exports.useTableNav = exports.useDataGridContext = exports.DataGrid = exports.Dropzone = exports.ProgressBar = exports.Popover = exports.SegmentedControl = exports.Tabs = exports.LoadingSpinner = exports.Dialog = exports.DatePicker = exports.Menu = exports.Radio = exports.Switch = exports.Checkbox = exports.Banner = exports.StatusLabel = exports.Accordion = void 0;
38
- exports.Kbd = exports.Code = exports.TextButton = exports.FilledButton = exports.OutlinedButton = exports.ColorPicker = exports.ConditionalWrap = exports.IconButtonArray = exports.CleanIconButton = exports.IconButton = exports.LoadingBar = exports.useSpotlightContext = exports.SpotlightTour = exports.SpotlightTarget = exports.SpotlightProvider = exports.Spotlight = void 0;
38
+ exports.SelectIconButton = exports.Kbd = exports.Code = exports.TextButton = exports.FilledButton = exports.OutlinedButton = exports.ColorPicker = exports.ConditionalWrap = exports.IconButtonArray = exports.CleanIconButton = exports.IconButton = exports.LoadingBar = exports.useSpotlightContext = exports.SpotlightTour = exports.SpotlightTarget = exports.SpotlightProvider = exports.Spotlight = void 0;
39
39
  var accordion_1 = require("./accordion");
40
40
  Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_1.Accordion; } });
41
41
  var status_label_1 = require("./status-label");
@@ -160,4 +160,6 @@ var code_1 = require("./code");
160
160
  Object.defineProperty(exports, "Code", { enumerable: true, get: function () { return code_1.Code; } });
161
161
  var kbd_1 = require("./kbd");
162
162
  Object.defineProperty(exports, "Kbd", { enumerable: true, get: function () { return kbd_1.Kbd; } });
163
+ var select_icon_button_1 = require("./select-icon-button");
164
+ Object.defineProperty(exports, "SelectIconButton", { enumerable: true, get: function () { return select_icon_button_1.SelectIconButton; } });
163
165
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;AAEH,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yCAMqB;AALnB,qGAAA,QAAQ,OAAA;AACR,+GAAA,kBAAkB,OAAA;AAClB,wGAAA,WAAW,OAAA;AACX,0GAAA,aAAa,OAAA;AACb,wGAAA,WAAW,OAAA;AAEb,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,yCAAu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AA;AACjB,4GAAA,eAAe,OAAA;AACf,0GAAA,aAAa,OAAA;AACb,gHAAA,mBAAmB,OAAA;AAErB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,yDAAsD;AAA7C,oHAAA,eAAe,OAAA;AACxB,yDAAsD;AAA7C,oHAAA,eAAe,OAAA;AACxB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,6BAA4B;AAAnB,0FAAA,GAAG,OAAA","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;AAEH,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,mCAAkC;AAAzB,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AAwD;AAA/C,sHAAA,gBAAgB,OAAA","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\nexport { SelectIconButton } from './select-icon-button';\n"]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SelectIconButton = void 0;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ /**
20
+ *
21
+ * Copyright (c) "Neo4j"
22
+ * Neo4j Sweden AB [http://neo4j.com]
23
+ *
24
+ * This file is part of Neo4j.
25
+ *
26
+ * Neo4j is free software: you can redistribute it and/or modify
27
+ * it under the terms of the GNU General Public License as published by
28
+ * the Free Software Foundation, either version 3 of the License, or
29
+ * (at your option) any later version.
30
+ *
31
+ * This program is distributed in the hope that it will be useful,
32
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
33
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
+ * GNU General Public License for more details.
35
+ *
36
+ * You should have received a copy of the GNU General Public License
37
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
38
+ */
39
+ const classnames_1 = __importDefault(require("classnames"));
40
+ const icons_1 = require("../icons");
41
+ const loading_spinner_1 = require("../loading-spinner");
42
+ const tooltip_1 = require("../tooltip");
43
+ const SelectIconButton = (_a) => {
44
+ var { children, size = 'medium', isDisabled = false, isLoading = false, isOpen = false, className, description, tooltipProps, onClick, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "size", "isDisabled", "isLoading", "isOpen", "className", "description", "tooltipProps", "onClick", "style", "htmlAttributes", "ref"]);
45
+ const classes = (0, classnames_1.default)('ndl-select-icon-btn', className, {
46
+ 'ndl-active': isOpen,
47
+ 'ndl-disabled': isDisabled,
48
+ 'ndl-large': size === 'large',
49
+ 'ndl-loading': isLoading,
50
+ 'ndl-medium': size === 'medium',
51
+ 'ndl-small': size === 'small',
52
+ });
53
+ const isInteractable = !isDisabled && !isLoading;
54
+ return ((0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, Object.assign({ hoverDelay: {
55
+ close: 0,
56
+ open: 500,
57
+ } }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple",
58
+ // We disable the tooltip if the button is disabled or open, so it doesn't interfere with a menu open
59
+ isDisabled: description === null || isDisabled || isOpen === true, children: [(0, jsx_runtime_1.jsx)(tooltip_1.Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { hasButtonWrapper: true, children: (0, jsx_runtime_1.jsxs)("button", Object.assign({ ref: ref, className: classes, style: style, disabled: !isInteractable, "aria-disabled": !isInteractable, "aria-label": description !== null && description !== void 0 ? description : undefined, "aria-expanded": isOpen, onClick: onClick }, restProps, htmlAttributes, { children: [(0, jsx_runtime_1.jsx)("div", { className: "ndl-select-icon-btn-inner", children: isLoading ? ((0, jsx_runtime_1.jsx)(loading_spinner_1.LoadingSpinner, { size: "small" })) : ((0, jsx_runtime_1.jsx)("div", { className: "ndl-icon", children: children })) }), (0, jsx_runtime_1.jsx)(icons_1.ChevronDownIconOutline, { className: (0, classnames_1.default)('ndl-select-icon-btn-icon', {
60
+ 'ndl-select-icon-btn-icon-open': isOpen === true,
61
+ }) })] })) })), (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: description }))] })));
62
+ };
63
+ exports.SelectIconButton = SelectIconButton;
64
+ //# sourceMappingURL=SelectIconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectIconButton.js","sourceRoot":"","sources":["../../../src/select-icon-button/SelectIconButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,oCAAkD;AAClD,wDAAoD;AACpD,wCAAqC;AA0B9B,MAAM,gBAAgB,GAAG,CAAC,EAcc,EAAE,EAAE;QAdlB,EAC/B,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,MAAM,GAAG,KAAK,EACd,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,KAAK,EACL,cAAc,EACd,GAAG,OAE0C,EAD1C,SAAS,cAbmB,kJAchC,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,qBAAqB,EAAE,SAAS,EAAE;QAC3D,YAAY,EAAE,MAAM;QACpB,cAAc,EAAE,UAAU;QAC1B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,aAAa,EAAE,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AAC;AAtEW,QAAA,gBAAgB,oBAsE3B","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { ChevronDownIconOutline } from '../icons';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Tooltip } from '../tooltip';\n\ntype SelectIconButtonProps = {\n /** Content displayed in the button */\n children?: React.ReactNode;\n /** Size of button */\n size?: 'small' | 'medium' | 'large';\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n /** Whether the button is in disabled state */\n isDisabled?: boolean;\n /** If the button is opened */\n isOpen: boolean;\n /** Callback function to be called when the button is clicked */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /**\n * A string that will be shown as a tooltip when hovering over the button. It also acts as an aria-label.\n * {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label}\n */\n description: string | null;\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: TooltipObjectProps;\n};\n\nexport const SelectIconButton = ({\n children,\n size = 'medium',\n isDisabled = false,\n isLoading = false,\n isOpen = false,\n className,\n description,\n tooltipProps,\n onClick,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'button', SelectIconButtonProps>) => {\n const classes = classNames('ndl-select-icon-btn', className, {\n 'ndl-active': isOpen,\n 'ndl-disabled': isDisabled,\n 'ndl-large': size === 'large',\n 'ndl-loading': isLoading,\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const isInteractable = !isDisabled && !isLoading;\n\n return (\n <Tooltip\n hoverDelay={{\n close: 0,\n open: 500,\n }}\n {...tooltipProps?.root}\n type=\"simple\"\n // We disable the tooltip if the button is disabled or open, so it doesn't interfere with a menu open\n isDisabled={description === null || isDisabled || isOpen === true}\n >\n <Tooltip.Trigger {...tooltipProps?.trigger} hasButtonWrapper>\n <button\n ref={ref}\n className={classes}\n style={style}\n disabled={!isInteractable}\n aria-disabled={!isInteractable}\n aria-label={description ?? undefined}\n aria-expanded={isOpen}\n onClick={onClick}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-select-icon-btn-inner\">\n {isLoading ? (\n <LoadingSpinner size=\"small\" />\n ) : (\n <div className=\"ndl-icon\">{children}</div>\n )}\n </div>\n\n <ChevronDownIconOutline\n className={classNames('ndl-select-icon-btn-icon', {\n 'ndl-select-icon-btn-icon-open': isOpen === true,\n })}\n />\n </button>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {description}\n </Tooltip.Content>\n </Tooltip>\n );\n};\n"]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ var desc = Object.getOwnPropertyDescriptor(m, k);
25
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
26
+ desc = { enumerable: true, get: function() { return m[k]; } };
27
+ }
28
+ Object.defineProperty(o, k2, desc);
29
+ }) : (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ o[k2] = m[k];
32
+ }));
33
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
34
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ __exportStar(require("./SelectIconButton"), exports);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/select-icon-button/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,qDAAmC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './SelectIconButton';\n"]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SelectIconButtonWithMenuSrc = exports.SelectIconButtonStatesSrc = exports.SelectIconButtonSizesSrc = exports.SelectIconButtonDefaultSrc = exports.SelectIconButtonWithMenu = exports.SelectIconButtonStates = exports.SelectIconButtonSizes = exports.SelectIconButtonDefault = void 0;
7
+ /**
8
+ *
9
+ * Copyright (c) "Neo4j"
10
+ * Neo4j Sweden AB [http://neo4j.com]
11
+ *
12
+ * This file is part of Neo4j.
13
+ *
14
+ * Neo4j is free software: you can redistribute it and/or modify
15
+ * it under the terms of the GNU General Public License as published by
16
+ * the Free Software Foundation, either version 3 of the License, or
17
+ * (at your option) any later version.
18
+ *
19
+ * This program is distributed in the hope that it will be useful,
20
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ * GNU General Public License for more details.
23
+ *
24
+ * You should have received a copy of the GNU General Public License
25
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
26
+ */
27
+ var select_icon_button_default_story_1 = require("./select-icon-button-default.story");
28
+ Object.defineProperty(exports, "SelectIconButtonDefault", { enumerable: true, get: function () { return __importDefault(select_icon_button_default_story_1).default; } });
29
+ var select_icon_button_sizes_story_1 = require("./select-icon-button-sizes.story");
30
+ Object.defineProperty(exports, "SelectIconButtonSizes", { enumerable: true, get: function () { return __importDefault(select_icon_button_sizes_story_1).default; } });
31
+ var select_icon_button_states_story_1 = require("./select-icon-button-states.story");
32
+ Object.defineProperty(exports, "SelectIconButtonStates", { enumerable: true, get: function () { return __importDefault(select_icon_button_states_story_1).default; } });
33
+ var select_icon_button_with_menu_story_1 = require("./select-icon-button-with-menu.story");
34
+ Object.defineProperty(exports, "SelectIconButtonWithMenu", { enumerable: true, get: function () { return __importDefault(select_icon_button_with_menu_story_1).default; } });
35
+ const export_stories_utils_1 = require("../../_common/export-stories-utils");
36
+ const select_icon_button_default_story_raw_1 = __importDefault(require("./select-icon-button-default.story?raw"));
37
+ const select_icon_button_sizes_story_raw_1 = __importDefault(require("./select-icon-button-sizes.story?raw"));
38
+ const select_icon_button_states_story_raw_1 = __importDefault(require("./select-icon-button-states.story?raw"));
39
+ const select_icon_button_with_menu_story_raw_1 = __importDefault(require("./select-icon-button-with-menu.story?raw"));
40
+ exports.SelectIconButtonDefaultSrc = (0, export_stories_utils_1.removeLicenseHeader)(select_icon_button_default_story_raw_1.default);
41
+ exports.SelectIconButtonSizesSrc = (0, export_stories_utils_1.removeLicenseHeader)(select_icon_button_sizes_story_raw_1.default);
42
+ exports.SelectIconButtonStatesSrc = (0, export_stories_utils_1.removeLicenseHeader)(select_icon_button_states_story_raw_1.default);
43
+ exports.SelectIconButtonWithMenuSrc = (0, export_stories_utils_1.removeLicenseHeader)(select_icon_button_with_menu_story_raw_1.default);
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/index.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,uFAAwF;AAA/E,4JAAA,OAAO,OAA2B;AAC3C,mFAAoF;AAA3E,wJAAA,OAAO,OAAyB;AACzC,qFAAsF;AAA7E,0JAAA,OAAO,OAA0B;AAC1C,2FAA2F;AAAlF,+JAAA,OAAO,OAA4B;AAE5C,6EAAyE;AACzE,kHAAmF;AACnF,8GAA+E;AAC/E,gHAAiF;AACjF,sHAAsF;AAEzE,QAAA,0BAA0B,GAAG,IAAA,0CAAmB,EAC3D,8CAA6B,CAC9B,CAAC;AACW,QAAA,wBAAwB,GAAG,IAAA,0CAAmB,EACzD,4CAA2B,CAC5B,CAAC;AACW,QAAA,yBAAyB,GAAG,IAAA,0CAAmB,EAC1D,6CAA4B,CAC7B,CAAC;AACW,QAAA,2BAA2B,GAAG,IAAA,0CAAmB,EAC5D,gDAA8B,CAC/B,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 */\nexport { default as SelectIconButtonDefault } from './select-icon-button-default.story';\nexport { default as SelectIconButtonSizes } from './select-icon-button-sizes.story';\nexport { default as SelectIconButtonStates } from './select-icon-button-states.story';\nexport { default as SelectIconButtonWithMenu } from './select-icon-button-with-menu.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport SelectIconButtonDefaultSrcRaw from './select-icon-button-default.story?raw';\nimport SelectIconButtonSizesSrcRaw from './select-icon-button-sizes.story?raw';\nimport SelectIconButtonStatesSrcRaw from './select-icon-button-states.story?raw';\nimport SelectIconButtonWithMenuSrcRaw from './select-icon-button-with-menu.story?raw';\n\nexport const SelectIconButtonDefaultSrc = removeLicenseHeader(\n SelectIconButtonDefaultSrcRaw,\n);\nexport const SelectIconButtonSizesSrc = removeLicenseHeader(\n SelectIconButtonSizesSrcRaw,\n);\nexport const SelectIconButtonStatesSrc = removeLicenseHeader(\n SelectIconButtonStatesSrcRaw,\n);\nexport const SelectIconButtonWithMenuSrc = removeLicenseHeader(\n SelectIconButtonWithMenuSrcRaw,\n);\n"]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const icons_1 = require("@neo4j-ndl/react/icons");
27
+ const Component = () => {
28
+ return ((0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Select", isOpen: false, children: (0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {}) }));
29
+ };
30
+ exports.default = Component;
31
+ //# sourceMappingURL=select-icon-button-default.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-icon-button-default.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAoD;AACpD,kDAAoD;AAEpD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,wBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,MAAM,EAAE,KAAK,YAClD,uBAAC,kBAAU,KAAG,GACG,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectIconButton } from '@neo4j-ndl/react';\nimport { SelectIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <SelectIconButton description=\"Select\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const icons_1 = require("@neo4j-ndl/react/icons");
27
+ const Component = () => {
28
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-16", children: [(0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [(0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Select", size: "small", isOpen: false, children: (0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {}) }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", children: " Small" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [(0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Select", size: "medium", isOpen: false, children: (0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {}) }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", children: " Medium" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [(0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Select", size: "large", isOpen: false, children: (0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {}) }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", children: " Large" })] })] }));
29
+ };
30
+ exports.default = Component;
31
+ //# sourceMappingURL=select-icon-button-sizes.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-icon-button-sizes.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-sizes.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAgE;AAChE,kDAAoD;AAEpD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,kCAAkC,aAC/C,iCAAK,SAAS,EAAC,iDAAiD,aAC9D,uBAAC,wBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,YAC/D,uBAAC,kBAAU,KAAG,GACG,EACnB,uBAAC,kBAAU,IAAC,OAAO,EAAC,OAAO,uBAAoB,IAC3C,EACN,iCAAK,SAAS,EAAC,iDAAiD,aAC9D,uBAAC,wBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAE,KAAK,YAChE,uBAAC,kBAAU,KAAG,GACG,EACnB,uBAAC,kBAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,iCAAK,SAAS,EAAC,iDAAiD,aAC9D,uBAAC,wBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,YAC/D,uBAAC,kBAAU,KAAG,GACG,EACnB,uBAAC,kBAAU,IAAC,OAAO,EAAC,OAAO,uBAAoB,IAC3C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectIconButton, Typography } from '@neo4j-ndl/react';\nimport { SelectIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"small\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Small</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"medium\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Medium</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"large\" isOpen={false}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Large</Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const icons_1 = require("@neo4j-ndl/react/icons");
27
+ const Component = () => {
28
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-16", children: [(0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [(0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Select", size: "small", isDisabled: true, isOpen: false, children: (0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {}) }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", children: " Disabled" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [(0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Select", size: "small", isOpen: true, children: (0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {}) }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", children: " Active" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-16 n-items-center", children: [(0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Select", size: "small", isLoading: true, isOpen: false, children: (0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {}) }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", children: " Loading" })] })] }));
29
+ };
30
+ exports.default = Component;
31
+ //# sourceMappingURL=select-icon-button-states.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-icon-button-states.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-states.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAgE;AAChE,kDAAoD;AAEpD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,kCAAkC,aAC/C,iCAAK,SAAS,EAAC,iDAAiD,aAC9D,uBAAC,wBAAgB,IACf,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAC,OAAO,EACZ,UAAU,QACV,MAAM,EAAE,KAAK,YAEb,uBAAC,kBAAU,KAAG,GACG,EACnB,uBAAC,kBAAU,IAAC,OAAO,EAAC,OAAO,0BAAuB,IAC9C,EACN,iCAAK,SAAS,EAAC,iDAAiD,aAC9D,uBAAC,wBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,IAAI,YAC9D,uBAAC,kBAAU,KAAG,GACG,EACnB,uBAAC,kBAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,iCAAK,SAAS,EAAC,iDAAiD,aAC9D,uBAAC,wBAAgB,IACf,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAC,OAAO,EACZ,SAAS,QACT,MAAM,EAAE,KAAK,YAEb,uBAAC,kBAAU,KAAG,GACG,EACnB,uBAAC,kBAAU,IAAC,OAAO,EAAC,OAAO,yBAAsB,IAC7C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectIconButton, Typography } from '@neo4j-ndl/react';\nimport { SelectIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton\n description=\"Select\"\n size=\"small\"\n isDisabled\n isOpen={false}\n >\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Disabled</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton description=\"Select\" size=\"small\" isOpen={true}>\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Active</Typography>\n </div>\n <div className=\"n-flex n-flex-row n-gap-token-16 n-items-center\">\n <SelectIconButton\n description=\"Select\"\n size=\"small\"\n isLoading\n isOpen={false}\n >\n <SelectIcon />\n </SelectIconButton>\n <Typography variant=\"label\"> Loading</Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const icons_1 = require("@neo4j-ndl/react/icons");
27
+ const react_2 = require("react");
28
+ const menuItems = [
29
+ { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.ExploreIcon, {}), title: 'Force-based layout' },
30
+ { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.HierarchyTwoIcon, {}), title: 'Hierarchical layout' },
31
+ ];
32
+ const Component = () => {
33
+ const anchorRef = (0, react_2.useRef)(null);
34
+ const [isMenuOpen, setIsMenuOpen] = (0, react_2.useState)(false);
35
+ const [selectedItem, setSelectedItem] = (0, react_2.useState)();
36
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(react_1.SelectIconButton, { description: "Options", isOpen: isMenuOpen, onClick: () => setIsMenuOpen((old) => !old), ref: anchorRef, children: selectedItem !== undefined ? (menuItems[selectedItem].leadingVisual) : ((0, jsx_runtime_1.jsx)(icons_1.SelectIcon, {})) }), (0, jsx_runtime_1.jsx)(react_1.Menu, { isOpen: isMenuOpen, anchorRef: anchorRef, onClose: () => setIsMenuOpen(false), children: (0, jsx_runtime_1.jsx)(react_1.Menu.Items, { htmlAttributes: {
37
+ id: 'default-menu',
38
+ }, children: menuItems.map((item, index) => ((0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: item.title, leadingVisual: item.leadingVisual, onClick: () => setSelectedItem(index) }, index))) }) })] }));
39
+ };
40
+ exports.default = Component;
41
+ //# sourceMappingURL=select-icon-button-with-menu.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-icon-button-with-menu.story.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button-with-menu.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0D;AAC1D,kDAIgC;AAChC,iCAAyC;AAEzC,MAAM,SAAS,GAAG;IAChB,EAAE,aAAa,EAAE,uBAAC,mBAAW,KAAG,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC/D,EAAE,aAAa,EAAE,uBAAC,wBAAgB,KAAG,EAAE,KAAK,EAAE,qBAAqB,EAAE;CACtE,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,SAAS,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACzD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,GAAU,CAAC;IAE3D,OAAO,CACL,4CACE,uBAAC,wBAAgB,IACf,WAAW,EAAC,SAAS,EACrB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAC3C,GAAG,EAAE,SAAS,YAEb,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,CAC5B,SAAS,CAAC,YAAY,CAAC,CAAC,aAAa,CACtC,CAAC,CAAC,CAAC,CACF,uBAAC,kBAAU,KAAG,CACf,GACgB,EACnB,uBAAC,YAAI,IACH,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,YAEnC,uBAAC,YAAI,CAAC,KAAK,IACT,cAAc,EAAE;wBACd,EAAE,EAAE,cAAc;qBACnB,YAEA,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,uBAAC,YAAI,CAAC,IAAI,IAER,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,IAHhC,KAAK,CAIV,CACH,CAAC,GACS,GACR,IACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Menu, SelectIconButton } from '@neo4j-ndl/react';\nimport {\n ExploreIcon,\n HierarchyTwoIcon,\n SelectIcon,\n} from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst menuItems = [\n { leadingVisual: <ExploreIcon />, title: 'Force-based layout' },\n { leadingVisual: <HierarchyTwoIcon />, title: 'Hierarchical layout' },\n];\n\nconst Component = () => {\n const anchorRef = useRef<HTMLButtonElement | null>(null);\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const [selectedItem, setSelectedItem] = useState<number>();\n\n return (\n <div>\n <SelectIconButton\n description=\"Options\"\n isOpen={isMenuOpen}\n onClick={() => setIsMenuOpen((old) => !old)}\n ref={anchorRef}\n >\n {selectedItem !== undefined ? (\n menuItems[selectedItem].leadingVisual\n ) : (\n <SelectIcon />\n )}\n </SelectIconButton>\n <Menu\n isOpen={isMenuOpen}\n anchorRef={anchorRef}\n onClose={() => setIsMenuOpen(false)}\n >\n <Menu.Items\n htmlAttributes={{\n id: 'default-menu',\n }}\n >\n {menuItems.map((item, index) => (\n <Menu.Item\n key={index}\n title={item.title}\n leadingVisual={item.leadingVisual}\n onClick={() => setSelectedItem(index)}\n />\n ))}\n </Menu.Items>\n </Menu>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,89 @@
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
+
22
+ "use strict";
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.WithMenu = exports.States = exports.Sizes = exports.Default = void 0;
25
+ const index_1 = require("../../index");
26
+ const _1 = require(".");
27
+ const componentMeta = {
28
+ component: index_1.SelectIconButton,
29
+ id: 'components-select-icon-button',
30
+ parameters: {
31
+ controls: { disable: true },
32
+ },
33
+ tags: ['docsPage'],
34
+ title: 'Components/SelectIconButton',
35
+ };
36
+ exports.default = componentMeta;
37
+ exports.Default = {
38
+ args: {},
39
+ parameters: {
40
+ docs: {
41
+ source: {
42
+ code: _1.SelectIconButtonDefaultSrc,
43
+ language: 'tsx',
44
+ type: 'code',
45
+ },
46
+ },
47
+ },
48
+ render: _1.SelectIconButtonDefault,
49
+ };
50
+ exports.Sizes = {
51
+ args: {},
52
+ parameters: {
53
+ docs: {
54
+ source: {
55
+ code: _1.SelectIconButtonSizesSrc,
56
+ language: 'tsx',
57
+ type: 'code',
58
+ },
59
+ },
60
+ },
61
+ render: _1.SelectIconButtonSizes,
62
+ };
63
+ exports.States = {
64
+ args: {},
65
+ parameters: {
66
+ docs: {
67
+ source: {
68
+ code: _1.SelectIconButtonStatesSrc,
69
+ language: 'tsx',
70
+ type: 'code',
71
+ },
72
+ },
73
+ },
74
+ render: _1.SelectIconButtonStates,
75
+ };
76
+ exports.WithMenu = {
77
+ args: {},
78
+ parameters: {
79
+ docs: {
80
+ source: {
81
+ code: _1.SelectIconButtonWithMenuSrc,
82
+ language: 'tsx',
83
+ type: 'code',
84
+ },
85
+ },
86
+ },
87
+ render: _1.SelectIconButtonWithMenu,
88
+ };
89
+ //# sourceMappingURL=select-icon-button.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-icon-button.stories.js","sourceRoot":"","sources":["../../../../src/select-icon-button/stories/select-icon-button.stories.tsx"],"names":[],"mappings":";;;AAsBA,uCAA+C;AAC/C,wBASW;AAEX,MAAM,aAAa,GAAkC;IACnD,SAAS,EAAE,wBAAgB;IAC3B,EAAE,EAAE,+BAA+B;IACnC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,6BAA6B;CACrC,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,6BAA0B;gBAChC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,0BAAuB;CAChC,CAAC;AAEW,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,wBAAqB;CAC9B,CAAC;AAEW,QAAA,MAAM,GAAU;IAC3B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,4BAAyB;gBAC/B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,yBAAsB;CAC/B,CAAC;AAEW,QAAA,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,8BAA2B;gBACjC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,2BAAwB;CACjC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { SelectIconButton } from '../../index';\nimport {\n SelectIconButtonDefault,\n SelectIconButtonDefaultSrc,\n SelectIconButtonSizes,\n SelectIconButtonSizesSrc,\n SelectIconButtonStates,\n SelectIconButtonStatesSrc,\n SelectIconButtonWithMenu,\n SelectIconButtonWithMenuSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof SelectIconButton> = {\n component: SelectIconButton,\n id: 'components-select-icon-button',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/SelectIconButton',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SelectIconButtonDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SelectIconButtonDefault,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SelectIconButtonSizesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SelectIconButtonSizes,\n};\n\nexport const States: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SelectIconButtonStatesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SelectIconButtonStates,\n};\n\nexport const WithMenu: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SelectIconButtonWithMenuSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SelectIconButtonWithMenu,\n};\n"]}
package/lib/esm/index.js CHANGED
@@ -76,4 +76,5 @@ export { FilledButton } from './filled-button';
76
76
  export { TextButton } from './text-button';
77
77
  export { Code } from './code';
78
78
  export { Kbd } from './kbd';
79
+ export { SelectIconButton } from './select-icon-button';
79
80
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAA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O,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,O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gB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\nexport { SelectIconButton } from './select-icon-button';\n"]}
@@ -0,0 +1,57 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ /**
14
+ *
15
+ * Copyright (c) "Neo4j"
16
+ * Neo4j Sweden AB [http://neo4j.com]
17
+ *
18
+ * This file is part of Neo4j.
19
+ *
20
+ * Neo4j is free software: you can redistribute it and/or modify
21
+ * it under the terms of the GNU General Public License as published by
22
+ * the Free Software Foundation, either version 3 of the License, or
23
+ * (at your option) any later version.
24
+ *
25
+ * This program is distributed in the hope that it will be useful,
26
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ * GNU General Public License for more details.
29
+ *
30
+ * You should have received a copy of the GNU General Public License
31
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
32
+ */
33
+ import classNames from 'classnames';
34
+ import { ChevronDownIconOutline } from '../icons';
35
+ import { LoadingSpinner } from '../loading-spinner';
36
+ import { Tooltip } from '../tooltip';
37
+ export const SelectIconButton = (_a) => {
38
+ var { children, size = 'medium', isDisabled = false, isLoading = false, isOpen = false, className, description, tooltipProps, onClick, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "size", "isDisabled", "isLoading", "isOpen", "className", "description", "tooltipProps", "onClick", "style", "htmlAttributes", "ref"]);
39
+ const classes = classNames('ndl-select-icon-btn', className, {
40
+ 'ndl-active': isOpen,
41
+ 'ndl-disabled': isDisabled,
42
+ 'ndl-large': size === 'large',
43
+ 'ndl-loading': isLoading,
44
+ 'ndl-medium': size === 'medium',
45
+ 'ndl-small': size === 'small',
46
+ });
47
+ const isInteractable = !isDisabled && !isLoading;
48
+ return (_jsxs(Tooltip, Object.assign({ hoverDelay: {
49
+ close: 0,
50
+ open: 500,
51
+ } }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.root, { type: "simple",
52
+ // We disable the tooltip if the button is disabled or open, so it doesn't interfere with a menu open
53
+ isDisabled: description === null || isDisabled || isOpen === true, children: [_jsx(Tooltip.Trigger, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.trigger, { hasButtonWrapper: true, children: _jsxs("button", Object.assign({ ref: ref, className: classes, style: style, disabled: !isInteractable, "aria-disabled": !isInteractable, "aria-label": description !== null && description !== void 0 ? description : undefined, "aria-expanded": isOpen, onClick: onClick }, restProps, htmlAttributes, { children: [_jsx("div", { className: "ndl-select-icon-btn-inner", children: isLoading ? (_jsx(LoadingSpinner, { size: "small" })) : (_jsx("div", { className: "ndl-icon", children: children })) }), _jsx(ChevronDownIconOutline, { className: classNames('ndl-select-icon-btn-icon', {
54
+ 'ndl-select-icon-btn-icon-open': isOpen === true,
55
+ }) })] })) })), _jsx(Tooltip.Content, Object.assign({}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content, { children: description }))] })));
56
+ };
57
+ //# sourceMappingURL=SelectIconButton.js.map