@bbl-digital/snorre 3.0.61 → 3.0.62

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -30811,9 +30811,8 @@
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; // Replace --:-- with 00:00 if that gets sent in.
30815
-
30816
- const inputValue = event.target.value.replace(_defaultNullableValue, _defaultFilledValue);
30814
+ const _maxLength = _defaultValue.length;
30815
+ const inputValue = event.target.value;
30817
30816
  const position = event.target.selectionEnd || 0;
30818
30817
  const isTyped = inputValue.length > inputStateValue.length;
30819
30818
  const cursorCharacter = inputValue[position - 1];
@@ -30889,8 +30888,10 @@
30889
30888
  children: [label && jsxRuntime$1.jsx(Label$1, {
30890
30889
  children: label
30891
30890
  }), jsxRuntime$1.jsx("input", {
30891
+ "data-testid": "snorre-timepicker-input",
30892
30892
  type: "text",
30893
- value: isNull ? _defaultNullableValue : inputStateValue,
30893
+ value: isNull ? undefined : inputStateValue,
30894
+ placeholder: _defaultNullableValue,
30894
30895
  disabled: disabled,
30895
30896
  autoFocus: autoFocus,
30896
30897
  css: theme => [css && css, disabled && styles$7.disabled(theme), isNull && styles$7.nullable],
@@ -41,9 +41,8 @@ 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; // Replace --:-- with 00:00 if that gets sent in.
45
-
46
- const inputValue = event.target.value.replace(_defaultNullableValue, _defaultFilledValue);
44
+ const _maxLength = _defaultValue.length;
45
+ const inputValue = event.target.value;
47
46
  const position = event.target.selectionEnd || 0;
48
47
  const isTyped = inputValue.length > inputStateValue.length;
49
48
  const cursorCharacter = inputValue[position - 1];
@@ -119,8 +118,10 @@ const TimePicker = ({
119
118
  children: [label && _jsx(Label, {
120
119
  children: label
121
120
  }), _jsx("input", {
121
+ "data-testid": "snorre-timepicker-input",
122
122
  type: "text",
123
- value: isNull ? _defaultNullableValue : inputStateValue,
123
+ value: isNull ? undefined : inputStateValue,
124
+ placeholder: _defaultNullableValue,
124
125
  disabled: disabled,
125
126
  autoFocus: autoFocus,
126
127
  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;I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4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAyMhC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -41,9 +41,8 @@ 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; // Replace --:-- with 00:00 if that gets sent in.
45
-
46
- const inputValue = event.target.value.replace(_defaultNullableValue, _defaultFilledValue);
44
+ const _maxLength = _defaultValue.length;
45
+ const inputValue = event.target.value;
47
46
  const position = event.target.selectionEnd || 0;
48
47
  const isTyped = inputValue.length > inputStateValue.length;
49
48
  const cursorCharacter = inputValue[position - 1];
@@ -119,8 +118,10 @@ const TimePicker = ({
119
118
  children: [label && _jsx(Label, {
120
119
  children: label
121
120
  }), _jsx("input", {
121
+ "data-testid": "snorre-timepicker-input",
122
122
  type: "text",
123
- value: isNull ? _defaultNullableValue : inputStateValue,
123
+ value: isNull ? undefined : inputStateValue,
124
+ placeholder: _defaultNullableValue,
124
125
  disabled: disabled,
125
126
  autoFocus: autoFocus,
126
127
  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.61",
3
+ "version": "3.0.62",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",