@ornikar/kitt-universal 4.5.0 → 4.6.0

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.
@@ -1,13 +1,13 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
- import type { PressableProps } from 'react-native';
2
+ import type { GestureResponderEvent, PressableProps } from 'react-native';
3
3
  export interface CheckboxProps {
4
- onChange: PressableProps['onPress'];
4
+ onChange: (checked: boolean, e: GestureResponderEvent) => void;
5
5
  onBlur?: (e: any) => void;
6
6
  onFocus?: (e: any) => void;
7
- value: boolean;
7
+ checked: boolean;
8
8
  hitSlop?: number;
9
9
  id?: PressableProps['testID'];
10
10
  children?: ReactNode;
11
11
  }
12
- export declare function Checkbox({ onChange, onBlur, onFocus, value, hitSlop, id, children, }: CheckboxProps): ReactElement;
12
+ export declare function Checkbox({ onChange, onBlur, onFocus, checked, hitSlop, id, children, }: CheckboxProps): ReactElement;
13
13
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/forms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,cAAc,CAAC;AAgD1E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAY,EACZ,EAAE,EACF,QAAQ,GACT,EAAE,aAAa,GAAG,YAAY,CA8B9B"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/forms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAgD1E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC/D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAY,EACZ,EAAE,EACF,QAAQ,GACT,EAAE,aAAa,GAAG,YAAY,CA8B9B"}
@@ -1,7 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { Except } from 'type-fest';
3
3
  import type { InputTextProps } from '../InputText/InputText';
4
- export interface InputEmailProps extends Except<InputTextProps, 'autoCompleteType' | 'keyboardType' | 'textContentType'> {
4
+ export interface InputEmailProps extends Except<InputTextProps, 'autoCompleteType' | 'keyboardType' | 'textContentType' | 'autoCapitalize'> {
5
5
  }
6
6
  export declare function InputEmail(props: InputEmailProps): ReactElement;
7
7
  //# sourceMappingURL=InputEmail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputEmail.d.ts","sourceRoot":"","sources":["../../../../src/forms/InputEmail/InputEmail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,WAAW,eACf,SAAQ,MAAM,CAAC,cAAc,EAAE,kBAAkB,GAAG,cAAc,GAAG,iBAAiB,CAAC;CAAG;AAE5F,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAE/D"}
1
+ {"version":3,"file":"InputEmail.d.ts","sourceRoot":"","sources":["../../../../src/forms/InputEmail/InputEmail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,WAAW,eACf,SAAQ,MAAM,CAAC,cAAc,EAAE,kBAAkB,GAAG,cAAc,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;CAAG;AAE/G,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAU/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"InputTextContainer.web.d.ts","sourceRoot":"","sources":["../../../../src/forms/InputText/InputTextContainer.web.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,UAAU,0BAA2B,SAAQ,uBAAuB;IAClE,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB;;2kJAwC7B,CAAC"}
1
+ {"version":3,"file":"InputTextContainer.web.d.ts","sourceRoot":"","sources":["../../../../src/forms/InputText/InputTextContainer.web.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,UAAU,0BAA2B,SAAQ,uBAAuB;IAClE,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB;;2kJAyC7B,CAAC"}
@@ -1541,7 +1541,7 @@ function Checkbox(_ref6) {
1541
1541
  var onChange = _ref6.onChange,
1542
1542
  onBlur = _ref6.onBlur,
1543
1543
  onFocus = _ref6.onFocus,
1544
- value = _ref6.value,
1544
+ checked = _ref6.checked,
1545
1545
  _ref6$hitSlop = _ref6.hitSlop,
1546
1546
  hitSlop = _ref6$hitSlop === void 0 ? 40 : _ref6$hitSlop,
1547
1547
  id = _ref6.id,
@@ -1550,19 +1550,19 @@ function Checkbox(_ref6) {
1550
1550
  return /*#__PURE__*/jsxs(CheckboxAndLabelPressableWrapper, {
1551
1551
  accessibilityRole: "checkbox",
1552
1552
  accessibilityState: {
1553
- checked: value
1553
+ checked: checked
1554
1554
  },
1555
1555
  hitSlop: hitSlop,
1556
1556
  onPress: function handlePress(e) {
1557
1557
  if (onFocus) onFocus(e);
1558
- if (onChange) onChange(e);
1558
+ if (onChange) onChange(!checked, e);
1559
1559
  if (onBlur) onBlur(e);
1560
1560
  },
1561
1561
  children: [/*#__PURE__*/jsx(CheckboxContainer, {
1562
- $isChecked: value,
1562
+ $isChecked: checked,
1563
1563
  $hasLabel: !!children,
1564
1564
  testID: id,
1565
- children: value ? /*#__PURE__*/jsx(Icon, {
1565
+ children: checked ? /*#__PURE__*/jsx(Icon, {
1566
1566
  align: "center",
1567
1567
  color: theme.kitt.forms.checkbox.markColor,
1568
1568
  size: theme.kitt.forms.checkbox.iconSize,
@@ -2264,7 +2264,7 @@ function DatePicker(_ref4) {
2264
2264
  $isStretch: stretch,
2265
2265
  children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$e(_objectSpread$e({}, sharedPartProps), {}, {
2266
2266
  partName: "year",
2267
- value: currentValue === null || currentValue === void 0 ? void 0 : currentValue.getFullYear(),
2267
+ value: currentValue ? currentValue.getFullYear() : undefined,
2268
2268
  placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
2269
2269
  }))
2270
2270
  })]
@@ -2382,7 +2382,8 @@ function InputEmail(props) {
2382
2382
  return /*#__PURE__*/jsx(InputText, _objectSpread$c({
2383
2383
  autoCompleteType: "email",
2384
2384
  keyboardType: "email-address",
2385
- textContentType: "emailAddress"
2385
+ textContentType: "emailAddress",
2386
+ autoCapitalize: "none"
2386
2387
  }, props));
2387
2388
  }
2388
2389