@bbl-digital/snorre 3.0.60 → 3.0.61

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
@@ -30811,8 +30811,9 @@
30811
30811
  const [inputStateValue, setInputStateValue] = React.useState(validatedTime); // Loads of logic to handle string input with divider
30812
30812
 
30813
30813
  const onInputChange = async (event, callback) => {
30814
- const _maxLength = _defaultValue.length;
30815
- const inputValue = event.target.value;
30814
+ const _maxLength = _defaultValue.length; // Replace --:-- with 00:00 if that gets sent in.
30815
+
30816
+ const inputValue = event.target.value.replace(_defaultNullableValue, _defaultFilledValue);
30816
30817
  const position = event.target.selectionEnd || 0;
30817
30818
  const isTyped = inputValue.length > inputStateValue.length;
30818
30819
  const cursorCharacter = inputValue[position - 1];
@@ -41,8 +41,9 @@ const TimePicker = ({
41
41
  const [inputStateValue, setInputStateValue] = useState(validatedTime); // Loads of logic to handle string input with divider
42
42
 
43
43
  const onInputChange = async (event, callback) => {
44
- const _maxLength = _defaultValue.length;
45
- const inputValue = event.target.value;
44
+ const _maxLength = _defaultValue.length; // Replace --:-- with 00:00 if that gets sent in.
45
+
46
+ const inputValue = event.target.value.replace(_defaultNullableValue, _defaultFilledValue);
46
47
  const position = event.target.selectionEnd || 0;
47
48
  const isTyped = inputValue.length > inputStateValue.length;
48
49
  const cursorCharacter = inputValue[position - 1];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Timepicker/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAgC,MAAM,OAAO,CAAA;AAepD,aAAK,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;AAElD,UAAU,MAAM;IACd,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qBAAqB;IAC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CAAA;IAC3B,6CAA6C;IAC7C,QAAQ,EAAE,YAAY,CAAA;IACtB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IACxB,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+FAA+F;IAC/F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qCAAqC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA2MhC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -41,8 +41,9 @@ const TimePicker = ({
41
41
  const [inputStateValue, setInputStateValue] = useState(validatedTime); // Loads of logic to handle string input with divider
42
42
 
43
43
  const onInputChange = async (event, callback) => {
44
- const _maxLength = _defaultValue.length;
45
- const inputValue = event.target.value;
44
+ const _maxLength = _defaultValue.length; // Replace --:-- with 00:00 if that gets sent in.
45
+
46
+ const inputValue = event.target.value.replace(_defaultNullableValue, _defaultFilledValue);
46
47
  const position = event.target.selectionEnd || 0;
47
48
  const isTyped = inputValue.length > inputStateValue.length;
48
49
  const cursorCharacter = inputValue[position - 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "3.0.60",
3
+ "version": "3.0.61",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",