@bbl-digital/snorre 3.0.59 → 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];
@@ -30890,7 +30891,6 @@
30890
30891
  }), jsxRuntime$1.jsx("input", {
30891
30892
  type: "text",
30892
30893
  value: isNull ? _defaultNullableValue : inputStateValue,
30893
- defaultValue: isNull ? _defaultNullableValue : inputStateValue,
30894
30894
  disabled: disabled,
30895
30895
  autoFocus: autoFocus,
30896
30896
  css: theme => [css && css, disabled && styles$7.disabled(theme), isNull && styles$7.nullable],
@@ -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];
@@ -120,7 +121,6 @@ const TimePicker = ({
120
121
  }), _jsx("input", {
121
122
  type: "text",
122
123
  value: isNull ? _defaultNullableValue : inputStateValue,
123
- defaultValue: isNull ? _defaultNullableValue : inputStateValue,
124
124
  disabled: disabled,
125
125
  autoFocus: autoFocus,
126
126
  css: theme => [css && css, disabled && styles.disabled(theme), isNull && styles.nullable],
@@ -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;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,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,U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hC,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];
@@ -120,7 +121,6 @@ const TimePicker = ({
120
121
  }), _jsx("input", {
121
122
  type: "text",
122
123
  value: isNull ? _defaultNullableValue : inputStateValue,
123
- defaultValue: isNull ? _defaultNullableValue : inputStateValue,
124
124
  disabled: disabled,
125
125
  autoFocus: autoFocus,
126
126
  css: theme => [css && css, disabled && styles.disabled(theme), isNull && styles.nullable],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "3.0.59",
3
+ "version": "3.0.61",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",