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/module.mjs CHANGED
@@ -234,7 +234,7 @@ const $4aac1ae7c2a46df4$export$353f5b6fc5456de1 = ({ children: children, variant
234
234
 
235
235
 
236
236
 
237
- const $f62becf1f473d668$export$298b9ad7287f04ba = " sd12 _ta12 Ue12 qe12 Gz12";
237
+ const $f62becf1f473d668$export$298b9ad7287f04ba = " sd12 _ta12 Ue12 qe12";
238
238
  const $f62becf1f473d668$export$706e9cce604ae69d = " uk12 uch12 udi12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-d12 vx12 wb12 xb12 _xa12 _Fb12 _FnuYUwec12 p9PEPsb12";
239
239
  const $f62becf1f473d668$var$inputStyles = function anonymous(props) {
240
240
  let rules = " ";
@@ -1306,6 +1306,7 @@ const $07aaa6869c77f679$export$de65de8213222d10 = ({ onClose: onClose, ...props
1306
1306
 
1307
1307
 
1308
1308
 
1309
+
1309
1310
  const $d6f6f2bb59cbf8cf$var$comboBoxContainerStyles = " sd12 _ta12 Ub12 qb12 Nh12";
1310
1311
  const $d6f6f2bb59cbf8cf$var$labelStyles = " uk12 uch12 udi12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-d12 vx12 wb12 xb12 _xa12 _Fb12 _FnuYUwec12 p9PEPsb12";
1311
1312
  const $d6f6f2bb59cbf8cf$var$inputWrapperStyles = " _Pc12 sd12 eb12";
@@ -1425,10 +1426,24 @@ const $d6f6f2bb59cbf8cf$var$listBoxItemStyles = function anonymous(props) {
1425
1426
  const $d6f6f2bb59cbf8cf$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";
1426
1427
  const $d6f6f2bb59cbf8cf$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";
1427
1428
  function $d6f6f2bb59cbf8cf$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 }) {
1429
+ const [internalInputValue, setInternalInputValue] = (0, $3A86U$useState)('');
1430
+ // Sync input value with selected item
1431
+ (0, $3A86U$useEffect)(()=>{
1432
+ if (selectedKey) {
1433
+ const selected = items.find((item)=>item.id === selectedKey);
1434
+ if (selected) setInternalInputValue(selected.label);
1435
+ } else setInternalInputValue('');
1436
+ }, [
1437
+ selectedKey,
1438
+ items
1439
+ ]);
1440
+ // Use controlled inputValue if provided, otherwise use internal state
1441
+ const effectiveInputValue = controlledInputValue !== undefined ? controlledInputValue : internalInputValue;
1442
+ const effectiveOnInputChange = controlledOnInputChange !== undefined ? controlledOnInputChange : setInternalInputValue;
1428
1443
  return (0, $3A86U$jsxs)((0, $3A86U$ComboBox), {
1429
1444
  className: $d6f6f2bb59cbf8cf$var$comboBoxContainerStyles,
1430
- inputValue: controlledInputValue,
1431
- onInputChange: controlledOnInputChange,
1445
+ inputValue: effectiveInputValue,
1446
+ onInputChange: effectiveOnInputChange,
1432
1447
  selectedKey: selectedKey,
1433
1448
  onSelectionChange: onSelectionChange,
1434
1449
  isDisabled: isDisabled,