@ornikar/kitt-universal 25.53.0 → 25.54.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [25.54.0](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@25.53.0...@ornikar/kitt-universal@25.54.0) (2025-05-20)
7
+
8
+
9
+ ### Features
10
+
11
+ * **kitt-universal/modals:** compound components OSE-16940 ([#2583](https://github.com/ornikar/kitt/issues/2583)) ([8526da2](https://github.com/ornikar/kitt/commit/8526da2fa48454f88558b6f209a7434fdbc7714c))
12
+
13
+
14
+
6
15
  ## [25.53.0](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@25.52.0...@ornikar/kitt-universal@25.53.0) (2025-05-19)
7
16
 
8
17
 
@@ -16,8 +16,11 @@ interface CardModalWithChildren extends BaseCardModalProps {
16
16
  }
17
17
  interface CardModalWithoutChildren extends BaseCardModalProps {
18
18
  children?: never;
19
+ /** @deprecated use `FullscreenModal.Header` as `children` instead */
19
20
  header?: ReactNode;
21
+ /** @deprecated use `FullscreenModal.Footer` as `children` instead */
20
22
  footer?: ReactNode;
23
+ /** @deprecated use `FullscreenModal.Body` as `children` instead */
21
24
  body: ReactNode;
22
25
  }
23
26
  export type CardModalProps = CardModalWithChildren | CardModalWithoutChildren;
@@ -1 +1 @@
1
- {"version":3,"file":"CardModal.d.ts","sourceRoot":"","sources":["../../../src/CardModal/CardModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAA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AAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,uBAAuB,EACvB,KAAK,EACL,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,wBAAwB,GAAG,SAAS,CAuBtC"}
1
+ {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../src/FullscreenModal/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK9C,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,uBAAuB,EACvB,KAAK,EACL,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,wBAAwB,GAAG,SAAS,CAyBtC"}
@@ -4,17 +4,31 @@ import { FullscreenModalBody } from './Body';
4
4
  import { FullscreenModalFooter } from './Footer';
5
5
  import { FullscreenModalBehaviour } from './FullscreenModalBehaviour';
6
6
  import { FullscreenModalHeader } from './Header';
7
- export interface FullscreenModalProps {
7
+ export interface BaseFullscreenModalProps {
8
+ backgroundColor?: ViewProps['backgroundColor'];
9
+ }
10
+ interface BaseFullscreenModalPropsWithChildren extends BaseFullscreenModalProps {
11
+ children: ReactNode;
12
+ header?: never;
13
+ footer?: never;
14
+ body?: never;
15
+ }
16
+ interface BaseFullscreenModalPropsWithoutChildren extends BaseFullscreenModalProps {
17
+ children?: never;
18
+ /** @deprecated use `FullscreenModal.Header` as `children` instead */
8
19
  header?: ReactNode;
20
+ /** @deprecated use `FullscreenModal.Footer` as `children` instead */
9
21
  footer?: ReactNode;
22
+ /** @deprecated use `FullscreenModal.Body` as `children` instead */
10
23
  body: ReactNode;
11
- backgroundColor?: ViewProps['backgroundColor'];
12
24
  }
13
- export declare function FullscreenModal({ body, header, footer, backgroundColor }: FullscreenModalProps): ReactNode;
25
+ export type FullscreenModalProps = BaseFullscreenModalPropsWithChildren | BaseFullscreenModalPropsWithoutChildren;
26
+ export declare function FullscreenModal({ children, body, header, footer, backgroundColor }: FullscreenModalProps): ReactNode;
14
27
  export declare namespace FullscreenModal {
15
28
  var Header: typeof FullscreenModalHeader;
16
29
  var Footer: typeof FullscreenModalFooter;
17
30
  var Body: typeof FullscreenModalBody;
18
31
  var ModalBehaviour: typeof FullscreenModalBehaviour;
19
32
  }
33
+ export {};
20
34
  //# sourceMappingURL=FullscreenModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FullscreenModal.d.ts","sourceRoot":"","sources":["../../../src/FullscreenModal/FullscreenModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,eAAe,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CAChD;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,oBAAoB,GAAG,SAAS,CAY1G;yBAZe,eAAe"}
1
+ {"version":3,"file":"FullscreenModal.d.ts","sourceRoot":"","sources":["../../../src/FullscreenModal/FullscreenModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACvC,eAAe,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CAChD;AAED,UAAU,oCAAqC,SAAQ,wBAAwB;IAC7E,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,UAAU,uCAAwC,SAAQ,wBAAwB;IAChF,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,qEAAqE;IACrE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qEAAqE;IACrE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mEAAmE;IACnE,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,MAAM,oBAAoB,GAAG,oCAAoC,GAAG,uCAAuC,CAAC;AAElH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,oBAAoB,GAAG,SAAS,CAgBpH;yBAhBe,eAAe"}
@@ -7,9 +7,8 @@ import type { FullscreenModalFooterProps } from '../FullscreenModal/Footer';
7
7
  import type { FullscreenModalProps } from '../FullscreenModal/FullscreenModal';
8
8
  import type { FullscreenModalHeaderProps } from '../FullscreenModal/Header';
9
9
  import { NavigationModalBehaviour } from './NavigationModalBehaviour';
10
- export interface NavigationModalProps extends FullscreenModalProps {
11
- }
12
- export declare function NavigationModal({ body, backgroundColor, footer, header }: NavigationModalProps): ReactNode;
10
+ export type NavigationModalProps = FullscreenModalProps;
11
+ export declare function NavigationModal({ body, backgroundColor, footer, header, children }: NavigationModalProps): ReactNode;
13
12
  export declare namespace NavigationModal {
14
13
  var Header: (props: HeaderProps) => ReactNode;
15
14
  var Body: (props: BodyProps) => ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationModal.d.ts","sourceRoot":"","sources":["../../../src/NavigationModal/NavigationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAE5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAE5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;CAAG;AAErE,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,oBAAoB,GAAG,SAAS,CAO1G;yBAPe,eAAe;;;;;;AAS/B,KAAK,WAAW,GAAG,oBAAoB,GAAG,0BAA0B,CAAC;AAUrE,KAAK,SAAS,GAAG,kBAAkB,GAAG,wBAAwB,CAAC;AAU/D,KAAK,WAAW,GAAG,oBAAoB,GAAG,0BAA0B,CAAC"}
1
+ {"version":3,"file":"NavigationModal.d.ts","sourceRoot":"","sources":["../../../src/NavigationModal/NavigationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAE5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAE5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,oBAAoB,GAAG,SAAS,CAWpH;yBAXe,eAAe;;;;;;AAa/B,KAAK,WAAW,GAAG,oBAAoB,GAAG,0BAA0B,CAAC;AAUrE,KAAK,SAAS,GAAG,kBAAkB,GAAG,wBAAwB,CAAC;AAU/D,KAAK,WAAW,GAAG,oBAAoB,GAAG,0BAA0B,CAAC"}
@@ -7784,7 +7784,10 @@ function FullscreenModalBody(_ref) {
7784
7784
  } = useTheme();
7785
7785
  const paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
7786
7786
  const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
7787
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
7787
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
7788
+ flexGrow: 1,
7789
+ flexShrink: 1
7790
+ }, props), {}, {
7788
7791
  paddingX: "kitt.fullscreenModal.horizontalPadding",
7789
7792
  paddingTop: paddingTop,
7790
7793
  paddingBottom: paddingBottom,
@@ -8066,28 +8069,31 @@ function FullscreenModalHeader(_ref) {
8066
8069
  }
8067
8070
 
8068
8071
  function FullscreenModal({
8072
+ children,
8069
8073
  body,
8070
8074
  header,
8071
8075
  footer,
8072
8076
  backgroundColor
8073
8077
  }) {
8074
- return /*#__PURE__*/jsxs(FullscreenModalContainer, {
8078
+ return /*#__PURE__*/jsx(FullscreenModalContainer, {
8075
8079
  backgroundColor: backgroundColor,
8076
- children: [header ? /*#__PURE__*/jsx(View, {
8077
- children: header
8078
- }) : null, /*#__PURE__*/jsxs(View, {
8079
- flexGrow: 1,
8080
- flexShrink: 1,
8081
- justifyContent: "space-between",
8082
- children: [/*#__PURE__*/jsx(ScrollView$2, {
8083
- bounces: false,
8084
- contentContainerStyle: {
8085
- flexGrow: 1,
8086
- position: 'relative'
8087
- },
8088
- children: body
8089
- }), footer || null]
8090
- })]
8080
+ children: children || /*#__PURE__*/jsxs(Fragment, {
8081
+ children: [header ? /*#__PURE__*/jsx(View, {
8082
+ children: header
8083
+ }) : null, /*#__PURE__*/jsxs(View, {
8084
+ flexGrow: 1,
8085
+ flexShrink: 1,
8086
+ justifyContent: "space-between",
8087
+ children: [/*#__PURE__*/jsx(ScrollView$2, {
8088
+ bounces: false,
8089
+ contentContainerStyle: {
8090
+ flexGrow: 1,
8091
+ position: 'relative'
8092
+ },
8093
+ children: body
8094
+ }), footer || null]
8095
+ })]
8096
+ })
8091
8097
  });
8092
8098
  }
8093
8099
  FullscreenModal.Header = FullscreenModalHeader;
@@ -11539,13 +11545,17 @@ function NavigationModal({
11539
11545
  body,
11540
11546
  backgroundColor,
11541
11547
  footer,
11542
- header
11548
+ header,
11549
+ children
11543
11550
  }) {
11544
11551
  const Component = useBreakpointValue({
11545
11552
  base: FullscreenModal,
11546
11553
  small: CardModal
11547
11554
  });
11548
- return /*#__PURE__*/jsx(Component, {
11555
+ return children ? /*#__PURE__*/jsx(Component, {
11556
+ backgroundColor: backgroundColor,
11557
+ children: children
11558
+ }) : /*#__PURE__*/jsx(Component, {
11549
11559
  body: body,
11550
11560
  backgroundColor: backgroundColor,
11551
11561
  footer: footer,