@bbl-digital/snorre 3.0.8 → 3.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"useAutocomplete.d.ts","sourceRoot":"","sources":["../../../../src/packages/core/Autocomplete/hooks/useAutocomplete.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAE1D,QAAA,MAAM,eAAe,UAAW,MAAM;;;;;;uBAuBV,MAAM,WAAW,CAAC,gBAAgB,CAAC;yBAwJjC,mBAAmB,CAAC,gBAAgB,CAAC;+BAZ/B,mBAAmB,CAAC,gBAAgB,CAAC;;qBA3H/C,gBAAgB,CAAC,gBAAgB,EAAE,OAAO,CAAC;;;;;;CAqNpE,CAAA;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"useAutocomplete.d.ts","sourceRoot":"","sources":["../../../../src/packages/core/Autocomplete/hooks/useAutocomplete.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAE1D,QAAA,MAAM,eAAe,UAAW,MAAM;;;;;;uBAuBV,MAAM,WAAW,CAAC,gBAAgB,CAAC;yBAkJjC,mBAAmB,CAAC,gBAAgB,CAAC;+BAZ/B,mBAAmB,CAAC,gBAAgB,CAAC;;qBArH/C,gBAAgB,CAAC,gBAAgB,EAAE,OAAO,CAAC;;;;;;CA+MpE,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -38,8 +38,6 @@ const useAutocomplete = props => {
38
38
  const onFuzzyBlur = e => {
39
39
  // If the value of the input is changed, and does not match the value of the values array,
40
40
  // we should revert back the input value to the original value
41
- //What
42
- // if (!e.target.value.length) clearSelectedItem()
43
41
  if (e.target.value === props.value) return; // If target value is the same as a value from the values array, we should set the value for the user
44
42
 
45
43
  if (inputValues?.length) {
@@ -50,10 +48,7 @@ const useAutocomplete = props => {
50
48
  setValueChanged(val);
51
49
  handleValueClick(valueInInputValues);
52
50
  return;
53
- } // Otherwise we should return to the original input value
54
-
55
-
56
- setValueChanged(props.value ?? '');
51
+ }
57
52
  }
58
53
  };
59
54
 
@@ -60,8 +60,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(({
60
60
  return _jsxs(_Fragment, {
61
61
  children: [_jsxs("label", {
62
62
  ref: inputWrapperRef,
63
- css: theme => [styles.default(theme), (props.invalid || props.invalidMessage) && styles.invalid(theme), props.validation && styles.validation, props.onLabelClick && styles.clickableLabel, height && styles.height(height), css && css],
64
63
  onClick: props.onLabelClick ? e => e.preventDefault() : undefined,
64
+ css: theme => [styles.default(theme), (props.invalid || props.invalidMessage) && styles.invalid(theme), props.validation && styles.validation, props.onLabelClick && styles.clickableLabel, height && styles.height(height), css && css],
65
65
  children: [_jsxs("span", {
66
66
  css: styles.label,
67
67
  children: [props.label && (props.onLabelClick ? _jsx(Link, {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Autocomplete/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIjD,QAAA,MAAM,MAAM;qBACO,SAAS;;;0BA2DJ,SAAS;;;;kBAuCjB,SAAS;6BAyBE,SAAS;yBAGb,MAAM;iCAOE,MAAM;kCAGL,MAAM;qBAGnB,SAAS;4BAYF,SAAS;qBA4BhB,MAAM;sBAKL,SAAS;CAM5B,CAAA;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,8CAM5C,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;UAcjB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Autocomplete/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIjD,QAAA,MAAM,MAAM;qBACO,SAAS;;;0BA2DJ,SAAS;;;;kBAuCjB,SAAS;6BA2BE,SAAS;yBAGb,MAAM;iCAOE,MAAM;kCAGL,MAAM;qBAGnB,SAAS;4BAYF,SAAS;qBA4BhB,MAAM;sBAKL,SAAS;CAM5B,CAAA;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,8CAM5C,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;UAcjB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,CAAA"}