@ornikar/kitt-universal 9.33.1 → 9.33.3

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,4 +1,4 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { PressableAnimatedContainerProps } from './PressableAnimatedContainer';
3
- export declare function PressableAnimatedContainer({ children, color, disabled, onPress, }: PressableAnimatedContainerProps): ReactElement;
3
+ export declare function PressableAnimatedContainer({ children, color, disabled, testID, onPress, }: PressableAnimatedContainerProps): ReactElement;
4
4
  //# sourceMappingURL=PressableAnimatedContainer.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PressableAnimatedContainer.web.d.ts","sourceRoot":"","sources":["../../../src/IconButton/PressableAnimatedContainer.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAGpF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE,+BAA+B,GAAG,YAAY,CAMhD"}
1
+ {"version":3,"file":"PressableAnimatedContainer.web.d.ts","sourceRoot":"","sources":["../../../src/IconButton/PressableAnimatedContainer.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAGpF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,+BAA+B,GAAG,YAAY,CAMhD"}
@@ -1,12 +1,20 @@
1
1
  import type { ReactElement } from 'react';
2
- import type { Except } from 'type-fest';
3
- import type { DatePickerInputsProps } from './components/DatePickerInputs';
2
+ import type { ResponsiveValue } from '../../utils/createResponsiveStyleFromProp/createResponsiveStyleFromProp';
4
3
  type DatePickerFillMode = 'keyboard' | 'native';
5
- export interface DatePickerProps extends Except<DatePickerInputsProps, 'onPress' | 'currentValue'> {
4
+ interface DatePickerPlaceholder {
5
+ day: string;
6
+ month: string;
7
+ year: string;
8
+ }
9
+ export interface DatePickerProps {
10
+ id?: string;
11
+ testID?: string;
12
+ disabled?: boolean;
6
13
  /**
7
14
  * @description value of the input
8
15
  */
9
16
  value?: Date;
17
+ placeholder?: DatePickerPlaceholder;
10
18
  /** @description minimum date for the value to be valid */
11
19
  minDate?: Date;
12
20
  /** @description maximum date for the value to be valid */
@@ -23,6 +31,7 @@ export interface DatePickerProps extends Except<DatePickerInputsProps, 'onPress'
23
31
  pickerUIValidateButtonLabel?: string;
24
32
  /** @description Native only props - Controls the default visibility of the native picker */
25
33
  isDefaultVisible?: boolean;
34
+ stretch?: ResponsiveValue<boolean | undefined>;
26
35
  /** @internal for story purpose */
27
36
  isHoveredInternal?: boolean;
28
37
  /** @internal for story purpose */
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/forms/DatePicker/DatePicker.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,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAI3E,KAAK,kBAAkB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEhD,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,qBAAqB,EAAE,SAAS,GAAG,cAAc,CAAC;IAChG;;OAEG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,0DAA0D;IAC1D,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,0DAA0D;IAC1D,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB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AQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,0DAA0D;IAC1D,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,6GAA6G;IAC7G,iBAAiB,CAAC,EAAE,IAAI,CAAC;IACzB,8GAA8G;IAC9G,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+HAA+H;IAC/H,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,4FAA4F;IAC5F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC/C,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAmB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,GAAG,YAAY,CASlG"}
@@ -1,8 +1,9 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { ViewProps } from '../../../native-base/primitives';
3
+ import type { DatePickerProps } from '../DatePicker';
3
4
  interface PartContainerProps {
4
5
  children: ReactNode;
5
- isStretch?: boolean;
6
+ isStretch?: DatePickerProps['stretch'];
6
7
  width?: ViewProps['width'];
7
8
  }
8
9
  export declare function PartContainer({ children, isStretch, width }: PartContainerProps): ReactElement;
@@ -1 +1 @@
1
- {"version":3,"file":"PartContainer.d.ts","sourceRoot":"","sources":["../../../../../src/forms/DatePicker/components/PartContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAIjE,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,GAAG,YAAY,CAU9F"}
1
+ {"version":3,"file":"PartContainer.d.ts","sourceRoot":"","sources":["../../../../../src/forms/DatePicker/components/PartContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,GAAG,YAAY,CAU9F"}
@@ -0,0 +1,8 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { DatePickerProps } from '../DatePicker';
3
+ interface PressableDateInputsProps extends Omit<DatePickerProps, 'onChange'> {
4
+ onPress: () => void;
5
+ }
6
+ export declare function PressableDateInputs({ disabled, stretch, id, testID, value, placeholder, isFocusedInternal, isHoveredInternal, isPressedInternal, onPress, }: PressableDateInputsProps): ReactElement;
7
+ export {};
8
+ //# sourceMappingURL=PressableDateInputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PressableDateInputs.d.ts","sourceRoot":"","sources":["../../../../../src/forms/DatePicker/components/PressableDateInputs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKrD,UAAU,wBAAyB,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IAC1E,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,OAAO,EACP,EAAE,EACF,MAAM,EACN,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,GACR,EAAE,wBAAwB,GAAG,YAAY,CAiDzC"}
@@ -3849,12 +3849,12 @@ function KeyboardDatePicker(_ref) {
3849
3849
  });
3850
3850
  }
3851
3851
 
3852
- function DatePickerInputs(_ref) {
3852
+ function PressableDateInputs(_ref) {
3853
3853
  var disabled = _ref.disabled,
3854
3854
  stretch = _ref.stretch,
3855
3855
  id = _ref.id,
3856
3856
  testID = _ref.testID,
3857
- currentValue = _ref.currentValue,
3857
+ value = _ref.value,
3858
3858
  placeholder = _ref.placeholder,
3859
3859
  isFocusedInternal = _ref.isFocusedInternal,
3860
3860
  isHoveredInternal = _ref.isHoveredInternal,
@@ -3870,7 +3870,7 @@ function DatePickerInputs(_ref) {
3870
3870
  display: "flex",
3871
3871
  flexDirection: "row",
3872
3872
  position: "relative",
3873
- alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'base-line'),
3873
+ alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'baseline'),
3874
3874
  nativeID: id,
3875
3875
  disabled: disabled,
3876
3876
  testID: testID,
@@ -3878,6 +3878,7 @@ function DatePickerInputs(_ref) {
3878
3878
  children: /*#__PURE__*/jsxs(View, {
3879
3879
  position: "relative",
3880
3880
  width: createResponsiveStyleFromProp(stretch, '100%'),
3881
+ pointerEvents: "none",
3881
3882
  children: [/*#__PURE__*/jsxs(HStack, {
3882
3883
  space: "kitt.2",
3883
3884
  width: createResponsiveStyleFromProp(stretch, '100%'),
@@ -3886,21 +3887,21 @@ function DatePickerInputs(_ref) {
3886
3887
  width: "kitt.forms.datePicker.day.minWidth",
3887
3888
  children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3888
3889
  placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day,
3889
- value: currentValue ? dayFormatter(currentValue.getDate()) : undefined
3890
+ value: value ? dayFormatter(value.getDate()) : undefined
3890
3891
  }))
3891
3892
  }), /*#__PURE__*/jsx(PartContainer, {
3892
3893
  isStretch: stretch,
3893
3894
  width: "kitt.forms.datePicker.month.minWidth",
3894
3895
  children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3895
3896
  placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month,
3896
- value: currentValue ? monthFormatter(currentValue.getMonth() + 1) : undefined
3897
+ value: value ? monthFormatter(value.getMonth() + 1) : undefined
3897
3898
  }))
3898
3899
  }), /*#__PURE__*/jsx(PartContainer, {
3899
3900
  isStretch: stretch,
3900
3901
  width: "kitt.forms.datePicker.year.minWidth",
3901
3902
  children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3902
3903
  placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year,
3903
- value: currentValue ? yearFormatter(currentValue.getFullYear()) : undefined
3904
+ value: value ? yearFormatter(value.getFullYear()) : undefined
3904
3905
  }))
3905
3906
  })]
3906
3907
  }), /*#__PURE__*/jsx(View, {
@@ -3958,8 +3959,8 @@ function DatePickerAndroid(_ref) {
3958
3959
  if (isDefaultVisible) handleModalOpen();
3959
3960
  // eslint-disable-next-line react-hooks/exhaustive-deps
3960
3961
  }, []);
3961
- return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
3962
- currentValue: currentValue,
3962
+ return /*#__PURE__*/jsx(PressableDateInputs, _objectSpread({
3963
+ value: currentValue,
3963
3964
  isFocusedInternal: isFocused,
3964
3965
  onPress: handleModalOpen
3965
3966
  }, props));
@@ -4452,8 +4453,8 @@ function DefaultNativeUIDatePicker(_ref) {
4452
4453
  setIsFocused(false);
4453
4454
  };
4454
4455
  return /*#__PURE__*/jsxs(Fragment, {
4455
- children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
4456
- currentValue: currentValue,
4456
+ children: [/*#__PURE__*/jsx(PressableDateInputs, _objectSpread({
4457
+ value: currentValue,
4457
4458
  isFocusedInternal: isFocused || isFocusedInternal,
4458
4459
  isHoveredInternal: isHoveredInternal,
4459
4460
  isPressedInternal: isPressedInternal,