fermmap-shared 0.2.4 → 0.2.5

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/main.cjs CHANGED
@@ -238,7 +238,7 @@ const $e6839169613154d7$export$353f5b6fc5456de1 = ({ children: children, variant
238
238
 
239
239
 
240
240
 
241
- const $6ab530226d5e3153$export$298b9ad7287f04ba = " sd12 _ta12 Ue12 qe12 Gz12";
241
+ const $6ab530226d5e3153$export$298b9ad7287f04ba = " sd12 _ta12 Ue12 qe12";
242
242
  const $6ab530226d5e3153$export$706e9cce604ae69d = " uk12 uch12 udi12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-d12 vx12 wb12 xb12 _xa12 _Fb12 _FnuYUwec12 p9PEPsb12";
243
243
  const $6ab530226d5e3153$var$inputStyles = function anonymous(props) {
244
244
  let rules = " ";
@@ -1310,6 +1310,7 @@ const $5a568b5eb65bfe76$export$de65de8213222d10 = ({ onClose: onClose, ...props
1310
1310
 
1311
1311
 
1312
1312
 
1313
+
1313
1314
  const $1c0dbf01eb96351a$var$comboBoxContainerStyles = " sd12 _ta12 Ub12 qb12 Nh12";
1314
1315
  const $1c0dbf01eb96351a$var$labelStyles = " uk12 uch12 udi12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-d12 vx12 wb12 xb12 _xa12 _Fb12 _FnuYUwec12 p9PEPsb12";
1315
1316
  const $1c0dbf01eb96351a$var$inputWrapperStyles = " _Pc12 sd12 eb12";
@@ -1429,10 +1430,24 @@ const $1c0dbf01eb96351a$var$listBoxItemStyles = function anonymous(props) {
1429
1430
  const $1c0dbf01eb96351a$var$descriptionStyles = " uk12 uch12 udi12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-c12 vx12 wc12 xc12 _xa12 wezxGHbtN5kwb12 xezxGHbg12 _xezxGHba12 wfd12 xfd12 _xfa12 wfX0cczbc12 xfX0cczbc12 _xfX0cczba12 _Fd12 _FezxGHba12 _FnuYUweb12 pn12";
1430
1431
  const $1c0dbf01eb96351a$var$errorStyles = " uk12 uch12 udi12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-c12 vx12 wc12 xc12 _xa12 wezxGHbtN5kwb12 xezxGHbg12 _xezxGHba12 wfd12 xfd12 _xfa12 wfX0cczbc12 xfX0cczbc12 _xfX0cczba12 _Fd12 _FezxGHba12 _FnuYUweb12 pnkUCZ12";
1431
1432
  function $1c0dbf01eb96351a$export$72b9695b8216309a({ label: label, description: description, errorMessage: errorMessage, isRequired: isRequired = false, isDisabled: isDisabled = false, selectedKey: selectedKey, onSelectionChange: onSelectionChange, items: items, placeholder: placeholder, 'aria-label': ariaLabel, inputValue: controlledInputValue, onInputChange: controlledOnInputChange }) {
1433
+ const [internalInputValue, setInternalInputValue] = (0, $fs04y$react.useState)('');
1434
+ // Sync input value with selected item
1435
+ (0, $fs04y$react.useEffect)(()=>{
1436
+ if (selectedKey) {
1437
+ const selected = items.find((item)=>item.id === selectedKey);
1438
+ if (selected) setInternalInputValue(selected.label);
1439
+ } else setInternalInputValue('');
1440
+ }, [
1441
+ selectedKey,
1442
+ items
1443
+ ]);
1444
+ // Use controlled inputValue if provided, otherwise use internal state
1445
+ const effectiveInputValue = controlledInputValue !== undefined ? controlledInputValue : internalInputValue;
1446
+ const effectiveOnInputChange = controlledOnInputChange !== undefined ? controlledOnInputChange : setInternalInputValue;
1432
1447
  return (0, $fs04y$reactjsxruntime.jsxs)((0, $fs04y$reactariacomponents.ComboBox), {
1433
1448
  className: $1c0dbf01eb96351a$var$comboBoxContainerStyles,
1434
- inputValue: controlledInputValue,
1435
- onInputChange: controlledOnInputChange,
1449
+ inputValue: effectiveInputValue,
1450
+ onInputChange: effectiveOnInputChange,
1436
1451
  selectedKey: selectedKey,
1437
1452
  onSelectionChange: onSelectionChange,
1438
1453
  isDisabled: isDisabled,