@kosdev-code/kos-ddk-components 0.1.0-dev.9 → 0.1.0-dev.90

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 +1 @@
1
- {"version":3,"file":"dashboard-card.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/dashboard-card/dashboard-card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAKlD,UAAU,SAAS;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiBD,eAAO,MAAM,sBAAsB;;;qHAiClC,CAAC;AAEF,eAAO,MAAM,UAAU;;;qHAqBtB,CAAC;AAEF,eAAO,MAAM,SAAS;;;qHAcrB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;yGAOpB,CAAC;AAEF,eAAO,MAAM,UAAU;;;yGAMtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;yGAQtB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;UAKnB,CAAC;AAgBF,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAuED,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAEzC,CAAC;AAElC,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAEvC,CAAC"}
1
+ {"version":3,"file":"dashboard-card.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/dashboard-card/dashboard-card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAwC,MAAM,OAAO,CAAC;AAKhF,UAAU,SAAS;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiBD,eAAO,MAAM,sBAAsB;;;qHAiClC,CAAC;AAEF,eAAO,MAAM,UAAU;;;qHAqBtB,CAAC;AAEF,eAAO,MAAM,SAAS;;;qHAYrB,CAAC;AA2CF,eAAO,MAAM,QAAQ;;;yGAOpB,CAAC;AAEF,eAAO,MAAM,UAAU;;;yGAMtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;yGAQtB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;UAKnB,CAAC;AAgBF,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AA0ED,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAEzC,CAAC;AAElC,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAEvC,CAAC"}
@@ -13,6 +13,7 @@ export * from './fuel-gauge';
13
13
  export * from './full-screen-modal';
14
14
  export * from './grid';
15
15
  export * from './info-card';
16
+ export * from './info-message';
16
17
  export * from './info-table';
17
18
  export * from './input-card';
18
19
  export * from './input-range-with-unit-card';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/kos-ddk-components/src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/kos-ddk-components/src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './info-message';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/info-message/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { CardProps } from '../../styles';
2
+ import { ReactNode } from 'react';
3
+ interface InfoProp extends CardProps {
4
+ children: ReactNode;
5
+ }
6
+ export declare const InfoMessage: ({ children, ...props }: InfoProp) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=info-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info-message.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/info-message/info-message.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAyBvC,UAAU,QAAS,SAAQ,SAAS;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,GAAI,wBAAwB,QAAQ,qDAS3D,CAAC"}
@@ -2,4 +2,6 @@ export * from './content';
2
2
  export * from './footer';
3
3
  export * from './header';
4
4
  export * from './modal';
5
+ export * from './modal-container';
6
+ export * from './utility-modal';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './modal-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-components/src/components/modal/modal-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const ModalContainer: import('@emotion/styled').StyledComponent<{
2
+ theme?: import('@emotion/react').Theme;
3
+ as?: React.ElementType;
4
+ }, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ //# sourceMappingURL=modal-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-components/src/components/modal/modal-container/modal-container.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;yGAO1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './use-utility-modal';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-components/src/components/modal/utility-modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { HeaderProps } from '../header';
2
+ import { ModalProps } from '../modal';
3
+ /**
4
+ * How a utility's modal fills the screen: `maximized` (the default) is a modal
5
+ * over the shell, `fullscreen` covers the whole display with no frame.
6
+ */
7
+ export type UtilityModalLayout = "maximized" | "fullscreen";
8
+ export interface UseUtilityModalOptions {
9
+ /** The utility experience's `onComplete`: called once the modal has closed. */
10
+ onComplete?: () => void;
11
+ /** Runs when the modal starts to close, before `onComplete` (reset models here). */
12
+ onClose?: () => void;
13
+ layout?: UtilityModalLayout;
14
+ /** Steps back inside the utility: the header's back button in standard mode. */
15
+ onBack?: () => void;
16
+ /** Whether the utility can step back now; defaults to whether `onBack` is set. */
17
+ showBack?: boolean;
18
+ backButtonLabel?: string;
19
+ closeButtonLabel?: string;
20
+ }
21
+ export interface UtilityModal {
22
+ isCompact: boolean;
23
+ /** Closes the modal; `onComplete` runs when its exit transition ends. */
24
+ close: () => void;
25
+ /** Spread on `Modal`. */
26
+ modalProps: Omit<ModalProps, "children">;
27
+ /** Spread on `Header`, then set its `title` and `subtitle`. */
28
+ headerProps: Omit<HeaderProps, "title" | "subtitle">;
29
+ /** Compact mode has no header back button: render a Back button in the footer. */
30
+ showFooterBack: boolean;
31
+ }
32
+ /**
33
+ * The modal a utility experience renders in, for the component mode the DDK host
34
+ * runs in: the props for `Modal` and `Header`, and the closing mechanics.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * const { modalProps, headerProps, close } = useUtilityModal({ onComplete });
39
+ * return (
40
+ * <Modal {...modalProps}>
41
+ * <Header {...headerProps} title={t("title")} />
42
+ * <Content align="center">…</Content>
43
+ * <Footer>
44
+ * <Button mode="primary" onPointerDown={close}>{t("done")}</Button>
45
+ * </Footer>
46
+ * </Modal>
47
+ * );
48
+ * ```
49
+ */
50
+ export declare const useUtilityModal: ({ onComplete, onClose, layout, onBack, showBack, backButtonLabel, closeButtonLabel, }?: UseUtilityModalOptions) => UtilityModal;
51
+ //# sourceMappingURL=use-utility-modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-utility-modal.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-components/src/components/modal/utility-modal/use-utility-modal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,YAAY,CAAC;AAE5D,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,yBAAyB;IACzB,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACzC,+DAA+D;IAC/D,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;IACrD,kFAAkF;IAClF,cAAc,EAAE,OAAO,CAAC;CACzB;AAaD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,GAAI,wFAQ7B,sBAA2B,KAAG,YAoDhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-modal.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/workflow-modal/workflow-modal.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAkC,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAgB3E,MAAM,MAAM,MAAM,GACd,OAAO,GACP,qBAAqB,GACrB,aAAa,GACb,SAAS,GACT,kBAAkB,GAClB,UAAU,GACV,SAAS,CAAC;AA6Cd,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,+GAW3B,kBAAkB,qDAiCpB,CAAC"}
1
+ {"version":3,"file":"workflow-modal.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-components/src/components/workflow-modal/workflow-modal.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,UAAU,CAAC;AAalB,MAAM,MAAM,MAAM,GACd,OAAO,GACP,qBAAqB,GACrB,aAAa,GACb,SAAS,GACT,kBAAkB,GAClB,UAAU,GACV,SAAS,CAAC;AA6Cd,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,+GAW3B,kBAAkB,qDAiCpB,CAAC"}
package/index.cjs CHANGED
@@ -97,7 +97,7 @@ const ActionItem = styled("div", {
97
97
  user-select: none;
98
98
  white-space: nowrap;
99
99
  `;
100
- const Container$a = styled.div`
100
+ const Container$9 = styled.div`
101
101
  align-items: center;
102
102
  display: flex;
103
103
  gap: var(--ddk-component-action-item-button-container-gap);
@@ -189,7 +189,7 @@ const ActionItemButton = ({
189
189
  unitStyle = "external",
190
190
  unitValue,
191
191
  ...props
192
- }) => /* @__PURE__ */ jsxRuntime.jsxs(Container$a, { children: [
192
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(Container$9, { children: [
193
193
  unitStyle === "inline" ? /* @__PURE__ */ jsxRuntime.jsxs(
194
194
  ActionItemButtonStyles,
195
195
  {
@@ -349,13 +349,13 @@ const CardButton = styled(Card, {
349
349
  height: var(--ddk-component-card-button-svg-size);
350
350
  }
351
351
  `;
352
- const Container$9 = styled.div`
352
+ const Container$8 = styled.div`
353
353
  display: flex;
354
354
  flex-direction: column;
355
355
  height: 100%;
356
356
  margin: 0 auto;
357
357
  gap: 16px;
358
- max-width: ${(props) => props.contain === false ? "" : props.size === "small" ? "var(--ddk-component-container-max-width-small)" : props.size === "medium" ? "var(--ddk-component-container-max-width-medium)" : "var(--ddk-component-container-max-width-large)"};
358
+ max-width: ${(props) => props.contain === false ? "" : props.size === "small" ? "var(--ddk-component-container-max-width-small)" : props.size === "medium" ? "var(--ddk-component-container-max-width-medium)" : "var(--ddk-component-page-max-width, var(--ddk-component-container-max-width-large))"};
359
359
 
360
360
  overflow-y: auto;
361
361
  width: 100%;
@@ -591,6 +591,17 @@ const HeadingLarge = styled.div`
591
591
  letter-spacing: var(--ddk-component-typography-heading-large-letter-spacing);
592
592
  line-height: var(--ddk-component-typography-heading-large-line-height);
593
593
  `;
594
+ const HeadingExtraLarge = styled.div`
595
+ color: var(--ddk-component-typography-heading-x-large-color);
596
+ font-family: var(--ddk-component-typography-heading-x-large-font-family);
597
+ font-size: var(--ddk-component-typography-heading-x-large-font-size);
598
+ font-style: var(--ddk-component-typography-heading-x-large-font-style);
599
+ font-weight: var(--ddk-component-typography-heading-x-large-font-weight);
600
+ letter-spacing: var(
601
+ --ddk-component-typography-heading-x-large-letter-spacing
602
+ );
603
+ line-height: var(--ddk-component-typography-heading-x-large-line-height);
604
+ `;
594
605
  const HeadingMediumInformation = styled(HeadingMedium)`
595
606
  color: var(--ddk-component-typography-label-information-color);
596
607
  `;
@@ -627,7 +638,7 @@ const LabelInformationSmall = styled(LabelSmall)`
627
638
  const LabelInformationExtraSmall = styled(LabelExtraSmall)`
628
639
  color: var(--ddk-component-typography-label-information-color);
629
640
  `;
630
- const Container$8 = styled.div`
641
+ const Container$7 = styled.div`
631
642
  align-items: var(--ddk-component-input-container-align-items);
632
643
  display: flex;
633
644
  flex-direction: var(--ddk-component-input-container-flex-direction);
@@ -686,7 +697,7 @@ const StyledInput = styled.input`
686
697
  }
687
698
  `;
688
699
  const Input = React.forwardRef(
689
- ({ error, isError, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Container$8, { children: [
700
+ ({ error, isError, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Container$7, { children: [
690
701
  error && /* @__PURE__ */ jsxRuntime.jsx(ErrorText, { children: error }),
691
702
  /* @__PURE__ */ jsxRuntime.jsx(StyledInput, { ref, isError: isError || !!error, ...props })
692
703
  ] })
@@ -1001,7 +1012,7 @@ const ContentStyle = styled.div`
1001
1012
  `;
1002
1013
  const Content$1 = ({ align, children, className, size }) => {
1003
1014
  const { componentModeOverride } = useComponentConfigurationContext();
1004
- return /* @__PURE__ */ jsxRuntime.jsx(Container$9, { size, children: /* @__PURE__ */ jsxRuntime.jsx(
1015
+ return /* @__PURE__ */ jsxRuntime.jsx(Container$8, { size, children: /* @__PURE__ */ jsxRuntime.jsx(
1005
1016
  ContentStyle,
1006
1017
  {
1007
1018
  align,
@@ -1072,7 +1083,7 @@ const HeaderContainer = styled.div`
1072
1083
  display: flex;
1073
1084
  flex-direction: var(--ddk-component-modal-header-flex-direction);
1074
1085
  gap: var(--ddk-component-modal-header-gap);
1075
- height: var(--ddk-component-modal-header-height);
1086
+ min-height: var(--ddk-component-modal-header-height);
1076
1087
  justify-content: space-between;
1077
1088
  padding: ${(props) => props.contain ? "var(--ddk-component-modal-header-padding-maximized)" : "var(--ddk-component-modal-header-padding)"};
1078
1089
  user-select: none;
@@ -4785,7 +4796,7 @@ const modalStyles = (mode, enableAnimation) => react.css`
4785
4796
  }
4786
4797
  }
4787
4798
  `;
4788
- const ModalContainer = styled(Container$9)`
4799
+ const ModalContainer$1 = styled(Container$8)`
4789
4800
  align-items: center;
4790
4801
  display: flex;
4791
4802
  flex-direction: column;
@@ -4826,7 +4837,7 @@ const Modal = ({
4826
4837
  style,
4827
4838
  onPointerDown: () => mode !== "maximized" && closeOnShroudClick && onClose?.(),
4828
4839
  children: /* @__PURE__ */ jsxRuntime.jsx(
4829
- ModalContainer,
4840
+ ModalContainer$1,
4830
4841
  {
4831
4842
  ...props,
4832
4843
  contain: mode !== "fullscreen",
@@ -4848,14 +4859,101 @@ const Modal = ({
4848
4859
  document.body
4849
4860
  );
4850
4861
  };
4851
- const Container$7 = styled.div`
4862
+ const ModalContainer = styled.div`
4852
4863
  display: flex;
4853
4864
  flex-direction: column;
4854
4865
  overflow-y: auto;
4855
4866
  overflow-x: hidden;
4856
- gap: 40px;
4867
+ gap: var(--ddk-component-base-modal-container-gap);
4857
4868
  height: 100%;
4858
4869
  `;
4870
+ const BackText = () => {
4871
+ const { t } = kosUiSdk.useKosTranslation("common");
4872
+ return t("close");
4873
+ };
4874
+ const VolumeBackButton = ({
4875
+ children,
4876
+ fill,
4877
+ label,
4878
+ size = "medium",
4879
+ ...props
4880
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
4881
+ IconButton,
4882
+ {
4883
+ icon: fill ? kosDdkStyles.ChevronLeftIcon : kosDdkStyles.ChevronLeftIcon,
4884
+ size,
4885
+ ...props,
4886
+ children: label ?? /* @__PURE__ */ jsxRuntime.jsx(BackText, {})
4887
+ }
4888
+ );
4889
+ const backButton = (label) => function UtilityBackButton({ onPointerDown }) {
4890
+ return /* @__PURE__ */ jsxRuntime.jsx(
4891
+ VolumeBackButton,
4892
+ {
4893
+ onPointerDown,
4894
+ label,
4895
+ size: "small"
4896
+ }
4897
+ );
4898
+ };
4899
+ const useUtilityModal = ({
4900
+ onComplete,
4901
+ onClose,
4902
+ layout = "maximized",
4903
+ onBack,
4904
+ showBack = !!onBack,
4905
+ backButtonLabel = "Back",
4906
+ closeButtonLabel = "Close"
4907
+ } = {}) => {
4908
+ const { componentModeOverride } = useComponentConfigurationContext();
4909
+ const isCompact = componentModeOverride === "compact";
4910
+ const [closing, setClosing] = React.useState(false);
4911
+ const close = React.useCallback(() => {
4912
+ onClose?.();
4913
+ setClosing(true);
4914
+ }, [onClose]);
4915
+ const BackButton2 = React.useMemo(() => backButton(backButtonLabel), [
4916
+ backButtonLabel
4917
+ ]);
4918
+ const fullscreen = layout === "fullscreen";
4919
+ const modalProps = {
4920
+ show: !closing,
4921
+ mode: layout,
4922
+ contain: fullscreen ? false : !isCompact,
4923
+ // A utility closes from its own controls, never from a tap outside it.
4924
+ closeOnShroudClick: false,
4925
+ onClose: close,
4926
+ onClosed: onComplete
4927
+ };
4928
+ const headerProps = fullscreen ? {
4929
+ contain: true,
4930
+ raiseCloseButton: true,
4931
+ showCloseButton: true,
4932
+ closeButtonLabel,
4933
+ onClose: close
4934
+ } : {
4935
+ contain: isCompact,
4936
+ CloseButton: isCompact ? CompactCloseButton : void 0,
4937
+ showCloseButton: true,
4938
+ closeButtonLabel,
4939
+ onClose: close,
4940
+ OpenButton: BackButton2,
4941
+ showOpenButton: !isCompact && showBack,
4942
+ onOpen: onBack
4943
+ };
4944
+ return {
4945
+ isCompact,
4946
+ close,
4947
+ modalProps,
4948
+ headerProps,
4949
+ showFooterBack: isCompact && showBack
4950
+ };
4951
+ };
4952
+ const WorkflowModalBase = styled(Modal)`
4953
+ --ddk-component-modal-min-height: var(
4954
+ --ddk-component-workflow-modal-min-height
4955
+ );
4956
+ `;
4859
4957
  const WorkflowContent = styled(Content$1)`
4860
4958
  align-items: center;
4861
4959
  gap: 24px;
@@ -4910,13 +5008,13 @@ const WorkflowModal = ({
4910
5008
  }) => {
4911
5009
  const { componentModeOverride } = useComponentConfigurationContext();
4912
5010
  return /* @__PURE__ */ jsxRuntime.jsx(
4913
- Modal,
5011
+ WorkflowModalBase,
4914
5012
  {
4915
5013
  ...props,
4916
5014
  contain: componentModeOverride !== "compact",
4917
5015
  show,
4918
5016
  onClose,
4919
- children: /* @__PURE__ */ jsxRuntime.jsxs(Container$7, { children: [
5017
+ children: /* @__PURE__ */ jsxRuntime.jsxs(ModalContainer, { children: [
4920
5018
  (showCloseButton && !!onClose || title) && /* @__PURE__ */ jsxRuntime.jsx(
4921
5019
  Header,
4922
5020
  {
@@ -4928,10 +5026,10 @@ const WorkflowModal = ({
4928
5026
  title
4929
5027
  }
4930
5028
  ),
4931
- /* @__PURE__ */ jsxRuntime.jsx(Content$1, { children: /* @__PURE__ */ jsxRuntime.jsxs(WorkflowContent, { children: [
5029
+ /* @__PURE__ */ jsxRuntime.jsxs(WorkflowContent, { contain: componentModeOverride === "compact", children: [
4932
5030
  getIcon(status, iconStyle),
4933
5031
  information
4934
- ] }) }),
5032
+ ] }),
4935
5033
  /* @__PURE__ */ jsxRuntime.jsx(Footer, { children: footer })
4936
5034
  ] })
4937
5035
  }
@@ -5057,9 +5155,36 @@ const CardTitle$1 = styled.div`
5057
5155
  gap: 12px;
5058
5156
 
5059
5157
  letter-spacing: 0.56px;
5060
-
5061
- max-height: 36px;
5062
5158
  `;
5159
+ const TITLE_TWO_LINES = 2.6;
5160
+ const TITLE_MIN_SCALE = 0.75;
5161
+ const useFitTitle = () => {
5162
+ const ref = React.useRef(null);
5163
+ const fitted = React.useRef("");
5164
+ const fit = React.useCallback(() => {
5165
+ const el = ref.current;
5166
+ if (!el) return;
5167
+ const key = `${el.clientWidth}|${el.textContent}`;
5168
+ if (key === fitted.current) return;
5169
+ fitted.current = key;
5170
+ el.style.fontSize = "";
5171
+ let size = parseFloat(getComputedStyle(el).fontSize);
5172
+ const min = size * TITLE_MIN_SCALE;
5173
+ while (el.scrollHeight > size * TITLE_TWO_LINES && size - 1 >= min) {
5174
+ size -= 1;
5175
+ el.style.fontSize = `${size}px`;
5176
+ }
5177
+ }, []);
5178
+ React.useLayoutEffect(fit);
5179
+ React.useLayoutEffect(() => {
5180
+ const el = ref.current;
5181
+ if (!el || typeof ResizeObserver === "undefined") return;
5182
+ const observer = new ResizeObserver(() => fit());
5183
+ observer.observe(el);
5184
+ return () => observer.disconnect();
5185
+ }, [fit]);
5186
+ return ref;
5187
+ };
5063
5188
  const CardBody = styled.div`
5064
5189
  align-items: center;
5065
5190
  grid-area: body;
@@ -5126,6 +5251,7 @@ const DashboardCard = ({
5126
5251
  };
5127
5252
  const { componentModeOverride } = useComponentConfigurationContext();
5128
5253
  const isCompact = componentModeOverride === "compact";
5254
+ const titleRef = useFitTitle();
5129
5255
  return /* @__PURE__ */ jsxRuntime.jsxs(
5130
5256
  DashboardCardContainer,
5131
5257
  {
@@ -5144,7 +5270,7 @@ const DashboardCard = ({
5144
5270
  }
5145
5271
  ),
5146
5272
  !!avatar && /* @__PURE__ */ jsxRuntime.jsx(CardAvatar, { backgroundColor, children: avatar }),
5147
- title && /* @__PURE__ */ jsxRuntime.jsx(CardTitle$1, { backgroundColor, children: title }),
5273
+ title && /* @__PURE__ */ jsxRuntime.jsx(CardTitle$1, { ref: titleRef, backgroundColor, children: title }),
5148
5274
  /* @__PURE__ */ jsxRuntime.jsx(CardBody, { children: body }),
5149
5275
  componentModeOverride === "compact" && !!showNavIcon && /* @__PURE__ */ jsxRuntime.jsx(CardNav, {}),
5150
5276
  !!footer && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { children: footer })
@@ -5904,6 +6030,33 @@ const InfoCardContainer = (props) => {
5904
6030
  const { t } = kosUiSdk.useKosTranslation("common");
5905
6031
  return /* @__PURE__ */ jsxRuntime.jsx(InfoCard, { unavailableText: t("unavailable"), ...props });
5906
6032
  };
6033
+ const InfoMessageCard = styled(Card)`
6034
+ background-color: var(--ddk-semantic-color-system-orange-light);
6035
+ border-color: var(--ddk-semantic-color-system-orange);
6036
+ gap: var(--ddk-generic-padding-medium);
6037
+ padding: var(--ddk-generic-padding-large) var(--ddk-generic-padding-x-large);
6038
+ display: flex;
6039
+ align-items: flex-start;
6040
+ min-height: initial;
6041
+ `;
6042
+ const InfoMessageIcon = styled(kosDdkStyles.ErrorIconWithBackground)`
6043
+ background-color: var(--ddk-semantic-color-system-orange);
6044
+ box-sizing: border-box;
6045
+ width: var(--ddk-component-info-message-icon-width);
6046
+ height: var(--ddk-component-info-message-icon-height);
6047
+ padding: var(--ddk-component-info-message-icon-padding);
6048
+ `;
6049
+ const Message = styled(BodyLarge)`
6050
+ color: var(--ddk-semantic-color-system-orange);
6051
+ flex: 1;
6052
+ `;
6053
+ const InfoMessage = ({ children, ...props }) => {
6054
+ const { componentModeOverride } = useComponentConfigurationContext();
6055
+ return /* @__PURE__ */ jsxRuntime.jsxs(InfoMessageCard, { ...props, children: [
6056
+ /* @__PURE__ */ jsxRuntime.jsx(InfoMessageIcon, {}),
6057
+ /* @__PURE__ */ jsxRuntime.jsx(Message, { children })
6058
+ ] });
6059
+ };
5907
6060
  var build$1 = { exports: {} };
5908
6061
  var build = build$1.exports;
5909
6062
  var hasRequiredBuild;
@@ -10747,7 +10900,7 @@ const Tabs = ({
10747
10900
  const TabContainerComponent = showBackground ? TabContainerWithBackground : TabContainer;
10748
10901
  const TabListComponent = contain ? TabListWithPadding : TabList;
10749
10902
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10750
- /* @__PURE__ */ jsxRuntime.jsx(TabContainerComponent, { children: /* @__PURE__ */ jsxRuntime.jsx(Container$9, { children: /* @__PURE__ */ jsxRuntime.jsx(TabListComponent, { children: tabs.map((tab) => {
10903
+ /* @__PURE__ */ jsxRuntime.jsx(TabContainerComponent, { children: /* @__PURE__ */ jsxRuntime.jsx(Container$8, { children: /* @__PURE__ */ jsxRuntime.jsx(TabListComponent, { children: tabs.map((tab) => {
10751
10904
  const TabComponent = activeTabValue === tab.id ? ActiveTab : Tab;
10752
10905
  return /* @__PURE__ */ jsxRuntime.jsx(
10753
10906
  TabComponent,
@@ -10758,7 +10911,7 @@ const Tabs = ({
10758
10911
  tab.id
10759
10912
  );
10760
10913
  }) }) }) }),
10761
- /* @__PURE__ */ jsxRuntime.jsx(TabContent, { children: /* @__PURE__ */ jsxRuntime.jsx(Container$9, { children: activeTabValue && tabMap[activeTabValue] && /* @__PURE__ */ jsxRuntime.jsx("section", { children: tabMap[activeTabValue].content }) }) })
10914
+ /* @__PURE__ */ jsxRuntime.jsx(TabContent, { children: /* @__PURE__ */ jsxRuntime.jsx(Container$8, { children: activeTabValue && tabMap[activeTabValue] && /* @__PURE__ */ jsxRuntime.jsx("section", { children: tabMap[activeTabValue].content }) }) })
10762
10915
  ] });
10763
10916
  };
10764
10917
  const useNavigate = () => {
@@ -11068,7 +11221,7 @@ const ContainerStyles = styled.div`
11068
11221
  const TopNavigation = ({
11069
11222
  iconNavigationItems,
11070
11223
  navigationItems
11071
- }) => /* @__PURE__ */ jsxRuntime.jsx(TopNavigationStyles, { children: /* @__PURE__ */ jsxRuntime.jsx(Container$9, { children: /* @__PURE__ */ jsxRuntime.jsxs(ContainerStyles, { children: [
11224
+ }) => /* @__PURE__ */ jsxRuntime.jsx(TopNavigationStyles, { children: /* @__PURE__ */ jsxRuntime.jsx(Container$8, { children: /* @__PURE__ */ jsxRuntime.jsxs(ContainerStyles, { children: [
11072
11225
  /* @__PURE__ */ jsxRuntime.jsx(TopNavigationButtonList, { items: navigationItems }),
11073
11226
  /* @__PURE__ */ jsxRuntime.jsx(TopNavigationIconButtonList, { items: iconNavigationItems })
11074
11227
  ] }) }) });
@@ -11078,26 +11231,7 @@ const viewStyles = react.css`
11078
11231
  gap: var(--ddk-component-view-gap);
11079
11232
  padding: var(--ddk-component-view-padding);
11080
11233
  `;
11081
- const View = ({ children, contain = true, style }) => contain ? /* @__PURE__ */ jsxRuntime.jsx(Container$9, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { css: [viewStyles, style], children }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { css: [viewStyles, style], children });
11082
- const BackText = () => {
11083
- const { t } = kosUiSdk.useKosTranslation("common");
11084
- return t("close");
11085
- };
11086
- const VolumeBackButton = ({
11087
- children,
11088
- fill,
11089
- label,
11090
- size = "medium",
11091
- ...props
11092
- }) => /* @__PURE__ */ jsxRuntime.jsx(
11093
- IconButton,
11094
- {
11095
- icon: fill ? kosDdkStyles.ChevronLeftIcon : kosDdkStyles.ChevronLeftIcon,
11096
- size,
11097
- ...props,
11098
- children: label ?? /* @__PURE__ */ jsxRuntime.jsx(BackText, {})
11099
- }
11100
- );
11234
+ const View = ({ children, contain = true, style }) => contain ? /* @__PURE__ */ jsxRuntime.jsx(Container$8, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { css: [viewStyles, style], children }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { css: [viewStyles, style], children });
11101
11235
  exports.ActionCard = ActionCard;
11102
11236
  exports.ActionItem = ActionItem;
11103
11237
  exports.ActionItemButton = ActionItemButton;
@@ -11130,7 +11264,7 @@ exports.ComponentConfigurationContext = ComponentConfigurationContext;
11130
11264
  exports.ComponentConfigurationProvider = ComponentConfigurationProvider;
11131
11265
  exports.ConfirmationModal = ConfirmationModalContainer;
11132
11266
  exports.ConfirmationModalContainer = ConfirmationModalContainer;
11133
- exports.Container = Container$9;
11267
+ exports.Container = Container$8;
11134
11268
  exports.Content = Content$1;
11135
11269
  exports.DashboardCardContainer = DashboardCardContainer;
11136
11270
  exports.Description = Description$1;
@@ -11150,6 +11284,7 @@ exports.GreenTickIconStyle = GreenTickIconStyle;
11150
11284
  exports.Grid = Grid;
11151
11285
  exports.Header = Header;
11152
11286
  exports.Heading = Heading;
11287
+ exports.HeadingExtraLarge = HeadingExtraLarge;
11153
11288
  exports.HeadingLarge = HeadingLarge;
11154
11289
  exports.HeadingLargeInformation = HeadingLargeInformation;
11155
11290
  exports.HeadingMedium = HeadingMedium;
@@ -11160,6 +11295,7 @@ exports.InfoCard = InfoCardContainer;
11160
11295
  exports.InfoCardContainer = InfoCardContainer;
11161
11296
  exports.InfoCardHead = InfoCardHead;
11162
11297
  exports.InfoContainer = InfoContainer;
11298
+ exports.InfoMessage = InfoMessage;
11163
11299
  exports.InfoTable = InfoTable;
11164
11300
  exports.InformationIconStyle = InformationIconStyle;
11165
11301
  exports.Input = Input;
@@ -11182,6 +11318,7 @@ exports.LargeText = LargeText;
11182
11318
  exports.ListContainer = ListContainer;
11183
11319
  exports.MenuButton = MenuButton;
11184
11320
  exports.Modal = Modal;
11321
+ exports.ModalContainer = ModalContainer;
11185
11322
  exports.MultiDial = MultiDial;
11186
11323
  exports.MultiPicker = MultiPicker;
11187
11324
  exports.MultiPickerCard = MultiPickerCard;
@@ -11268,6 +11405,7 @@ exports.useComponentConfigurationContext = useComponentConfigurationContext;
11268
11405
  exports.useExperience = useExperience;
11269
11406
  exports.useKeyboardToggle = useKeyboardToggle;
11270
11407
  exports.useNavigate = useNavigate;
11408
+ exports.useUtilityModal = useUtilityModal;
11271
11409
  exports.useViewExperience = useViewExperience;
11272
11410
  exports.useViewExperienceListMap = useViewExperienceListMap;
11273
11411
  //# sourceMappingURL=index.cjs.map