@ballistix.digital/react-components 9.5.0 → 9.5.1-rc-368.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.
package/dist/index.js CHANGED
@@ -2239,7 +2239,7 @@ const $0c7305af577f9538$var$base = {
2239
2239
  tagItemIcon: '',
2240
2240
  list: 'px-0! w-full! *:px-0 max-h-56 overflow-scroll py-1!',
2241
2241
  listGroupLabel: '',
2242
- listItem: 'w-full! list-none! hover:bg-primary-500 hover:text-white py-2! px-2!',
2242
+ listItem: 'w-full! list-none! hover:bg-primary-500 hover:text-white py-2! px-2! cursor-pointer',
2243
2243
  listDisabledItem: '',
2244
2244
  searchContainer: 'w-full! px-2! py-2! border-b',
2245
2245
  searchBox: '',
@@ -2391,6 +2391,25 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2391
2391
  }, [
2392
2392
  error
2393
2393
  ]);
2394
+ const handleFormatOptionLabel = (data)=>{
2395
+ if (searchInputOptionRenderer && data.value.startsWith($cb1b9d36d0757897$var$searchPrefix)) {
2396
+ const tagItem = (0, $iA2ta$reactjsxruntime.jsx)("div", {
2397
+ className: styles.tagItem,
2398
+ children: (0, $iA2ta$reactjsxruntime.jsx)("p", {
2399
+ className: styles.tagItemText,
2400
+ children: data.label
2401
+ })
2402
+ });
2403
+ return (0, $iA2ta$reactjsxruntime.jsx)("div", {
2404
+ className: styles.listItem,
2405
+ children: searchInputOptionRenderer(tagItem)
2406
+ });
2407
+ }
2408
+ return (0, $iA2ta$reactjsxruntime.jsx)("div", {
2409
+ className: styles.listItem,
2410
+ children: data.label
2411
+ });
2412
+ };
2394
2413
  return (0, $iA2ta$reactjsxruntime.jsxs)("div", {
2395
2414
  className: styles.container,
2396
2415
  "data-testid": selectDataTestId,
@@ -2435,21 +2454,7 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2435
2454
  onChange: handleChange,
2436
2455
  onSearchInputChange: handleSearchInputChange,
2437
2456
  //
2438
- formatOptionLabel: (data)=>{
2439
- if (searchInputOptionRenderer && data.value.startsWith($cb1b9d36d0757897$var$searchPrefix)) {
2440
- const tagItem = (0, $iA2ta$reactjsxruntime.jsx)("div", {
2441
- className: styles.tagItem,
2442
- children: (0, $iA2ta$reactjsxruntime.jsx)("p", {
2443
- className: styles.tagItemText,
2444
- children: data.label
2445
- })
2446
- });
2447
- return (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$reactjsxruntime.Fragment), {
2448
- children: searchInputOptionRenderer(tagItem)
2449
- });
2450
- }
2451
- return data.label;
2452
- },
2457
+ formatOptionLabel: searchInputOptionRenderer ? handleFormatOptionLabel : undefined,
2453
2458
  classNames: {
2454
2459
  menuButton: ()=>(0, $622cd2936b18c771$export$4370d69198e9314a)(styles.input, `bx-select-menu-${name}`, state === null && '*:text-gray-300! ', state === null && !isValid && isTouched && '*:text-red-300!'),
2455
2460
  menu: styles.menu,