@kosdev-code/kos-ddk-components 0.1.0-dev.92 → 0.1.0-dev.93
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
package/index.js
CHANGED
|
@@ -1069,6 +1069,9 @@ const HeaderContainer = styled.div`
|
|
|
1069
1069
|
justify-content: space-between;
|
|
1070
1070
|
padding: ${(props) => props.contain ? "var(--ddk-component-modal-header-padding-maximized)" : "var(--ddk-component-modal-header-padding)"};
|
|
1071
1071
|
user-select: none;
|
|
1072
|
+
&[data-wrap-title="true"] {
|
|
1073
|
+
flex-shrink: 0;
|
|
1074
|
+
}
|
|
1072
1075
|
`;
|
|
1073
1076
|
const TitleContainer = styled.div`
|
|
1074
1077
|
display: flex;
|
|
@@ -1078,6 +1081,12 @@ const TitleContainer = styled.div`
|
|
|
1078
1081
|
gap: var(--ddk-component-modal-header-title-container-gap);
|
|
1079
1082
|
text-align: var(--ddk-component-modal-header-title-container-text-align);
|
|
1080
1083
|
white-space: var(--ddk-component-modal-header-title-container-white-space);
|
|
1084
|
+
&[data-wrap-title="true"] {
|
|
1085
|
+
flex: 1;
|
|
1086
|
+
min-width: 0;
|
|
1087
|
+
white-space: normal;
|
|
1088
|
+
overflow-wrap: anywhere;
|
|
1089
|
+
}
|
|
1081
1090
|
`;
|
|
1082
1091
|
const SideContentContainer = styled.div`
|
|
1083
1092
|
display: flex;
|
|
@@ -1086,6 +1095,10 @@ const SideContentContainer = styled.div`
|
|
|
1086
1095
|
justify-content: center;
|
|
1087
1096
|
padding: var(--ddk-component-modal-header-side-content-padding);
|
|
1088
1097
|
width: 40px;
|
|
1098
|
+
&[data-wrap-title="true"] {
|
|
1099
|
+
flex-shrink: 0;
|
|
1100
|
+
height: auto;
|
|
1101
|
+
}
|
|
1089
1102
|
`;
|
|
1090
1103
|
const Header = ({
|
|
1091
1104
|
CloseButton: CloseButton$1,
|
|
@@ -1100,7 +1113,8 @@ const Header = ({
|
|
|
1100
1113
|
showOpenButton,
|
|
1101
1114
|
size = "small",
|
|
1102
1115
|
subtitle,
|
|
1103
|
-
title
|
|
1116
|
+
title,
|
|
1117
|
+
wrapTitle = false
|
|
1104
1118
|
}) => {
|
|
1105
1119
|
const closeButton = CloseButton$1 ? /* @__PURE__ */ jsx(CloseButton$1, {}) : /* @__PURE__ */ jsx(
|
|
1106
1120
|
CloseButton,
|
|
@@ -1111,15 +1125,16 @@ const Header = ({
|
|
|
1111
1125
|
}
|
|
1112
1126
|
);
|
|
1113
1127
|
const openButton = OpenButton ? /* @__PURE__ */ jsx(OpenButton, { onPointerDown: onOpen }) : /* @__PURE__ */ jsx(MenuButton, { onPointerDown: onOpen });
|
|
1114
|
-
return /* @__PURE__ */ jsxs(HeaderContainer, { contain, children: [
|
|
1115
|
-
/* @__PURE__ */ jsx(SideContentContainer, { children: showOpenButton ? openButton : leftContent }),
|
|
1116
|
-
/* @__PURE__ */ jsxs(TitleContainer, { children: [
|
|
1128
|
+
return /* @__PURE__ */ jsxs(HeaderContainer, { contain, "data-wrap-title": wrapTitle, children: [
|
|
1129
|
+
/* @__PURE__ */ jsx(SideContentContainer, { "data-wrap-title": wrapTitle, children: showOpenButton ? openButton : leftContent }),
|
|
1130
|
+
/* @__PURE__ */ jsxs(TitleContainer, { "data-wrap-title": wrapTitle, children: [
|
|
1117
1131
|
title && /* @__PURE__ */ jsx(HeadingMedium, { children: title }),
|
|
1118
1132
|
subtitle && /* @__PURE__ */ jsx(LabelInformationSmall, { children: subtitle })
|
|
1119
1133
|
] }),
|
|
1120
1134
|
/* @__PURE__ */ jsx(
|
|
1121
1135
|
SideContentContainer,
|
|
1122
1136
|
{
|
|
1137
|
+
"data-wrap-title": wrapTitle,
|
|
1123
1138
|
style: { zIndex: raiseCloseButton ? 1 : "initial" },
|
|
1124
1139
|
onPointerDown: showCloseButton ? onClose : void 0,
|
|
1125
1140
|
children: showCloseButton ? closeButton : void 0
|
|
@@ -4986,6 +5001,7 @@ const WorkflowModal = ({
|
|
|
4986
5001
|
showCloseButton = true,
|
|
4987
5002
|
status,
|
|
4988
5003
|
title,
|
|
5004
|
+
wrapTitle = false,
|
|
4989
5005
|
...props
|
|
4990
5006
|
}) => {
|
|
4991
5007
|
const { componentModeOverride } = useComponentConfigurationContext();
|
|
@@ -5005,7 +5021,8 @@ const WorkflowModal = ({
|
|
|
5005
5021
|
contain: componentModeOverride === "compact",
|
|
5006
5022
|
onClose,
|
|
5007
5023
|
showCloseButton,
|
|
5008
|
-
title
|
|
5024
|
+
title,
|
|
5025
|
+
wrapTitle
|
|
5009
5026
|
}
|
|
5010
5027
|
),
|
|
5011
5028
|
/* @__PURE__ */ jsxs(WorkflowContent, { contain: componentModeOverride === "compact", children: [
|