@kosdev-code/kos-ddk-components 0.1.0-dev.92 → 0.1.0-dev.94
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/components/modal/header/header.d.ts +3 -1
- package/components/modal/header/header.d.ts.map +1 -1
- package/components/workflow-modal/workflow-modal.d.ts +2 -1
- package/components/workflow-modal/workflow-modal.d.ts.map +1 -1
- package/index.cjs +22 -5
- package/index.cjs.map +1 -1
- package/index.js +22 -5
- package/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -13,6 +13,8 @@ export interface HeaderProps {
|
|
|
13
13
|
size?: "small" | "medium" | "large";
|
|
14
14
|
subtitle?: ReactNode;
|
|
15
15
|
title?: ReactNode;
|
|
16
|
+
/** Allow the title to wrap while preserving space for the side controls. */
|
|
17
|
+
wrapTitle?: boolean;
|
|
16
18
|
}
|
|
17
|
-
export declare const Header: ({ CloseButton, closeButtonLabel, contain, leftContent, onClose, onOpen, OpenButton, raiseCloseButton, showCloseButton, showOpenButton, size, subtitle, title, }: HeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const Header: ({ CloseButton, closeButtonLabel, contain, leftContent, onClose, onOpen, OpenButton, raiseCloseButton, showCloseButton, showOpenButton, size, subtitle, title, wrapTitle, }: HeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
20
|
//# sourceMappingURL=header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-components/src/components/modal/header/header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-components/src/components/modal/header/header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AA0DpD,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,GAAI,4KAepB,WAAW,qDAmCb,CAAC"}
|
|
@@ -9,6 +9,7 @@ export interface WorkflowModalProps extends Omit<ModalProps, "children"> {
|
|
|
9
9
|
showCloseButton?: boolean;
|
|
10
10
|
status?: Status;
|
|
11
11
|
title?: string;
|
|
12
|
+
wrapTitle?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare const WorkflowModal: ({ closeButtonLabel, footer, iconStyle, information, onClose, show, showCloseButton, status, title, ...props }: WorkflowModalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const WorkflowModal: ({ closeButtonLabel, footer, iconStyle, information, onClose, show, showCloseButton, status, title, wrapTitle, ...props }: WorkflowModalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
15
|
//# sourceMappingURL=workflow-modal.d.ts.map
|
|
@@ -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,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;
|
|
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;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,GAAI,0HAY3B,kBAAkB,qDAkCpB,CAAC"}
|
package/index.cjs
CHANGED
|
@@ -1087,6 +1087,9 @@ const HeaderContainer = styled.div`
|
|
|
1087
1087
|
justify-content: space-between;
|
|
1088
1088
|
padding: ${(props) => props.contain ? "var(--ddk-component-modal-header-padding-maximized)" : "var(--ddk-component-modal-header-padding)"};
|
|
1089
1089
|
user-select: none;
|
|
1090
|
+
&[data-wrap-title="true"] {
|
|
1091
|
+
flex-shrink: 0;
|
|
1092
|
+
}
|
|
1090
1093
|
`;
|
|
1091
1094
|
const TitleContainer = styled.div`
|
|
1092
1095
|
display: flex;
|
|
@@ -1096,6 +1099,12 @@ const TitleContainer = styled.div`
|
|
|
1096
1099
|
gap: var(--ddk-component-modal-header-title-container-gap);
|
|
1097
1100
|
text-align: var(--ddk-component-modal-header-title-container-text-align);
|
|
1098
1101
|
white-space: var(--ddk-component-modal-header-title-container-white-space);
|
|
1102
|
+
&[data-wrap-title="true"] {
|
|
1103
|
+
flex: 1;
|
|
1104
|
+
min-width: 0;
|
|
1105
|
+
white-space: normal;
|
|
1106
|
+
overflow-wrap: anywhere;
|
|
1107
|
+
}
|
|
1099
1108
|
`;
|
|
1100
1109
|
const SideContentContainer = styled.div`
|
|
1101
1110
|
display: flex;
|
|
@@ -1104,6 +1113,10 @@ const SideContentContainer = styled.div`
|
|
|
1104
1113
|
justify-content: center;
|
|
1105
1114
|
padding: var(--ddk-component-modal-header-side-content-padding);
|
|
1106
1115
|
width: 40px;
|
|
1116
|
+
&[data-wrap-title="true"] {
|
|
1117
|
+
flex-shrink: 0;
|
|
1118
|
+
height: auto;
|
|
1119
|
+
}
|
|
1107
1120
|
`;
|
|
1108
1121
|
const Header = ({
|
|
1109
1122
|
CloseButton: CloseButton$1,
|
|
@@ -1118,7 +1131,8 @@ const Header = ({
|
|
|
1118
1131
|
showOpenButton,
|
|
1119
1132
|
size = "small",
|
|
1120
1133
|
subtitle,
|
|
1121
|
-
title
|
|
1134
|
+
title,
|
|
1135
|
+
wrapTitle = false
|
|
1122
1136
|
}) => {
|
|
1123
1137
|
const closeButton = CloseButton$1 ? /* @__PURE__ */ jsxRuntime.jsx(CloseButton$1, {}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1124
1138
|
CloseButton,
|
|
@@ -1129,15 +1143,16 @@ const Header = ({
|
|
|
1129
1143
|
}
|
|
1130
1144
|
);
|
|
1131
1145
|
const openButton = OpenButton ? /* @__PURE__ */ jsxRuntime.jsx(OpenButton, { onPointerDown: onOpen }) : /* @__PURE__ */ jsxRuntime.jsx(MenuButton, { onPointerDown: onOpen });
|
|
1132
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { contain, children: [
|
|
1133
|
-
/* @__PURE__ */ jsxRuntime.jsx(SideContentContainer, { children: showOpenButton ? openButton : leftContent }),
|
|
1134
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TitleContainer, { children: [
|
|
1146
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { contain, "data-wrap-title": wrapTitle, children: [
|
|
1147
|
+
/* @__PURE__ */ jsxRuntime.jsx(SideContentContainer, { "data-wrap-title": wrapTitle, children: showOpenButton ? openButton : leftContent }),
|
|
1148
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TitleContainer, { "data-wrap-title": wrapTitle, children: [
|
|
1135
1149
|
title && /* @__PURE__ */ jsxRuntime.jsx(HeadingMedium, { children: title }),
|
|
1136
1150
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx(LabelInformationSmall, { children: subtitle })
|
|
1137
1151
|
] }),
|
|
1138
1152
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1139
1153
|
SideContentContainer,
|
|
1140
1154
|
{
|
|
1155
|
+
"data-wrap-title": wrapTitle,
|
|
1141
1156
|
style: { zIndex: raiseCloseButton ? 1 : "initial" },
|
|
1142
1157
|
onPointerDown: showCloseButton ? onClose : void 0,
|
|
1143
1158
|
children: showCloseButton ? closeButton : void 0
|
|
@@ -5004,6 +5019,7 @@ const WorkflowModal = ({
|
|
|
5004
5019
|
showCloseButton = true,
|
|
5005
5020
|
status,
|
|
5006
5021
|
title,
|
|
5022
|
+
wrapTitle = false,
|
|
5007
5023
|
...props
|
|
5008
5024
|
}) => {
|
|
5009
5025
|
const { componentModeOverride } = useComponentConfigurationContext();
|
|
@@ -5023,7 +5039,8 @@ const WorkflowModal = ({
|
|
|
5023
5039
|
contain: componentModeOverride === "compact",
|
|
5024
5040
|
onClose,
|
|
5025
5041
|
showCloseButton,
|
|
5026
|
-
title
|
|
5042
|
+
title,
|
|
5043
|
+
wrapTitle
|
|
5027
5044
|
}
|
|
5028
5045
|
),
|
|
5029
5046
|
/* @__PURE__ */ jsxRuntime.jsxs(WorkflowContent, { contain: componentModeOverride === "compact", children: [
|