@bbl-digital/snorre 2.2.23 → 2.2.24

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/bundle.js CHANGED
@@ -874,7 +874,7 @@
874
874
  handleDebounceChange(debouncedValue); // eslint-disable-next-line react-hooks/exhaustive-deps
875
875
  }, [debouncedValue]);
876
876
  return jsxRuntime$1.jsxs("label", {
877
- css: theme => [styles$j.default(theme), props.highlight && styles$j.highligted(height), props.type === 'search' && styles$j.searchLabel(theme), props.validation && styles$j.validation, props.invalidMessage && styles$j.invalid(theme), height && styles$j.height(height)],
877
+ css: theme => [styles$j.default(theme), props.highlight && styles$j.highligted(height), props.type === 'search' && styles$j.searchLabel(theme), props.validation && styles$j.validation, (props.invalid || props.invalidMessage) && styles$j.invalid(theme), height && styles$j.height(height)],
878
878
  children: [props.label && jsxRuntime$1.jsx("span", {
879
879
  children: props.label
880
880
  }), jsxRuntime$1.jsx("input", {
@@ -59,7 +59,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
59
59
  handleDebounceChange(debouncedValue); // eslint-disable-next-line react-hooks/exhaustive-deps
60
60
  }, [debouncedValue]);
61
61
  return _jsxs("label", {
62
- css: theme => [styles.default(theme), props.highlight && styles.highligted(height), props.type === 'search' && styles.searchLabel(theme), props.validation && styles.validation, props.invalidMessage && styles.invalid(theme), height && styles.height(height)],
62
+ css: theme => [styles.default(theme), props.highlight && styles.highligted(height), props.type === 'search' && styles.searchLabel(theme), props.validation && styles.validation, (props.invalid || props.invalidMessage) && styles.invalid(theme), height && styles.height(height)],
63
63
  children: [props.label && _jsx("span", {
64
64
  children: props.label
65
65
  }), _jsx("input", {
@@ -43,6 +43,8 @@ interface IProps {
43
43
  validation?: boolean;
44
44
  /** Invalid message */
45
45
  invalidMessage?: string;
46
+ /** Activates invalid styling for custom external validation */
47
+ invalid?: boolean;
46
48
  /** Set the height of the input, border comes in addition to height */
47
49
  height?: string;
48
50
  }
@@ -1 +1 @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iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACzD,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC3D,gBAAgB;IAChB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,kDAAkD;IAClD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iBAAiB;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0BAA0B;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,oBAAY,GAAG,GAAG,GAAG,CAAA;AAErB,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,CAoGjC,CAAA;AAED,eAAe,KAAK,CAAA"}
@@ -59,7 +59,7 @@ const Input = /*#__PURE__*/React.forwardRef(({
59
59
  handleDebounceChange(debouncedValue); // eslint-disable-next-line react-hooks/exhaustive-deps
60
60
  }, [debouncedValue]);
61
61
  return _jsxs("label", {
62
- css: theme => [styles.default(theme), props.highlight && styles.highligted(height), props.type === 'search' && styles.searchLabel(theme), props.validation && styles.validation, props.invalidMessage && styles.invalid(theme), height && styles.height(height)],
62
+ css: theme => [styles.default(theme), props.highlight && styles.highligted(height), props.type === 'search' && styles.searchLabel(theme), props.validation && styles.validation, (props.invalid || props.invalidMessage) && styles.invalid(theme), height && styles.height(height)],
63
63
  children: [props.label && _jsx("span", {
64
64
  children: props.label
65
65
  }), _jsx("input", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "2.2.23",
3
+ "version": "2.2.24",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",