@bigbinary/neeto-molecules 5.2.18 → 5.2.20

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.
@@ -1,8 +1,9 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { DropdownMenu, Typography, Spinner } from '@bigbinary/neeto-atoms';
3
- import { hyphenate, isPresent, _findBy, noop } from '@bigbinary/neeto-cist';
3
+ import { isPresent, hyphenate, _findBy, noop } from '@bigbinary/neeto-cist';
4
4
  import { memo, forwardRef } from 'react';
5
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
+ import { jsx, jsxs } from 'react/jsx-runtime';
6
+ import { C as Check } from '../check-BjsXqoAv.js';
6
7
  import { n } from '../inject-css-C2dztUxs.js';
7
8
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
8
9
  import { isNil } from 'ramda';
@@ -11,9 +12,13 @@ import { X } from '../x-DcQBAC3X.js';
11
12
  import { C as ChevronDown } from '../chevron-down-BrliMcYV.js';
12
13
  import '../createLucideIcon--oLqczpc.js';
13
14
 
15
+ var ICON_SIZE = 16;
16
+
14
17
  var Menu = function Menu(_ref) {
15
18
  var onItemClick = _ref.onItemClick,
16
19
  options = _ref.options,
20
+ _ref$selectedValue = _ref.selectedValue,
21
+ selectedValue = _ref$selectedValue === void 0 ? null : _ref$selectedValue,
17
22
  _ref$shouldShowAllOpt = _ref.shouldShowAllOptions,
18
23
  shouldShowAllOptions = _ref$shouldShowAllOpt === void 0 ? false : _ref$shouldShowAllOpt,
19
24
  _ref$hiddenStatuses = _ref.hiddenStatuses,
@@ -21,11 +26,17 @@ var Menu = function Menu(_ref) {
21
26
  var allowedOptions = shouldShowAllOptions ? options : options.filter(function (status) {
22
27
  return !hiddenStatuses.includes(status.value);
23
28
  });
24
- return /*#__PURE__*/jsx(Fragment, {
29
+ return /*#__PURE__*/jsx("div", {
30
+ className: "flex w-full flex-col gap-y-0.5",
25
31
  children: allowedOptions === null || allowedOptions === void 0 ? void 0 : allowedOptions.map(function (option) {
32
+ var isSelected = isPresent(selectedValue) && option.value === selectedValue;
26
33
  return /*#__PURE__*/jsx(DropdownMenu.MenuItem, {
27
34
  className: "status-dropdown-item--".concat(option.color),
28
35
  "data-testid": "status-dropdown-item-".concat(hyphenate(option.value)),
36
+ isActive: isSelected,
37
+ suffix: isSelected && /*#__PURE__*/jsx(Check, {
38
+ size: ICON_SIZE
39
+ }),
29
40
  onClick: function onClick() {
30
41
  return onItemClick(option);
31
42
  },
@@ -36,11 +47,9 @@ var Menu = function Menu(_ref) {
36
47
  };
37
48
  var Menu$1 = /*#__PURE__*/memo(Menu);
38
49
 
39
- var css = ":root{--neeto-molecules-status-color-open:9,90,186;--neeto-molecules-status-color-done:189,100,13;--neeto-molecules-status-color-waiting:47,57,65;--neeto-molecules-status-color-red:187,18,26;--neeto-molecules-status-color-yellow:255,204,112;--neeto-molecules-status-color-violet:157,98,162;--neeto-molecules-status-color-pink:225,62,230;--neeto-molecules-status-color-teal:38,87,124;--neeto-molecules-status-color-cyan:66,160,157;--neeto-molecules-status-color-green:16,113,84;--neeto-molecules-status-bg-open:226,241,255;--neeto-molecules-status-bg-done:250,241,225;--neeto-molecules-status-bg-waiting:233,235,237;--neeto-molecules-status-bg-red:254,236,240;--neeto-molecules-status-bg-yellow:255,247,233;--neeto-molecules-status-bg-violet:235,222,255;--neeto-molecules-status-bg-pink:254,233,255;--neeto-molecules-status-bg-teal:228,244,255;--neeto-molecules-status-bg-cyan:224,255,254;--neeto-molecules-status-bg-green:224,244,238}.dark{--neeto-molecules-status-color-open:144,194,255;--neeto-molecules-status-bg-open:24,42,66;--neeto-molecules-status-color-done:255,194,121;--neeto-molecules-status-bg-done:54,38,18;--neeto-molecules-status-color-waiting:255,255,255;--neeto-molecules-status-bg-waiting:16,24,40;--neeto-molecules-status-color-red:255,119,130;--neeto-molecules-status-bg-red:60,20,24;--neeto-molecules-status-color-yellow:255,221,138;--neeto-molecules-status-bg-yellow:60,48,20;--neeto-molecules-status-color-violet:218,170,255;--neeto-molecules-status-bg-violet:49,27,63;--neeto-molecules-status-color-pink:255,155,255;--neeto-molecules-status-bg-pink:56,30,60;--neeto-molecules-status-color-teal:139,205,255;--neeto-molecules-status-bg-teal:22,42,55;--neeto-molecules-status-color-cyan:130,255,247;--neeto-molecules-status-bg-cyan:14,49,48;--neeto-molecules-status-color-green:117,255,195;--neeto-molecules-status-bg-green:15,50,36}.status-dropdown-target--cyan,.status-dropdown-target--done,.status-dropdown-target--green,.status-dropdown-target--open,.status-dropdown-target--pink,.status-dropdown-target--red,.status-dropdown-target--teal,.status-dropdown-target--violet,.status-dropdown-target--waiting,.status-dropdown-target--yellow{background-color:rgb(var(--status-target-bg));color:rgb(var(--status-target-color))}.status-dropdown-target--open{--status-target-color:var(--neeto-molecules-status-color-open);--status-target-bg:var(--neeto-molecules-status-bg-open)}.status-dropdown-target--done{--status-target-color:var(--neeto-molecules-status-color-done);--status-target-bg:var(--neeto-molecules-status-bg-done)}.status-dropdown-target--waiting{--status-target-color:var(--neeto-molecules-status-color-waiting);--status-target-bg:var(--neeto-molecules-status-bg-waiting)}.status-dropdown-target--red{--status-target-color:var(--neeto-molecules-status-color-red);--status-target-bg:var(--neeto-molecules-status-bg-red)}.status-dropdown-target--yellow{--status-target-color:var(--neeto-molecules-status-color-yellow);--status-target-bg:var(--neeto-molecules-status-bg-yellow)}.status-dropdown-target--violet{--status-target-color:var(--neeto-molecules-status-color-violet);--status-target-bg:var(--neeto-molecules-status-bg-violet)}.status-dropdown-target--pink{--status-target-color:var(--neeto-molecules-status-color-pink);--status-target-bg:var(--neeto-molecules-status-bg-pink)}.status-dropdown-target--teal{--status-target-color:var(--neeto-molecules-status-color-teal);--status-target-bg:var(--neeto-molecules-status-bg-teal)}.status-dropdown-target--cyan{--status-target-color:var(--neeto-molecules-status-color-cyan);--status-target-bg:var(--neeto-molecules-status-bg-cyan)}.status-dropdown-target--green{--status-target-color:var(--neeto-molecules-status-color-green);--status-target-bg:var(--neeto-molecules-status-bg-green)}.status-dropdown-item--open{color:#095aba!important;color:rgb(var(--neeto-molecules-status-color-open))!important}.status-dropdown-item--done{color:#bd640d!important;color:rgb(var(--neeto-molecules-status-color-done))!important}.status-dropdown-item--waiting{color:#2f3941!important;color:rgb(var(--neeto-molecules-status-color-waiting))!important}.status-dropdown-item--red{color:#bb121a!important;color:rgb(var(--neeto-molecules-status-color-red))!important}.status-dropdown-item--yellow{color:#ffcc70!important;color:rgb(var(--neeto-molecules-status-color-yellow))!important}.status-dropdown-item--violet{color:#9d62a2!important;color:rgb(var(--neeto-molecules-status-color-violet))!important}.status-dropdown-item--pink{color:#e13ee6!important;color:rgb(var(--neeto-molecules-status-color-pink))!important}.status-dropdown-item--teal{color:#26577c!important;color:rgb(var(--neeto-molecules-status-color-teal))!important}.status-dropdown-item--cyan{color:#42a09d!important;color:rgb(var(--neeto-molecules-status-color-cyan))!important}.status-dropdown-item--green{color:#107154!important;color:rgb(var(--neeto-molecules-status-color-green))!important}";
50
+ var css = ":root{--neeto-molecules-status-color-open:9,90,186;--neeto-molecules-status-color-done:189,100,13;--neeto-molecules-status-color-waiting:47,57,65;--neeto-molecules-status-color-red:187,18,26;--neeto-molecules-status-color-yellow:255,204,112;--neeto-molecules-status-color-violet:157,98,162;--neeto-molecules-status-color-pink:225,62,230;--neeto-molecules-status-color-teal:38,87,124;--neeto-molecules-status-color-cyan:66,160,157;--neeto-molecules-status-color-green:16,113,84;--neeto-molecules-status-bg-open:226,241,255;--neeto-molecules-status-bg-done:250,241,225;--neeto-molecules-status-bg-waiting:233,235,237;--neeto-molecules-status-bg-red:254,236,240;--neeto-molecules-status-bg-yellow:255,247,233;--neeto-molecules-status-bg-violet:235,222,255;--neeto-molecules-status-bg-pink:254,233,255;--neeto-molecules-status-bg-teal:228,244,255;--neeto-molecules-status-bg-cyan:224,255,254;--neeto-molecules-status-bg-green:224,244,238}.dark{--neeto-molecules-status-color-open:144,194,255;--neeto-molecules-status-bg-open:24,42,66;--neeto-molecules-status-color-done:255,194,121;--neeto-molecules-status-bg-done:54,38,18;--neeto-molecules-status-color-waiting:255,255,255;--neeto-molecules-status-bg-waiting:16,24,40;--neeto-molecules-status-color-red:255,119,130;--neeto-molecules-status-bg-red:60,20,24;--neeto-molecules-status-color-yellow:255,221,138;--neeto-molecules-status-bg-yellow:60,48,20;--neeto-molecules-status-color-violet:218,170,255;--neeto-molecules-status-bg-violet:49,27,63;--neeto-molecules-status-color-pink:255,155,255;--neeto-molecules-status-bg-pink:56,30,60;--neeto-molecules-status-color-teal:139,205,255;--neeto-molecules-status-bg-teal:22,42,55;--neeto-molecules-status-color-cyan:130,255,247;--neeto-molecules-status-bg-cyan:14,49,48;--neeto-molecules-status-color-green:117,255,195;--neeto-molecules-status-bg-green:15,50,36}.status-dropdown-target--cyan,.status-dropdown-target--done,.status-dropdown-target--green,.status-dropdown-target--open,.status-dropdown-target--pink,.status-dropdown-target--red,.status-dropdown-target--teal,.status-dropdown-target--violet,.status-dropdown-target--waiting,.status-dropdown-target--yellow{background-color:rgb(var(--status-target-bg));color:rgb(var(--status-target-color))}.status-dropdown-target--open{--status-target-color:var(--neeto-molecules-status-color-open);--status-target-bg:var(--neeto-molecules-status-bg-open)}.status-dropdown-target--done{--status-target-color:var(--neeto-molecules-status-color-done);--status-target-bg:var(--neeto-molecules-status-bg-done)}.status-dropdown-target--waiting{--status-target-color:var(--neeto-molecules-status-color-waiting);--status-target-bg:var(--neeto-molecules-status-bg-waiting)}.status-dropdown-target--red{--status-target-color:var(--neeto-molecules-status-color-red);--status-target-bg:var(--neeto-molecules-status-bg-red)}.status-dropdown-target--yellow{--status-target-color:var(--neeto-molecules-status-color-yellow);--status-target-bg:var(--neeto-molecules-status-bg-yellow)}.status-dropdown-target--violet{--status-target-color:var(--neeto-molecules-status-color-violet);--status-target-bg:var(--neeto-molecules-status-bg-violet)}.status-dropdown-target--pink{--status-target-color:var(--neeto-molecules-status-color-pink);--status-target-bg:var(--neeto-molecules-status-bg-pink)}.status-dropdown-target--teal{--status-target-color:var(--neeto-molecules-status-color-teal);--status-target-bg:var(--neeto-molecules-status-bg-teal)}.status-dropdown-target--cyan{--status-target-color:var(--neeto-molecules-status-color-cyan);--status-target-bg:var(--neeto-molecules-status-bg-cyan)}.status-dropdown-target--green{--status-target-color:var(--neeto-molecules-status-color-green);--status-target-bg:var(--neeto-molecules-status-bg-green)}.status-dropdown-item--open,.status-dropdown-item--open *{color:#095aba!important;color:rgb(var(--neeto-molecules-status-color-open))!important}.status-dropdown-item--done,.status-dropdown-item--done *{color:#bd640d!important;color:rgb(var(--neeto-molecules-status-color-done))!important}.status-dropdown-item--waiting,.status-dropdown-item--waiting *{color:#2f3941!important;color:rgb(var(--neeto-molecules-status-color-waiting))!important}.status-dropdown-item--red,.status-dropdown-item--red *{color:#bb121a!important;color:rgb(var(--neeto-molecules-status-color-red))!important}.status-dropdown-item--yellow,.status-dropdown-item--yellow *{color:#ffcc70!important;color:rgb(var(--neeto-molecules-status-color-yellow))!important}.status-dropdown-item--violet,.status-dropdown-item--violet *{color:#9d62a2!important;color:rgb(var(--neeto-molecules-status-color-violet))!important}.status-dropdown-item--pink,.status-dropdown-item--pink *{color:#e13ee6!important;color:rgb(var(--neeto-molecules-status-color-pink))!important}.status-dropdown-item--teal,.status-dropdown-item--teal *{color:#26577c!important;color:rgb(var(--neeto-molecules-status-color-teal))!important}.status-dropdown-item--cyan,.status-dropdown-item--cyan *{color:#42a09d!important;color:rgb(var(--neeto-molecules-status-color-cyan))!important}.status-dropdown-item--green,.status-dropdown-item--green *{color:#107154!important;color:rgb(var(--neeto-molecules-status-color-green))!important}";
40
51
  n(css,{});
41
52
 
42
- var ICON_SIZE = 16;
43
-
44
53
  var _excluded = ["color", "value", "label", "dataTestid", "isClearable", "onClear", "placeholder"];
45
54
  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; }
46
55
  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; }
@@ -55,7 +64,7 @@ var Target = /*#__PURE__*/forwardRef(function (_ref, ref) {
55
64
  otherProps = _objectWithoutProperties(_ref, _excluded);
56
65
  var _useTranslation = useTranslation(),
57
66
  t = _useTranslation.t;
58
- var targetClassName = "rounded-sm inline-flex items-center gap-2 cursor-pointer py-0.5 px-2 status-dropdown-target--".concat(color || "waiting");
67
+ var targetClassName = "pointer-events-auto rounded-sm inline-flex items-center gap-2 cursor-pointer py-0.5 px-2 status-dropdown-target--".concat(color || "waiting");
59
68
  var isOptionSelected = !isNil(value);
60
69
  var handleClearClick = function handleClearClick(event) {
61
70
  onClear();
@@ -77,6 +86,7 @@ var Target = /*#__PURE__*/forwardRef(function (_ref, ref) {
77
86
  children: [isOptionSelected ? /*#__PURE__*/jsx(Typography, {
78
87
  className: "inline",
79
88
  variant: "body2",
89
+ weight: "medium",
80
90
  children: label
81
91
  }) : /*#__PURE__*/jsx(Typography, {
82
92
  className: "text-muted-foreground inline",
@@ -107,7 +117,9 @@ Target.displayName = "Target";
107
117
  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; }
108
118
  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; }
109
119
  var StatusDropdown = function StatusDropdown(_ref) {
110
- var _ref$disabled = _ref.disabled,
120
+ var _ref$className = _ref.className,
121
+ className = _ref$className === void 0 ? "w-full" : _ref$className,
122
+ _ref$disabled = _ref.disabled,
111
123
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
112
124
  _ref$hiddenStatuses = _ref.hiddenStatuses,
113
125
  hiddenStatuses = _ref$hiddenStatuses === void 0 ? [] : _ref$hiddenStatuses,
@@ -131,17 +143,31 @@ var StatusDropdown = function StatusDropdown(_ref) {
131
143
  }, options);
132
144
  return /*#__PURE__*/jsx(DropdownMenu, {
133
145
  disabled: disabled,
146
+ position: "bottom-end",
147
+ customTarget:
148
+ /*#__PURE__*/
149
+ // The wrapper is the popper anchor: full row width by default so the
150
+ // menu aligns with the row end like the other metadata dropdowns,
151
+ // while the colored chip inside keeps its intrinsic width. The
152
+ // wrapper ignores pointer events so only the chip is clickable —
153
+ // Radix's trigger handlers live on the wrapper and still fire when
154
+ // chip clicks bubble up.
155
+ jsx("div", {
156
+ className: "pointer-events-none ".concat(className),
157
+ children: /*#__PURE__*/jsx(Target, _objectSpread({
158
+ label: selectedValue
159
+ }, _objectSpread(_objectSpread({}, selectedOption), {}, {
160
+ dataTestid: dataTestid,
161
+ isClearable: isClearable,
162
+ onClear: onClear,
163
+ placeholder: placeholder
164
+ })))
165
+ }),
134
166
  dropdownProps: {
167
+ className: "w-64",
168
+ collisionPadding: 8,
135
169
  "data-testid": "status-dropdown-menu"
136
170
  },
137
- customTarget: /*#__PURE__*/jsx(Target, _objectSpread({
138
- label: selectedValue
139
- }, _objectSpread(_objectSpread({}, selectedOption), {}, {
140
- dataTestid: dataTestid,
141
- isClearable: isClearable,
142
- onClear: onClear,
143
- placeholder: placeholder
144
- }))),
145
171
  children: isLoading ? /*#__PURE__*/jsx("div", {
146
172
  className: "flex w-full items-center justify-center py-8",
147
173
  children: /*#__PURE__*/jsx(Spinner, {})
@@ -149,6 +175,7 @@ var StatusDropdown = function StatusDropdown(_ref) {
149
175
  hiddenStatuses: hiddenStatuses,
150
176
  onItemClick: onItemClick,
151
177
  options: options,
178
+ selectedValue: selectedValue,
152
179
  shouldShowAllOptions: shouldShowAllOptions
153
180
  })
154
181
  });
@@ -1 +1 @@
1
- {"version":3,"file":"StatusDropdown.js","sources":["../../src/v2/components/StatusDropdown/Menu.jsx","../../src/v2/components/StatusDropdown/constants.js","../../src/v2/components/StatusDropdown/Target.jsx","../../src/v2/components/StatusDropdown/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { DropdownMenu } from \"@bigbinary/neeto-atoms\";\nimport { hyphenate } from \"neetocist\";\n\nconst Menu = ({\n onItemClick,\n options,\n shouldShowAllOptions = false,\n hiddenStatuses = [],\n}) => {\n const allowedOptions = shouldShowAllOptions\n ? options\n : options.filter(status => !hiddenStatuses.includes(status.value));\n\n return (\n <>\n {allowedOptions?.map(option => (\n <DropdownMenu.MenuItem\n className={`status-dropdown-item--${option.color}`}\n data-testid={`status-dropdown-item-${hyphenate(option.value)}`}\n key={option.value}\n onClick={() => onItemClick(option)}\n >\n {option.label}\n </DropdownMenu.MenuItem>\n ))}\n </>\n );\n};\n\nexport default memo(Menu);\n","export const ICON_SIZE = 16;\n","import { forwardRef } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport { ChevronDown, X } from \"lucide-react\";\nimport { isPresent } from \"neetocist\";\nimport { isNil } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ICON_SIZE } from \"./constants.js\";\n\nconst Target = forwardRef(\n (\n {\n color,\n value,\n label,\n dataTestid,\n isClearable,\n onClear,\n placeholder,\n ...otherProps\n },\n ref\n ) => {\n const { t } = useTranslation();\n const targetClassName = `rounded-sm inline-flex items-center gap-2 cursor-pointer py-0.5 px-2 status-dropdown-target--${\n color || \"waiting\"\n }`;\n const isOptionSelected = !isNil(value);\n\n const handleClearClick = event => {\n onClear();\n event.stopPropagation();\n };\n\n const handleClearKeyDown = event => {\n if (!(event.key === \"Enter\" || event.key === \" \")) return;\n event.preventDefault();\n handleClearClick(event);\n };\n\n return (\n <button\n {...{ ref, ...otherProps }}\n aria-haspopup=\"listbox\"\n className={targetClassName}\n data-testid={isPresent(dataTestid) ? dataTestid : \"status-dropdown\"}\n type=\"button\"\n aria-label={\n isOptionSelected\n ? `Selected: ${label}`\n : placeholder || t(\"neetoMolecules.statusDropdown.placeholder\")\n }\n >\n {isOptionSelected ? (\n <Typography className=\"inline\" variant=\"body2\">\n {label}\n </Typography>\n ) : (\n <Typography className=\"text-muted-foreground inline\" variant=\"body2\">\n {placeholder || t(\"neetoMolecules.statusDropdown.placeholder\")}\n </Typography>\n )}\n <span className=\"inline-flex items-center gap-1\">\n {isClearable && isOptionSelected && (\n <span\n aria-label={t(\"neetoMolecules.statusDropdown.clear\")}\n className=\"cursor-pointer\"\n data-testid=\"status-dropdown-clear-button\"\n role=\"button\"\n tabIndex={0}\n onClick={handleClearClick}\n onKeyDown={handleClearKeyDown}\n >\n <X size={ICON_SIZE} />\n </span>\n )}\n <ChevronDown aria-hidden=\"true\" size={ICON_SIZE} />\n </span>\n </button>\n );\n }\n);\n\nTarget.displayName = \"Target\";\n\nexport default Target;\n","import { DropdownMenu, Spinner } from \"@bigbinary/neeto-atoms\";\nimport { _findBy, noop } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport Menu from \"./Menu\";\nimport \"./status-dropdown.css\";\nimport Target from \"./Target\";\n\nconst StatusDropdown = ({\n disabled = false,\n hiddenStatuses = [],\n isLoading = false,\n onItemClick,\n options,\n placeholder = null,\n selectedValue,\n shouldShowAllOptions = false,\n isClearable = false,\n onClear = noop,\n dataTestid = \"status-dropdown\",\n}) => {\n const selectedOption = _findBy({ value: selectedValue }, options);\n\n return (\n <DropdownMenu\n {...{ disabled }}\n dropdownProps={{ \"data-testid\": \"status-dropdown-menu\" }}\n customTarget={\n <Target\n label={selectedValue}\n {...{\n ...selectedOption,\n dataTestid,\n isClearable,\n onClear,\n placeholder,\n }}\n />\n }\n >\n {isLoading ? (\n <div className=\"flex w-full items-center justify-center py-8\">\n <Spinner />\n </div>\n ) : (\n <Menu\n {...{ hiddenStatuses, onItemClick, options, shouldShowAllOptions }}\n />\n )}\n </DropdownMenu>\n );\n};\n\nStatusDropdown.Menu = Menu;\n\nStatusDropdown.propTypes = {\n /**\n * This prop will decide whether the dropdown is disabled or not.\n */\n disabled: PropTypes.bool,\n /**\n * Statuses to be hidden when shouldShowAllOptions is false.\n */\n hiddenStatuses: PropTypes.array,\n /**\n * This prop will decide whether the dropdown is in loading state or not.\n */\n isLoading: PropTypes.bool,\n /**\n * Function to be called when a menu item is clicked.\n */\n onItemClick: PropTypes.func,\n /**\n * The items that should be shown in the dropdown.\n */\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n color: PropTypes.string,\n })\n ),\n /**\n * Placeholder for the dropdown.\n */\n placeholder: PropTypes.string,\n /**\n * The selected value.\n */\n selectedValue: PropTypes.string,\n /**\n * This prop will decide whether all options should be shown or not. If set to false, the items in hiddenStatuses will not be shown.\n */\n shouldShowAllOptions: PropTypes.bool,\n /**\n * This prop will decide whether the dropdown is clearable or not.\n */\n isClearable: PropTypes.bool,\n /**\n * Function to be called when the clear button is clicked.\n */\n onClear: PropTypes.func,\n};\n\nexport default StatusDropdown;\n"],"names":["Menu","_ref","onItemClick","options","_ref$shouldShowAllOpt","shouldShowAllOptions","_ref$hiddenStatuses","hiddenStatuses","allowedOptions","filter","status","includes","value","_jsx","_Fragment","children","map","option","DropdownMenu","MenuItem","className","concat","color","hyphenate","onClick","label","memo","ICON_SIZE","Target","forwardRef","ref","dataTestid","isClearable","onClear","placeholder","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","targetClassName","isOptionSelected","isNil","handleClearClick","event","stopPropagation","handleClearKeyDown","key","preventDefault","_jsxs","_objectSpread","isPresent","type","Typography","variant","role","tabIndex","onKeyDown","X","size","ChevronDown","displayName","StatusDropdown","_ref$disabled","disabled","_ref$isLoading","isLoading","_ref$placeholder","selectedValue","_ref$isClearable","_ref$onClear","noop","_ref$dataTestid","selectedOption","_findBy","dropdownProps","customTarget","Spinner"],"mappings":";;;;;;;;;;;;;AAKA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAKJ;AAAA,EAAA,IAJJC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IAAAC,qBAAA,GAAAH,IAAA,CACPI,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAAE,mBAAA,GAAAL,IAAA,CAC5BM,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,mBAAA;EAEnB,IAAME,cAAc,GAAGH,oBAAoB,GACvCF,OAAO,GACPA,OAAO,CAACM,MAAM,CAAC,UAAAC,MAAM,EAAA;IAAA,OAAI,CAACH,cAAc,CAACI,QAAQ,CAACD,MAAM,CAACE,KAAK,CAAC;EAAA,CAAA,CAAC;EAEpE,oBACEC,GAAA,CAAAC,QAAA,EAAA;IAAAC,QAAA,EACGP,cAAc,KAAA,IAAA,IAAdA,cAAc,KAAA,MAAA,GAAA,MAAA,GAAdA,cAAc,CAAEQ,GAAG,CAAC,UAAAC,MAAM,EAAA;AAAA,MAAA,oBACzBJ,GAAA,CAACK,YAAY,CAACC,QAAQ,EAAA;AACpBC,QAAAA,SAAS,2BAAAC,MAAA,CAA2BJ,MAAM,CAACK,KAAK,CAAG;QACnD,aAAA,EAAA,uBAAA,CAAAD,MAAA,CAAqCE,SAAS,CAACN,MAAM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AO;AAAEE,MAAAA,oBAAoB,EAApBA;KAC7C;AACF,GACW,CAAC;AAEnB;AAEA0D,cAAc,CAAC/D,IAAI,GAAGA,MAAI;;;;"}
1
+ {"version":3,"file":"StatusDropdown.js","sources":["../../src/v2/components/StatusDropdown/constants.js","../../src/v2/components/StatusDropdown/Menu.jsx","../../src/v2/components/StatusDropdown/Target.jsx","../../src/v2/components/StatusDropdown/index.jsx"],"sourcesContent":["export const ICON_SIZE = 16;\n","import { memo } from \"react\";\n\nimport { DropdownMenu } from \"@bigbinary/neeto-atoms\";\nimport { Check } from \"lucide-react\";\nimport { hyphenate, isPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport { ICON_SIZE } from \"./constants.js\";\n\nconst Menu = ({\n onItemClick,\n options,\n selectedValue = null,\n shouldShowAllOptions = false,\n hiddenStatuses = [],\n}) => {\n const allowedOptions = shouldShowAllOptions\n ? options\n : options.filter(status => !hiddenStatuses.includes(status.value));\n\n return (\n <div className=\"flex w-full flex-col gap-y-0.5\">\n {allowedOptions?.map(option => {\n const isSelected =\n isPresent(selectedValue) && option.value === selectedValue;\n\n return (\n <DropdownMenu.MenuItem\n className={`status-dropdown-item--${option.color}`}\n data-testid={`status-dropdown-item-${hyphenate(option.value)}`}\n isActive={isSelected}\n key={option.value}\n suffix={isSelected && <Check size={ICON_SIZE} />}\n onClick={() => onItemClick(option)}\n >\n {option.label}\n </DropdownMenu.MenuItem>\n );\n })}\n </div>\n );\n};\n\nMenu.propTypes = {\n /**\n * Statuses to be hidden when shouldShowAllOptions is false.\n */\n hiddenStatuses: PropTypes.array,\n /**\n * Function to be called when a menu item is clicked.\n */\n onItemClick: PropTypes.func,\n /**\n * The items that should be shown in the dropdown.\n */\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n color: PropTypes.string,\n })\n ),\n /**\n * The selected value; the matching option gets the active state and check.\n */\n selectedValue: PropTypes.string,\n /**\n * This prop will decide whether all options should be shown or not.\n */\n shouldShowAllOptions: PropTypes.bool,\n};\n\nexport default memo(Menu);\n","import { forwardRef } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport { ChevronDown, X } from \"lucide-react\";\nimport { isPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { isNil } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ICON_SIZE } from \"./constants.js\";\n\nconst Target = forwardRef(\n (\n {\n color,\n value,\n label,\n dataTestid,\n isClearable,\n onClear,\n placeholder,\n ...otherProps\n },\n ref\n ) => {\n const { t } = useTranslation();\n const targetClassName = `pointer-events-auto rounded-sm inline-flex items-center gap-2 cursor-pointer py-0.5 px-2 status-dropdown-target--${\n color || \"waiting\"\n }`;\n const isOptionSelected = !isNil(value);\n\n const handleClearClick = event => {\n onClear();\n event.stopPropagation();\n };\n\n const handleClearKeyDown = event => {\n if (!(event.key === \"Enter\" || event.key === \" \")) return;\n event.preventDefault();\n handleClearClick(event);\n };\n\n return (\n <button\n {...{ ref, ...otherProps }}\n aria-haspopup=\"listbox\"\n className={targetClassName}\n data-testid={isPresent(dataTestid) ? dataTestid : \"status-dropdown\"}\n type=\"button\"\n aria-label={\n isOptionSelected\n ? `Selected: ${label}`\n : placeholder || t(\"neetoMolecules.statusDropdown.placeholder\")\n }\n >\n {isOptionSelected ? (\n <Typography className=\"inline\" variant=\"body2\" weight=\"medium\">\n {label}\n </Typography>\n ) : (\n <Typography className=\"text-muted-foreground inline\" variant=\"body2\">\n {placeholder || t(\"neetoMolecules.statusDropdown.placeholder\")}\n </Typography>\n )}\n <span className=\"inline-flex items-center gap-1\">\n {isClearable && isOptionSelected && (\n <span\n aria-label={t(\"neetoMolecules.statusDropdown.clear\")}\n className=\"cursor-pointer\"\n data-testid=\"status-dropdown-clear-button\"\n role=\"button\"\n tabIndex={0}\n onClick={handleClearClick}\n onKeyDown={handleClearKeyDown}\n >\n <X size={ICON_SIZE} />\n </span>\n )}\n <ChevronDown aria-hidden=\"true\" size={ICON_SIZE} />\n </span>\n </button>\n );\n }\n);\n\nTarget.displayName = \"Target\";\n\nTarget.propTypes = {\n /**\n * Color key of the selected option, mapped to the status color classes.\n */\n color: PropTypes.string,\n /**\n * data-testid for the target button.\n */\n dataTestid: PropTypes.string,\n /**\n * This prop will decide whether the clear button is shown.\n */\n isClearable: PropTypes.bool,\n /**\n * Label of the selected option.\n */\n label: PropTypes.string,\n /**\n * Function to be called when the clear button is clicked.\n */\n onClear: PropTypes.func,\n /**\n * Placeholder shown when no option is selected.\n */\n placeholder: PropTypes.string,\n /**\n * Value of the selected option.\n */\n value: PropTypes.string,\n};\n\nexport default Target;\n","import { DropdownMenu, Spinner } from \"@bigbinary/neeto-atoms\";\nimport { _findBy, noop } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport Menu from \"./Menu\";\nimport \"./status-dropdown.css\";\nimport Target from \"./Target\";\n\nconst StatusDropdown = ({\n className = \"w-full\",\n disabled = false,\n hiddenStatuses = [],\n isLoading = false,\n onItemClick,\n options,\n placeholder = null,\n selectedValue,\n shouldShowAllOptions = false,\n isClearable = false,\n onClear = noop,\n dataTestid = \"status-dropdown\",\n}) => {\n const selectedOption = _findBy({ value: selectedValue }, options);\n\n return (\n <DropdownMenu\n {...{ disabled }}\n position=\"bottom-end\"\n customTarget={\n // The wrapper is the popper anchor: full row width by default so the\n // menu aligns with the row end like the other metadata dropdowns,\n // while the colored chip inside keeps its intrinsic width. The\n // wrapper ignores pointer events so only the chip is clickable —\n // Radix's trigger handlers live on the wrapper and still fire when\n // chip clicks bubble up.\n <div className={`pointer-events-none ${className}`}>\n <Target\n label={selectedValue}\n {...{\n ...selectedOption,\n dataTestid,\n isClearable,\n onClear,\n placeholder,\n }}\n />\n </div>\n }\n dropdownProps={{\n className: \"w-64\",\n collisionPadding: 8,\n \"data-testid\": \"status-dropdown-menu\",\n }}\n >\n {isLoading ? (\n <div className=\"flex w-full items-center justify-center py-8\">\n <Spinner />\n </div>\n ) : (\n <Menu\n {...{\n hiddenStatuses,\n onItemClick,\n options,\n selectedValue,\n shouldShowAllOptions,\n }}\n />\n )}\n </DropdownMenu>\n );\n};\n\nStatusDropdown.Menu = Menu;\n\nStatusDropdown.propTypes = {\n /**\n * External classNames for the target wrapper, which anchors the menu.\n * Defaults to `w-full` so the menu aligns with the row end like the other\n * metadata-pane dropdowns.\n */\n className: PropTypes.string,\n /**\n * This prop will decide whether the dropdown is disabled or not.\n */\n disabled: PropTypes.bool,\n /**\n * Statuses to be hidden when shouldShowAllOptions is false.\n */\n hiddenStatuses: PropTypes.array,\n /**\n * This prop will decide whether the dropdown is in loading state or not.\n */\n isLoading: PropTypes.bool,\n /**\n * Function to be called when a menu item is clicked.\n */\n onItemClick: PropTypes.func,\n /**\n * The items that should be shown in the dropdown.\n */\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n color: PropTypes.string,\n })\n ),\n /**\n * Placeholder for the dropdown.\n */\n placeholder: PropTypes.string,\n /**\n * The selected value.\n */\n selectedValue: PropTypes.string,\n /**\n * This prop will decide whether all options should be shown or not. If set to false, the items in hiddenStatuses will not be shown.\n */\n shouldShowAllOptions: PropTypes.bool,\n /**\n * This prop will decide whether the dropdown is clearable or not.\n */\n isClearable: PropTypes.bool,\n /**\n * Function to be called when the clear button is clicked.\n */\n onClear: PropTypes.func,\n /**\n * data-testid for the target button.\n */\n dataTestid: PropTypes.string,\n};\n\nexport default StatusDropdown;\n"],"names":["ICON_SIZE","Menu","_ref","onItemClick","options","_ref$selectedValue","selectedValue","_ref$shouldShowAllOpt","shouldShowAllOptions","_ref$hiddenStatuses","hiddenStatuses","allowedOptions","filter","status","includes","value","_jsx","className","children","map","option","isSelected","isPresent","DropdownMenu","MenuItem","concat","color","hyphenate","isActive","suffix","Check","size","onClick","label","memo","Target","forwardRef","ref","dataTestid","isClearable","onClear","placeholder","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","targetClassName","isOptionSelected","isNil","handleClearClick","event","stopPropagation","handleClearKeyDown","key","preventDefault","_jsxs","_objectSpread","type","Typography","variant","weight","role","tabIndex","onKeyDown","X","ChevronDown","displayName","StatusDropdown","_ref$className","_ref$disabled","disabled","_ref$isLoading","isLoading","_ref$placeholder","_ref$isClearable","_ref$onClear","noop","_ref$dataTestid","selectedOption","_findBy","position","customTarget","dropdownProps","collisionPadding","Spinner"],"mappings":";;;;;;;;;;;;;;AAAO,IAAMA,SAAS,GAAG,EAAE;;ACS3B,IAAMC,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAMJ;AAAA,EAAA,IALJC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IAAAC,kBAAA,GAAAH,IAAA,CACPI,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,kBAAA;IAAAE,qBAAA,GAAAL,IAAA,CACpBM,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAAE,mBAAA,GAAAP,IAAA,CAC5BQ,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,mBAAA;EAEnB,IAAME,cAAc,GAAGH,oBAAoB,GACvCJ,OAAO,GACPA,OAAO,CAACQ,MAAM,CAAC,UAAAC,MAAM,EAAA;IAAA,OAAI,CAACH,cAAc,CAACI,QAAQ,CAACD,MAAM,CAACE,KAAK,CAAC;EAAA,CAAA,CAAC;AAEpE,EAAA,oBACEC,GAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,gCAAgC;IAAAC,QAAA,EAC5CP,cAAc,KAAA,IAAA,IAAdA,cAAc,KAAA,MAAA,GAAA,MAAA,GAAdA,cAAc,CAAEQ,GAAG,CAAC,UAAAC,MAAM,EAAI;MAC7B,IAAMC,UAAU,GACdC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SAAS,CAAG;AAAAC,MAAAA,QAAA,eACjDF,GAAA,CAACmB,MAAM,EAAAuB,aAAA,CAAA;AACLzB,QAAAA,KAAK,EAAE3B;AAAc,OAAA,EAAAoD,aAAA,CAAAA,aAAA,CAAA,EAAA,EAEhBsB,cAAc,CAAA,EAAA,EAAA,EAAA;AACjB1C,QAAAA,UAAU,EAAVA,UAAU;AACVC,QAAAA,WAAW,EAAXA,WAAW;AACXC,QAAAA,OAAO,EAAPA,OAAO;AACPC,QAAAA,WAAW,EAAXA;OAAW,CAAA,CAEd;AAAC,KACC,CACN;AACD2C,IAAAA,aAAa,EAAE;AACbnE,MAAAA,SAAS,EAAE,MAAM;AACjBoE,MAAAA,gBAAgB,EAAE,CAAC;AACnB,MAAA,aAAa,EAAE;KACf;IAAAnE,QAAA,EAEDwD,SAAS,gBACR1D,GAAA,CAAA,KAAA,EAAA;AAAKC,MAAAA,SAAS,EAAC,8CAA8C;AAAAC,MAAAA,QAAA,eAC3DF,GAAA,CAACsE,OAAO,EAAA,EAAE;AAAC,KACR,CAAC,gBAENtE,GAAA,CAACf,MAAI,EAAA;AAEDS,MAAAA,cAAc,EAAdA,cAAc;AACdP,MAAAA,WAAW,EAAXA,WAAW;AACXC,MAAAA,OAAO,EAAPA,OAAO;AACPE,MAAAA,aAAa,EAAbA,aAAa;AACbE,MAAAA,oBAAoB,EAApBA;KAEH;AACF,GACW,CAAC;AAEnB;AAEA6D,cAAc,CAACpE,IAAI,GAAGA,MAAI;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "5.2.18",
3
+ "version": "5.2.20",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",