@bigbinary/neeto-molecules 4.1.49 → 4.1.51
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/dist/CSSTransition-DU3ZFKUe.js +1097 -0
- package/dist/CSSTransition-DU3ZFKUe.js.map +1 -0
- package/dist/CalendarView.js +2 -1
- package/dist/CalendarView.js.map +1 -1
- package/dist/{Columns-BB50-jks.js → Columns-D68XA-e7.js} +2 -53
- package/dist/Columns-D68XA-e7.js.map +1 -0
- package/dist/Columns-cUgR6NTO.js +502 -0
- package/dist/Columns-cUgR6NTO.js.map +1 -0
- package/dist/Columns.js +2 -1
- package/dist/Columns.js.map +1 -1
- package/dist/MenuBar.js +8 -1095
- package/dist/MenuBar.js.map +1 -1
- package/dist/SubHeader.js +2 -1
- package/dist/SubHeader.js.map +1 -1
- package/dist/Taxonomy.js +2 -1
- package/dist/Taxonomy.js.map +1 -1
- package/dist/circle-question-mark-Dib48f5Z.js +19 -0
- package/dist/circle-question-mark-Dib48f5Z.js.map +1 -0
- package/dist/cjs/CSSTransition-D_jVZ_GR.js +1099 -0
- package/dist/cjs/CSSTransition-D_jVZ_GR.js.map +1 -0
- package/dist/cjs/CalendarView.js +2 -1
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/{Columns-jm_CUnLP.js → Columns-BACqpEQU.js} +3 -54
- package/dist/cjs/Columns-BACqpEQU.js.map +1 -0
- package/dist/cjs/Columns-D3eocaeY.js +508 -0
- package/dist/cjs/Columns-D3eocaeY.js.map +1 -0
- package/dist/cjs/Columns.js +2 -1
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/MenuBar.js +7 -1094
- package/dist/cjs/MenuBar.js.map +1 -1
- package/dist/cjs/SubHeader.js +2 -1
- package/dist/cjs/SubHeader.js.map +1 -1
- package/dist/cjs/Taxonomy.js +2 -1
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/circle-question-mark-kxBMPyWQ.js +21 -0
- package/dist/cjs/circle-question-mark-kxBMPyWQ.js.map +1 -0
- package/dist/cjs/ellipsis-BcfLTtl5.js +21 -0
- package/dist/cjs/ellipsis-BcfLTtl5.js.map +1 -0
- package/dist/cjs/plus-MoDFAiKt.js +20 -0
- package/dist/cjs/plus-MoDFAiKt.js.map +1 -0
- package/dist/cjs/search-BBuFYdmG.js +20 -0
- package/dist/cjs/search-BBuFYdmG.js.map +1 -0
- package/dist/cjs/utilities.esm-jwIHISzF.js +58 -0
- package/dist/cjs/utilities.esm-jwIHISzF.js.map +1 -0
- package/dist/cjs/v2/Breadcrumbs.js +50 -0
- package/dist/cjs/v2/Breadcrumbs.js.map +1 -0
- package/dist/cjs/v2/Columns.js +34 -0
- package/dist/cjs/v2/Columns.js.map +1 -0
- package/dist/cjs/v2/Container.js +34 -0
- package/dist/cjs/v2/Container.js.map +1 -0
- package/dist/cjs/v2/FloatingActionMenu.js +22 -49
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/v2/Header.js +128 -0
- package/dist/cjs/v2/Header.js.map +1 -0
- package/dist/cjs/v2/HelpPopover.js +93 -0
- package/dist/cjs/v2/HelpPopover.js.map +1 -0
- package/dist/cjs/v2/MenuBar.js +265 -0
- package/dist/cjs/v2/MenuBar.js.map +1 -0
- package/dist/cjs/v2/MoreDropdown.js +201 -0
- package/dist/cjs/v2/MoreDropdown.js.map +1 -0
- package/dist/cjs/v2/Search.js +129 -0
- package/dist/cjs/v2/Search.js.map +1 -0
- package/dist/cjs/v2/Sidebar.js +5 -32
- package/dist/cjs/v2/Sidebar.js.map +1 -1
- package/dist/cjs/v2/SubHeader.js +246 -0
- package/dist/cjs/v2/SubHeader.js.map +1 -0
- package/dist/ellipsis-DpI9xqUK.js +19 -0
- package/dist/ellipsis-DpI9xqUK.js.map +1 -0
- package/dist/plus-clM1IC_E.js +18 -0
- package/dist/plus-clM1IC_E.js.map +1 -0
- package/dist/search-DCgpNjip.js +18 -0
- package/dist/search-DCgpNjip.js.map +1 -0
- package/dist/utilities.esm-CS21Daln.js +56 -0
- package/dist/utilities.esm-CS21Daln.js.map +1 -0
- package/dist/v2/Breadcrumbs.js +48 -0
- package/dist/v2/Breadcrumbs.js.map +1 -0
- package/dist/v2/Columns.js +22 -0
- package/dist/v2/Columns.js.map +1 -0
- package/dist/v2/Container.js +32 -0
- package/dist/v2/Container.js.map +1 -0
- package/dist/v2/FloatingActionMenu.js +19 -46
- package/dist/v2/FloatingActionMenu.js.map +1 -1
- package/dist/v2/Header.js +126 -0
- package/dist/v2/Header.js.map +1 -0
- package/dist/v2/HelpPopover.js +91 -0
- package/dist/v2/HelpPopover.js.map +1 -0
- package/dist/v2/MenuBar.js +263 -0
- package/dist/v2/MenuBar.js.map +1 -0
- package/dist/v2/MoreDropdown.js +199 -0
- package/dist/v2/MoreDropdown.js.map +1 -0
- package/dist/v2/Search.js +127 -0
- package/dist/v2/Search.js.map +1 -0
- package/dist/v2/Sidebar.js +3 -30
- package/dist/v2/Sidebar.js.map +1 -1
- package/dist/v2/SubHeader.js +244 -0
- package/dist/v2/SubHeader.js.map +1 -0
- package/package.json +1 -1
- package/types/v2/Breadcrumbs.d.ts +12 -0
- package/types/v2/Columns.d.ts +42 -0
- package/types/v2/Container.d.ts +8 -0
- package/types/v2/Header.d.ts +22 -0
- package/types/v2/HelpPopover.d.ts +23 -0
- package/types/v2/MenuBar.d.ts +68 -0
- package/types/v2/MoreDropdown.d.ts +42 -0
- package/types/v2/Search.d.ts +16 -0
- package/types/v2/SubHeader.d.ts +51 -0
- package/dist/Columns-BB50-jks.js.map +0 -1
- package/dist/cjs/Columns-jm_CUnLP.js.map +0 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import { DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, DropdownMenuSeparator, DropdownMenuItem, TooltipProvider, Tooltip, TooltipTrigger, Button, TooltipContent, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent } from '@bigbinary/neeto-atoms';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { hyphenate } from '@bigbinary/neeto-cist';
|
|
6
|
+
import { mergeRight } from 'ramda';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
|
+
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
9
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
+
import { c as createLucideIcon } from '../createLucideIcon-mNMhCCpf.js';
|
|
11
|
+
import { E as Ellipsis } from '../ellipsis-DpI9xqUK.js';
|
|
12
|
+
import 'react';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @license lucide-react v1.7.0 - ISC
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the ISC license.
|
|
18
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const __iconNode = [
|
|
23
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
24
|
+
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
25
|
+
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
26
|
+
];
|
|
27
|
+
const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode);
|
|
28
|
+
|
|
29
|
+
var DEFAULT_TOOLTIP_PROPS = {
|
|
30
|
+
disabled: true,
|
|
31
|
+
position: "bottom",
|
|
32
|
+
touch: ["hold", 500]
|
|
33
|
+
};
|
|
34
|
+
var ICON_SIZES = {
|
|
35
|
+
small: 20,
|
|
36
|
+
medium: 24,
|
|
37
|
+
large: 30
|
|
38
|
+
};
|
|
39
|
+
var STYLE_TO_VARIANT = {
|
|
40
|
+
primary: "default",
|
|
41
|
+
secondary: "secondary",
|
|
42
|
+
tertiary: "ghost",
|
|
43
|
+
danger: "destructive",
|
|
44
|
+
danger_text: "destructive",
|
|
45
|
+
text: "ghost",
|
|
46
|
+
link: "link"
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var _excluded$2 = ["isVisible", "key"];
|
|
50
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
51
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
52
|
+
var Submenu = withT(function (_ref) {
|
|
53
|
+
var t = _ref.t,
|
|
54
|
+
label = _ref.label,
|
|
55
|
+
_ref$menuItems = _ref.menuItems,
|
|
56
|
+
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
57
|
+
return /*#__PURE__*/jsxs(DropdownMenuSub, {
|
|
58
|
+
children: [/*#__PURE__*/jsx(DropdownMenuSubTrigger, {
|
|
59
|
+
"aria-haspopup": "menu",
|
|
60
|
+
children: label
|
|
61
|
+
}), /*#__PURE__*/jsx(DropdownMenuSubContent, {
|
|
62
|
+
"aria-label": t("neetoMolecules.moreDropdown.submenuAriaLabel", {
|
|
63
|
+
label: label
|
|
64
|
+
}),
|
|
65
|
+
children: menuItems.map(function (_ref2) {
|
|
66
|
+
var _ref2$isVisible = _ref2.isVisible,
|
|
67
|
+
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
68
|
+
key = _ref2.key,
|
|
69
|
+
itemProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
70
|
+
if (!isVisible) return null;
|
|
71
|
+
return /*#__PURE__*/jsx(MenuItem, _objectSpread$2({}, itemProps), key !== null && key !== void 0 ? key : hyphenate(itemProps.label || "menu-item"));
|
|
72
|
+
})
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
var _excluded$1 = ["onClick", "label", "type", "hasSubItems", "menuItems", "dropdownProps"];
|
|
78
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
79
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
80
|
+
var MenuItem = function MenuItem(_ref) {
|
|
81
|
+
var onClick = _ref.onClick,
|
|
82
|
+
label = _ref.label,
|
|
83
|
+
_ref$type = _ref.type,
|
|
84
|
+
type = _ref$type === void 0 ? "menuItem" : _ref$type,
|
|
85
|
+
_ref$hasSubItems = _ref.hasSubItems,
|
|
86
|
+
hasSubItems = _ref$hasSubItems === void 0 ? false : _ref$hasSubItems,
|
|
87
|
+
menuItems = _ref.menuItems,
|
|
88
|
+
dropdownProps = _ref.dropdownProps,
|
|
89
|
+
menuItemProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
90
|
+
if (type === "divider") return /*#__PURE__*/jsx(DropdownMenuSeparator, {
|
|
91
|
+
role: "separator"
|
|
92
|
+
});
|
|
93
|
+
if (hasSubItems) {
|
|
94
|
+
return /*#__PURE__*/jsx(Submenu, _objectSpread$1({}, _objectSpread$1({
|
|
95
|
+
dropdownProps: dropdownProps,
|
|
96
|
+
label: label,
|
|
97
|
+
menuItems: menuItems
|
|
98
|
+
}, menuItemProps)));
|
|
99
|
+
}
|
|
100
|
+
return /*#__PURE__*/jsx(DropdownMenuItem, _objectSpread$1(_objectSpread$1({
|
|
101
|
+
onClick: onClick,
|
|
102
|
+
role: "menuitem"
|
|
103
|
+
}, menuItemProps), {}, {
|
|
104
|
+
children: label
|
|
105
|
+
}));
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
var _excluded = ["isRounded", "size", "tooltipProps", "style"],
|
|
109
|
+
_excluded2 = ["isVisible", "key"];
|
|
110
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
111
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
112
|
+
var MoreDropdown = function MoreDropdown(_ref) {
|
|
113
|
+
var _ref$dropdownButtonPr = _ref.dropdownButtonProps,
|
|
114
|
+
dropdownButtonProps = _ref$dropdownButtonPr === void 0 ? {} : _ref$dropdownButtonPr,
|
|
115
|
+
_ref$isVertical = _ref.isVertical,
|
|
116
|
+
isVertical = _ref$isVertical === void 0 ? false : _ref$isVertical,
|
|
117
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
118
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
119
|
+
_ref$dropdownProps = _ref.dropdownProps,
|
|
120
|
+
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
121
|
+
menuTopChildren = _ref.menuTopChildren,
|
|
122
|
+
menuBottomChildren = _ref.menuBottomChildren,
|
|
123
|
+
_ref$menuItems = _ref.menuItems,
|
|
124
|
+
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
125
|
+
var _useTranslation = useTranslation(),
|
|
126
|
+
t = _useTranslation.t;
|
|
127
|
+
var isRoundedButton = dropdownButtonProps.isRounded,
|
|
128
|
+
_dropdownButtonProps$ = dropdownButtonProps.size,
|
|
129
|
+
buttonSize = _dropdownButtonProps$ === void 0 ? "medium" : _dropdownButtonProps$,
|
|
130
|
+
customTooltipProps = dropdownButtonProps.tooltipProps,
|
|
131
|
+
buttonStyle = dropdownButtonProps.style,
|
|
132
|
+
buttonProps = _objectWithoutProperties(dropdownButtonProps, _excluded);
|
|
133
|
+
var tooltipProps = mergeRight(DEFAULT_TOOLTIP_PROPS, customTooltipProps);
|
|
134
|
+
var variant = STYLE_TO_VARIANT[buttonStyle] || "ghost";
|
|
135
|
+
var TargetIcon = isVertical ? EllipsisVertical : Ellipsis;
|
|
136
|
+
var iconSize = ICON_SIZES[buttonSize] || 20;
|
|
137
|
+
var isDropdownDisabled = isDisabled || dropdownProps.disabled;
|
|
138
|
+
if (isDropdownDisabled && !tooltipProps.disabled) {
|
|
139
|
+
return /*#__PURE__*/jsx(TooltipProvider, {
|
|
140
|
+
children: /*#__PURE__*/jsxs(Tooltip, {
|
|
141
|
+
children: [/*#__PURE__*/jsx(TooltipTrigger, {
|
|
142
|
+
asChild: true,
|
|
143
|
+
children: /*#__PURE__*/jsx("span", {
|
|
144
|
+
children: /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
|
|
145
|
+
variant: variant,
|
|
146
|
+
disabled: true,
|
|
147
|
+
"data-dropdown-button-style": "more-dropdown",
|
|
148
|
+
"data-testid": "more-dropdown-button",
|
|
149
|
+
size: "icon",
|
|
150
|
+
className: classnames("shrink-0", {
|
|
151
|
+
"rounded-full": isRoundedButton
|
|
152
|
+
})
|
|
153
|
+
}, buttonProps), {}, {
|
|
154
|
+
children: /*#__PURE__*/jsx(TargetIcon, {
|
|
155
|
+
size: iconSize
|
|
156
|
+
})
|
|
157
|
+
}))
|
|
158
|
+
})
|
|
159
|
+
}), /*#__PURE__*/jsx(TooltipContent, {
|
|
160
|
+
side: tooltipProps.position || "bottom",
|
|
161
|
+
children: tooltipProps.content
|
|
162
|
+
})]
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return /*#__PURE__*/jsxs(DropdownMenu, _objectSpread(_objectSpread({}, dropdownProps), {}, {
|
|
167
|
+
children: [/*#__PURE__*/jsx(DropdownMenuTrigger, {
|
|
168
|
+
asChild: true,
|
|
169
|
+
children: /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
|
|
170
|
+
variant: variant,
|
|
171
|
+
"aria-haspopup": "menu",
|
|
172
|
+
"aria-label": t("neetoMolecules.moreDropdown.buttonAriaLabel"),
|
|
173
|
+
"data-dropdown-button-style": "more-dropdown",
|
|
174
|
+
disabled: isDropdownDisabled,
|
|
175
|
+
size: "icon",
|
|
176
|
+
className: classnames("shrink-0", {
|
|
177
|
+
"rounded-full": isRoundedButton
|
|
178
|
+
})
|
|
179
|
+
}, buttonProps), {}, {
|
|
180
|
+
children: /*#__PURE__*/jsx(TargetIcon, {
|
|
181
|
+
size: iconSize
|
|
182
|
+
})
|
|
183
|
+
}))
|
|
184
|
+
}), /*#__PURE__*/jsxs(DropdownMenuContent, {
|
|
185
|
+
"aria-label": t("neetoMolecules.moreDropdown.menuAriaLabel"),
|
|
186
|
+
children: [menuTopChildren, menuItems.map(function (_ref2) {
|
|
187
|
+
var _ref2$isVisible = _ref2.isVisible,
|
|
188
|
+
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
189
|
+
key = _ref2.key,
|
|
190
|
+
menuItemProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
191
|
+
if (!isVisible) return null;
|
|
192
|
+
return /*#__PURE__*/jsx(MenuItem, _objectSpread({}, menuItemProps), key !== null && key !== void 0 ? key : hyphenate(menuItemProps.label || "menu-item"));
|
|
193
|
+
}), menuBottomChildren]
|
|
194
|
+
})]
|
|
195
|
+
}));
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export { MoreDropdown as default };
|
|
199
|
+
//# sourceMappingURL=MoreDropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MoreDropdown.js","sources":["../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.js","../../src/v2/components/MoreDropdown/constants.js","../../src/v2/components/MoreDropdown/Submenu.jsx","../../src/v2/components/MoreDropdown/MenuItem.jsx","../../src/v2/components/MoreDropdown/index.jsx"],"sourcesContent":["/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"12\", cy: \"5\", r: \"1\", key: \"gxeob9\" }],\n [\"circle\", { cx: \"12\", cy: \"19\", r: \"1\", key: \"lyex9k\" }]\n];\nconst EllipsisVertical = createLucideIcon(\"ellipsis-vertical\", __iconNode);\n\nexport { __iconNode, EllipsisVertical as default };\n//# sourceMappingURL=ellipsis-vertical.js.map\n","const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n tertiary: \"tertiary\",\n danger: \"danger\",\n danger_text: \"danger_text\",\n text: \"text\",\n link: \"link\",\n};\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nconst MENU_ITEM_TYPES = { menuItem: \"menuItem\", divider: \"divider\" };\n\nconst DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n touch: [\"hold\", 500],\n};\n\nconst ICON_SIZES = { small: 20, medium: 24, large: 30 };\n\nconst STYLE_TO_VARIANT = {\n primary: \"default\",\n secondary: \"secondary\",\n tertiary: \"ghost\",\n danger: \"destructive\",\n danger_text: \"destructive\",\n text: \"ghost\",\n link: \"link\",\n};\n\nexport {\n BUTTON_STYLES,\n SIZES,\n STRATEGY,\n MENU_ITEM_TYPES,\n DEFAULT_TOOLTIP_PROPS,\n ICON_SIZES,\n STYLE_TO_VARIANT,\n};\n","import {\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n} from \"@bigbinary/neeto-atoms\";\nimport { hyphenate } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\n\nimport MenuItem from \"./MenuItem\";\n\nconst Submenu = withT(({ t, label, menuItems = [] }) => (\n <DropdownMenuSub>\n <DropdownMenuSubTrigger aria-haspopup=\"menu\">\n {label}\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent\n aria-label={t(\"neetoMolecules.moreDropdown.submenuAriaLabel\", {\n label,\n })}\n >\n {menuItems.map(({ isVisible = true, key, ...itemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(itemProps.label || \"menu-item\")}\n {...itemProps}\n />\n );\n })}\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n));\n\nexport default Submenu;\n","import {\n DropdownMenuItem,\n DropdownMenuSeparator,\n} from \"@bigbinary/neeto-atoms\";\n\nimport Submenu from \"./Submenu\";\n\nconst MenuItem = ({\n onClick,\n label,\n type = \"menuItem\",\n hasSubItems = false,\n menuItems,\n dropdownProps,\n ...menuItemProps\n}) => {\n if (type === \"divider\") return <DropdownMenuSeparator role=\"separator\" />;\n\n if (hasSubItems) {\n return (\n <Submenu {...{ dropdownProps, label, menuItems, ...menuItemProps }} />\n );\n }\n\n return (\n <DropdownMenuItem {...{ onClick }} role=\"menuitem\" {...menuItemProps}>\n {label}\n </DropdownMenuItem>\n );\n};\n\nexport default MenuItem;\n","/* eslint-disable @bigbinary/neeto/use-neetoui-classes */\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { Ellipsis, EllipsisVertical } from \"lucide-react\";\nimport { hyphenate } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n DEFAULT_TOOLTIP_PROPS,\n ICON_SIZES,\n MENU_ITEM_TYPES,\n SIZES,\n STYLE_TO_VARIANT,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const {\n isRounded: isRoundedButton,\n size: buttonSize = \"medium\",\n tooltipProps: customTooltipProps,\n style: buttonStyle,\n ...buttonProps\n } = dropdownButtonProps;\n\n const tooltipProps = mergeRight(DEFAULT_TOOLTIP_PROPS, customTooltipProps);\n const variant = STYLE_TO_VARIANT[buttonStyle] || \"ghost\";\n\n const TargetIcon = isVertical ? EllipsisVertical : Ellipsis;\n const iconSize = ICON_SIZES[buttonSize] || 20;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <span>\n <Button\n {...{ variant }}\n disabled\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"more-dropdown-button\"\n size=\"icon\"\n className={classnames(\"shrink-0\", {\n \"rounded-full\": isRoundedButton,\n })}\n {...buttonProps}\n >\n <TargetIcon size={iconSize} />\n </Button>\n </span>\n </TooltipTrigger>\n <TooltipContent side={tooltipProps.position || \"bottom\"}>\n {tooltipProps.content}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n }\n\n return (\n <DropdownMenu {...dropdownProps}>\n <DropdownMenuTrigger asChild>\n <Button\n {...{ variant }}\n aria-haspopup=\"menu\"\n aria-label={t(\"neetoMolecules.moreDropdown.buttonAriaLabel\")}\n data-dropdown-button-style=\"more-dropdown\"\n disabled={isDropdownDisabled}\n size=\"icon\"\n className={classnames(\"shrink-0\", {\n \"rounded-full\": isRoundedButton,\n })}\n {...buttonProps}\n >\n <TargetIcon size={iconSize} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent\n aria-label={t(\"neetoMolecules.moreDropdown.menuAriaLabel\")}\n >\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label || \"menu-item\")}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n\nMoreDropdown.propTypes = {\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf([\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"danger\",\n \"danger_text\",\n \"text\",\n \"link\",\n ]),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n isRounded: PropTypes.bool,\n }),\n isVertical: PropTypes.bool,\n isDisabled: PropTypes.bool,\n dropdownProps: PropTypes.object,\n menuTopChildren: PropTypes.node,\n menuBottomChildren: PropTypes.node,\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["DEFAULT_TOOLTIP_PROPS","disabled","position","touch","ICON_SIZES","small","medium","large","STYLE_TO_VARIANT","primary","secondary","tertiary","danger","danger_text","text","link","Submenu","withT","_ref","t","label","_ref$menuItems","menuItems","_jsxs","DropdownMenuSub","children","_jsx","DropdownMenuSubTrigger","DropdownMenuSubContent","map","_ref2","_ref2$isVisible","isVisible","key","itemProps","_objectWithoutProperties","_excluded","MenuItem","_objectSpread","hyphenate","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","dropdownProps","menuItemProps","DropdownMenuSeparator","role","DropdownMenuItem","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_useTranslation","useTranslation","isRoundedButton","isRounded","_dropdownButtonProps$","size","buttonSize","customTooltipProps","tooltipProps","buttonStyle","style","buttonProps","mergeRight","variant","TargetIcon","EllipsisVertical","Ellipsis","iconSize","isDropdownDisabled","TooltipProvider","Tooltip","TooltipTrigger","asChild","Button","className","classnames","TooltipContent","side","content","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","_excluded2"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG;AACnB,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC3D,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC1D,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC1D,CAAC;AACD,MA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AAA,CAACoE,mBAAmB,EAAA;MAClB,YAAA,EAAYxE,CAAC,CAAC,2CAA2C,CAAE;MAAAM,QAAA,EAAA,CAE1DiC,eAAe,EACfpC,SAAS,CAACO,GAAG,CAAC,UAAAC,KAAA,EAAiD;AAAA,QAAA,IAAAC,eAAA,GAAAD,KAAA,CAA9CE,SAAS;AAATA,UAAAA,SAAS,GAAAD,eAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,eAAA;UAAEE,GAAG,GAAAH,KAAA,CAAHG,GAAG;AAAKa,UAAAA,aAAa,GAAAX,wBAAA,CAAAL,KAAA,EAAA8D,UAAA,CAAA;AACvD,QAAA,IAAI,CAAC5D,SAAS,EAAE,OAAO,IAAI;QAE3B,oBACEN,GAAA,CAACW,QAAQ,EAAAC,aAAA,CAAA,EAAA,EAEHQ,aAAa,CAAA,EADZb,GAAG,KAAA,IAAA,IAAHA,GAAG,cAAHA,GAAG,GAAIM,SAAS,CAACO,aAAa,CAAC1B,KAAK,IAAI,WAAW,CAEzD,CAAC;MAEN,CAAC,CAAC,EACDuC,kBAAkB;AAAA,KACA,CAAC;AAAA,GAAA,CACV,CAAC;AAEnB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
+
import { useId, useState, useRef, useEffect } from 'react';
|
|
5
|
+
import { Label, Input } from '@bigbinary/neeto-atoms';
|
|
6
|
+
import useFuncDebounce from '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
|
|
7
|
+
import useQueryParams from '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
|
8
|
+
import useUpdateEffect from '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
|
|
9
|
+
import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
10
|
+
import { mergeLeft, omit } from 'ramda';
|
|
11
|
+
import { useTranslation } from 'react-i18next';
|
|
12
|
+
import { useHistory } from 'react-router-dom';
|
|
13
|
+
import { getQueryParams } from '@bigbinary/neeto-commons-frontend/utils';
|
|
14
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
15
|
+
import { S as Search$1 } from '../search-DCgpNjip.js';
|
|
16
|
+
import '../createLucideIcon-mNMhCCpf.js';
|
|
17
|
+
|
|
18
|
+
var getInitialSearchValue = function getInitialSearchValue(_ref) {
|
|
19
|
+
var _ref$initialValue = _ref.initialValue,
|
|
20
|
+
initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue,
|
|
21
|
+
enableUrlSync = _ref.enableUrlSync,
|
|
22
|
+
searchParamName = _ref.searchParamName;
|
|
23
|
+
if (enableUrlSync) {
|
|
24
|
+
var _queryParams$searchPa;
|
|
25
|
+
var queryParams = getQueryParams({
|
|
26
|
+
toCamelCase: false
|
|
27
|
+
});
|
|
28
|
+
return (_queryParams$searchPa = queryParams[searchParamName]) !== null && _queryParams$searchPa !== void 0 ? _queryParams$searchPa : "";
|
|
29
|
+
}
|
|
30
|
+
return initialValue;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var _excluded = ["value", "debounceTime", "onSearch", "onChange", "enableUrlSync", "searchParamName", "className", "label"];
|
|
34
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36
|
+
var Search = function Search(_ref) {
|
|
37
|
+
var value = _ref.value,
|
|
38
|
+
_ref$debounceTime = _ref.debounceTime,
|
|
39
|
+
debounceTime = _ref$debounceTime === void 0 ? 300 : _ref$debounceTime,
|
|
40
|
+
onSearch = _ref.onSearch,
|
|
41
|
+
onChange = _ref.onChange,
|
|
42
|
+
_ref$enableUrlSync = _ref.enableUrlSync,
|
|
43
|
+
enableUrlSync = _ref$enableUrlSync === void 0 ? false : _ref$enableUrlSync,
|
|
44
|
+
_ref$searchParamName = _ref.searchParamName,
|
|
45
|
+
searchParamName = _ref$searchParamName === void 0 ? "search_term" : _ref$searchParamName,
|
|
46
|
+
className = _ref.className,
|
|
47
|
+
label = _ref.label,
|
|
48
|
+
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
49
|
+
var _useTranslation = useTranslation(),
|
|
50
|
+
t = _useTranslation.t;
|
|
51
|
+
var queryParams = useQueryParams({
|
|
52
|
+
toCamelCase: false
|
|
53
|
+
});
|
|
54
|
+
var history = useHistory();
|
|
55
|
+
var inputId = useId();
|
|
56
|
+
var _useState = useState(getInitialSearchValue({
|
|
57
|
+
initialValue: value,
|
|
58
|
+
enableUrlSync: enableUrlSync,
|
|
59
|
+
searchParamName: searchParamName
|
|
60
|
+
})),
|
|
61
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
+
internalValue = _useState2[0],
|
|
63
|
+
setInternalValue = _useState2[1];
|
|
64
|
+
var trimmedValue = value === null || value === void 0 ? void 0 : value.trim();
|
|
65
|
+
useUpdateEffect(function () {
|
|
66
|
+
var _queryParams$searchPa;
|
|
67
|
+
if (!enableUrlSync) return;
|
|
68
|
+
var searchParamValue = (_queryParams$searchPa = queryParams === null || queryParams === void 0 ? void 0 : queryParams[searchParamName]) !== null && _queryParams$searchPa !== void 0 ? _queryParams$searchPa : "";
|
|
69
|
+
setInternalValue(searchParamValue);
|
|
70
|
+
}, [queryParams === null || queryParams === void 0 ? void 0 : queryParams[searchParamName]]);
|
|
71
|
+
var handleSearchQueryParams = function handleSearchQueryParams(trimmedValue) {
|
|
72
|
+
if (!trimmedValue && !(queryParams !== null && queryParams !== void 0 && queryParams[searchParamName])) return;
|
|
73
|
+
if (trimmedValue === (queryParams === null || queryParams === void 0 ? void 0 : queryParams[searchParamName])) return;
|
|
74
|
+
var pathname = history.location.pathname;
|
|
75
|
+
if (trimmedValue) {
|
|
76
|
+
history.push(buildUrl(pathname, mergeLeft(_defineProperty({}, searchParamName, trimmedValue), queryParams)));
|
|
77
|
+
} else {
|
|
78
|
+
history.push(buildUrl(pathname, omit([searchParamName], queryParams)));
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var handleDebouncedSearchTermChange = useFuncDebounce(function (trimmedValue) {
|
|
82
|
+
if (onSearch) onSearch(trimmedValue);else if (enableUrlSync) handleSearchQueryParams(trimmedValue);
|
|
83
|
+
}, debounceTime);
|
|
84
|
+
useUpdateEffect(function () {
|
|
85
|
+
handleDebouncedSearchTermChange(trimmedValue);
|
|
86
|
+
}, [trimmedValue]);
|
|
87
|
+
var prevValueRef = useRef(value);
|
|
88
|
+
if (value !== undefined && value !== prevValueRef.current) {
|
|
89
|
+
setInternalValue(value);
|
|
90
|
+
prevValueRef.current = value;
|
|
91
|
+
}
|
|
92
|
+
var handleOnChange = function handleOnChange(e) {
|
|
93
|
+
var _e$target$value;
|
|
94
|
+
var trimmedValue = (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim();
|
|
95
|
+
onChange === null || onChange === void 0 || onChange(e);
|
|
96
|
+
setInternalValue(e.target.value);
|
|
97
|
+
if ((internalValue === null || internalValue === void 0 ? void 0 : internalValue.trim()) !== trimmedValue) {
|
|
98
|
+
handleDebouncedSearchTermChange(trimmedValue);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
useEffect(function () {
|
|
102
|
+
return handleDebouncedSearchTermChange.cancel;
|
|
103
|
+
}, []);
|
|
104
|
+
return /*#__PURE__*/jsxs("div", {
|
|
105
|
+
className: className,
|
|
106
|
+
children: [label && /*#__PURE__*/jsx(Label, {
|
|
107
|
+
className: "mb-1",
|
|
108
|
+
htmlFor: inputId,
|
|
109
|
+
children: label
|
|
110
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
111
|
+
className: "relative",
|
|
112
|
+
children: [/*#__PURE__*/jsx(Search$1, {
|
|
113
|
+
className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"
|
|
114
|
+
}), /*#__PURE__*/jsx(Input, _objectSpread({
|
|
115
|
+
className: "pl-9 [&::-webkit-search-cancel-button:hover]:cursor-pointer [&::-webkit-search-decoration:hover]:cursor-pointer",
|
|
116
|
+
id: inputId,
|
|
117
|
+
placeholder: t("neetoMolecules.common.actions.search"),
|
|
118
|
+
type: "search",
|
|
119
|
+
value: internalValue,
|
|
120
|
+
onChange: handleOnChange
|
|
121
|
+
}, inputProps))]
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export { Search as default };
|
|
127
|
+
//# sourceMappingURL=Search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Search.js","sources":["../../src/v2/components/Search/utils.js","../../src/v2/components/Search/index.jsx"],"sourcesContent":["import { getQueryParams } from \"neetocommons/utils\";\n\nexport const getInitialSearchValue = ({\n initialValue = \"\",\n enableUrlSync,\n searchParamName,\n}) => {\n if (enableUrlSync) {\n const queryParams = getQueryParams({ toCamelCase: false });\n\n return queryParams[searchParamName] ?? \"\";\n }\n\n return initialValue;\n};\n","import { useEffect, useId, useRef, useState } from \"react\";\n\nimport { Input, Label } from \"@bigbinary/neeto-atoms\";\nimport { Search as SearchIcon } from \"lucide-react\";\nimport useFuncDebounce from \"neetocommons/react-utils/useFuncDebounce\";\nimport useQueryParams from \"neetocommons/react-utils/useQueryParams\";\nimport useUpdateEffect from \"neetocommons/react-utils/useUpdateEffect\";\nimport { buildUrl } from \"neetocommons/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { mergeLeft, omit } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { getInitialSearchValue } from \"./utils\";\n\nconst Search = ({\n value,\n debounceTime = 300,\n onSearch,\n onChange,\n enableUrlSync = false,\n searchParamName = \"search_term\",\n className,\n label,\n ...inputProps\n}) => {\n const { t } = useTranslation();\n const queryParams = useQueryParams({ toCamelCase: false });\n const history = useHistory();\n const inputId = useId();\n\n const [internalValue, setInternalValue] = useState(\n getInitialSearchValue({\n initialValue: value,\n enableUrlSync,\n searchParamName,\n })\n );\n const trimmedValue = value?.trim();\n\n useUpdateEffect(() => {\n if (!enableUrlSync) return;\n\n const searchParamValue = queryParams?.[searchParamName] ?? \"\";\n setInternalValue(searchParamValue);\n }, [queryParams?.[searchParamName]]);\n\n const handleSearchQueryParams = trimmedValue => {\n if (!trimmedValue && !queryParams?.[searchParamName]) return;\n\n if (trimmedValue === queryParams?.[searchParamName]) return;\n\n const pathname = history.location.pathname;\n\n if (trimmedValue) {\n history.push(\n buildUrl(\n pathname,\n mergeLeft({ [searchParamName]: trimmedValue }, queryParams)\n )\n );\n } else {\n history.push(buildUrl(pathname, omit([searchParamName], queryParams)));\n }\n };\n\n const handleDebouncedSearchTermChange = useFuncDebounce(trimmedValue => {\n if (onSearch) onSearch(trimmedValue);\n else if (enableUrlSync) handleSearchQueryParams(trimmedValue);\n }, debounceTime);\n\n useUpdateEffect(() => {\n handleDebouncedSearchTermChange(trimmedValue);\n }, [trimmedValue]);\n\n const prevValueRef = useRef(value);\n if (value !== undefined && value !== prevValueRef.current) {\n setInternalValue(value);\n prevValueRef.current = value;\n }\n\n const handleOnChange = e => {\n const trimmedValue = e.target.value?.trim();\n onChange?.(e);\n setInternalValue(e.target.value);\n\n if (internalValue?.trim() !== trimmedValue) {\n handleDebouncedSearchTermChange(trimmedValue);\n }\n };\n\n useEffect(() => handleDebouncedSearchTermChange.cancel, []);\n\n return (\n <div {...{ className }}>\n {label && (\n <Label className=\"mb-1\" htmlFor={inputId}>\n {label}\n </Label>\n )}\n <div className=\"relative\">\n <SearchIcon className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2\" />\n <Input\n className=\"pl-9 [&::-webkit-search-cancel-button:hover]:cursor-pointer [&::-webkit-search-decoration:hover]:cursor-pointer\"\n id={inputId}\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n type=\"search\"\n value={internalValue}\n onChange={handleOnChange}\n {...inputProps}\n />\n </div>\n </div>\n );\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n debounceTime: PropTypes.number,\n onChange: PropTypes.func,\n onSearch: PropTypes.func,\n enableUrlSync: PropTypes.bool,\n searchParamName: PropTypes.string,\n inputProps: PropTypes.object,\n};\n\nexport default Search;\n"],"names":["getInitialSearchValue","_ref","_ref$initialValue","initialValue","enableUrlSync","searchParamName","_queryParams$searchPa","queryParams","getQueryParams","toCamelCase","Search","value","_ref$debounceTime","debounceTime","onSearch","onChange","_ref$enableUrlSync","_ref$searchParamName","className","label","inputProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","useQueryParams","history","useHistory","inputId","useId","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","trimmedValue","trim","useUpdateEffect","searchParamValue","handleSearchQueryParams","pathname","location","push","buildUrl","mergeLeft","_defineProperty","omit","handleDebouncedSearchTermChange","useFuncDebounce","prevValueRef","useRef","undefined","current","handleOnChange","e","_e$target$value","target","useEffect","cancel","_jsxs","children","_jsx","Label","htmlFor","SearchIcon","Input","_objectSpread","id","placeholder","type"],"mappings":";;;;;;;;;;;;;;;;;AAEO,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAI5B;AAAA,EAAA,IAAAC,iBAAA,GAAAD,IAAA,CAHJE,YAAY;AAAZA,IAAAA,YAAY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8C,QAAAA,IAAI,EAAC,QAAQ;AACb5D,QAAAA,KAAK,EAAEwB,aAAc;AACrBpB,QAAAA,QAAQ,EAAEwC;OAAe,EACrBnC,UAAU,CACf,CAAC;AAAA,KACC,CAAC;AAAA,GACH,CAAC;AAEV;;;;"}
|
package/dist/v2/Sidebar.js
CHANGED
|
@@ -16,7 +16,8 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
16
16
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
17
17
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
18
18
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
19
|
-
import {
|
|
19
|
+
import { P as Plus } from '../plus-clM1IC_E.js';
|
|
20
|
+
import { E as Ellipsis } from '../ellipsis-DpI9xqUK.js';
|
|
20
21
|
import { C as ChevronRight } from '../chevron-right-DcaO-Hlu.js';
|
|
21
22
|
import 'zustand/shallow';
|
|
22
23
|
import '@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions';
|
|
@@ -25,35 +26,7 @@ import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
|
25
26
|
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
26
27
|
import '@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint';
|
|
27
28
|
import '@bigbinary/neeto-filters-frontend/Segments';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @license lucide-react v1.7.0 - ISC
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the ISC license.
|
|
33
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const __iconNode$1 = [
|
|
38
|
-
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
39
|
-
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
40
|
-
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
41
|
-
];
|
|
42
|
-
const Ellipsis = createLucideIcon("ellipsis", __iconNode$1);
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @license lucide-react v1.7.0 - ISC
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the ISC license.
|
|
48
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const __iconNode = [
|
|
53
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
54
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
55
|
-
];
|
|
56
|
-
const Plus = createLucideIcon("plus", __iconNode);
|
|
29
|
+
import '../createLucideIcon-mNMhCCpf.js';
|
|
57
30
|
|
|
58
31
|
var Header = function Header(_ref) {
|
|
59
32
|
var _ProductTypefaceLogos;
|