@dxc-technology/halstack-react 0.0.0-c2aa807 → 0.0.0-c2da493
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/dist/index.d.mts +22 -4
- package/dist/index.d.ts +22 -4
- package/dist/index.js +737 -765
- package/dist/index.mjs +839 -867
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4069,114 +4069,33 @@ var Dropdown_default = DxcDropdown;
|
|
|
4069
4069
|
|
|
4070
4070
|
// src/header/Header.tsx
|
|
4071
4071
|
var import_react19 = require("react");
|
|
4072
|
+
|
|
4073
|
+
// src/header/Icons.tsx
|
|
4072
4074
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4073
|
-
var
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("g", { transform: "translate(0)", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("g", { children: [
|
|
4079
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4080
|
-
"path",
|
|
4081
|
-
{
|
|
4082
|
-
d: "M91.613-28.177v2.514H90.231V-28.15l-2.415-3.82h1.616l1.5,2.532,1.526-2.532h1.571ZM83.9-25.555A3.15,3.15,0,0,1,80.6-28.8v-.018a3.231,3.231,0,0,1,3.294-3.262,3.442,3.442,0,0,1,2.469.865l-.87,1.054a2.311,2.311,0,0,0-1.643-.64,1.891,1.891,0,0,0-1.8,1.964v.018a1.886,1.886,0,0,0,1.9,2,2.2,2.2,0,0,0,1.3-.378v-.9H83.858v-1.2h2.729v2.738A4.071,4.071,0,0,1,83.9-25.555Zm-6.416-3.261a1.913,1.913,0,0,0-1.9-1.982A1.883,1.883,0,0,0,73.7-28.835v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,77.486-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018A3.255,3.255,0,0,1,75.6-32.078a3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,75.583-25.555Zm-9.173-.108V-31.97h1.382v5.045h3.133v1.261Zm-3.433-3.153a1.913,1.913,0,0,0-1.9-1.982,1.883,1.883,0,0,0-1.886,1.964v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,62.978-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018a3.255,3.255,0,0,1,3.348-3.262,3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,61.075-25.555Zm-6.508-.108-3.043-4.009v4.009H50.159V-31.97h1.275l2.944,3.883V-31.97h1.364v6.306Zm-8.246,0v-2.531h-2.55v2.531H42.389V-31.97h1.382v2.5h2.55v-2.5H47.7v6.306Zm-8.432.108A3.178,3.178,0,0,1,34.666-28.8v-.018a3.2,3.2,0,0,1,3.276-3.262,3.237,3.237,0,0,1,2.478.973l-.88,1.018a2.315,2.315,0,0,0-1.606-.712,1.866,1.866,0,0,0-1.822,1.964v.018a1.87,1.87,0,0,0,1.822,1.982,2.265,2.265,0,0,0,1.651-.739l.88.891A3.206,3.206,0,0,1,37.889-25.555Zm-9.805-.108V-31.97h4.739v1.235H29.458v1.279h2.962v1.234H29.458V-26.9h3.411v1.234ZM24.322-30.69v5.027H22.939V-30.69H21.028v-1.28h5.206v1.28H24.322",
|
|
4083
|
-
transform: "translate(-21.028 65.555)",
|
|
4084
|
-
fill: "#010101"
|
|
4085
|
-
}
|
|
4086
|
-
),
|
|
4087
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4088
|
-
"path",
|
|
4089
|
-
{
|
|
4090
|
-
d: "M75.836-76.712a8.975,8.975,0,0,1,2.246-3.9,8.393,8.393,0,0,1,6.058-2.457h9.824v-5.67H84.139a14.611,14.611,0,0,0-10.232,4.221,14.509,14.509,0,0,0-3.076,4.536,11.913,11.913,0,0,0-.973,3.271Zm0,4.325a8.978,8.978,0,0,0,2.246,3.9,8.394,8.394,0,0,0,6.058,2.457h9.824v5.67H84.139A14.611,14.611,0,0,1,73.907-64.58a14.506,14.506,0,0,1-3.076-4.536,11.91,11.91,0,0,1-.973-3.271ZM57.522-69.832l-7.5,9.473H42.581L53.818-74.55,42.581-88.739H50.02l7.5,9.472,7.5-9.472h7.439L61.225-74.55l11.237,14.19H65.023Zm-12.336-6.88a11.935,11.935,0,0,0-.973-3.271,14.515,14.515,0,0,0-3.076-4.536A14.612,14.612,0,0,0,30.9-88.739H21.081v5.67H30.9a8.394,8.394,0,0,1,6.058,2.457,8.978,8.978,0,0,1,2.246,3.9Zm0,4.325a11.932,11.932,0,0,1-.973,3.271,14.511,14.511,0,0,1-3.076,4.536A14.611,14.611,0,0,1,30.9-60.359H21.081v-5.67H30.9a8.4,8.4,0,0,0,6.058-2.457,8.981,8.981,0,0,0,2.246-3.9h5.978",
|
|
4091
|
-
transform: "translate(-21.049 88.739)",
|
|
4092
|
-
fill: "#603494"
|
|
4093
|
-
}
|
|
4094
|
-
)
|
|
4095
|
-
] }) })
|
|
4096
|
-
] });
|
|
4097
|
-
} else if (typeof themeInput === "string") return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LogoImg2, { alt: logoLabel, src: themeInput });
|
|
4098
|
-
else return themeInput;
|
|
4099
|
-
};
|
|
4100
|
-
var Content3 = ({ isResponsive, responsiveContent, handleMenu, content }) => isResponsive ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MenuContent, { children: responsiveContent?.(handleMenu) }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentContainer, { children: content });
|
|
4101
|
-
var DxcHeader = ({
|
|
4102
|
-
underlined = false,
|
|
4103
|
-
content,
|
|
4104
|
-
responsiveContent,
|
|
4105
|
-
onClick,
|
|
4106
|
-
margin,
|
|
4107
|
-
tabIndex = 0
|
|
4108
|
-
}) => {
|
|
4109
|
-
const [isResponsive, setIsResponsive] = (0, import_react18.useState)(false);
|
|
4110
|
-
const [isMenuVisible, setIsMenuVisible] = (0, import_react18.useState)(false);
|
|
4111
|
-
const colorsTheme = (0, import_react19.useContext)(HalstackContext);
|
|
4112
|
-
const translatedLabels = (0, import_react19.useContext)(HalstackLanguageContext);
|
|
4113
|
-
const ref = (0, import_react18.useRef)(null);
|
|
4114
|
-
const handleMenu = () => {
|
|
4115
|
-
if (isResponsive && !isMenuVisible) {
|
|
4116
|
-
setIsMenuVisible(!isMenuVisible);
|
|
4117
|
-
} else {
|
|
4118
|
-
setIsMenuVisible(!isMenuVisible);
|
|
4119
|
-
}
|
|
4120
|
-
};
|
|
4121
|
-
const headerLogo = (0, import_react18.useMemo)(
|
|
4122
|
-
() => getLogoElement(colorsTheme.header.logo, translatedLabels.formFields.logoAlternativeText),
|
|
4123
|
-
[colorsTheme, translatedLabels]
|
|
4124
|
-
);
|
|
4125
|
-
const headerResponsiveLogo = (0, import_react18.useMemo)(
|
|
4126
|
-
() => getLogoElement(colorsTheme.header.logoResponsive, translatedLabels.formFields.logoAlternativeText),
|
|
4127
|
-
[colorsTheme, translatedLabels]
|
|
4128
|
-
);
|
|
4129
|
-
(0, import_react18.useEffect)(() => {
|
|
4130
|
-
const handleResize = () => {
|
|
4131
|
-
setIsResponsive(window.matchMedia(`(max-width: ${responsiveSizes.medium}rem)`).matches);
|
|
4132
|
-
};
|
|
4133
|
-
handleResize();
|
|
4134
|
-
window.addEventListener("resize", handleResize);
|
|
4135
|
-
return () => {
|
|
4136
|
-
window.removeEventListener("resize", handleResize);
|
|
4137
|
-
};
|
|
4138
|
-
}, []);
|
|
4139
|
-
(0, import_react18.useEffect)(() => {
|
|
4140
|
-
if (!isResponsive) {
|
|
4141
|
-
setIsMenuVisible(false);
|
|
4142
|
-
}
|
|
4143
|
-
}, [isResponsive]);
|
|
4144
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_styled_components17.ThemeProvider, { theme: colorsTheme.header, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(HeaderContainer, { underlined, margin, ref, children: [
|
|
4145
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LogoAnchor, { tabIndex: onClick ? tabIndex : -1, interactive: !!onClick, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LogoContainer2, { children: headerLogo }) }),
|
|
4146
|
-
isResponsive && responsiveContent && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Flex_default, { grow: 1, children: [
|
|
4147
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChildContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(HamburgerTrigger, { tabIndex, onClick: handleMenu, "aria-label": "Show options", children: [
|
|
4148
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DxcIcon, { icon: "menu" }),
|
|
4149
|
-
translatedLabels.header.hamburgerTitle
|
|
4150
|
-
] }) }),
|
|
4151
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(ResponsiveMenu, { hasVisibility: isMenuVisible, children: [
|
|
4152
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Flex_default, { justifyContent: "space-between", alignItems: "center", children: [
|
|
4153
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ResponsiveLogoContainer, { children: headerResponsiveLogo }),
|
|
4154
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Tooltip, { label: translatedLabels.header.closeIcon, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CloseAction, { tabIndex, onClick: handleMenu, "aria-label": translatedLabels.header.closeIcon, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DxcIcon, { icon: "close" }) }) })
|
|
4155
|
-
] }),
|
|
4156
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4157
|
-
Content3,
|
|
4158
|
-
{
|
|
4159
|
-
isResponsive,
|
|
4160
|
-
responsiveContent,
|
|
4161
|
-
handleMenu,
|
|
4162
|
-
content
|
|
4163
|
-
}
|
|
4164
|
-
)
|
|
4165
|
-
] }),
|
|
4166
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Overlay2, { onClick: handleMenu, hasVisibility: isMenuVisible })
|
|
4167
|
-
] }),
|
|
4168
|
-
!isResponsive && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4169
|
-
Content3,
|
|
4075
|
+
var dxcLogo2 = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "73", height: "40", viewBox: "0 0 73 40", children: [
|
|
4076
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("title", { children: "DXC Logo" }),
|
|
4077
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("g", { transform: "translate(0)", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("g", { children: [
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4079
|
+
"path",
|
|
4170
4080
|
{
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4081
|
+
d: "M91.613-28.177v2.514H90.231V-28.15l-2.415-3.82h1.616l1.5,2.532,1.526-2.532h1.571ZM83.9-25.555A3.15,3.15,0,0,1,80.6-28.8v-.018a3.231,3.231,0,0,1,3.294-3.262,3.442,3.442,0,0,1,2.469.865l-.87,1.054a2.311,2.311,0,0,0-1.643-.64,1.891,1.891,0,0,0-1.8,1.964v.018a1.886,1.886,0,0,0,1.9,2,2.2,2.2,0,0,0,1.3-.378v-.9H83.858v-1.2h2.729v2.738A4.071,4.071,0,0,1,83.9-25.555Zm-6.416-3.261a1.913,1.913,0,0,0-1.9-1.982A1.883,1.883,0,0,0,73.7-28.835v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,77.486-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018A3.255,3.255,0,0,1,75.6-32.078a3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,75.583-25.555Zm-9.173-.108V-31.97h1.382v5.045h3.133v1.261Zm-3.433-3.153a1.913,1.913,0,0,0-1.9-1.982,1.883,1.883,0,0,0-1.886,1.964v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,62.978-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018a3.255,3.255,0,0,1,3.348-3.262,3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,61.075-25.555Zm-6.508-.108-3.043-4.009v4.009H50.159V-31.97h1.275l2.944,3.883V-31.97h1.364v6.306Zm-8.246,0v-2.531h-2.55v2.531H42.389V-31.97h1.382v2.5h2.55v-2.5H47.7v6.306Zm-8.432.108A3.178,3.178,0,0,1,34.666-28.8v-.018a3.2,3.2,0,0,1,3.276-3.262,3.237,3.237,0,0,1,2.478.973l-.88,1.018a2.315,2.315,0,0,0-1.606-.712,1.866,1.866,0,0,0-1.822,1.964v.018a1.87,1.87,0,0,0,1.822,1.982,2.265,2.265,0,0,0,1.651-.739l.88.891A3.206,3.206,0,0,1,37.889-25.555Zm-9.805-.108V-31.97h4.739v1.235H29.458v1.279h2.962v1.234H29.458V-26.9h3.411v1.234ZM24.322-30.69v5.027H22.939V-30.69H21.028v-1.28h5.206v1.28H24.322",
|
|
4082
|
+
transform: "translate(-21.028 65.555)",
|
|
4083
|
+
fill: "#010101"
|
|
4084
|
+
}
|
|
4085
|
+
),
|
|
4086
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4087
|
+
"path",
|
|
4088
|
+
{
|
|
4089
|
+
d: "M75.836-76.712a8.975,8.975,0,0,1,2.246-3.9,8.393,8.393,0,0,1,6.058-2.457h9.824v-5.67H84.139a14.611,14.611,0,0,0-10.232,4.221,14.509,14.509,0,0,0-3.076,4.536,11.913,11.913,0,0,0-.973,3.271Zm0,4.325a8.978,8.978,0,0,0,2.246,3.9,8.394,8.394,0,0,0,6.058,2.457h9.824v5.67H84.139A14.611,14.611,0,0,1,73.907-64.58a14.506,14.506,0,0,1-3.076-4.536,11.91,11.91,0,0,1-.973-3.271ZM57.522-69.832l-7.5,9.473H42.581L53.818-74.55,42.581-88.739H50.02l7.5,9.472,7.5-9.472h7.439L61.225-74.55l11.237,14.19H65.023Zm-12.336-6.88a11.935,11.935,0,0,0-.973-3.271,14.515,14.515,0,0,0-3.076-4.536A14.612,14.612,0,0,0,30.9-88.739H21.081v5.67H30.9a8.394,8.394,0,0,1,6.058,2.457,8.978,8.978,0,0,1,2.246,3.9Zm0,4.325a11.932,11.932,0,0,1-.973,3.271,14.511,14.511,0,0,1-3.076,4.536A14.611,14.611,0,0,1,30.9-60.359H21.081v-5.67H30.9a8.4,8.4,0,0,0,6.058-2.457,8.981,8.981,0,0,0,2.246-3.9h5.978",
|
|
4090
|
+
transform: "translate(-21.049 88.739)",
|
|
4091
|
+
fill: "#603494"
|
|
4175
4092
|
}
|
|
4176
4093
|
)
|
|
4177
|
-
] }) })
|
|
4178
|
-
};
|
|
4179
|
-
|
|
4094
|
+
] }) })
|
|
4095
|
+
] });
|
|
4096
|
+
|
|
4097
|
+
// src/header/Header.tsx
|
|
4098
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4180
4099
|
var HeaderDropdown = import_styled_components17.default.div`
|
|
4181
4100
|
display: flex;
|
|
4182
4101
|
button {
|
|
@@ -4187,28 +4106,28 @@ var HeaderDropdown = import_styled_components17.default.div`
|
|
|
4187
4106
|
}
|
|
4188
4107
|
`;
|
|
4189
4108
|
var HeaderContainer = import_styled_components17.default.header`
|
|
4109
|
+
background-color: var(--color-bg-neutral-lightest);
|
|
4110
|
+
border-bottom: ${(props) => props.underlined && `var(--border-width-m) var(--border-style-default) var(--border-color-neutral-strongest)`};
|
|
4111
|
+
align-items: center;
|
|
4190
4112
|
box-sizing: border-box;
|
|
4191
4113
|
display: flex;
|
|
4192
4114
|
flex-direction: row;
|
|
4193
|
-
align-items: center;
|
|
4194
4115
|
justify-content: space-between;
|
|
4195
|
-
min-height: ${(props) => props.theme.minHeight};
|
|
4196
4116
|
margin-bottom: ${(props) => props.margin ? spaces[props.margin] : "0px"};
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
border-bottom: ${(props) => props.underlined && `${props.theme.underlinedThickness} ${props.theme.underlinedStyle} ${props.theme.underlinedColor}`};
|
|
4117
|
+
min-height: 64px;
|
|
4118
|
+
padding: var(--spacing-padding-none) var(--spacing-padding-l);
|
|
4200
4119
|
`;
|
|
4201
4120
|
var LogoAnchor = import_styled_components17.default.a`
|
|
4202
4121
|
${(props) => props.interactive ? "cursor: pointer" : "cursor: default; outline:none;"};
|
|
4203
4122
|
`;
|
|
4204
4123
|
var LogoImg2 = import_styled_components17.default.img`
|
|
4205
|
-
max-height:
|
|
4206
|
-
width:
|
|
4124
|
+
max-height: var(--height-xl);
|
|
4125
|
+
width: auto;
|
|
4207
4126
|
`;
|
|
4208
4127
|
var LogoContainer2 = import_styled_components17.default.div`
|
|
4209
|
-
max-height:
|
|
4210
|
-
width: ${(props) => props.theme.logoWidth};
|
|
4128
|
+
max-height: var(--height-xl);
|
|
4211
4129
|
vertical-align: middle;
|
|
4130
|
+
width: auto;
|
|
4212
4131
|
`;
|
|
4213
4132
|
var ChildContainer = import_styled_components17.default.div`
|
|
4214
4133
|
display: flex;
|
|
@@ -4223,94 +4142,74 @@ var ContentContainer = import_styled_components17.default.div`
|
|
|
4223
4142
|
flex-grow: 1;
|
|
4224
4143
|
justify-content: flex-end;
|
|
4225
4144
|
width: calc(100% - 186px);
|
|
4226
|
-
color:
|
|
4145
|
+
color: var(--color-fg-neutral-dark);
|
|
4227
4146
|
`;
|
|
4228
4147
|
var HamburgerTrigger = import_styled_components17.default.button`
|
|
4148
|
+
align-items: center;
|
|
4149
|
+
background-color: transparent;
|
|
4150
|
+
border-radius: var(--border-radius-xs);
|
|
4151
|
+
border: var(--border-width-s) var(--border-style-default) transparent;
|
|
4152
|
+
color: var(--color-fg-neutral-dark);
|
|
4153
|
+
cursor: pointer;
|
|
4229
4154
|
display: flex;
|
|
4230
4155
|
flex-direction: column;
|
|
4156
|
+
font-family: var(--typography-font-family);
|
|
4157
|
+
font-size: var(--typography-label-s);
|
|
4158
|
+
font-weight: var(--typography-label-semibold);
|
|
4159
|
+
height: var(--height-xl);
|
|
4231
4160
|
justify-content: center;
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
border: 1px solid transparent;
|
|
4236
|
-
border-radius: 2px;
|
|
4237
|
-
background-color: transparent;
|
|
4161
|
+
// TODO: Ask about padding (spacing-padding-m or spacing-padding-xs?)
|
|
4162
|
+
padding: var(--spacing-padding-none) var(--spacing-padding-m);
|
|
4163
|
+
text-transform: uppercase;
|
|
4238
4164
|
:hover {
|
|
4239
|
-
background-color:
|
|
4165
|
+
background-color: var(--color-bg-neutral-medium);
|
|
4240
4166
|
}
|
|
4241
4167
|
&:focus {
|
|
4242
|
-
outline:
|
|
4168
|
+
outline: var(--border-color-secondary-medium) var(--border-style-default) var(--border-width-m);
|
|
4243
4169
|
}
|
|
4244
4170
|
& > svg {
|
|
4245
|
-
fill:
|
|
4171
|
+
fill: var(--color-fg-neutral-dark);
|
|
4246
4172
|
}
|
|
4247
4173
|
& > span {
|
|
4248
|
-
font-size:
|
|
4174
|
+
font-size: var(--height-s);
|
|
4249
4175
|
}
|
|
4250
|
-
font-family: ${(props) => props.theme.hamburgerFontFamily};
|
|
4251
|
-
font-style: ${(props) => props.theme.hamburgerFontStyle};
|
|
4252
|
-
font-size: ${(props) => props.theme.hamburgerFontSize};
|
|
4253
|
-
text-transform: ${(props) => props.theme.hamburgerTextTransform};
|
|
4254
|
-
font-weight: ${(props) => props.theme.hamburgerFontWeight};
|
|
4255
|
-
color: ${(props) => props.theme.hamburgerFontColor};
|
|
4256
4176
|
`;
|
|
4257
4177
|
var ResponsiveMenu = import_styled_components17.default.div`
|
|
4258
4178
|
display: flex;
|
|
4259
4179
|
flex-direction: column;
|
|
4260
|
-
background-color:
|
|
4180
|
+
background-color: var(--color-bg-neutral-lightest);
|
|
4261
4181
|
position: fixed;
|
|
4262
4182
|
top: 0;
|
|
4263
4183
|
right: 0;
|
|
4264
|
-
z-index:
|
|
4184
|
+
z-index: 2000;
|
|
4265
4185
|
|
|
4266
4186
|
@media (max-width: ${responsiveSizes.large}rem) and (min-width: ${responsiveSizes.small}rem) {
|
|
4267
|
-
width:
|
|
4187
|
+
width: 60vw;
|
|
4268
4188
|
}
|
|
4269
4189
|
|
|
4270
4190
|
@media (not((max-width: ${responsiveSizes.large}rem) and (min-width: ${responsiveSizes.small}rem))) {
|
|
4271
|
-
width:
|
|
4191
|
+
width: 100vw;
|
|
4272
4192
|
}
|
|
4273
4193
|
|
|
4274
4194
|
height: 100vh;
|
|
4275
4195
|
padding: 20px;
|
|
4276
4196
|
transform: ${(props) => props.hasVisibility ? "translateX(0)" : "translateX(100vw)"};
|
|
4277
|
-
opacity: ${(props) => props.hasVisibility ? "1" : "0.96"};
|
|
4278
4197
|
transition-property: transform, opacity;
|
|
4279
4198
|
transition-duration: 0.6s;
|
|
4280
4199
|
transition-timing-function: ease-in-out;
|
|
4281
4200
|
box-sizing: border-box;
|
|
4282
4201
|
`;
|
|
4283
4202
|
var ResponsiveLogoContainer = import_styled_components17.default.div`
|
|
4284
|
-
max-height:
|
|
4285
|
-
width:
|
|
4203
|
+
max-height: var(--height-xl);
|
|
4204
|
+
width: auto;
|
|
4286
4205
|
display: flex;
|
|
4287
4206
|
`;
|
|
4288
|
-
var CloseAction = import_styled_components17.default.button`
|
|
4289
|
-
display: flex;
|
|
4290
|
-
justify-content: center;
|
|
4291
|
-
align-content: center;
|
|
4292
|
-
padding: 6px;
|
|
4293
|
-
border: unset;
|
|
4294
|
-
border-radius: 2px;
|
|
4295
|
-
background-color: transparent;
|
|
4296
|
-
cursor: pointer;
|
|
4297
|
-
|
|
4298
|
-
:focus,
|
|
4299
|
-
:focus-visible {
|
|
4300
|
-
outline: ${(props) => props.theme.hamburgerFocusColor} auto 1px;
|
|
4301
|
-
}
|
|
4302
|
-
font-size: 24px;
|
|
4303
|
-
svg {
|
|
4304
|
-
height: 24px;
|
|
4305
|
-
width: 24px;
|
|
4306
|
-
}
|
|
4307
|
-
`;
|
|
4308
4207
|
var MenuContent = import_styled_components17.default.div`
|
|
4309
4208
|
display: flex;
|
|
4310
4209
|
flex-direction: column;
|
|
4311
4210
|
align-items: flex-start;
|
|
4312
4211
|
height: 100%;
|
|
4313
|
-
color:
|
|
4212
|
+
color: var(--color-fg-neutral-dark);
|
|
4314
4213
|
`;
|
|
4315
4214
|
var Overlay2 = import_styled_components17.default.div`
|
|
4316
4215
|
position: fixed;
|
|
@@ -4318,18 +4217,112 @@ var Overlay2 = import_styled_components17.default.div`
|
|
|
4318
4217
|
left: 0;
|
|
4319
4218
|
width: 100vw;
|
|
4320
4219
|
height: 100vh;
|
|
4321
|
-
background-color: ${(props) => props.
|
|
4322
|
-
opacity: ${(props) => props.theme.overlayOpacity} !important;
|
|
4323
|
-
visibility: ${(props) => props.hasVisibility ? "visible" : "hidden"};
|
|
4324
|
-
opacity: ${(props) => props.hasVisibility ? "1" : "0"};
|
|
4220
|
+
background-color: ${(props) => props.hasVisibility ? "var(--color-bg-alpha-medium)" : "transparent"};
|
|
4325
4221
|
|
|
4326
4222
|
@media (max-width: ${responsiveSizes.small}rem) {
|
|
4327
|
-
display: none;
|
|
4223
|
+
${(props) => !props.hasVisibility && "display: none"};
|
|
4328
4224
|
}
|
|
4329
4225
|
|
|
4330
|
-
|
|
4331
|
-
z-index: ${(props) => props.theme.overlayZindex};
|
|
4226
|
+
z-index: 1600;
|
|
4332
4227
|
`;
|
|
4228
|
+
var Dropdown = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(HeaderDropdown, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Dropdown_default, { ...props }) });
|
|
4229
|
+
var getLogoElement = (logo) => {
|
|
4230
|
+
if (logo) {
|
|
4231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LogoImg2, { alt: logo.title, src: logo.src, title: logo.title });
|
|
4232
|
+
} else {
|
|
4233
|
+
return dxcLogo2;
|
|
4234
|
+
}
|
|
4235
|
+
};
|
|
4236
|
+
var Content3 = ({ isResponsive, responsiveContent, handleMenu, content }) => isResponsive ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MenuContent, { children: responsiveContent?.(handleMenu) }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContentContainer, { children: content });
|
|
4237
|
+
var DxcHeader = ({
|
|
4238
|
+
underlined = false,
|
|
4239
|
+
content,
|
|
4240
|
+
responsiveContent,
|
|
4241
|
+
logo,
|
|
4242
|
+
margin,
|
|
4243
|
+
onClick,
|
|
4244
|
+
tabIndex = 0
|
|
4245
|
+
}) => {
|
|
4246
|
+
const [isResponsive, setIsResponsive] = (0, import_react18.useState)(false);
|
|
4247
|
+
const [isMenuVisible, setIsMenuVisible] = (0, import_react18.useState)(false);
|
|
4248
|
+
const translatedLabels = (0, import_react19.useContext)(HalstackLanguageContext);
|
|
4249
|
+
const ref = (0, import_react18.useRef)(null);
|
|
4250
|
+
const handleMenu = () => {
|
|
4251
|
+
if (isResponsive && !isMenuVisible) {
|
|
4252
|
+
setIsMenuVisible(!isMenuVisible);
|
|
4253
|
+
} else {
|
|
4254
|
+
setIsMenuVisible(!isMenuVisible);
|
|
4255
|
+
}
|
|
4256
|
+
};
|
|
4257
|
+
const headerLogo = getLogoElement(logo);
|
|
4258
|
+
(0, import_react18.useEffect)(() => {
|
|
4259
|
+
const handleResize = () => {
|
|
4260
|
+
setIsResponsive(window.matchMedia(`(max-width: ${responsiveSizes.medium}rem)`).matches);
|
|
4261
|
+
};
|
|
4262
|
+
handleResize();
|
|
4263
|
+
window.addEventListener("resize", handleResize);
|
|
4264
|
+
return () => {
|
|
4265
|
+
window.removeEventListener("resize", handleResize);
|
|
4266
|
+
};
|
|
4267
|
+
}, []);
|
|
4268
|
+
(0, import_react18.useEffect)(() => {
|
|
4269
|
+
if (!isResponsive) {
|
|
4270
|
+
setIsMenuVisible(false);
|
|
4271
|
+
}
|
|
4272
|
+
}, [isResponsive]);
|
|
4273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(HeaderContainer, { underlined, margin, ref, children: [
|
|
4274
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4275
|
+
LogoAnchor,
|
|
4276
|
+
{
|
|
4277
|
+
href: logo?.href,
|
|
4278
|
+
tabIndex: onClick ? tabIndex : -1,
|
|
4279
|
+
interactive: !!onClick || !!logo?.href,
|
|
4280
|
+
onClick,
|
|
4281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LogoContainer2, { children: headerLogo })
|
|
4282
|
+
}
|
|
4283
|
+
),
|
|
4284
|
+
isResponsive && responsiveContent && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Flex_default, { grow: 1, children: [
|
|
4285
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChildContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(HamburgerTrigger, { tabIndex, onClick: handleMenu, "aria-label": "Show options", children: [
|
|
4286
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DxcIcon, { icon: "menu" }),
|
|
4287
|
+
translatedLabels.header.hamburgerTitle
|
|
4288
|
+
] }) }),
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ResponsiveMenu, { hasVisibility: isMenuVisible, children: [
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Flex_default, { justifyContent: "space-between", alignItems: "center", children: [
|
|
4291
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ResponsiveLogoContainer, { children: headerLogo }),
|
|
4292
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4293
|
+
ActionIcon_default,
|
|
4294
|
+
{
|
|
4295
|
+
icon: "close",
|
|
4296
|
+
onClick: handleMenu,
|
|
4297
|
+
tabIndex,
|
|
4298
|
+
title: translatedLabels.header.closeIcon
|
|
4299
|
+
}
|
|
4300
|
+
)
|
|
4301
|
+
] }),
|
|
4302
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4303
|
+
Content3,
|
|
4304
|
+
{
|
|
4305
|
+
isResponsive,
|
|
4306
|
+
responsiveContent,
|
|
4307
|
+
handleMenu,
|
|
4308
|
+
content
|
|
4309
|
+
}
|
|
4310
|
+
)
|
|
4311
|
+
] }),
|
|
4312
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Overlay2, { onClick: handleMenu, hasVisibility: isMenuVisible })
|
|
4313
|
+
] }),
|
|
4314
|
+
!isResponsive && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4315
|
+
Content3,
|
|
4316
|
+
{
|
|
4317
|
+
isResponsive,
|
|
4318
|
+
responsiveContent,
|
|
4319
|
+
handleMenu,
|
|
4320
|
+
content
|
|
4321
|
+
}
|
|
4322
|
+
)
|
|
4323
|
+
] });
|
|
4324
|
+
};
|
|
4325
|
+
DxcHeader.Dropdown = Dropdown;
|
|
4333
4326
|
var Header_default = DxcHeader;
|
|
4334
4327
|
|
|
4335
4328
|
// src/sidenav/Sidenav.tsx
|
|
@@ -4337,10 +4330,10 @@ var import_react21 = require("react");
|
|
|
4337
4330
|
var import_styled_components18 = __toESM(require("styled-components"));
|
|
4338
4331
|
|
|
4339
4332
|
// src/bleed/Bleed.tsx
|
|
4340
|
-
var
|
|
4333
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4341
4334
|
var getNegativeValue = (value) => value ? `calc(${value} * -1)` : null;
|
|
4342
4335
|
function DxcBleed({ space, horizontal, vertical, top, right, bottom, left, children }) {
|
|
4343
|
-
return /* @__PURE__ */ (0,
|
|
4336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4344
4337
|
DxcContainer,
|
|
4345
4338
|
{
|
|
4346
4339
|
margin: {
|
|
@@ -4366,39 +4359,39 @@ var useResponsiveSidenavVisibility = () => {
|
|
|
4366
4359
|
};
|
|
4367
4360
|
|
|
4368
4361
|
// src/sidenav/Sidenav.tsx
|
|
4369
|
-
var
|
|
4362
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4370
4363
|
var DxcSidenav = ({ title, children }) => {
|
|
4371
4364
|
const colorsTheme = (0, import_react21.useContext)(HalstackContext);
|
|
4372
|
-
return /* @__PURE__ */ (0,
|
|
4365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_styled_components18.ThemeProvider, { theme: colorsTheme.sidenav, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(SidenavContainer, { children: [
|
|
4373
4366
|
title,
|
|
4374
|
-
/* @__PURE__ */ (0,
|
|
4367
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Flex_default, { direction: "column", gap: "1rem", children })
|
|
4375
4368
|
] }) });
|
|
4376
4369
|
};
|
|
4377
|
-
var Title2 = ({ children }) => /* @__PURE__ */ (0,
|
|
4378
|
-
var Section = ({ children }) => /* @__PURE__ */ (0,
|
|
4379
|
-
/* @__PURE__ */ (0,
|
|
4380
|
-
/* @__PURE__ */ (0,
|
|
4370
|
+
var Title2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DxcBleed, { horizontal: "1rem", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SidenavTitle, { children }) });
|
|
4371
|
+
var Section = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DxcBleed, { horizontal: "1rem", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Flex_default, { direction: "column", children }) }),
|
|
4373
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Divider, {})
|
|
4381
4374
|
] });
|
|
4382
4375
|
var Group = ({ title, collapsable = false, icon, children }) => {
|
|
4383
4376
|
const [collapsed, setCollapsed] = (0, import_react21.useState)(false);
|
|
4384
4377
|
const [isSelected, changeIsSelected] = (0, import_react21.useState)(false);
|
|
4385
|
-
return /* @__PURE__ */ (0,
|
|
4386
|
-
collapsable && title ? /* @__PURE__ */ (0,
|
|
4378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GroupContextProvider, { value: changeIsSelected, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(SidenavGroup, { children: [
|
|
4379
|
+
collapsable && title ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4387
4380
|
SidenavGroupTitleButton,
|
|
4388
4381
|
{
|
|
4389
4382
|
"aria-expanded": !collapsed,
|
|
4390
4383
|
onClick: () => setCollapsed(!collapsed),
|
|
4391
4384
|
selectedGroup: collapsed && isSelected,
|
|
4392
4385
|
children: [
|
|
4393
|
-
/* @__PURE__ */ (0,
|
|
4394
|
-
typeof icon === "string" ? /* @__PURE__ */ (0,
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Flex_default, { alignItems: "center", gap: "0.5rem", children: [
|
|
4387
|
+
typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DxcIcon, { icon }) : icon,
|
|
4395
4388
|
title
|
|
4396
4389
|
] }),
|
|
4397
|
-
/* @__PURE__ */ (0,
|
|
4390
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DxcIcon, { icon: collapsed ? "expand_more" : "expand_less" })
|
|
4398
4391
|
]
|
|
4399
4392
|
}
|
|
4400
|
-
) : title && /* @__PURE__ */ (0,
|
|
4401
|
-
typeof icon === "string" ? /* @__PURE__ */ (0,
|
|
4393
|
+
) : title && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(SidenavGroupTitle, { children: [
|
|
4394
|
+
typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DxcIcon, { icon }) : icon,
|
|
4402
4395
|
title
|
|
4403
4396
|
] }),
|
|
4404
4397
|
!collapsed && children
|
|
@@ -4415,7 +4408,7 @@ var Link = (0, import_react21.forwardRef)(
|
|
|
4415
4408
|
(0, import_react21.useEffect)(() => {
|
|
4416
4409
|
changeIsGroupSelected?.((isGroupSelected2) => !isGroupSelected2 ? selected : isGroupSelected2);
|
|
4417
4410
|
}, [selected, changeIsGroupSelected]);
|
|
4418
|
-
return /* @__PURE__ */ (0,
|
|
4411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4419
4412
|
SidenavLink,
|
|
4420
4413
|
{
|
|
4421
4414
|
selected,
|
|
@@ -4426,11 +4419,11 @@ var Link = (0, import_react21.forwardRef)(
|
|
|
4426
4419
|
onClick: handleClick,
|
|
4427
4420
|
...otherProps,
|
|
4428
4421
|
children: [
|
|
4429
|
-
/* @__PURE__ */ (0,
|
|
4430
|
-
typeof icon === "string" ? /* @__PURE__ */ (0,
|
|
4422
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Flex_default, { alignItems: "center", gap: "0.5rem", children: [
|
|
4423
|
+
typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DxcIcon, { icon }) : icon,
|
|
4431
4424
|
children
|
|
4432
4425
|
] }),
|
|
4433
|
-
newWindow && /* @__PURE__ */ (0,
|
|
4426
|
+
newWindow && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DxcIcon, { icon: "open_in_new" })
|
|
4434
4427
|
]
|
|
4435
4428
|
}
|
|
4436
4429
|
);
|
|
@@ -4589,9 +4582,9 @@ var Sidenav_default = DxcSidenav;
|
|
|
4589
4582
|
var import_react22 = require("react");
|
|
4590
4583
|
|
|
4591
4584
|
// src/layout/Icons.tsx
|
|
4592
|
-
var
|
|
4585
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4593
4586
|
var layoutIcons = {
|
|
4594
|
-
facebookLogo: /* @__PURE__ */ (0,
|
|
4587
|
+
facebookLogo: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4595
4588
|
"svg",
|
|
4596
4589
|
{
|
|
4597
4590
|
version: "1.1",
|
|
@@ -4601,7 +4594,7 @@ var layoutIcons = {
|
|
|
4601
4594
|
height: "438.536px",
|
|
4602
4595
|
viewBox: "0 0 438.536 438.536",
|
|
4603
4596
|
fill: "#FFFFFF",
|
|
4604
|
-
children: /* @__PURE__ */ (0,
|
|
4597
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4605
4598
|
"path",
|
|
4606
4599
|
{
|
|
4607
4600
|
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123\n C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126\n h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225\n C438.532,59.576,430.49,40.204,414.41,24.123z M373.155,225.548h-49.963V406.84h-74.802V225.548H210.99V163.02h37.401v-37.402\n c0-26.838,6.283-47.107,18.843-60.813c12.559-13.706,33.304-20.555,62.242-20.555h49.963v62.526h-31.401\n c-10.663,0-17.467,1.853-20.417,5.568c-2.949,3.711-4.428,10.23-4.428,19.558v31.119h56.534L373.155,225.548z"
|
|
@@ -4609,9 +4602,9 @@ var layoutIcons = {
|
|
|
4609
4602
|
) })
|
|
4610
4603
|
}
|
|
4611
4604
|
),
|
|
4612
|
-
xLogo: /* @__PURE__ */ (0,
|
|
4613
|
-
/* @__PURE__ */ (0,
|
|
4614
|
-
/* @__PURE__ */ (0,
|
|
4605
|
+
xLogo: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { width: "256", height: "256", viewBox: "0 0 256 256", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4606
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("rect", { width: "256", height: "256", rx: "40", fill: "white" }),
|
|
4607
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4615
4608
|
"path",
|
|
4616
4609
|
{
|
|
4617
4610
|
d: "M140.192 118.205L187.848 64H176.556L135.158 111.056L102.117 64H64L113.975 135.163L64 192H75.2914L118.982 142.296L153.883 192H192L140.192 118.205ZM124.722 135.787L119.65 128.697L79.3634 72.3294H96.7094L129.232 117.837L134.282 124.927L176.551 184.076H159.205L124.722 135.787Z",
|
|
@@ -4619,7 +4612,7 @@ var layoutIcons = {
|
|
|
4619
4612
|
}
|
|
4620
4613
|
)
|
|
4621
4614
|
] }),
|
|
4622
|
-
linkedinLogo: /* @__PURE__ */ (0,
|
|
4615
|
+
linkedinLogo: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4623
4616
|
"svg",
|
|
4624
4617
|
{
|
|
4625
4618
|
version: "1.1",
|
|
@@ -4629,7 +4622,7 @@ var layoutIcons = {
|
|
|
4629
4622
|
height: "438.536px",
|
|
4630
4623
|
viewBox: "0 0 438.536 438.536",
|
|
4631
4624
|
fill: "#FFFFFF",
|
|
4632
|
-
children: /* @__PURE__ */ (0,
|
|
4625
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4633
4626
|
"path",
|
|
4634
4627
|
{
|
|
4635
4628
|
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123\n C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126\n h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225\n C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332\n c-6.851,6.567-15.893,9.851-27.124,9.851h-0.288c-10.848,0-19.648-3.284-26.407-9.851c-6.76-6.567-10.138-14.703-10.138-24.41\n c0-9.897,3.476-18.083,10.421-24.556c6.95-6.471,15.942-9.708,26.98-9.708c11.039,0,19.89,3.237,26.553,9.708\n c6.661,6.473,10.088,14.659,10.277,24.556C137.899,117.625,134.477,125.761,127.626,132.332z M370.873,367.157h-65.952v-105.92\n c0-29.879-11.036-44.823-33.116-44.823c-8.374,0-15.42,2.331-21.128,6.995c-5.715,4.661-9.996,10.324-12.847,16.991\n c-1.335,3.422-1.999,8.75-1.999,15.981v110.775h-65.952c0.571-119.529,0.571-185.579,0-198.142h65.952v27.974\n c13.867-21.681,33.558-32.544,59.101-32.544c22.84,0,41.21,7.52,55.104,22.554c13.895,15.037,20.841,37.214,20.841,66.519v113.64\n H370.873z"
|
|
@@ -4688,7 +4681,7 @@ var useResponsive = (breakpoint) => {
|
|
|
4688
4681
|
};
|
|
4689
4682
|
|
|
4690
4683
|
// src/layout/ApplicationLayout.tsx
|
|
4691
|
-
var
|
|
4684
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4692
4685
|
var ApplicationLayoutContainer = import_styled_components19.default.div`
|
|
4693
4686
|
position: absolute;
|
|
4694
4687
|
top: 64px;
|
|
@@ -4780,7 +4773,7 @@ var MainContentContainer = import_styled_components19.default.main`
|
|
|
4780
4773
|
flex: 1;
|
|
4781
4774
|
background-color: #fff;
|
|
4782
4775
|
`;
|
|
4783
|
-
var Main = ({ children }) => /* @__PURE__ */ (0,
|
|
4776
|
+
var Main = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children });
|
|
4784
4777
|
var DxcApplicationLayout = ({
|
|
4785
4778
|
visibilityToggleLabel = "",
|
|
4786
4779
|
header,
|
|
@@ -4800,24 +4793,24 @@ var DxcApplicationLayout = ({
|
|
|
4800
4793
|
setIsSidenavVisibleResponsive(false);
|
|
4801
4794
|
}
|
|
4802
4795
|
}, [isResponsive]);
|
|
4803
|
-
return /* @__PURE__ */ (0,
|
|
4804
|
-
/* @__PURE__ */ (0,
|
|
4805
|
-
sidenav && isResponsive && /* @__PURE__ */ (0,
|
|
4796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ApplicationLayoutContainer, { hasSidenav: !!sidenav, isSidenavVisible: isSidenavVisibleResponsive, ref, children: [
|
|
4797
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(HeaderContainer2, { children: header ?? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Header_default, { underlined: true }) }),
|
|
4798
|
+
sidenav && isResponsive && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VisibilityToggle, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tooltip, { label: translatedLabels.applicationLayout.visibilityToggleTitle, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4806
4799
|
HamburgerTrigger2,
|
|
4807
4800
|
{
|
|
4808
4801
|
onClick: handleSidenavVisibility,
|
|
4809
4802
|
"aria-label": visibilityToggleLabel ? void 0 : translatedLabels.applicationLayout.visibilityToggleTitle,
|
|
4810
4803
|
children: [
|
|
4811
|
-
/* @__PURE__ */ (0,
|
|
4804
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DxcIcon, { icon: "Menu" }),
|
|
4812
4805
|
visibilityToggleLabel
|
|
4813
4806
|
]
|
|
4814
4807
|
}
|
|
4815
4808
|
) }) }),
|
|
4816
|
-
/* @__PURE__ */ (0,
|
|
4817
|
-
/* @__PURE__ */ (0,
|
|
4818
|
-
/* @__PURE__ */ (0,
|
|
4819
|
-
/* @__PURE__ */ (0,
|
|
4820
|
-
footer ?? /* @__PURE__ */ (0,
|
|
4809
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(BodyContainer, { children: [
|
|
4810
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SidenavContextProvider, { value: setIsSidenavVisibleResponsive, children: sidenav && (isResponsive ? isSidenavVisibleResponsive : true) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SidenavContainer2, { children: sidenav }) }),
|
|
4811
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(MainContainer, { children: [
|
|
4812
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MainContentContainer, { children: findChildType(children, Main) }),
|
|
4813
|
+
footer ?? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4821
4814
|
Footer_default,
|
|
4822
4815
|
{
|
|
4823
4816
|
copyright: `\xA9 DXC Technology ${year}. All rights reserved.`,
|
|
@@ -4838,7 +4831,7 @@ var ApplicationLayout_default = DxcApplicationLayout;
|
|
|
4838
4831
|
|
|
4839
4832
|
// src/badge/Badge.tsx
|
|
4840
4833
|
var import_styled_components20 = __toESM(require("styled-components"));
|
|
4841
|
-
var
|
|
4834
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4842
4835
|
var contextualColorMap = {
|
|
4843
4836
|
grey: {
|
|
4844
4837
|
background: "var(--color-bg-neutral-light)",
|
|
@@ -4953,7 +4946,7 @@ var DxcBadge = ({
|
|
|
4953
4946
|
icon,
|
|
4954
4947
|
notificationLimit = 99,
|
|
4955
4948
|
size = "medium"
|
|
4956
|
-
}) => /* @__PURE__ */ (0,
|
|
4949
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Tooltip, { label: title, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4957
4950
|
BadgeContainer,
|
|
4958
4951
|
{
|
|
4959
4952
|
label,
|
|
@@ -4962,8 +4955,8 @@ var DxcBadge = ({
|
|
|
4962
4955
|
size,
|
|
4963
4956
|
"aria-label": title,
|
|
4964
4957
|
children: [
|
|
4965
|
-
mode === "contextual" && icon && /* @__PURE__ */ (0,
|
|
4966
|
-
label && /* @__PURE__ */ (0,
|
|
4958
|
+
mode === "contextual" && icon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IconContainer4, { size, children: typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DxcIcon, { icon }) : icon }),
|
|
4959
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label, { size, children: typeof label === "number" ? label > notificationLimit ? `+${notificationLimit}` : label : label })
|
|
4967
4960
|
]
|
|
4968
4961
|
}
|
|
4969
4962
|
) });
|
|
@@ -4976,7 +4969,7 @@ var import_styled_components22 = __toESM(require("styled-components"));
|
|
|
4976
4969
|
// src/breadcrumbs/Item.tsx
|
|
4977
4970
|
var import_react24 = require("react");
|
|
4978
4971
|
var import_styled_components21 = __toESM(require("styled-components"));
|
|
4979
|
-
var
|
|
4972
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4980
4973
|
var ListItem = import_styled_components21.default.li`
|
|
4981
4974
|
display: flex;
|
|
4982
4975
|
align-items: center;
|
|
@@ -5027,12 +5020,12 @@ var Item = ({ isCurrentPage = false, href, label, onClick }) => {
|
|
|
5027
5020
|
if (optionElement?.title === "" && labelContainer.scrollWidth > labelContainer.clientWidth)
|
|
5028
5021
|
optionElement.title = label;
|
|
5029
5022
|
};
|
|
5030
|
-
return /* @__PURE__ */ (0,
|
|
5023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ListItem, { "aria-current": isCurrentPage ? "page" : void 0, isCurrentPage, children: isCurrentPage ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CurrentPage, { ref: currentItemRef, onMouseEnter: handleOnMouseEnter, children: label }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Link2, { href, onClick: handleOnClick, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { children: label }) }) });
|
|
5031
5024
|
};
|
|
5032
5025
|
var Item_default = Item;
|
|
5033
5026
|
|
|
5034
5027
|
// src/breadcrumbs/Breadcrumbs.tsx
|
|
5035
|
-
var
|
|
5028
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5036
5029
|
var OrderedList = import_styled_components22.default.ol`
|
|
5037
5030
|
display: flex;
|
|
5038
5031
|
align-items: center;
|
|
@@ -5069,21 +5062,21 @@ var DxcBreadcrumbs = ({
|
|
|
5069
5062
|
},
|
|
5070
5063
|
[items]
|
|
5071
5064
|
);
|
|
5072
|
-
return /* @__PURE__ */ (0,
|
|
5073
|
-
showRoot && /* @__PURE__ */ (0,
|
|
5074
|
-
/* @__PURE__ */ (0,
|
|
5065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("nav", { "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(OrderedList, { children: items && items.length > Math.max(itemsBeforeCollapse, 2) ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
5066
|
+
showRoot && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Item_default, { href: items[0]?.href, label: items[0]?.label ?? "" }, 0),
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Flex_default, { alignItems: "center", as: "li", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5075
5068
|
Dropdown_default,
|
|
5076
5069
|
{
|
|
5077
5070
|
caretHidden: true,
|
|
5078
|
-
icon: /* @__PURE__ */ (0,
|
|
5071
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DxcIcon, { icon: "more_horiz" }),
|
|
5079
5072
|
margin: showRoot ? { left: "small" } : void 0,
|
|
5080
5073
|
onSelectOption: handleOnSelectOption,
|
|
5081
5074
|
options: items.slice(showRoot ? 1 : 0, -1).map(({ label, href }) => ({ label, value: href })),
|
|
5082
5075
|
title: "More options"
|
|
5083
5076
|
}
|
|
5084
5077
|
) }, 1),
|
|
5085
|
-
/* @__PURE__ */ (0,
|
|
5086
|
-
] }) : items.map((item, index, { length }) => /* @__PURE__ */ (0,
|
|
5078
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Item_default, { isCurrentPage: true, label: items[items.length - 1]?.label ?? "" }, 2)
|
|
5079
|
+
] }) : items.map((item, index, { length }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5087
5080
|
Item_default,
|
|
5088
5081
|
{
|
|
5089
5082
|
href: item.href,
|
|
@@ -5123,7 +5116,7 @@ var TypographyContext_default = (0, import_react26.createContext)({
|
|
|
5123
5116
|
});
|
|
5124
5117
|
|
|
5125
5118
|
// src/typography/Typography.tsx
|
|
5126
|
-
var
|
|
5119
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5127
5120
|
var Typography = import_styled_components23.default.span`
|
|
5128
5121
|
margin: 0px;
|
|
5129
5122
|
display: ${({ display }) => display};
|
|
@@ -5149,96 +5142,94 @@ function DxcTypography({ children, ...props }) {
|
|
|
5149
5142
|
}),
|
|
5150
5143
|
[componentContext, props]
|
|
5151
5144
|
);
|
|
5152
|
-
return /* @__PURE__ */ (0,
|
|
5145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TypographyContext_default.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Typography, { ...contextValue, children }) });
|
|
5153
5146
|
}
|
|
5154
5147
|
|
|
5155
5148
|
// src/bulleted-list/BulletedList.tsx
|
|
5156
|
-
var
|
|
5157
|
-
var BulletedListItem = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children });
|
|
5158
|
-
var DxcBulletedList = ({ children, type = "disc", icon = "" }) => {
|
|
5159
|
-
const colorsTheme = (0, import_react28.useContext)(HalstackContext);
|
|
5160
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_styled_components24.ThemeProvider, { theme: colorsTheme.bulletedList, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ListContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Flex_default, { direction: "column", as: type === "number" ? "ol" : "ul", gap: "0.125rem", children: import_react28.Children.map(children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ListItem2, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(GeneralContent, { children: [
|
|
5161
|
-
type === "number" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Number2, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DxcTypography, { color: colorsTheme.bulletedList.fontColor, children: [
|
|
5162
|
-
index + 1,
|
|
5163
|
-
"."
|
|
5164
|
-
] }) }) : type === "square" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Square, {}) }) : type === "circle" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Circle, {}) }) : type === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { children: typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DxcIcon, { icon }) : icon }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Disc, {}) }),
|
|
5165
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DxcTypography, { color: colorsTheme.bulletedList.fontColor, children: child })
|
|
5166
|
-
] }) })) }) }) });
|
|
5167
|
-
};
|
|
5168
|
-
DxcBulletedList.Item = BulletedListItem;
|
|
5149
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5169
5150
|
var ListContainer = import_styled_components24.default.div`
|
|
5170
5151
|
ul,
|
|
5171
5152
|
ol {
|
|
5172
|
-
padding: 0;
|
|
5173
5153
|
margin: 0;
|
|
5154
|
+
padding: 0;
|
|
5174
5155
|
}
|
|
5175
5156
|
`;
|
|
5176
5157
|
var Bullet = import_styled_components24.default.div`
|
|
5177
|
-
display: flex;
|
|
5178
|
-
align-self: flex-start;
|
|
5179
5158
|
align-items: center;
|
|
5180
|
-
|
|
5159
|
+
align-self: flex-start;
|
|
5160
|
+
display: flex;
|
|
5161
|
+
height: var(--height-s);
|
|
5181
5162
|
`;
|
|
5182
5163
|
var GeneralContent = import_styled_components24.default.div`
|
|
5164
|
+
align-items: center;
|
|
5183
5165
|
display: grid;
|
|
5166
|
+
gap: var(--spacing-gap-s);
|
|
5184
5167
|
grid-template-columns: auto 1fr;
|
|
5185
|
-
align-items: center;
|
|
5186
5168
|
`;
|
|
5187
5169
|
var Icon = import_styled_components24.default.div`
|
|
5188
|
-
|
|
5170
|
+
display: flex;
|
|
5171
|
+
align-items: center;
|
|
5172
|
+
font-size: var(--height-xxs);
|
|
5173
|
+
height: var(--height-s);
|
|
5189
5174
|
width: auto;
|
|
5190
|
-
margin-right: ${(props) => props.theme.bulletMarginRight};
|
|
5191
|
-
align-content: center;
|
|
5192
|
-
color: ${(props) => props.theme.fontColor};
|
|
5193
|
-
|
|
5194
|
-
font-size: ${(props) => props.theme.bulletIconHeight};
|
|
5195
5175
|
svg {
|
|
5196
|
-
height:
|
|
5197
|
-
width:
|
|
5176
|
+
height: var(--height-xxs);
|
|
5177
|
+
width: 16px;
|
|
5198
5178
|
}
|
|
5199
5179
|
`;
|
|
5200
5180
|
var Number2 = import_styled_components24.default.div`
|
|
5201
|
-
user-select: none;
|
|
5202
|
-
margin-right: ${(props) => props.theme.bulletMarginRight};
|
|
5203
|
-
display: flex;
|
|
5204
|
-
box-sizing: border-box;
|
|
5205
5181
|
align-self: flex-start;
|
|
5182
|
+
box-sizing: border-box;
|
|
5183
|
+
display: flex;
|
|
5206
5184
|
min-width: 0;
|
|
5185
|
+
user-select: none;
|
|
5207
5186
|
`;
|
|
5208
5187
|
var Square = import_styled_components24.default.div`
|
|
5209
|
-
background-color:
|
|
5210
|
-
height:
|
|
5211
|
-
width:
|
|
5212
|
-
margin-right: ${(props) => props.theme.bulletMarginRight};
|
|
5188
|
+
background-color: var(--color-fg-neutral-dark);
|
|
5189
|
+
height: 4px;
|
|
5190
|
+
width: 4px;
|
|
5213
5191
|
`;
|
|
5214
5192
|
var Circle = import_styled_components24.default.div`
|
|
5215
|
-
|
|
5216
|
-
width: ${(props) => props.theme.bulletWidth};
|
|
5193
|
+
border-color: var(--color-fg-neutral-dark);
|
|
5217
5194
|
border-radius: 50%;
|
|
5218
|
-
border:
|
|
5219
|
-
|
|
5220
|
-
|
|
5195
|
+
border: var(--border-width-s) var(--border-style-default);
|
|
5196
|
+
height: 4px;
|
|
5197
|
+
width: 4px;
|
|
5221
5198
|
`;
|
|
5222
5199
|
var Disc = import_styled_components24.default.div`
|
|
5223
|
-
background-color:
|
|
5224
|
-
height: ${(props) => props.theme.bulletHeight};
|
|
5225
|
-
width: ${(props) => props.theme.bulletWidth};
|
|
5200
|
+
background-color: var(--color-fg-neutral-dark);
|
|
5226
5201
|
border-radius: 50%;
|
|
5227
|
-
|
|
5202
|
+
height: 4px;
|
|
5203
|
+
width: 4px;
|
|
5228
5204
|
`;
|
|
5229
5205
|
var ListItem2 = import_styled_components24.default.li`
|
|
5206
|
+
color: var(--color-fg-neutral-dark);
|
|
5230
5207
|
display: flex;
|
|
5231
|
-
|
|
5232
|
-
|
|
5208
|
+
font-family: var(--typography-font-family);
|
|
5209
|
+
font-size: var(--typography-body-m);
|
|
5210
|
+
font-weight: var(--typography-body-regular);
|
|
5233
5211
|
list-style: none;
|
|
5234
|
-
|
|
5212
|
+
margin: var(--spacing-padding-none);
|
|
5213
|
+
padding: var(--spacing-padding-none);
|
|
5235
5214
|
`;
|
|
5215
|
+
var BulletedListItem = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children });
|
|
5216
|
+
var DxcBulletedList = ({ children, type = "disc", icon = "" }) => {
|
|
5217
|
+
const colorsTheme = (0, import_react28.useContext)(HalstackContext);
|
|
5218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_styled_components24.ThemeProvider, { theme: colorsTheme.bulletedList, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ListContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Flex_default, { direction: "column", as: type === "number" ? "ol" : "ul", gap: "0.125rem", children: import_react28.Children.map(children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ListItem2, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(GeneralContent, { children: [
|
|
5219
|
+
type === "number" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Number2, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DxcTypography, { color: colorsTheme.bulletedList.fontColor, children: [
|
|
5220
|
+
index + 1,
|
|
5221
|
+
"."
|
|
5222
|
+
] }) }) : type === "square" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Square, {}) }) : type === "circle" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Circle, {}) }) : type === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { children: typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DxcIcon, { icon }) : icon }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Bullet, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Disc, {}) }),
|
|
5223
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DxcTypography, { color: colorsTheme.bulletedList.fontColor, children: child })
|
|
5224
|
+
] }) })) }) }) });
|
|
5225
|
+
};
|
|
5226
|
+
DxcBulletedList.Item = BulletedListItem;
|
|
5236
5227
|
var BulletedList_default = DxcBulletedList;
|
|
5237
5228
|
|
|
5238
5229
|
// src/card/Card.tsx
|
|
5239
5230
|
var import_react29 = require("react");
|
|
5240
5231
|
var import_styled_components25 = __toESM(require("styled-components"));
|
|
5241
|
-
var
|
|
5232
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5242
5233
|
var Card = import_styled_components25.default.div`
|
|
5243
5234
|
display: flex;
|
|
5244
5235
|
cursor: ${({ hasAction }) => hasAction ? "pointer" : "unset"};
|
|
@@ -5302,7 +5293,7 @@ var DxcCard = ({
|
|
|
5302
5293
|
children
|
|
5303
5294
|
}) => {
|
|
5304
5295
|
const [isHovered, changeIsHovered] = (0, import_react29.useState)(false);
|
|
5305
|
-
return /* @__PURE__ */ (0,
|
|
5296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5306
5297
|
Card,
|
|
5307
5298
|
{
|
|
5308
5299
|
hasAction: !!(onClick || linkHref),
|
|
@@ -5314,9 +5305,9 @@ var DxcCard = ({
|
|
|
5314
5305
|
as: linkHref && "a",
|
|
5315
5306
|
href: linkHref,
|
|
5316
5307
|
shadowDepth: !outlined ? 0 : isHovered && (onClick || linkHref) ? 2 : 1,
|
|
5317
|
-
children: /* @__PURE__ */ (0,
|
|
5318
|
-
imageSrc && /* @__PURE__ */ (0,
|
|
5319
|
-
/* @__PURE__ */ (0,
|
|
5308
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(CardContainer, { hasAction: onClick || linkHref ? true : false, imagePosition: imageSrc ? imagePosition : "none", children: [
|
|
5309
|
+
imageSrc && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ImageContainer, { imageBgColor, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TagImage, { imagePadding, imageCover, src: imageSrc, alt: "Card image" }) }),
|
|
5310
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CardContent, { children })
|
|
5320
5311
|
] })
|
|
5321
5312
|
}
|
|
5322
5313
|
);
|
|
@@ -5328,7 +5319,7 @@ var import_react31 = require("react");
|
|
|
5328
5319
|
var import_styled_components26 = __toESM(require("styled-components"));
|
|
5329
5320
|
|
|
5330
5321
|
// src/checkbox/utils.tsx
|
|
5331
|
-
var
|
|
5322
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5332
5323
|
var sizes2 = {
|
|
5333
5324
|
small: "120px",
|
|
5334
5325
|
medium: "240px",
|
|
@@ -5347,21 +5338,21 @@ var spaces2 = {
|
|
|
5347
5338
|
};
|
|
5348
5339
|
var calculateWidth4 = (margin, size) => size === "fillParent" ? `calc(${sizes2[size]} - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})` : size && sizes2[size];
|
|
5349
5340
|
var icons = {
|
|
5350
|
-
checked: /* @__PURE__ */ (0,
|
|
5341
|
+
checked: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5351
5342
|
"path",
|
|
5352
5343
|
{
|
|
5353
5344
|
d: "M19 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.11 21 21 20.1 21 19V5C21 3.9 20.11 3 19 3ZM10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",
|
|
5354
5345
|
fill: "currentColor"
|
|
5355
5346
|
}
|
|
5356
5347
|
) }),
|
|
5357
|
-
partial: /* @__PURE__ */ (0,
|
|
5348
|
+
partial: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5358
5349
|
"path",
|
|
5359
5350
|
{
|
|
5360
5351
|
d: "M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM7 11H17V13H7V11Z",
|
|
5361
5352
|
fill: "currentColor"
|
|
5362
5353
|
}
|
|
5363
5354
|
) }),
|
|
5364
|
-
unchecked: /* @__PURE__ */ (0,
|
|
5355
|
+
unchecked: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5365
5356
|
"path",
|
|
5366
5357
|
{
|
|
5367
5358
|
d: "M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z",
|
|
@@ -5375,7 +5366,7 @@ var import_react30 = require("react");
|
|
|
5375
5366
|
var CheckboxContext_default = (0, import_react30.createContext)(null);
|
|
5376
5367
|
|
|
5377
5368
|
// src/checkbox/Checkbox.tsx
|
|
5378
|
-
var
|
|
5369
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5379
5370
|
var Label2 = import_styled_components26.default.span`
|
|
5380
5371
|
color: ${({ disabled }) => disabled ? "var(--color-fg-neutral-medium)" : "var(--color-fg-neutral-dark)"};
|
|
5381
5372
|
font-family: var(--typography-font-family);
|
|
@@ -5459,7 +5450,7 @@ var DxcCheckbox = (0, import_react31.forwardRef)(
|
|
|
5459
5450
|
break;
|
|
5460
5451
|
}
|
|
5461
5452
|
};
|
|
5462
|
-
return /* @__PURE__ */ (0,
|
|
5453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5463
5454
|
CheckboxContainer,
|
|
5464
5455
|
{
|
|
5465
5456
|
disabled,
|
|
@@ -5470,12 +5461,12 @@ var DxcCheckbox = (0, import_react31.forwardRef)(
|
|
|
5470
5461
|
ref,
|
|
5471
5462
|
size,
|
|
5472
5463
|
children: [
|
|
5473
|
-
label && /* @__PURE__ */ (0,
|
|
5464
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Label2, { "aria-label": label, disabled, id: labelId, children: [
|
|
5474
5465
|
label,
|
|
5475
5466
|
" ",
|
|
5476
|
-
optional && /* @__PURE__ */ (0,
|
|
5467
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: translatedLabels.formFields.optionalLabel })
|
|
5477
5468
|
] }),
|
|
5478
|
-
/* @__PURE__ */ (0,
|
|
5469
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5479
5470
|
Checkbox,
|
|
5480
5471
|
{
|
|
5481
5472
|
"aria-checked": checked ?? innerChecked,
|
|
@@ -5493,7 +5484,7 @@ var DxcCheckbox = (0, import_react31.forwardRef)(
|
|
|
5493
5484
|
children: partial ? icons.partial : checked ?? innerChecked ? icons.checked : icons.unchecked
|
|
5494
5485
|
}
|
|
5495
5486
|
),
|
|
5496
|
-
/* @__PURE__ */ (0,
|
|
5487
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5497
5488
|
"input",
|
|
5498
5489
|
{
|
|
5499
5490
|
checked: checked ?? innerChecked,
|
|
@@ -5514,7 +5505,7 @@ var Checkbox_default = DxcCheckbox;
|
|
|
5514
5505
|
|
|
5515
5506
|
// src/chip/Chip.tsx
|
|
5516
5507
|
var import_styled_components27 = __toESM(require("styled-components"));
|
|
5517
|
-
var
|
|
5508
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5518
5509
|
var calculateWidth5 = (margin) => `calc(100% - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})`;
|
|
5519
5510
|
var Chip = import_styled_components27.default.div`
|
|
5520
5511
|
box-sizing: border-box;
|
|
@@ -5561,8 +5552,8 @@ var DxcChip = ({
|
|
|
5561
5552
|
disabled,
|
|
5562
5553
|
margin,
|
|
5563
5554
|
tabIndex = 0
|
|
5564
|
-
}) => /* @__PURE__ */ (0,
|
|
5565
|
-
prefixIcon && (typeof onClickPrefix === "function" ? /* @__PURE__ */ (0,
|
|
5555
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Chip, { disabled, margin, children: [
|
|
5556
|
+
prefixIcon && (typeof onClickPrefix === "function" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5566
5557
|
ActionIcon_default,
|
|
5567
5558
|
{
|
|
5568
5559
|
disabled,
|
|
@@ -5571,9 +5562,9 @@ var DxcChip = ({
|
|
|
5571
5562
|
tabIndex,
|
|
5572
5563
|
title: "Prefix Action"
|
|
5573
5564
|
}
|
|
5574
|
-
) : /* @__PURE__ */ (0,
|
|
5575
|
-
label && /* @__PURE__ */ (0,
|
|
5576
|
-
suffixIcon && (typeof onClickSuffix === "function" ? /* @__PURE__ */ (0,
|
|
5565
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(IconContainer5, { disabled, children: typeof prefixIcon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DxcIcon, { icon: prefixIcon }) : prefixIcon })),
|
|
5566
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LabelContainer2, { disabled, children: label }),
|
|
5567
|
+
suffixIcon && (typeof onClickSuffix === "function" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5577
5568
|
ActionIcon_default,
|
|
5578
5569
|
{
|
|
5579
5570
|
disabled,
|
|
@@ -5582,7 +5573,7 @@ var DxcChip = ({
|
|
|
5582
5573
|
tabIndex,
|
|
5583
5574
|
title: "Suffix Action"
|
|
5584
5575
|
}
|
|
5585
|
-
) : /* @__PURE__ */ (0,
|
|
5576
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(IconContainer5, { disabled, children: typeof suffixIcon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DxcIcon, { icon: suffixIcon }) : suffixIcon }))
|
|
5586
5577
|
] });
|
|
5587
5578
|
var Chip_default = DxcChip;
|
|
5588
5579
|
|
|
@@ -5598,7 +5589,7 @@ var import_react34 = require("react");
|
|
|
5598
5589
|
|
|
5599
5590
|
// src/contextual-menu/SubMenu.tsx
|
|
5600
5591
|
var import_styled_components28 = __toESM(require("styled-components"));
|
|
5601
|
-
var
|
|
5592
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5602
5593
|
var SubMenuContainer = import_styled_components28.default.ul`
|
|
5603
5594
|
margin: 0;
|
|
5604
5595
|
padding: 0;
|
|
@@ -5607,13 +5598,13 @@ var SubMenuContainer = import_styled_components28.default.ul`
|
|
|
5607
5598
|
list-style: none;
|
|
5608
5599
|
`;
|
|
5609
5600
|
function SubMenu({ children, id }) {
|
|
5610
|
-
return /* @__PURE__ */ (0,
|
|
5601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SubMenuContainer, { id, role: "menu", children });
|
|
5611
5602
|
}
|
|
5612
5603
|
|
|
5613
5604
|
// src/contextual-menu/ItemAction.tsx
|
|
5614
5605
|
var import_react32 = require("react");
|
|
5615
5606
|
var import_styled_components29 = __toESM(require("styled-components"));
|
|
5616
|
-
var
|
|
5607
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5617
5608
|
var Action = import_styled_components29.default.button`
|
|
5618
5609
|
box-sizing: content-box;
|
|
5619
5610
|
border: none;
|
|
@@ -5667,11 +5658,11 @@ var Text2 = import_styled_components29.default.span`
|
|
|
5667
5658
|
var ItemAction_default = (0, import_react32.memo)(function ItemAction({ badge, collapseIcon, depthLevel, icon, label, ...props }) {
|
|
5668
5659
|
const [hasTooltip, setHasTooltip] = (0, import_react32.useState)(false);
|
|
5669
5660
|
const modifiedBadge = badge && (0, import_react32.cloneElement)(badge, { size: "small" });
|
|
5670
|
-
return /* @__PURE__ */ (0,
|
|
5671
|
-
/* @__PURE__ */ (0,
|
|
5672
|
-
collapseIcon && /* @__PURE__ */ (0,
|
|
5673
|
-
icon && depthLevel === 0 && /* @__PURE__ */ (0,
|
|
5674
|
-
/* @__PURE__ */ (0,
|
|
5661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipWrapper, { condition: hasTooltip, label, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Action, { depthLevel, ...props, children: [
|
|
5662
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Label3, { children: [
|
|
5663
|
+
collapseIcon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon2, { children: collapseIcon }),
|
|
5664
|
+
icon && depthLevel === 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon2, { children: typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DxcIcon, { icon }) : icon }),
|
|
5665
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5675
5666
|
Text2,
|
|
5676
5667
|
{
|
|
5677
5668
|
selected: props.selected,
|
|
@@ -5710,20 +5701,20 @@ var isGroupSelected = (items, selectedItemId) => items.some((item) => {
|
|
|
5710
5701
|
});
|
|
5711
5702
|
|
|
5712
5703
|
// src/contextual-menu/GroupItem.tsx
|
|
5713
|
-
var
|
|
5704
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5714
5705
|
function GroupItem({ items, ...props }) {
|
|
5715
5706
|
const groupMenuId = `group-menu-${(0, import_react34.useId)()}`;
|
|
5716
5707
|
const { selectedItemId } = (0, import_react34.useContext)(ContextualMenuContext_default) ?? {};
|
|
5717
5708
|
const groupSelected = (0, import_react34.useMemo)(() => isGroupSelected(items, selectedItemId), [items, selectedItemId]);
|
|
5718
5709
|
const [isOpen, setIsOpen] = (0, import_react34.useState)(groupSelected && selectedItemId === -1);
|
|
5719
|
-
return /* @__PURE__ */ (0,
|
|
5720
|
-
/* @__PURE__ */ (0,
|
|
5710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
5711
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5721
5712
|
ItemAction_default,
|
|
5722
5713
|
{
|
|
5723
5714
|
"aria-controls": isOpen ? groupMenuId : void 0,
|
|
5724
5715
|
"aria-expanded": isOpen ? true : void 0,
|
|
5725
5716
|
"aria-pressed": groupSelected && !isOpen,
|
|
5726
|
-
collapseIcon: isOpen ? /* @__PURE__ */ (0,
|
|
5717
|
+
collapseIcon: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DxcIcon, { icon: "filled_expand_less" }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DxcIcon, { icon: "filled_expand_more" }),
|
|
5727
5718
|
onClick: () => {
|
|
5728
5719
|
setIsOpen((isCurrentlyOpen) => !isCurrentlyOpen);
|
|
5729
5720
|
},
|
|
@@ -5731,13 +5722,13 @@ function GroupItem({ items, ...props }) {
|
|
|
5731
5722
|
...props
|
|
5732
5723
|
}
|
|
5733
5724
|
),
|
|
5734
|
-
isOpen && /* @__PURE__ */ (0,
|
|
5725
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SubMenu, { id: groupMenuId, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MenuItem, { item, depthLevel: props.depthLevel + 1 }, `${item.label}-${index}`)) })
|
|
5735
5726
|
] });
|
|
5736
5727
|
}
|
|
5737
5728
|
|
|
5738
5729
|
// src/contextual-menu/SingleItem.tsx
|
|
5739
5730
|
var import_react35 = require("react");
|
|
5740
|
-
var
|
|
5731
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5741
5732
|
function SingleItem({ id, onSelect, selectedByDefault = false, ...props }) {
|
|
5742
5733
|
const { selectedItemId, setSelectedItemId } = (0, import_react35.useContext)(ContextualMenuContext_default) ?? {};
|
|
5743
5734
|
const handleClick = () => {
|
|
@@ -5749,7 +5740,7 @@ function SingleItem({ id, onSelect, selectedByDefault = false, ...props }) {
|
|
|
5749
5740
|
setSelectedItemId?.(id);
|
|
5750
5741
|
}
|
|
5751
5742
|
}, [selectedItemId, selectedByDefault, id]);
|
|
5752
|
-
return /* @__PURE__ */ (0,
|
|
5743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5753
5744
|
ItemAction_default,
|
|
5754
5745
|
{
|
|
5755
5746
|
"aria-pressed": selectedItemId === -1 ? selectedByDefault : selectedItemId === id,
|
|
@@ -5761,19 +5752,19 @@ function SingleItem({ id, onSelect, selectedByDefault = false, ...props }) {
|
|
|
5761
5752
|
}
|
|
5762
5753
|
|
|
5763
5754
|
// src/contextual-menu/MenuItem.tsx
|
|
5764
|
-
var
|
|
5755
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5765
5756
|
var MenuItemContainer = import_styled_components30.default.li`
|
|
5766
5757
|
display: grid;
|
|
5767
5758
|
gap: var(--spacing-gap-xs);
|
|
5768
5759
|
`;
|
|
5769
5760
|
function MenuItem({ item, depthLevel = 0 }) {
|
|
5770
|
-
return /* @__PURE__ */ (0,
|
|
5761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MenuItemContainer, { role: "menuitem", children: "items" in item ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GroupItem, { ...item, depthLevel }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SingleItem, { ...item, depthLevel }) });
|
|
5771
5762
|
}
|
|
5772
5763
|
|
|
5773
5764
|
// src/contextual-menu/Section.tsx
|
|
5774
5765
|
var import_styled_components31 = __toESM(require("styled-components"));
|
|
5775
5766
|
var import_react36 = require("react");
|
|
5776
|
-
var
|
|
5767
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5777
5768
|
var SectionContainer = import_styled_components31.default.section`
|
|
5778
5769
|
display: grid;
|
|
5779
5770
|
gap: var(--spacing-gap-xs);
|
|
@@ -5788,15 +5779,15 @@ var Title3 = import_styled_components31.default.h2`
|
|
|
5788
5779
|
`;
|
|
5789
5780
|
function Section2({ index, length, section }) {
|
|
5790
5781
|
const id = `section-${(0, import_react36.useId)()}`;
|
|
5791
|
-
return /* @__PURE__ */ (0,
|
|
5792
|
-
section.title && /* @__PURE__ */ (0,
|
|
5793
|
-
/* @__PURE__ */ (0,
|
|
5794
|
-
index !== length - 1 && /* @__PURE__ */ (0,
|
|
5782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(SectionContainer, { "aria-label": section.title ?? id, "aria-labelledby": id, children: [
|
|
5783
|
+
section.title && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title3, { id, children: section.title }),
|
|
5784
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SubMenu, { children: section.items.map((item, index2) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MenuItem, { item }, `${item.label}-${index2}`)) }),
|
|
5785
|
+
index !== length - 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DxcInset, { top: "var(--spacing-padding-xxs)", bottom: "var(--spacing-padding-xxs)", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DxcDivider, { color: "lightGrey" }) })
|
|
5795
5786
|
] });
|
|
5796
5787
|
}
|
|
5797
5788
|
|
|
5798
5789
|
// src/contextual-menu/ContextualMenu.tsx
|
|
5799
|
-
var
|
|
5790
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5800
5791
|
var ContextualMenu = import_styled_components32.default.div`
|
|
5801
5792
|
box-sizing: border-box;
|
|
5802
5793
|
margin: 0;
|
|
@@ -5828,7 +5819,7 @@ function DxcContextualMenu({ items }) {
|
|
|
5828
5819
|
setFirstUpdate(false);
|
|
5829
5820
|
}
|
|
5830
5821
|
}, [firstUpdate, selectedItemId]);
|
|
5831
|
-
return /* @__PURE__ */ (0,
|
|
5822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ContextualMenu, { ref: contextualMenuRef, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ContextualMenuContext_default.Provider, { value: contextValue, children: itemsWithId[0] && isSection(itemsWithId[0]) ? itemsWithId.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Section2, { section: item, index, length: itemsWithId.length }, `section-${index}`)) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SubMenu, { children: itemsWithId.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MenuItem, { item }, `${item.label}-${index}`)) }) }) });
|
|
5832
5823
|
}
|
|
5833
5824
|
|
|
5834
5825
|
// src/data-grid/DataGrid.tsx
|
|
@@ -5839,20 +5830,7 @@ var import_styles = require("react-data-grid/lib/styles.css");
|
|
|
5839
5830
|
|
|
5840
5831
|
// src/data-grid/utils.tsx
|
|
5841
5832
|
var import_react_data_grid = require("react-data-grid");
|
|
5842
|
-
var
|
|
5843
|
-
var overwriteTheme = (theme) => {
|
|
5844
|
-
const newTheme = {
|
|
5845
|
-
checkbox: {
|
|
5846
|
-
backgroundColorChecked: theme?.dataGrid?.headerCheckboxBackgroundColorChecked,
|
|
5847
|
-
hoverBackgroundColorChecked: theme?.dataGrid?.headerCheckboxHoverBackgroundColorChecked,
|
|
5848
|
-
borderColor: theme?.dataGrid?.headerCheckboxBorderColor,
|
|
5849
|
-
hoverBorderColor: theme?.dataGrid?.headerCheckboxHoverBorderColor,
|
|
5850
|
-
checkColor: theme?.dataGrid?.headerCheckboxCheckColor,
|
|
5851
|
-
focusColor: theme?.dataGrid?.focusColor
|
|
5852
|
-
}
|
|
5853
|
-
};
|
|
5854
|
-
return newTheme;
|
|
5855
|
-
};
|
|
5833
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5856
5834
|
var convertToRDGColumns = (gridColumn, summaryRow) => ({
|
|
5857
5835
|
key: gridColumn.key,
|
|
5858
5836
|
name: gridColumn.label,
|
|
@@ -5862,11 +5840,11 @@ var convertToRDGColumns = (gridColumn, summaryRow) => ({
|
|
|
5862
5840
|
editable: gridColumn.textEditable,
|
|
5863
5841
|
headerCellClass: gridColumn.alignment ? `header-align-${gridColumn.alignment}` : `header-align-left`,
|
|
5864
5842
|
renderEditCell: gridColumn.textEditable ? import_react_data_grid.textEditor : void 0,
|
|
5865
|
-
renderCell: ({ row }) => /* @__PURE__ */ (0,
|
|
5866
|
-
renderSummaryCell: () => gridColumn.summaryKey ? /* @__PURE__ */ (0,
|
|
5843
|
+
renderCell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `ellipsis-cell ${gridColumn.alignment ? `align-${gridColumn.alignment}` : "align-left"}`, children: row[gridColumn.key] }),
|
|
5844
|
+
renderSummaryCell: () => gridColumn.summaryKey ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `ellipsis-cell ${gridColumn.alignment ? `align-${gridColumn.alignment}` : "align-left"}`, children: summaryRow?.[gridColumn.summaryKey] }) : void 0
|
|
5867
5845
|
});
|
|
5868
|
-
var renderSortStatus = ({ sortDirection }) => /* @__PURE__ */ (0,
|
|
5869
|
-
var renderExpandableTrigger = (row, rows, uniqueRowId, setRowsToRender) => /* @__PURE__ */ (0,
|
|
5846
|
+
var renderSortStatus = ({ sortDirection }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "sortIconContainer", children: sortDirection !== void 0 ? sortDirection === "ASC" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DxcIcon, { icon: "Keyboard_Arrow_Up" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DxcIcon, { icon: "Keyboard_Arrow_Down" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DxcIcon, { icon: "Expand_All" }) });
|
|
5847
|
+
var renderExpandableTrigger = (row, rows, uniqueRowId, setRowsToRender) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5870
5848
|
ActionIcon_default,
|
|
5871
5849
|
{
|
|
5872
5850
|
icon: row.contentIsExpanded ? "arrow_drop_down" : "arrow_right",
|
|
@@ -5899,7 +5877,7 @@ var renderExpandableTrigger = (row, rows, uniqueRowId, setRowsToRender) => /* @_
|
|
|
5899
5877
|
disabled: !rows.some((row2) => uniqueRowId in row2)
|
|
5900
5878
|
}
|
|
5901
5879
|
);
|
|
5902
|
-
var renderHierarchyTrigger = (rows, triggerRow, uniqueRowId, columnKey, setRowsToRender) => /* @__PURE__ */ (0,
|
|
5880
|
+
var renderHierarchyTrigger = (rows, triggerRow, uniqueRowId, columnKey, setRowsToRender) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5903
5881
|
"button",
|
|
5904
5882
|
{
|
|
5905
5883
|
type: "button",
|
|
@@ -5939,12 +5917,12 @@ var renderHierarchyTrigger = (rows, triggerRow, uniqueRowId, columnKey, setRowsT
|
|
|
5939
5917
|
setRowsToRender(newRowsToRender);
|
|
5940
5918
|
},
|
|
5941
5919
|
children: [
|
|
5942
|
-
/* @__PURE__ */ (0,
|
|
5943
|
-
/* @__PURE__ */ (0,
|
|
5920
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DxcIcon, { icon: triggerRow.visibleChildren ? "Keyboard_Arrow_Down" : "Chevron_Right" }),
|
|
5921
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "ellipsis-cell", children: triggerRow[columnKey] })
|
|
5944
5922
|
]
|
|
5945
5923
|
}
|
|
5946
5924
|
);
|
|
5947
|
-
var renderCheckbox = (rows, row, uniqueRowId, selectedRows, onSelectRows) => /* @__PURE__ */ (0,
|
|
5925
|
+
var renderCheckbox = (rows, row, uniqueRowId, selectedRows, onSelectRows) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5948
5926
|
Checkbox_default,
|
|
5949
5927
|
{
|
|
5950
5928
|
checked: selectedRows.has(rowKeyGetter(row, uniqueRowId)),
|
|
@@ -5966,7 +5944,7 @@ var renderCheckbox = (rows, row, uniqueRowId, selectedRows, onSelectRows) => /*
|
|
|
5966
5944
|
disabled: !rows.some((row2) => uniqueRowId in row2)
|
|
5967
5945
|
}
|
|
5968
5946
|
);
|
|
5969
|
-
var renderHeaderCheckbox = (rows, uniqueRowId, selectedRows,
|
|
5947
|
+
var renderHeaderCheckbox = (rows, uniqueRowId, selectedRows, onSelectRows) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5970
5948
|
Checkbox_default,
|
|
5971
5949
|
{
|
|
5972
5950
|
checked: rows.length > 0 && !rows.some((row) => !selectedRows.has(rowKeyGetter(row, uniqueRowId))),
|
|
@@ -5991,7 +5969,7 @@ var renderHeaderCheckbox = (rows, uniqueRowId, selectedRows, colorsTheme, onSele
|
|
|
5991
5969
|
},
|
|
5992
5970
|
disabled: rows.length === 0 || !rows.some((row) => uniqueRowId in row)
|
|
5993
5971
|
}
|
|
5994
|
-
)
|
|
5972
|
+
);
|
|
5995
5973
|
var rowKeyGetter = (row, uniqueRowId) => {
|
|
5996
5974
|
const keyValue = row[uniqueRowId];
|
|
5997
5975
|
return typeof keyValue === "string" || typeof keyValue === "number" ? keyValue : "";
|
|
@@ -6151,7 +6129,7 @@ var import_styled_components34 = __toESM(require("styled-components"));
|
|
|
6151
6129
|
// src/select/ListOption.tsx
|
|
6152
6130
|
var import_styled_components33 = __toESM(require("styled-components"));
|
|
6153
6131
|
var import_react38 = require("react");
|
|
6154
|
-
var
|
|
6132
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6155
6133
|
var OptionItem = import_styled_components33.default.li`
|
|
6156
6134
|
padding: var(--spacing-padding-none) var(--spacing-padding-xs);
|
|
6157
6135
|
cursor: pointer;
|
|
@@ -6222,7 +6200,7 @@ var ListOption = ({
|
|
|
6222
6200
|
(0, import_react38.useEffect)(() => {
|
|
6223
6201
|
if (checkboxRef.current) checkboxRef.current.style.pointerEvents = "none";
|
|
6224
6202
|
}, []);
|
|
6225
|
-
return /* @__PURE__ */ (0,
|
|
6203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipWrapper, { condition: hasTooltip, label: option.label, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6226
6204
|
OptionItem,
|
|
6227
6205
|
{
|
|
6228
6206
|
"aria-selected": !multiple ? isSelected : void 0,
|
|
@@ -6234,12 +6212,12 @@ var ListOption = ({
|
|
|
6234
6212
|
role: "option",
|
|
6235
6213
|
selected: isSelected,
|
|
6236
6214
|
visualFocused,
|
|
6237
|
-
children: /* @__PURE__ */ (0,
|
|
6238
|
-
multiple && /* @__PURE__ */ (0,
|
|
6239
|
-
option.icon && /* @__PURE__ */ (0,
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
6241
|
-
/* @__PURE__ */ (0,
|
|
6242
|
-
!multiple && isSelected && /* @__PURE__ */ (0,
|
|
6215
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(StyledOption, { grouped: isGroupedOption, last: isLastOption, selected: isSelected, visualFocused, children: [
|
|
6216
|
+
multiple && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Checkbox_default, { checked: isSelected, tabIndex: -1, ref: checkboxRef }),
|
|
6217
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(OptionIcon, { children: typeof option.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DxcIcon, { icon: option.icon }) : option.icon }),
|
|
6218
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(OptionContent, { children: [
|
|
6219
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(OptionLabel, { isSelectAllOption, onMouseEnter: handleOnMouseEnter, children: option.label }),
|
|
6220
|
+
!multiple && isSelected && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DxcIcon, { icon: "done" })
|
|
6243
6221
|
] })
|
|
6244
6222
|
] })
|
|
6245
6223
|
}
|
|
@@ -6340,7 +6318,7 @@ var getSelectableOptionsValues = (options) => isArrayOfGroupedOptions(options) ?
|
|
|
6340
6318
|
var computeNewValue = (currentValue, newOption) => currentValue.includes(newOption.value) ? currentValue.filter((val) => val !== newOption.value) : [...currentValue, newOption.value];
|
|
6341
6319
|
|
|
6342
6320
|
// src/select/Listbox.tsx
|
|
6343
|
-
var
|
|
6321
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6344
6322
|
var ListboxContainer = import_styled_components34.default.div`
|
|
6345
6323
|
box-sizing: border-box;
|
|
6346
6324
|
max-height: 304px;
|
|
@@ -6402,7 +6380,7 @@ var Listbox = ({
|
|
|
6402
6380
|
if (multiple && enableSelectAll) {
|
|
6403
6381
|
const groupSelectionType = getGroupSelectionType(option.options, currentValue);
|
|
6404
6382
|
globalMappingIndex++;
|
|
6405
|
-
return /* @__PURE__ */ (0,
|
|
6383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CheckboxContext_default.Provider, { value: { partial: groupSelectionType === "indeterminate" }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6406
6384
|
ListOption_default,
|
|
6407
6385
|
{
|
|
6408
6386
|
id: groupId,
|
|
@@ -6420,17 +6398,17 @@ var Listbox = ({
|
|
|
6420
6398
|
groupId
|
|
6421
6399
|
) });
|
|
6422
6400
|
} else
|
|
6423
|
-
return /* @__PURE__ */ (0,
|
|
6401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GroupLabel, { id: groupId, role: "presentation", children: option.label });
|
|
6424
6402
|
};
|
|
6425
6403
|
const mapOptionFunc = (option, mapIndex) => {
|
|
6426
6404
|
if ("options" in option) {
|
|
6427
6405
|
const groupId = `${id}-group-${mapIndex}`;
|
|
6428
|
-
return option.options.length > 0 && /* @__PURE__ */ (0,
|
|
6406
|
+
return option.options.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("ul", { "aria-labelledby": groupId, role: "group", style: { padding: 0, margin: 0 }, children: [
|
|
6429
6407
|
getGroupOption(groupId, option),
|
|
6430
6408
|
option.options.map((singleOption) => {
|
|
6431
6409
|
globalMappingIndex++;
|
|
6432
6410
|
const optionId = `${id}-option-${globalMappingIndex}`;
|
|
6433
|
-
return /* @__PURE__ */ (0,
|
|
6411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6434
6412
|
ListOption_default,
|
|
6435
6413
|
{
|
|
6436
6414
|
id: optionId,
|
|
@@ -6449,7 +6427,7 @@ var Listbox = ({
|
|
|
6449
6427
|
} else {
|
|
6450
6428
|
globalMappingIndex++;
|
|
6451
6429
|
const optionId = `${id}-option-${globalMappingIndex}`;
|
|
6452
|
-
return /* @__PURE__ */ (0,
|
|
6430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6453
6431
|
ListOption_default,
|
|
6454
6432
|
{
|
|
6455
6433
|
id: optionId,
|
|
@@ -6466,12 +6444,12 @@ var Listbox = ({
|
|
|
6466
6444
|
};
|
|
6467
6445
|
const getFirstItem = () => {
|
|
6468
6446
|
if (searchable && (options.length === 0 || !groupsHaveOptions(options)))
|
|
6469
|
-
return /* @__PURE__ */ (0,
|
|
6470
|
-
/* @__PURE__ */ (0,
|
|
6447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(OptionsSystemMessage, { children: [
|
|
6448
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DxcIcon, { icon: "search_off" }),
|
|
6471
6449
|
translatedLabels.select.noMatchesErrorMessage
|
|
6472
6450
|
] });
|
|
6473
6451
|
else if (optional && !multiple)
|
|
6474
|
-
return /* @__PURE__ */ (0,
|
|
6452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6475
6453
|
ListOption_default,
|
|
6476
6454
|
{
|
|
6477
6455
|
id: `${id}-option-${0}`,
|
|
@@ -6485,7 +6463,7 @@ var Listbox = ({
|
|
|
6485
6463
|
`${id}-option-${optionalItem.value}`
|
|
6486
6464
|
);
|
|
6487
6465
|
else if (multiple && enableSelectAll) {
|
|
6488
|
-
return /* @__PURE__ */ (0,
|
|
6466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CheckboxContext_default.Provider, { value: { partial: selectionType === "indeterminate" }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6489
6467
|
ListOption_default,
|
|
6490
6468
|
{
|
|
6491
6469
|
id: `${id}-option-${0}`,
|
|
@@ -6520,7 +6498,7 @@ var Listbox = ({
|
|
|
6520
6498
|
inline: "start"
|
|
6521
6499
|
});
|
|
6522
6500
|
}, [visualFocusIndex]);
|
|
6523
|
-
return /* @__PURE__ */ (0,
|
|
6501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6524
6502
|
ListboxContainer,
|
|
6525
6503
|
{
|
|
6526
6504
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -6546,7 +6524,7 @@ var Listbox_default = Listbox;
|
|
|
6546
6524
|
|
|
6547
6525
|
// src/styles/forms/ErrorMessage.tsx
|
|
6548
6526
|
var import_styled_components35 = __toESM(require("styled-components"));
|
|
6549
|
-
var
|
|
6527
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6550
6528
|
var ErrorMessageContainer = import_styled_components35.default.div`
|
|
6551
6529
|
display: flex;
|
|
6552
6530
|
align-items: center;
|
|
@@ -6561,8 +6539,8 @@ var ErrorMessageContainer = import_styled_components35.default.div`
|
|
|
6561
6539
|
font-size: var(--height-xxs);
|
|
6562
6540
|
}
|
|
6563
6541
|
`;
|
|
6564
|
-
var ErrorMessage = ({ error, id }) => /* @__PURE__ */ (0,
|
|
6565
|
-
error && /* @__PURE__ */ (0,
|
|
6542
|
+
var ErrorMessage = ({ error, id }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(ErrorMessageContainer, { "aria-live": error ? "assertive" : "off", id, role: "alert", children: [
|
|
6543
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DxcIcon, { icon: "filled_error" }),
|
|
6566
6544
|
error
|
|
6567
6545
|
] });
|
|
6568
6546
|
var ErrorMessage_default = ErrorMessage;
|
|
@@ -6618,7 +6596,7 @@ var inputStylesByState = (disabled, error, readOnly) => import_styled_components
|
|
|
6618
6596
|
`;
|
|
6619
6597
|
|
|
6620
6598
|
// src/select/Select.tsx
|
|
6621
|
-
var
|
|
6599
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6622
6600
|
var SelectContainer = import_styled_components39.default.div`
|
|
6623
6601
|
box-sizing: border-box;
|
|
6624
6602
|
display: flex;
|
|
@@ -6981,8 +6959,8 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
6981
6959
|
},
|
|
6982
6960
|
[handleOptionOnClick, innerValue, value]
|
|
6983
6961
|
);
|
|
6984
|
-
return /* @__PURE__ */ (0,
|
|
6985
|
-
label && /* @__PURE__ */ (0,
|
|
6962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(SelectContainer, { margin, ref, size, children: [
|
|
6963
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
6986
6964
|
Label_default,
|
|
6987
6965
|
{
|
|
6988
6966
|
disabled,
|
|
@@ -6994,13 +6972,13 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
6994
6972
|
children: [
|
|
6995
6973
|
label,
|
|
6996
6974
|
" ",
|
|
6997
|
-
optional && /* @__PURE__ */ (0,
|
|
6975
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: translatedLabels.formFields.optionalLabel })
|
|
6998
6976
|
]
|
|
6999
6977
|
}
|
|
7000
6978
|
),
|
|
7001
|
-
helperText && /* @__PURE__ */ (0,
|
|
7002
|
-
/* @__PURE__ */ (0,
|
|
7003
|
-
/* @__PURE__ */ (0,
|
|
6979
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(HelperText_default, { disabled, hasMargin: true, children: helperText }),
|
|
6980
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Popover2.Root, { open: isOpen, children: [
|
|
6981
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Popover2.Trigger, { asChild: true, type: void 0, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
7004
6982
|
Select,
|
|
7005
6983
|
{
|
|
7006
6984
|
"aria-activedescendant": visualFocusIndex >= 0 ? `option-${visualFocusIndex}` : void 0,
|
|
@@ -7024,9 +7002,9 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7024
7002
|
role: "combobox",
|
|
7025
7003
|
tabIndex: disabled ? -1 : tabIndex,
|
|
7026
7004
|
children: [
|
|
7027
|
-
multiple && Array.isArray(selectedOption) && selectedOption.length > 0 && /* @__PURE__ */ (0,
|
|
7028
|
-
/* @__PURE__ */ (0,
|
|
7029
|
-
/* @__PURE__ */ (0,
|
|
7005
|
+
multiple && Array.isArray(selectedOption) && selectedOption.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(SelectionIndicator, { disabled, children: [
|
|
7006
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectionNumber, { disabled, children: selectedOption.length }),
|
|
7007
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Tooltip, { label: translatedLabels.select.actionClearSelectionTitle, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7030
7008
|
ClearOptionsAction,
|
|
7031
7009
|
{
|
|
7032
7010
|
"aria-label": translatedLabels.select.actionClearSelectionTitle,
|
|
@@ -7036,12 +7014,12 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7036
7014
|
event.preventDefault();
|
|
7037
7015
|
},
|
|
7038
7016
|
tabIndex: -1,
|
|
7039
|
-
children: /* @__PURE__ */ (0,
|
|
7017
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DxcIcon, { icon: "clear" })
|
|
7040
7018
|
}
|
|
7041
7019
|
) })
|
|
7042
7020
|
] }),
|
|
7043
|
-
/* @__PURE__ */ (0,
|
|
7044
|
-
/* @__PURE__ */ (0,
|
|
7021
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipWrapper, { condition: hasTooltip, label: getSelectedOptionLabel(placeholder, selectedOption), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(SearchableValueContainer, { children: [
|
|
7022
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7045
7023
|
"input",
|
|
7046
7024
|
{
|
|
7047
7025
|
disabled,
|
|
@@ -7050,7 +7028,7 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7050
7028
|
value: multiple ? (Array.isArray(value) ? value : Array.isArray(innerValue) ? innerValue : []).join(",") : value ?? innerValue
|
|
7051
7029
|
}
|
|
7052
7030
|
),
|
|
7053
|
-
searchable && /* @__PURE__ */ (0,
|
|
7031
|
+
searchable && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7054
7032
|
SearchInput,
|
|
7055
7033
|
{
|
|
7056
7034
|
"aria-labelledby": label ? labelId : void 0,
|
|
@@ -7063,7 +7041,7 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7063
7041
|
value: searchValue
|
|
7064
7042
|
}
|
|
7065
7043
|
),
|
|
7066
|
-
(!searchable || searchValue === "") && /* @__PURE__ */ (0,
|
|
7044
|
+
(!searchable || searchValue === "") && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7067
7045
|
SelectedOption,
|
|
7068
7046
|
{
|
|
7069
7047
|
atBackground: (multiple ? (value ?? innerValue).length === 0 : !(value ?? innerValue)) || searchable && isOpen,
|
|
@@ -7073,8 +7051,8 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7073
7051
|
}
|
|
7074
7052
|
)
|
|
7075
7053
|
] }) }),
|
|
7076
|
-
/* @__PURE__ */ (0,
|
|
7077
|
-
searchable && searchValue.length > 0 && /* @__PURE__ */ (0,
|
|
7054
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Flex_default, { alignItems: "center", children: [
|
|
7055
|
+
searchable && searchValue.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Tooltip, { label: translatedLabels.select.actionClearSelectionTitle, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7078
7056
|
ActionIcon_default,
|
|
7079
7057
|
{
|
|
7080
7058
|
icon: "clear",
|
|
@@ -7083,12 +7061,12 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7083
7061
|
title: translatedLabels.select.actionClearSearchTitle
|
|
7084
7062
|
}
|
|
7085
7063
|
) }),
|
|
7086
|
-
/* @__PURE__ */ (0,
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DxcIcon, { icon: isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down" })
|
|
7087
7065
|
] })
|
|
7088
7066
|
]
|
|
7089
7067
|
}
|
|
7090
7068
|
) }),
|
|
7091
|
-
/* @__PURE__ */ (0,
|
|
7069
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Popover2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7092
7070
|
Popover2.Content,
|
|
7093
7071
|
{
|
|
7094
7072
|
onCloseAutoFocus: (event) => {
|
|
@@ -7099,7 +7077,7 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7099
7077
|
},
|
|
7100
7078
|
sideOffset: 4,
|
|
7101
7079
|
style: { zIndex: "2147483647" },
|
|
7102
|
-
children: /* @__PURE__ */ (0,
|
|
7080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7103
7081
|
Listbox_default,
|
|
7104
7082
|
{
|
|
7105
7083
|
ariaLabelledBy: labelId,
|
|
@@ -7123,14 +7101,14 @@ var DxcSelect = (0, import_react40.forwardRef)(
|
|
|
7123
7101
|
}
|
|
7124
7102
|
) })
|
|
7125
7103
|
] }),
|
|
7126
|
-
!disabled && typeof error === "string" && /* @__PURE__ */ (0,
|
|
7104
|
+
!disabled && typeof error === "string" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorMessage_default, { error, id: errorId })
|
|
7127
7105
|
] });
|
|
7128
7106
|
}
|
|
7129
7107
|
);
|
|
7130
7108
|
var Select_default = DxcSelect;
|
|
7131
7109
|
|
|
7132
7110
|
// src/paginator/Paginator.tsx
|
|
7133
|
-
var
|
|
7111
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7134
7112
|
var DxcPaginator = ({
|
|
7135
7113
|
currentPage = 1,
|
|
7136
7114
|
itemsPerPage = 5,
|
|
@@ -7187,10 +7165,10 @@ var DxcPaginator = ({
|
|
|
7187
7165
|
align-items: center;
|
|
7188
7166
|
gap: var(--spacing-gap-s);
|
|
7189
7167
|
`;
|
|
7190
|
-
return /* @__PURE__ */ (0,
|
|
7191
|
-
itemsPerPageOptions && /* @__PURE__ */ (0,
|
|
7192
|
-
/* @__PURE__ */ (0,
|
|
7193
|
-
/* @__PURE__ */ (0,
|
|
7168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(DxcPaginatorContainer, { children: [
|
|
7169
|
+
itemsPerPageOptions && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ItemsPerPageContainer, { children: [
|
|
7170
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: translatedLabels.paginator.itemsPerPageText }),
|
|
7171
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectContainer2, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7194
7172
|
Select_default,
|
|
7195
7173
|
{
|
|
7196
7174
|
options: itemsPerPageOptions.map((num) => ({
|
|
@@ -7206,10 +7184,10 @@ var DxcPaginator = ({
|
|
|
7206
7184
|
}
|
|
7207
7185
|
) })
|
|
7208
7186
|
] }),
|
|
7209
|
-
/* @__PURE__ */ (0,
|
|
7210
|
-
/* @__PURE__ */ (0,
|
|
7211
|
-
onPageChange && /* @__PURE__ */ (0,
|
|
7212
|
-
/* @__PURE__ */ (0,
|
|
7187
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TotalItemsContainer, { children: translatedLabels.paginator.minToMaxOfText(minItemsPerPage, maxItemsPerPage, totalItems) }),
|
|
7188
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(GoToPageContainer, { children: [
|
|
7189
|
+
onPageChange && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ButtonsContainer, { children: [
|
|
7190
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7213
7191
|
Button_default,
|
|
7214
7192
|
{
|
|
7215
7193
|
mode: "secondary",
|
|
@@ -7223,7 +7201,7 @@ var DxcPaginator = ({
|
|
|
7223
7201
|
size: { height: "medium" }
|
|
7224
7202
|
}
|
|
7225
7203
|
),
|
|
7226
|
-
/* @__PURE__ */ (0,
|
|
7204
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7227
7205
|
Button_default,
|
|
7228
7206
|
{
|
|
7229
7207
|
mode: "secondary",
|
|
@@ -7238,12 +7216,12 @@ var DxcPaginator = ({
|
|
|
7238
7216
|
}
|
|
7239
7217
|
)
|
|
7240
7218
|
] }),
|
|
7241
|
-
showGoToPage ? /* @__PURE__ */ (0,
|
|
7242
|
-
/* @__PURE__ */ (0,
|
|
7219
|
+
showGoToPage ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(PageToSelectContainer, { children: [
|
|
7220
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
|
|
7243
7221
|
translatedLabels.paginator.goToPageText,
|
|
7244
7222
|
" "
|
|
7245
7223
|
] }),
|
|
7246
|
-
/* @__PURE__ */ (0,
|
|
7224
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectContainer2, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7247
7225
|
Select_default,
|
|
7248
7226
|
{
|
|
7249
7227
|
options: Array.from(Array(totalPages), (e, num) => ({
|
|
@@ -7258,9 +7236,9 @@ var DxcPaginator = ({
|
|
|
7258
7236
|
tabIndex
|
|
7259
7237
|
}
|
|
7260
7238
|
) })
|
|
7261
|
-
] }) : /* @__PURE__ */ (0,
|
|
7262
|
-
onPageChange && /* @__PURE__ */ (0,
|
|
7263
|
-
/* @__PURE__ */ (0,
|
|
7239
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: translatedLabels.paginator.pageOfText(currentPageInternal, totalPages) }),
|
|
7240
|
+
onPageChange && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ButtonsContainer, { children: [
|
|
7241
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7264
7242
|
Button_default,
|
|
7265
7243
|
{
|
|
7266
7244
|
mode: "secondary",
|
|
@@ -7274,7 +7252,7 @@ var DxcPaginator = ({
|
|
|
7274
7252
|
size: { height: "medium" }
|
|
7275
7253
|
}
|
|
7276
7254
|
),
|
|
7277
|
-
/* @__PURE__ */ (0,
|
|
7255
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7278
7256
|
Button_default,
|
|
7279
7257
|
{
|
|
7280
7258
|
mode: "secondary",
|
|
@@ -7297,7 +7275,7 @@ var Paginator_default = DxcPaginator;
|
|
|
7297
7275
|
// src/table/Table.tsx
|
|
7298
7276
|
var import_styled_components41 = __toESM(require("styled-components"));
|
|
7299
7277
|
var import_react42 = require("react");
|
|
7300
|
-
var
|
|
7278
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7301
7279
|
var calculateWidth7 = (margin) => `calc(100% - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})`;
|
|
7302
7280
|
var TableContainer = import_styled_components41.default.div`
|
|
7303
7281
|
width: ${({ margin }) => calculateWidth7(margin)};
|
|
@@ -7368,9 +7346,9 @@ var ActionsContainer = import_styled_components41.default.div`
|
|
|
7368
7346
|
var DxcActionsCell = ({ actions }) => {
|
|
7369
7347
|
const actionIcons = (0, import_react42.useMemo)(() => actions.filter((action) => !action.options), [actions]);
|
|
7370
7348
|
const dropdownAction = (0, import_react42.useMemo)(() => actions.find((action) => action.options), [actions]);
|
|
7371
|
-
return /* @__PURE__ */ (0,
|
|
7349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ActionsContainer, { children: [
|
|
7372
7350
|
actionIcons.map(
|
|
7373
|
-
(action, index) => index < (dropdownAction ? 2 : 3) && /* @__PURE__ */ (0,
|
|
7351
|
+
(action, index) => index < (dropdownAction ? 2 : 3) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7374
7352
|
ActionIcon_default,
|
|
7375
7353
|
{
|
|
7376
7354
|
icon: action.icon,
|
|
@@ -7382,7 +7360,7 @@ var DxcActionsCell = ({ actions }) => {
|
|
|
7382
7360
|
`action-${index}`
|
|
7383
7361
|
)
|
|
7384
7362
|
),
|
|
7385
|
-
dropdownAction && /* @__PURE__ */ (0,
|
|
7363
|
+
dropdownAction && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7386
7364
|
Dropdown_default,
|
|
7387
7365
|
{
|
|
7388
7366
|
caretHidden: true,
|
|
@@ -7396,99 +7374,56 @@ var DxcActionsCell = ({ actions }) => {
|
|
|
7396
7374
|
)
|
|
7397
7375
|
] });
|
|
7398
7376
|
};
|
|
7399
|
-
var DxcTable = ({ children, margin, mode = "default" }) => /* @__PURE__ */ (0,
|
|
7377
|
+
var DxcTable = ({ children, margin, mode = "default" }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableContainer, { margin, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Table, { mode, children }) });
|
|
7400
7378
|
DxcTable.ActionsCell = DxcActionsCell;
|
|
7401
7379
|
var Table_default = DxcTable;
|
|
7402
7380
|
|
|
7403
7381
|
// src/data-grid/DataGrid.tsx
|
|
7404
|
-
var
|
|
7405
|
-
var ActionContainer = import_styled_components42.default.div`
|
|
7406
|
-
display: flex;
|
|
7407
|
-
height: 100%;
|
|
7408
|
-
align-items: center;
|
|
7409
|
-
justify-content: center;
|
|
7410
|
-
font-size: 14px;
|
|
7411
|
-
width: 100%;
|
|
7412
|
-
`;
|
|
7413
|
-
var HierarchyContainer = import_styled_components42.default.div`
|
|
7414
|
-
padding-left: ${(props) => `calc(${props.theme.dataPaddingLeft} * ${props.level})`};
|
|
7415
|
-
button {
|
|
7416
|
-
display: grid;
|
|
7417
|
-
grid-template-columns: auto 1fr;
|
|
7418
|
-
align-items: center;
|
|
7419
|
-
gap: 0.5rem;
|
|
7420
|
-
padding: 0px;
|
|
7421
|
-
border: 0px;
|
|
7422
|
-
width: 100%;
|
|
7423
|
-
height: ${(props) => props.theme.dataRowHeight}px;
|
|
7424
|
-
background: transparent;
|
|
7425
|
-
text-align: left;
|
|
7426
|
-
font-size: ${(props) => props.theme.dataFontSize};
|
|
7427
|
-
font-family: inherit;
|
|
7428
|
-
color: inherit;
|
|
7429
|
-
cursor: pointer;
|
|
7430
|
-
}
|
|
7431
|
-
`;
|
|
7382
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7432
7383
|
var DataGridContainer = import_styled_components42.default.div`
|
|
7433
7384
|
width: 100%;
|
|
7434
7385
|
height: ${(props) => props.paginatorRendered ? `calc(100% - 50px)` : `100%`};
|
|
7435
7386
|
.rdg {
|
|
7436
|
-
border-radius:
|
|
7387
|
+
border-radius: var(--border-radius-s);
|
|
7437
7388
|
height: 100%;
|
|
7438
7389
|
border: 0px;
|
|
7439
|
-
|
|
7440
|
-
width: 8px;
|
|
7441
|
-
height: 8px;
|
|
7442
|
-
}
|
|
7443
|
-
&::-webkit-scrollbar-thumb {
|
|
7444
|
-
background-color: ${(props) => props.theme.scrollBarThumbColor};
|
|
7445
|
-
border-radius: 6px;
|
|
7446
|
-
}
|
|
7447
|
-
&::-webkit-scrollbar-track {
|
|
7448
|
-
background-color: ${(props) => props.theme.scrollBarTrackColor};
|
|
7449
|
-
border-radius: 6px;
|
|
7450
|
-
}
|
|
7390
|
+
${scrollbarStyles}
|
|
7451
7391
|
}
|
|
7452
|
-
.rdg-cell:has(> #
|
|
7392
|
+
.rdg-cell:has(> #small_action) {
|
|
7453
7393
|
padding: 0px;
|
|
7454
7394
|
}
|
|
7455
7395
|
.rdg-cell {
|
|
7456
7396
|
display: grid;
|
|
7457
7397
|
align-items: center;
|
|
7458
7398
|
width: 100%;
|
|
7459
|
-
padding: 0px
|
|
7460
|
-
font-family:
|
|
7461
|
-
font-size:
|
|
7462
|
-
font-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7399
|
+
padding: 0px var(--spacing-padding-xs);
|
|
7400
|
+
font-family: var(--typography-font-family);
|
|
7401
|
+
font-size: var(--typography-label-m);
|
|
7402
|
+
font-weight: var(--typography-label-regular);
|
|
7403
|
+
color: var(--color-fg-neutral-dark);
|
|
7404
|
+
border-bottom: var(--border-width-s) var(--border-style-default) var(--border-color-neutral-lightest);
|
|
7405
|
+
border-right: var(--border-width-s) var(--border-style-default) var(--border-color-neutral-lightest);
|
|
7406
|
+
background-color: var(--color-bg-neutral-lightest);
|
|
7407
|
+
|
|
7408
|
+
&[aria-selected="true"] {
|
|
7409
|
+
outline: var(--border-width-m) var(--border-style-default) var(--border-color-secondary-medium);
|
|
7410
|
+
}
|
|
7471
7411
|
.rdg-text-editor:focus {
|
|
7472
7412
|
border-color: transparent;
|
|
7473
|
-
background-color:
|
|
7474
|
-
color:
|
|
7413
|
+
background-color: var(--color-bg-neutral-lightest);
|
|
7414
|
+
color: var(--color-fg-neutral-dark);
|
|
7475
7415
|
}
|
|
7476
7416
|
}
|
|
7477
7417
|
.rdg-header-row {
|
|
7478
|
-
border-top-left-radius:
|
|
7479
|
-
border-top-right-radius:
|
|
7418
|
+
border-top-left-radius: var(--border-radius-s);
|
|
7419
|
+
border-top-right-radius: var(--border-radius-s);
|
|
7480
7420
|
.rdg-cell {
|
|
7481
|
-
font-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
color: ${(props) => props.theme.headerFontColor};
|
|
7486
|
-
text-transform: ${(props) => props.theme.headerFontTextTransform};
|
|
7487
|
-
padding: 0px ${(props) => props.theme.headerPaddingRight} 0 ${(props) => props.theme.headerPaddingLeft};
|
|
7488
|
-
line-height: ${(props) => props.theme.headerTextLineHeight};
|
|
7489
|
-
background-color: ${(props) => props.theme.headerBackgroundColor};
|
|
7421
|
+
font-weight: var(--font-weight-bold);
|
|
7422
|
+
color: var(--color-fg-neutral-bright);
|
|
7423
|
+
padding: 0px var(--spacing-padding-xs);
|
|
7424
|
+
background-color: var(--color-bg-primary-strong);
|
|
7490
7425
|
.sortIconContainer {
|
|
7491
|
-
margin-left:
|
|
7426
|
+
margin-left: var(--spacing-gap-s);
|
|
7492
7427
|
display: flex;
|
|
7493
7428
|
height: 100%;
|
|
7494
7429
|
align-items: center;
|
|
@@ -7501,10 +7436,10 @@ var DataGridContainer = import_styled_components42.default.div`
|
|
|
7501
7436
|
}
|
|
7502
7437
|
}
|
|
7503
7438
|
.rdg-summary-row {
|
|
7504
|
-
background-color:
|
|
7439
|
+
background-color: var(--color-bg-neutral-lighter);
|
|
7505
7440
|
.rdg-cell {
|
|
7506
7441
|
border: 0px;
|
|
7507
|
-
font-weight:
|
|
7442
|
+
font-weight: var(--font-weight-semibold);
|
|
7508
7443
|
}
|
|
7509
7444
|
}
|
|
7510
7445
|
.ellipsis-cell {
|
|
@@ -7538,6 +7473,34 @@ var DataGridContainer = import_styled_components42.default.div`
|
|
|
7538
7473
|
text-align: right;
|
|
7539
7474
|
}
|
|
7540
7475
|
`;
|
|
7476
|
+
var HierarchyContainer = import_styled_components42.default.div`
|
|
7477
|
+
padding-left: ${(props) => `calc(var(--spacing-gap-s) * ${props.level})`};
|
|
7478
|
+
button {
|
|
7479
|
+
display: grid;
|
|
7480
|
+
grid-template-columns: auto 1fr;
|
|
7481
|
+
align-items: center;
|
|
7482
|
+
gap: var(--spacing-gap-s);
|
|
7483
|
+
padding: 0px;
|
|
7484
|
+
border: 0px;
|
|
7485
|
+
width: 100%;
|
|
7486
|
+
height: var(--height-l);
|
|
7487
|
+
background-color: var(--color-bg-neutral-lightest);
|
|
7488
|
+
font-family: var(--typography-font-family);
|
|
7489
|
+
font-size: var(--typography-label-m);
|
|
7490
|
+
font-weight: var(--typography-label-regular);
|
|
7491
|
+
color: var(--color-fg-neutral-dark);
|
|
7492
|
+
text-align: left;
|
|
7493
|
+
cursor: pointer;
|
|
7494
|
+
}
|
|
7495
|
+
`;
|
|
7496
|
+
var ActionContainer = import_styled_components42.default.div`
|
|
7497
|
+
display: flex;
|
|
7498
|
+
height: 100%;
|
|
7499
|
+
align-items: center;
|
|
7500
|
+
justify-content: center;
|
|
7501
|
+
font-size: var(--height-s);
|
|
7502
|
+
width: 100%;
|
|
7503
|
+
`;
|
|
7541
7504
|
var DxcDataGrid = ({
|
|
7542
7505
|
columns,
|
|
7543
7506
|
rows,
|
|
@@ -7559,8 +7522,8 @@ var DxcDataGrid = ({
|
|
|
7559
7522
|
defaultPage = 1
|
|
7560
7523
|
}) => {
|
|
7561
7524
|
const [rowsToRender, setRowsToRender] = (0, import_react43.useState)(rows);
|
|
7562
|
-
const colorsTheme = (0, import_react43.useContext)(HalstackContext);
|
|
7563
7525
|
const [page, changePage] = (0, import_react43.useState)(defaultPage);
|
|
7526
|
+
const [colHeight, setColHeight] = (0, import_react43.useState)(36);
|
|
7564
7527
|
const goToPage = (newPage) => {
|
|
7565
7528
|
if (onPageChange) {
|
|
7566
7529
|
onPageChange(newPage);
|
|
@@ -7595,7 +7558,7 @@ var DxcDataGrid = ({
|
|
|
7595
7558
|
if (row.isExpandedChildContent) {
|
|
7596
7559
|
return row.expandedChildContent || null;
|
|
7597
7560
|
}
|
|
7598
|
-
return /* @__PURE__ */ (0,
|
|
7561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActionContainer, { id: "small_action", children: row.expandedContent && renderExpandableTrigger(row, rowsToRender, uniqueRowId, setRowsToRender) });
|
|
7599
7562
|
}
|
|
7600
7563
|
},
|
|
7601
7564
|
...expectedColumns
|
|
@@ -7608,9 +7571,9 @@ var DxcDataGrid = ({
|
|
|
7608
7571
|
...expectedColumns[0],
|
|
7609
7572
|
renderCell({ row }) {
|
|
7610
7573
|
if (row.childRows?.length) {
|
|
7611
|
-
return /* @__PURE__ */ (0,
|
|
7574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(HierarchyContainer, { level: typeof row.rowLevel === "number" ? row.rowLevel : 0, children: renderHierarchyTrigger(rowsToRender, row, uniqueRowId, firstColumnKey, setRowsToRender) });
|
|
7612
7575
|
}
|
|
7613
|
-
return /* @__PURE__ */ (0,
|
|
7576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(HierarchyContainer, { level: typeof row.rowLevel === "number" ? row.rowLevel : 0, className: "ellipsis-cell", children: row[firstColumnKey] });
|
|
7614
7577
|
}
|
|
7615
7578
|
};
|
|
7616
7579
|
}
|
|
@@ -7625,11 +7588,11 @@ var DxcDataGrid = ({
|
|
|
7625
7588
|
minWidth: 36,
|
|
7626
7589
|
renderCell({ row }) {
|
|
7627
7590
|
if (!row.isExpandedChildContent) {
|
|
7628
|
-
return /* @__PURE__ */ (0,
|
|
7591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActionContainer, { id: "small_action", children: renderCheckbox(rows, row, uniqueRowId, selectedRows, onSelectRows) });
|
|
7629
7592
|
}
|
|
7630
7593
|
return null;
|
|
7631
7594
|
},
|
|
7632
|
-
renderHeaderCell: () => /* @__PURE__ */ (0,
|
|
7595
|
+
renderHeaderCell: () => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActionContainer, { id: "small_action", children: renderHeaderCheckbox(rows, uniqueRowId, selectedRows, onSelectRows) })
|
|
7633
7596
|
},
|
|
7634
7597
|
...expectedColumns
|
|
7635
7598
|
];
|
|
@@ -7638,6 +7601,10 @@ var DxcDataGrid = ({
|
|
|
7638
7601
|
}, [selectable, expandable, columns, rowsToRender, onSelectRows, rows, summaryRow, uniqueRowId, selectedRows]);
|
|
7639
7602
|
const [columnsOrder, setColumnsOrder] = (0, import_react43.useState)(() => columnsToRender.map((_, index) => index));
|
|
7640
7603
|
const [sortColumns, setSortColumns] = (0, import_react43.useState)([]);
|
|
7604
|
+
(0, import_react43.useEffect)(() => {
|
|
7605
|
+
const rootStyles = getComputedStyle(document.documentElement);
|
|
7606
|
+
if (rootStyles) setColHeight(parseFloat(rootStyles.getPropertyValue("--height-l")));
|
|
7607
|
+
}, []);
|
|
7641
7608
|
(0, import_react43.useEffect)(() => {
|
|
7642
7609
|
setColumnsOrder(Array.from({ length: columnsToRender.length }, (_, index) => index));
|
|
7643
7610
|
}, [columnsToRender.length]);
|
|
@@ -7730,8 +7697,8 @@ var DxcDataGrid = ({
|
|
|
7730
7697
|
}
|
|
7731
7698
|
return !showPaginator || onPageChange ? sortedRows : getPaginatedNodes(sortedRows, uniqueRowId, minItemsPerPageIndex, maxItemsPerPageIndex + 1);
|
|
7732
7699
|
}, [sortedRows, minItemsPerPageIndex, maxItemsPerPageIndex]);
|
|
7733
|
-
return /* @__PURE__ */ (0,
|
|
7734
|
-
/* @__PURE__ */ (0,
|
|
7700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DataGridContainer, { paginatorRendered: showPaginator && (totalItems ?? rows.length) > itemsPerPage, children: [
|
|
7701
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7735
7702
|
import_react_data_grid2.default,
|
|
7736
7703
|
{
|
|
7737
7704
|
columns: reorderedColumns,
|
|
@@ -7742,15 +7709,15 @@ var DxcDataGrid = ({
|
|
|
7742
7709
|
sortColumns,
|
|
7743
7710
|
onSortColumnsChange: handleSortChange,
|
|
7744
7711
|
rowKeyGetter: (row) => uniqueRowId ? rowKeyGetter(row, uniqueRowId) : "",
|
|
7745
|
-
rowHeight: (row) => row.isExpandedChildContent && typeof row.expandedContentHeight === "number" && row.expandedContentHeight > 0 ? row.expandedContentHeight :
|
|
7712
|
+
rowHeight: (row) => row.isExpandedChildContent && typeof row.expandedContentHeight === "number" && row.expandedContentHeight > 0 ? row.expandedContentHeight : colHeight ?? 0,
|
|
7746
7713
|
selectedRows,
|
|
7747
7714
|
bottomSummaryRows: summaryRow ? [summaryRow] : void 0,
|
|
7748
|
-
headerRowHeight:
|
|
7749
|
-
summaryRowHeight:
|
|
7715
|
+
headerRowHeight: colHeight,
|
|
7716
|
+
summaryRowHeight: colHeight,
|
|
7750
7717
|
className: "fill-grid"
|
|
7751
7718
|
}
|
|
7752
7719
|
),
|
|
7753
|
-
showPaginator && (totalItems ?? rows.length) > itemsPerPage && /* @__PURE__ */ (0,
|
|
7720
|
+
showPaginator && (totalItems ?? rows.length) > itemsPerPage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7754
7721
|
Paginator_default,
|
|
7755
7722
|
{
|
|
7756
7723
|
totalItems: totalItems ?? rows.length,
|
|
@@ -7762,7 +7729,7 @@ var DxcDataGrid = ({
|
|
|
7762
7729
|
onPageChange: goToPage
|
|
7763
7730
|
}
|
|
7764
7731
|
)
|
|
7765
|
-
] })
|
|
7732
|
+
] });
|
|
7766
7733
|
};
|
|
7767
7734
|
DxcDataGrid.ActionsCell = DxcActionsCell;
|
|
7768
7735
|
var DataGrid_default = DxcDataGrid;
|
|
@@ -7782,7 +7749,7 @@ var import_styled_components45 = __toESM(require("styled-components"));
|
|
|
7782
7749
|
// src/date-input/Calendar.tsx
|
|
7783
7750
|
var import_react44 = require("react");
|
|
7784
7751
|
var import_styled_components43 = __toESM(require("styled-components"));
|
|
7785
|
-
var
|
|
7752
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7786
7753
|
var CalendarContainer = import_styled_components43.default.div`
|
|
7787
7754
|
box-sizing: border-box;
|
|
7788
7755
|
display: flex;
|
|
@@ -7990,9 +7957,9 @@ var Calendar = ({
|
|
|
7990
7957
|
break;
|
|
7991
7958
|
}
|
|
7992
7959
|
};
|
|
7993
|
-
return /* @__PURE__ */ (0,
|
|
7994
|
-
/* @__PURE__ */ (0,
|
|
7995
|
-
/* @__PURE__ */ (0,
|
|
7960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(CalendarContainer, { role: "grid", children: [
|
|
7961
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CalendarHeaderRow, { role: "row", children: translatedLabels.calendar.daysShort.map((weekDay) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WeekHeaderCell, { role: "columnheader", children: weekDay }, weekDay)) }),
|
|
7962
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MonthContainer, { onBlur: handleOnBlur, role: "rowgroup", children: divideDaysIntoWeeks(dayCells, translatedLabels.calendar.daysShort.length).map((week, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WeekContainer, { role: "row", children: week.map((date) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7996
7963
|
DayCellButton,
|
|
7997
7964
|
{
|
|
7998
7965
|
id: `${id}_day_${date.day}_month${date.month}`,
|
|
@@ -8017,7 +7984,7 @@ var Calendar_default = (0, import_react44.memo)(Calendar);
|
|
|
8017
7984
|
var import_dayjs = __toESM(require("dayjs"));
|
|
8018
7985
|
var import_react45 = require("react");
|
|
8019
7986
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8020
|
-
var
|
|
7987
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
8021
7988
|
var YearPickerContainer = import_styled_components44.default.div`
|
|
8022
7989
|
box-sizing: border-box;
|
|
8023
7990
|
display: flex;
|
|
@@ -8094,7 +8061,7 @@ var YearPicker = ({ onYearSelect, selectedDate, today: today2 }) => {
|
|
|
8094
8061
|
break;
|
|
8095
8062
|
}
|
|
8096
8063
|
};
|
|
8097
|
-
return /* @__PURE__ */ (0,
|
|
8064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(YearPickerContainer, { role: "listbox", "aria-label": "Year Picker", children: yearList.map((year2) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8098
8065
|
YearPickerButton,
|
|
8099
8066
|
{
|
|
8100
8067
|
"aria-label": year2.toString(),
|
|
@@ -8116,7 +8083,7 @@ var YearPicker = ({ onYearSelect, selectedDate, today: today2 }) => {
|
|
|
8116
8083
|
var YearPicker_default = (0, import_react45.memo)(YearPicker);
|
|
8117
8084
|
|
|
8118
8085
|
// src/date-input/DatePicker.tsx
|
|
8119
|
-
var
|
|
8086
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
8120
8087
|
var DatePickerContainer = import_styled_components45.default.div`
|
|
8121
8088
|
padding: var(--spacing-padding-m) var(--spacing-padding-xs) var(--spacing-padding-xs) var(--spacing-padding-xs);
|
|
8122
8089
|
background-color: var(--color-bg-neutral-lightest);
|
|
@@ -8200,41 +8167,41 @@ var DatePicker = ({ date, onDateSelect, id }) => {
|
|
|
8200
8167
|
const handleMonthChange = (chosenDate) => {
|
|
8201
8168
|
setInnerDate(chosenDate);
|
|
8202
8169
|
};
|
|
8203
|
-
return /* @__PURE__ */ (0,
|
|
8204
|
-
/* @__PURE__ */ (0,
|
|
8205
|
-
/* @__PURE__ */ (0,
|
|
8170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DatePickerContainer, { id, children: [
|
|
8171
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(PickerHeader, { children: [
|
|
8172
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Tooltip, { label: translatedLabels.calendar.previousMonthTitle, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8206
8173
|
HeaderButton,
|
|
8207
8174
|
{
|
|
8208
8175
|
"aria-label": translatedLabels.calendar.previousMonthTitle,
|
|
8209
8176
|
onClick: () => handleMonthChange(innerDate.set("month", innerDate.get("month") - 1)),
|
|
8210
|
-
children: /* @__PURE__ */ (0,
|
|
8177
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DxcIcon, { icon: "keyboard_arrow_left" })
|
|
8211
8178
|
}
|
|
8212
8179
|
) }),
|
|
8213
|
-
/* @__PURE__ */ (0,
|
|
8180
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
8214
8181
|
HeaderYearTrigger,
|
|
8215
8182
|
{
|
|
8216
8183
|
"aria-live": "polite",
|
|
8217
8184
|
onClick: () => setContent((currentContent) => currentContent === "yearPicker" ? "calendar" : "yearPicker"),
|
|
8218
8185
|
children: [
|
|
8219
|
-
/* @__PURE__ */ (0,
|
|
8186
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(HeaderYearTriggerLabel, { children: [
|
|
8220
8187
|
translatedLabels.calendar.months[innerDate.get("month")],
|
|
8221
8188
|
" ",
|
|
8222
8189
|
innerDate.format("YYYY")
|
|
8223
8190
|
] }),
|
|
8224
|
-
/* @__PURE__ */ (0,
|
|
8191
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DxcIcon, { icon: content === "yearPicker" ? "arrow_drop_up" : "arrow_drop_down" })
|
|
8225
8192
|
]
|
|
8226
8193
|
}
|
|
8227
8194
|
),
|
|
8228
|
-
/* @__PURE__ */ (0,
|
|
8195
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Tooltip, { label: translatedLabels.calendar.nextMonthTitle, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8229
8196
|
HeaderButton,
|
|
8230
8197
|
{
|
|
8231
8198
|
"aria-label": translatedLabels.calendar.nextMonthTitle,
|
|
8232
8199
|
onClick: () => handleMonthChange(innerDate.set("month", innerDate.get("month") + 1)),
|
|
8233
|
-
children: /* @__PURE__ */ (0,
|
|
8200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DxcIcon, { icon: "keyboard_arrow_right" })
|
|
8234
8201
|
}
|
|
8235
8202
|
) })
|
|
8236
8203
|
] }),
|
|
8237
|
-
content === "calendar" && /* @__PURE__ */ (0,
|
|
8204
|
+
content === "calendar" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8238
8205
|
Calendar_default,
|
|
8239
8206
|
{
|
|
8240
8207
|
innerDate,
|
|
@@ -8244,7 +8211,7 @@ var DatePicker = ({ date, onDateSelect, id }) => {
|
|
|
8244
8211
|
today
|
|
8245
8212
|
}
|
|
8246
8213
|
),
|
|
8247
|
-
content === "yearPicker" && /* @__PURE__ */ (0,
|
|
8214
|
+
content === "yearPicker" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(YearPicker_default, { selectedDate, onYearSelect: handleOnYearSelect, today })
|
|
8248
8215
|
] });
|
|
8249
8216
|
};
|
|
8250
8217
|
var DatePicker_default = (0, import_react46.memo)(DatePicker);
|
|
@@ -8308,7 +8275,7 @@ var transformSpecialChars = (str) => {
|
|
|
8308
8275
|
};
|
|
8309
8276
|
|
|
8310
8277
|
// src/text-input/Suggestion.tsx
|
|
8311
|
-
var
|
|
8278
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
8312
8279
|
var SuggestionContainer = import_styled_components46.default.li`
|
|
8313
8280
|
display: flex;
|
|
8314
8281
|
flex-direction: column;
|
|
@@ -8336,7 +8303,7 @@ var Suggestion = ({ highlighted, id, isLast, onClick, suggestion, value, visuall
|
|
|
8336
8303
|
const regEx = new RegExp(transformSpecialChars(value), "i");
|
|
8337
8304
|
return { matchedWords: suggestion.match(regEx), noMatchedWords: suggestion.replace(regEx, "") };
|
|
8338
8305
|
}, [value, suggestion]);
|
|
8339
|
-
return /* @__PURE__ */ (0,
|
|
8306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
8340
8307
|
SuggestionContainer,
|
|
8341
8308
|
{
|
|
8342
8309
|
"aria-selected": visuallyFocused ? true : void 0,
|
|
@@ -8347,11 +8314,11 @@ var Suggestion = ({ highlighted, id, isLast, onClick, suggestion, value, visuall
|
|
|
8347
8314
|
role: "option",
|
|
8348
8315
|
visuallyFocused,
|
|
8349
8316
|
children: [
|
|
8350
|
-
/* @__PURE__ */ (0,
|
|
8351
|
-
/* @__PURE__ */ (0,
|
|
8317
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Flex_default, { alignItems: "center", grow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(StyledSuggestion, { children: highlighted ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
8318
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: matchedSuggestion.matchedWords }),
|
|
8352
8319
|
matchedSuggestion.noMatchedWords
|
|
8353
8320
|
] }) : suggestion }) }),
|
|
8354
|
-
!isLast && /* @__PURE__ */ (0,
|
|
8321
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DxcDivider, {})
|
|
8355
8322
|
]
|
|
8356
8323
|
}
|
|
8357
8324
|
);
|
|
@@ -8359,7 +8326,7 @@ var Suggestion = ({ highlighted, id, isLast, onClick, suggestion, value, visuall
|
|
|
8359
8326
|
var Suggestion_default = (0, import_react48.memo)(Suggestion);
|
|
8360
8327
|
|
|
8361
8328
|
// src/text-input/Suggestions.tsx
|
|
8362
|
-
var
|
|
8329
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
8363
8330
|
var SuggestionsContainer = import_styled_components47.default.div`
|
|
8364
8331
|
box-sizing: border-box;
|
|
8365
8332
|
max-height: 304px;
|
|
@@ -8415,10 +8382,10 @@ var Suggestions = ({
|
|
|
8415
8382
|
inline: "start"
|
|
8416
8383
|
});
|
|
8417
8384
|
}, [visualFocusIndex]);
|
|
8418
|
-
return /* @__PURE__ */ (0,
|
|
8419
|
-
/* @__PURE__ */ (0,
|
|
8385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SuggestionsContainer, { style: styles, children: isSearching ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SuggestionsSystemMessage, { "aria-live": "polite", children: translatedLabels.textInput.searchingMessage }) : searchHasErrors ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(SuggestionsErrorMessage, { "aria-live": "assertive", role: "alert", children: [
|
|
8386
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DxcIcon, { icon: "filled_error" }),
|
|
8420
8387
|
translatedLabels.textInput.fetchingDataErrorMessage
|
|
8421
|
-
] }) : /* @__PURE__ */ (0,
|
|
8388
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8422
8389
|
"ul",
|
|
8423
8390
|
{
|
|
8424
8391
|
"aria-label": "Suggestions",
|
|
@@ -8429,7 +8396,7 @@ var Suggestions = ({
|
|
|
8429
8396
|
ref: listboxRef,
|
|
8430
8397
|
role: "listbox",
|
|
8431
8398
|
style: { margin: 0, padding: 0 },
|
|
8432
|
-
children: suggestions.map((suggestion, index) => /* @__PURE__ */ (0,
|
|
8399
|
+
children: suggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8433
8400
|
Suggestion_default,
|
|
8434
8401
|
{
|
|
8435
8402
|
highlighted: highlightedSuggestions,
|
|
@@ -8448,7 +8415,7 @@ var Suggestions = ({
|
|
|
8448
8415
|
var Suggestions_default = (0, import_react49.memo)(Suggestions);
|
|
8449
8416
|
|
|
8450
8417
|
// src/text-input/TextInput.tsx
|
|
8451
|
-
var
|
|
8418
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
8452
8419
|
var TextInputContainer = import_styled_components48.default.div`
|
|
8453
8420
|
box-sizing: border-box;
|
|
8454
8421
|
display: flex;
|
|
@@ -8500,7 +8467,7 @@ var Addon = import_styled_components48.default.span`
|
|
|
8500
8467
|
${({ type }) => `padding-${type === "prefix" ? "right" : "left"}: var(--spacing-padding-xs);`}
|
|
8501
8468
|
pointer-events: none;
|
|
8502
8469
|
`;
|
|
8503
|
-
var AutosuggestWrapper = ({ condition, wrapper, children }) => /* @__PURE__ */ (0,
|
|
8470
|
+
var AutosuggestWrapper = ({ condition, wrapper, children }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: condition ? wrapper(children) : children });
|
|
8504
8471
|
var DxcTextInput = (0, import_react50.forwardRef)(
|
|
8505
8472
|
({
|
|
8506
8473
|
action,
|
|
@@ -8780,19 +8747,19 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8780
8747
|
}
|
|
8781
8748
|
return void 0;
|
|
8782
8749
|
}, [value, innerValue, suggestions, numberInputContext]);
|
|
8783
|
-
return /* @__PURE__ */ (0,
|
|
8784
|
-
label && /* @__PURE__ */ (0,
|
|
8750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(TextInputContainer, { margin, ref, size, children: [
|
|
8751
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Label_default, { disabled, hasMargin: !helperText, htmlFor: inputId, children: [
|
|
8785
8752
|
label,
|
|
8786
8753
|
" ",
|
|
8787
|
-
optional && /* @__PURE__ */ (0,
|
|
8754
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: translatedLabels.formFields.optionalLabel })
|
|
8788
8755
|
] }),
|
|
8789
|
-
helperText && /* @__PURE__ */ (0,
|
|
8790
|
-
/* @__PURE__ */ (0,
|
|
8756
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(HelperText_default, { disabled, hasMargin: true, children: helperText }),
|
|
8757
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8791
8758
|
AutosuggestWrapper,
|
|
8792
8759
|
{
|
|
8793
8760
|
condition: hasSuggestions(suggestions),
|
|
8794
|
-
wrapper: (children) => /* @__PURE__ */ (0,
|
|
8795
|
-
/* @__PURE__ */ (0,
|
|
8761
|
+
wrapper: (children) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Popover3.Root, { open: isOpen && (filteredSuggestions.length > 0 || isSearching || isAutosuggestError), children: [
|
|
8762
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8796
8763
|
Popover3.Trigger,
|
|
8797
8764
|
{
|
|
8798
8765
|
"aria-controls": void 0,
|
|
@@ -8803,7 +8770,7 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8803
8770
|
children
|
|
8804
8771
|
}
|
|
8805
8772
|
),
|
|
8806
|
-
/* @__PURE__ */ (0,
|
|
8773
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Popover3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8807
8774
|
Popover3.Content,
|
|
8808
8775
|
{
|
|
8809
8776
|
onCloseAutoFocus: (event) => {
|
|
@@ -8814,7 +8781,7 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8814
8781
|
},
|
|
8815
8782
|
sideOffset: 4,
|
|
8816
8783
|
style: { zIndex: "2147483647" },
|
|
8817
|
-
children: /* @__PURE__ */ (0,
|
|
8784
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8818
8785
|
Suggestions_default,
|
|
8819
8786
|
{
|
|
8820
8787
|
highlightedSuggestions: typeof suggestions !== "function",
|
|
@@ -8834,7 +8801,7 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8834
8801
|
}
|
|
8835
8802
|
) })
|
|
8836
8803
|
] }),
|
|
8837
|
-
children: /* @__PURE__ */ (0,
|
|
8804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
8838
8805
|
TextInput,
|
|
8839
8806
|
{
|
|
8840
8807
|
disabled,
|
|
@@ -8844,8 +8811,8 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8844
8811
|
readOnly,
|
|
8845
8812
|
ref: inputContainerRef,
|
|
8846
8813
|
children: [
|
|
8847
|
-
prefix && /* @__PURE__ */ (0,
|
|
8848
|
-
/* @__PURE__ */ (0,
|
|
8814
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Addon, { disabled, type: "prefix", children: prefix }),
|
|
8815
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8849
8816
|
Input,
|
|
8850
8817
|
{
|
|
8851
8818
|
"aria-activedescendant": hasSuggestions(suggestions) && isOpen && visualFocusIndex !== -1 ? `suggestion-${visualFocusIndex}` : void 0,
|
|
@@ -8881,8 +8848,8 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8881
8848
|
value: value ?? innerValue
|
|
8882
8849
|
}
|
|
8883
8850
|
),
|
|
8884
|
-
/* @__PURE__ */ (0,
|
|
8885
|
-
!disabled && !readOnly && clearable && (value ?? innerValue).length > 0 && /* @__PURE__ */ (0,
|
|
8851
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex_default, { children: [
|
|
8852
|
+
!disabled && !readOnly && clearable && (value ?? innerValue).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8886
8853
|
ActionIcon_default,
|
|
8887
8854
|
{
|
|
8888
8855
|
icon: "close",
|
|
@@ -8891,8 +8858,8 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8891
8858
|
title: translatedLabels.textInput.clearFieldActionTitle
|
|
8892
8859
|
}
|
|
8893
8860
|
),
|
|
8894
|
-
numberInputContext?.typeNumber === "number" && numberInputContext?.showControls && /* @__PURE__ */ (0,
|
|
8895
|
-
/* @__PURE__ */ (0,
|
|
8861
|
+
numberInputContext?.typeNumber === "number" && numberInputContext?.showControls && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
8862
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8896
8863
|
ActionIcon_default,
|
|
8897
8864
|
{
|
|
8898
8865
|
disabled,
|
|
@@ -8903,7 +8870,7 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8903
8870
|
title: translatedLabels.numberInput.decrementValueTitle
|
|
8904
8871
|
}
|
|
8905
8872
|
),
|
|
8906
|
-
/* @__PURE__ */ (0,
|
|
8873
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8907
8874
|
ActionIcon_default,
|
|
8908
8875
|
{
|
|
8909
8876
|
disabled,
|
|
@@ -8915,7 +8882,7 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8915
8882
|
}
|
|
8916
8883
|
)
|
|
8917
8884
|
] }),
|
|
8918
|
-
action && /* @__PURE__ */ (0,
|
|
8885
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8919
8886
|
ActionIcon_default,
|
|
8920
8887
|
{
|
|
8921
8888
|
disabled,
|
|
@@ -8927,20 +8894,20 @@ var DxcTextInput = (0, import_react50.forwardRef)(
|
|
|
8927
8894
|
}
|
|
8928
8895
|
)
|
|
8929
8896
|
] }),
|
|
8930
|
-
suffix && /* @__PURE__ */ (0,
|
|
8897
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Addon, { disabled, type: "suffix", children: suffix })
|
|
8931
8898
|
]
|
|
8932
8899
|
}
|
|
8933
8900
|
)
|
|
8934
8901
|
}
|
|
8935
8902
|
),
|
|
8936
|
-
!disabled && typeof error === "string" && /* @__PURE__ */ (0,
|
|
8903
|
+
!disabled && typeof error === "string" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ErrorMessage_default, { error, id: errorId })
|
|
8937
8904
|
] });
|
|
8938
8905
|
}
|
|
8939
8906
|
);
|
|
8940
8907
|
var TextInput_default = DxcTextInput;
|
|
8941
8908
|
|
|
8942
8909
|
// src/date-input/DateInput.tsx
|
|
8943
|
-
var
|
|
8910
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
8944
8911
|
import_dayjs3.default.extend(import_customParseFormat.default);
|
|
8945
8912
|
var SIDEOFFSET = 4;
|
|
8946
8913
|
var sizes5 = {
|
|
@@ -9153,8 +9120,8 @@ var DxcDateInput = (0, import_react51.forwardRef)(
|
|
|
9153
9120
|
}
|
|
9154
9121
|
}
|
|
9155
9122
|
}, [isOpen, disabled, calendarId]);
|
|
9156
|
-
return /* @__PURE__ */ (0,
|
|
9157
|
-
label && /* @__PURE__ */ (0,
|
|
9123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_styled_components49.ThemeProvider, { theme: colorsTheme, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DateInputContainer, { margin, size, ref, children: [
|
|
9124
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
9158
9125
|
Label5,
|
|
9159
9126
|
{
|
|
9160
9127
|
htmlFor: dateRef.current?.getElementsByTagName("input")[0]?.id,
|
|
@@ -9163,13 +9130,13 @@ var DxcDateInput = (0, import_react51.forwardRef)(
|
|
|
9163
9130
|
children: [
|
|
9164
9131
|
label,
|
|
9165
9132
|
" ",
|
|
9166
|
-
optional && /* @__PURE__ */ (0,
|
|
9133
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(OptionalLabel, { disabled, children: translatedLabels.formFields.optionalLabel })
|
|
9167
9134
|
]
|
|
9168
9135
|
}
|
|
9169
9136
|
),
|
|
9170
|
-
helperText && /* @__PURE__ */ (0,
|
|
9171
|
-
/* @__PURE__ */ (0,
|
|
9172
|
-
/* @__PURE__ */ (0,
|
|
9137
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(HelperText2, { disabled, children: helperText }),
|
|
9138
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Popover4.Root, { open: isOpen, children: [
|
|
9139
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Popover4.Trigger, { asChild: true, "aria-controls": void 0, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9173
9140
|
TextInput_default,
|
|
9174
9141
|
{
|
|
9175
9142
|
name,
|
|
@@ -9195,7 +9162,7 @@ var DxcDateInput = (0, import_react51.forwardRef)(
|
|
|
9195
9162
|
ariaLabel
|
|
9196
9163
|
}
|
|
9197
9164
|
) }),
|
|
9198
|
-
/* @__PURE__ */ (0,
|
|
9165
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Popover4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9199
9166
|
StyledPopoverContent,
|
|
9200
9167
|
{
|
|
9201
9168
|
sideOffset,
|
|
@@ -9204,7 +9171,7 @@ var DxcDateInput = (0, import_react51.forwardRef)(
|
|
|
9204
9171
|
onBlur: handleDatePickerOnBlur,
|
|
9205
9172
|
onKeyDown: handleDatePickerEscKeydown,
|
|
9206
9173
|
ref: popoverContentRef,
|
|
9207
|
-
children: /* @__PURE__ */ (0,
|
|
9174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DatePicker_default, { id: calendarId, onDateSelect: handleCalendarOnClick, date: dayjsDate })
|
|
9208
9175
|
}
|
|
9209
9176
|
) })
|
|
9210
9177
|
] })
|
|
@@ -9217,7 +9184,7 @@ var DateInput_default = DxcDateInput;
|
|
|
9217
9184
|
var import_react52 = require("react");
|
|
9218
9185
|
var import_react_dom2 = require("react-dom");
|
|
9219
9186
|
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9220
|
-
var
|
|
9187
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
9221
9188
|
var BodyStyle2 = import_styled_components50.createGlobalStyle`
|
|
9222
9189
|
body {
|
|
9223
9190
|
overflow: hidden;
|
|
@@ -9280,14 +9247,14 @@ var DxcDialog = ({
|
|
|
9280
9247
|
document.removeEventListener("keydown", handleKeyDown);
|
|
9281
9248
|
};
|
|
9282
9249
|
}, [onCloseClick]);
|
|
9283
|
-
return /* @__PURE__ */ (0,
|
|
9284
|
-
/* @__PURE__ */ (0,
|
|
9250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
9251
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BodyStyle2, {}),
|
|
9285
9252
|
(0, import_react_dom2.createPortal)(
|
|
9286
|
-
/* @__PURE__ */ (0,
|
|
9287
|
-
overlay && /* @__PURE__ */ (0,
|
|
9288
|
-
/* @__PURE__ */ (0,
|
|
9253
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(DialogContainer, { children: [
|
|
9254
|
+
overlay && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Overlay3, { onClick: onBackgroundClick }),
|
|
9255
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Dialog, { "aria-label": "Dialog", "aria-modal": overlay, closable, role: "dialog", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FocusLock_default, { children: [
|
|
9289
9256
|
children,
|
|
9290
|
-
closable && /* @__PURE__ */ (0,
|
|
9257
|
+
closable && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CloseIconActionContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
9291
9258
|
ActionIcon_default,
|
|
9292
9259
|
{
|
|
9293
9260
|
icon: "close",
|
|
@@ -9311,7 +9278,7 @@ var import_styled_components52 = __toESM(require("styled-components"));
|
|
|
9311
9278
|
// src/file-input/FileItem.tsx
|
|
9312
9279
|
var import_react53 = require("react");
|
|
9313
9280
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9314
|
-
var
|
|
9281
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
9315
9282
|
var ListItem3 = import_styled_components51.default.li`
|
|
9316
9283
|
list-style: none;
|
|
9317
9284
|
display: flex;
|
|
@@ -9412,12 +9379,12 @@ var FileItem = ({
|
|
|
9412
9379
|
const text = event.currentTarget;
|
|
9413
9380
|
setHasTooltip(text.scrollWidth > text.clientWidth);
|
|
9414
9381
|
};
|
|
9415
|
-
return /* @__PURE__ */ (0,
|
|
9416
|
-
/* @__PURE__ */ (0,
|
|
9417
|
-
showPreview && (type.includes("image") ? /* @__PURE__ */ (0,
|
|
9418
|
-
/* @__PURE__ */ (0,
|
|
9419
|
-
/* @__PURE__ */ (0,
|
|
9420
|
-
/* @__PURE__ */ (0,
|
|
9382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ListItem3, { children: [
|
|
9383
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(MainContainer2, { error, singleFileMode, showPreview, children: [
|
|
9384
|
+
showPreview && (type.includes("image") ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ImagePreview, { src: preview, alt: `Preview of ${fileName}` }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IconPreview, { "aria-labelledby": fileNameId, error, role: "img", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DxcIcon, { icon: preview }) })),
|
|
9385
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(FileItemContent, { children: [
|
|
9386
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FileName, { id: fileNameId, children: fileName }),
|
|
9387
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Flex_default, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
9421
9388
|
ActionIcon_default,
|
|
9422
9389
|
{
|
|
9423
9390
|
onClick: () => onDelete(fileName),
|
|
@@ -9428,9 +9395,9 @@ var FileItem = ({
|
|
|
9428
9395
|
) })
|
|
9429
9396
|
] })
|
|
9430
9397
|
] }),
|
|
9431
|
-
error && /* @__PURE__ */ (0,
|
|
9432
|
-
/* @__PURE__ */ (0,
|
|
9433
|
-
/* @__PURE__ */ (0,
|
|
9398
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipWrapper, { condition: hasTooltip, label: error, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ErrorMessageContainer2, { role: "alert", "aria-live": "assertive", singleFileMode, children: [
|
|
9399
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ErrorIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DxcIcon, { icon: "filled_error" }) }),
|
|
9400
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ErrorMessage2, { onMouseEnter: handleOnMouseEnter, children: error })
|
|
9434
9401
|
] }) })
|
|
9435
9402
|
] });
|
|
9436
9403
|
};
|
|
@@ -9458,7 +9425,7 @@ var isFileIncluded = (file, fileList) => {
|
|
|
9458
9425
|
};
|
|
9459
9426
|
|
|
9460
9427
|
// src/file-input/FileInput.tsx
|
|
9461
|
-
var
|
|
9428
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
9462
9429
|
var FileInputContainer = import_styled_components52.default.div`
|
|
9463
9430
|
display: flex;
|
|
9464
9431
|
flex-direction: column;
|
|
@@ -9637,11 +9604,11 @@ var DxcFileInput = (0, import_react54.forwardRef)(
|
|
|
9637
9604
|
};
|
|
9638
9605
|
getFiles();
|
|
9639
9606
|
}, [value]);
|
|
9640
|
-
return /* @__PURE__ */ (0,
|
|
9641
|
-
/* @__PURE__ */ (0,
|
|
9642
|
-
/* @__PURE__ */ (0,
|
|
9643
|
-
mode === "file" ? /* @__PURE__ */ (0,
|
|
9644
|
-
/* @__PURE__ */ (0,
|
|
9607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(FileInputContainer, { margin, ref, children: [
|
|
9608
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Label_default, { htmlFor: fileInputId, disabled, children: label }),
|
|
9609
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HelperText_default, { disabled, children: helperText }),
|
|
9610
|
+
mode === "file" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(FileContainer, { singleFileMode: !multiple && files.length === 1, children: [
|
|
9611
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9645
9612
|
ValueInput,
|
|
9646
9613
|
{
|
|
9647
9614
|
id: fileInputId,
|
|
@@ -9653,7 +9620,7 @@ var DxcFileInput = (0, import_react54.forwardRef)(
|
|
|
9653
9620
|
readOnly: true
|
|
9654
9621
|
}
|
|
9655
9622
|
),
|
|
9656
|
-
/* @__PURE__ */ (0,
|
|
9623
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9657
9624
|
Button_default,
|
|
9658
9625
|
{
|
|
9659
9626
|
mode: "secondary",
|
|
@@ -9664,7 +9631,7 @@ var DxcFileInput = (0, import_react54.forwardRef)(
|
|
|
9664
9631
|
tabIndex
|
|
9665
9632
|
}
|
|
9666
9633
|
),
|
|
9667
|
-
files.length > 0 && /* @__PURE__ */ (0,
|
|
9634
|
+
files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FileItemListContainer, { role: "list", children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9668
9635
|
FileItem_default,
|
|
9669
9636
|
{
|
|
9670
9637
|
fileName: file.file.name,
|
|
@@ -9678,8 +9645,8 @@ var DxcFileInput = (0, import_react54.forwardRef)(
|
|
|
9678
9645
|
},
|
|
9679
9646
|
`file-${index}`
|
|
9680
9647
|
)) })
|
|
9681
|
-
] }) : /* @__PURE__ */ (0,
|
|
9682
|
-
/* @__PURE__ */ (0,
|
|
9648
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Container2, { children: [
|
|
9649
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9683
9650
|
ValueInput,
|
|
9684
9651
|
{
|
|
9685
9652
|
id: fileInputId,
|
|
@@ -9691,7 +9658,7 @@ var DxcFileInput = (0, import_react54.forwardRef)(
|
|
|
9691
9658
|
readOnly: true
|
|
9692
9659
|
}
|
|
9693
9660
|
),
|
|
9694
|
-
/* @__PURE__ */ (0,
|
|
9661
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
9695
9662
|
DragDropArea,
|
|
9696
9663
|
{
|
|
9697
9664
|
isDragging,
|
|
@@ -9702,7 +9669,7 @@ var DxcFileInput = (0, import_react54.forwardRef)(
|
|
|
9702
9669
|
onDragOver: handleDrag,
|
|
9703
9670
|
onDragLeave: handleDragOut,
|
|
9704
9671
|
children: [
|
|
9705
|
-
/* @__PURE__ */ (0,
|
|
9672
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9706
9673
|
Button_default,
|
|
9707
9674
|
{
|
|
9708
9675
|
mode: "secondary",
|
|
@@ -9712,11 +9679,11 @@ var DxcFileInput = (0, import_react54.forwardRef)(
|
|
|
9712
9679
|
size: { width: "fitContent", height: "medium" }
|
|
9713
9680
|
}
|
|
9714
9681
|
),
|
|
9715
|
-
mode === "dropzone" ? /* @__PURE__ */ (0,
|
|
9682
|
+
mode === "dropzone" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropzoneLabel, { disabled, children: dropAreaLabel ?? (multiple ? translatedLabels.fileInput.multipleDropAreaLabelDefault : translatedLabels.fileInput.singleDropAreaLabelDefault) }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FiledropLabel, { disabled, children: dropAreaLabel ?? (multiple ? translatedLabels.fileInput.multipleDropAreaLabelDefault : translatedLabels.fileInput.singleDropAreaLabelDefault) })
|
|
9716
9683
|
]
|
|
9717
9684
|
}
|
|
9718
9685
|
),
|
|
9719
|
-
files.length > 0 && /* @__PURE__ */ (0,
|
|
9686
|
+
files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FileItemListContainer, { role: "list", children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9720
9687
|
FileItem_default,
|
|
9721
9688
|
{
|
|
9722
9689
|
fileName: file.file.name,
|
|
@@ -9738,7 +9705,7 @@ var FileInput_default = DxcFileInput;
|
|
|
9738
9705
|
|
|
9739
9706
|
// src/grid/Grid.tsx
|
|
9740
9707
|
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9741
|
-
var
|
|
9708
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
9742
9709
|
var Grid = import_styled_components53.default.div`
|
|
9743
9710
|
display: grid;
|
|
9744
9711
|
${(props) => `
|
|
@@ -9765,7 +9732,7 @@ var GridItem = import_styled_components53.default.div`
|
|
|
9765
9732
|
${props.placeSelf ? typeof props.placeSelf === "string" ? `place-self: ${props.placeSelf};` : `align-self: ${props.placeSelf.alignSelf ?? ""}; justify-self: ${props.placeSelf.justifySelf ?? ""};` : ""}
|
|
9766
9733
|
`}
|
|
9767
9734
|
`;
|
|
9768
|
-
var DxcGrid = (props) => /* @__PURE__ */ (0,
|
|
9735
|
+
var DxcGrid = (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Grid, { ...props });
|
|
9769
9736
|
DxcGrid.Item = GridItem;
|
|
9770
9737
|
var Grid_default = DxcGrid;
|
|
9771
9738
|
|
|
@@ -9801,7 +9768,7 @@ var getHeadingWeight = (weight) => {
|
|
|
9801
9768
|
};
|
|
9802
9769
|
|
|
9803
9770
|
// src/heading/Heading.tsx
|
|
9804
|
-
var
|
|
9771
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
9805
9772
|
var HeadingContainer = import_styled_components54.default.div`
|
|
9806
9773
|
margin: ${({ margin }) => margin && typeof margin !== "object" ? spaces[margin] : "0px"};
|
|
9807
9774
|
margin-top: ${({ margin }) => margin && typeof margin === "object" && margin.top ? spaces[margin.top] : ""};
|
|
@@ -9817,12 +9784,12 @@ var Heading = import_styled_components54.default.h1`
|
|
|
9817
9784
|
margin: 0;
|
|
9818
9785
|
`;
|
|
9819
9786
|
function DxcHeading({ as, level = 1, margin, text, weight = "default" }) {
|
|
9820
|
-
return /* @__PURE__ */ (0,
|
|
9787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(HeadingContainer, { margin, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Heading, { as: as ?? `h${level}`, $level: level, $weight: weight, children: text }) });
|
|
9821
9788
|
}
|
|
9822
9789
|
|
|
9823
9790
|
// src/image/Image.tsx
|
|
9824
9791
|
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9825
|
-
var
|
|
9792
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
9826
9793
|
var Figure = import_styled_components55.default.figure`
|
|
9827
9794
|
display: flex;
|
|
9828
9795
|
flex-direction: column;
|
|
@@ -9837,9 +9804,9 @@ var CaptionContainer = import_styled_components55.default.figcaption`
|
|
|
9837
9804
|
font-size: var(--typography-label-s);
|
|
9838
9805
|
font-weight: var(--typography-label-regular);
|
|
9839
9806
|
`;
|
|
9840
|
-
var CaptionWrapper = ({ caption, children }) => caption != null ? /* @__PURE__ */ (0,
|
|
9807
|
+
var CaptionWrapper = ({ caption, children }) => caption != null ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Figure, { children: [
|
|
9841
9808
|
children,
|
|
9842
|
-
/* @__PURE__ */ (0,
|
|
9809
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(CaptionContainer, { children: caption })
|
|
9843
9810
|
] }) : children;
|
|
9844
9811
|
function DxcImage({
|
|
9845
9812
|
alt,
|
|
@@ -9855,7 +9822,7 @@ function DxcImage({
|
|
|
9855
9822
|
srcSet,
|
|
9856
9823
|
width
|
|
9857
9824
|
}) {
|
|
9858
|
-
return /* @__PURE__ */ (0,
|
|
9825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(CaptionWrapper, { caption, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
9859
9826
|
"img",
|
|
9860
9827
|
{
|
|
9861
9828
|
alt,
|
|
@@ -9876,9 +9843,9 @@ function DxcImage({
|
|
|
9876
9843
|
}
|
|
9877
9844
|
|
|
9878
9845
|
// src/inset/Inset.tsx
|
|
9879
|
-
var
|
|
9846
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
9880
9847
|
function DxcInset({ bottom, children, horizontal, left, right, space, top, vertical }) {
|
|
9881
|
-
return /* @__PURE__ */ (0,
|
|
9848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
9882
9849
|
DxcContainer,
|
|
9883
9850
|
{
|
|
9884
9851
|
padding: {
|
|
@@ -9895,7 +9862,7 @@ function DxcInset({ bottom, children, horizontal, left, right, space, top, verti
|
|
|
9895
9862
|
// src/link/Link.tsx
|
|
9896
9863
|
var import_react55 = require("react");
|
|
9897
9864
|
var import_styled_components56 = __toESM(require("styled-components"));
|
|
9898
|
-
var
|
|
9865
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
9899
9866
|
var Link3 = import_styled_components56.default.a`
|
|
9900
9867
|
all: unset;
|
|
9901
9868
|
display: inline-flex;
|
|
@@ -9958,7 +9925,7 @@ var DxcLink = (0, import_react55.forwardRef)(
|
|
|
9958
9925
|
onClick,
|
|
9959
9926
|
tabIndex = 0,
|
|
9960
9927
|
...otherProps
|
|
9961
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
9928
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
9962
9929
|
Link3,
|
|
9963
9930
|
{
|
|
9964
9931
|
as: onClick && !href ? "button" : "a",
|
|
@@ -9971,9 +9938,9 @@ var DxcLink = (0, import_react55.forwardRef)(
|
|
|
9971
9938
|
margin,
|
|
9972
9939
|
ref,
|
|
9973
9940
|
...otherProps,
|
|
9974
|
-
children: /* @__PURE__ */ (0,
|
|
9941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(LinkContent, { iconPosition, inheritColor, children: [
|
|
9975
9942
|
children,
|
|
9976
|
-
icon && /* @__PURE__ */ (0,
|
|
9943
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(IconContainer6, { children: typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DxcIcon, { icon }) : icon })
|
|
9977
9944
|
] })
|
|
9978
9945
|
}
|
|
9979
9946
|
)
|
|
@@ -9993,7 +9960,7 @@ var import_react56 = require("react");
|
|
|
9993
9960
|
var NavTabsContext_default = (0, import_react56.createContext)(null);
|
|
9994
9961
|
|
|
9995
9962
|
// src/nav-tabs/Tab.tsx
|
|
9996
|
-
var
|
|
9963
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
9997
9964
|
var TabContainer = import_styled_components57.default.div`
|
|
9998
9965
|
position: relative;
|
|
9999
9966
|
display: flex;
|
|
@@ -10078,8 +10045,8 @@ var Tab = (0, import_react57.forwardRef)(
|
|
|
10078
10045
|
break;
|
|
10079
10046
|
}
|
|
10080
10047
|
};
|
|
10081
|
-
return /* @__PURE__ */ (0,
|
|
10082
|
-
/* @__PURE__ */ (0,
|
|
10048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(TabContainer, { children: [
|
|
10049
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DxcInset, { space: "var(--spacing-padding-xs)", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
10083
10050
|
TabLink,
|
|
10084
10051
|
{
|
|
10085
10052
|
href: !disabled ? href : void 0,
|
|
@@ -10099,10 +10066,10 @@ var Tab = (0, import_react57.forwardRef)(
|
|
|
10099
10066
|
"aria-disabled": disabled,
|
|
10100
10067
|
...otherProps,
|
|
10101
10068
|
children: [
|
|
10102
|
-
icon && /* @__PURE__ */ (0,
|
|
10103
|
-
/* @__PURE__ */ (0,
|
|
10104
|
-
/* @__PURE__ */ (0,
|
|
10105
|
-
notificationNumber && !disabled && /* @__PURE__ */ (0,
|
|
10069
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IconContainer7, { disabled, children: typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DxcIcon, { icon }) : icon }),
|
|
10070
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Flex_default, { alignItems: "center", gap: "var(--spacing-gap-s)", children: [
|
|
10071
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Label6, { disabled, children }),
|
|
10072
|
+
notificationNumber && !disabled && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
10106
10073
|
Badge_default,
|
|
10107
10074
|
{
|
|
10108
10075
|
mode: "notification",
|
|
@@ -10114,7 +10081,7 @@ var Tab = (0, import_react57.forwardRef)(
|
|
|
10114
10081
|
]
|
|
10115
10082
|
}
|
|
10116
10083
|
) }),
|
|
10117
|
-
/* @__PURE__ */ (0,
|
|
10084
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Underline, { active })
|
|
10118
10085
|
] });
|
|
10119
10086
|
}
|
|
10120
10087
|
);
|
|
@@ -10155,7 +10122,7 @@ var getNextTabIndex = (array, initialIndex) => {
|
|
|
10155
10122
|
};
|
|
10156
10123
|
|
|
10157
10124
|
// src/nav-tabs/NavTabs.tsx
|
|
10158
|
-
var
|
|
10125
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
10159
10126
|
var NavTabsContainer = import_styled_components58.default.div`
|
|
10160
10127
|
position: relative;
|
|
10161
10128
|
display: flex;
|
|
@@ -10199,9 +10166,9 @@ var DxcNavTabs = ({ iconPosition = "left", tabIndex = 0, children }) => {
|
|
|
10199
10166
|
break;
|
|
10200
10167
|
}
|
|
10201
10168
|
};
|
|
10202
|
-
return /* @__PURE__ */ (0,
|
|
10203
|
-
/* @__PURE__ */ (0,
|
|
10204
|
-
/* @__PURE__ */ (0,
|
|
10169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(NavTabsContainer, { onKeyDown: handleOnKeyDown, role: "tablist", "aria-label": "Navigation tabs", children: [
|
|
10170
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Underline2, {}),
|
|
10171
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(NavTabsContext_default.Provider, { value: contextValue, children })
|
|
10205
10172
|
] });
|
|
10206
10173
|
};
|
|
10207
10174
|
DxcNavTabs.Tab = Tab_default;
|
|
@@ -10210,7 +10177,7 @@ var NavTabs_default = DxcNavTabs;
|
|
|
10210
10177
|
// src/number-input/NumberInput.tsx
|
|
10211
10178
|
var import_react59 = require("react");
|
|
10212
10179
|
var import_styled_components59 = __toESM(require("styled-components"));
|
|
10213
|
-
var
|
|
10180
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
10214
10181
|
var NumberInputContainer = import_styled_components59.default.div`
|
|
10215
10182
|
${({ size }) => size === "fillParent" && "width: 100%;"}
|
|
10216
10183
|
|
|
@@ -10273,7 +10240,7 @@ var DxcNumberInput = (0, import_react59.forwardRef)(
|
|
|
10273
10240
|
input?.removeEventListener("wheel", preventDefault);
|
|
10274
10241
|
};
|
|
10275
10242
|
}, []);
|
|
10276
|
-
return /* @__PURE__ */ (0,
|
|
10243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NumberInputContext_default.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NumberInputContainer, { ref: numberInputRef, size, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
10277
10244
|
TextInput_default,
|
|
10278
10245
|
{
|
|
10279
10246
|
label,
|
|
@@ -10305,7 +10272,7 @@ var NumberInput_default = DxcNumberInput;
|
|
|
10305
10272
|
// src/paragraph/Paragraph.tsx
|
|
10306
10273
|
var import_react60 = require("react");
|
|
10307
10274
|
var import_styled_components60 = __toESM(require("styled-components"));
|
|
10308
|
-
var
|
|
10275
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
10309
10276
|
var Paragraph = import_styled_components60.default.p`
|
|
10310
10277
|
display: ${(props) => props.theme.display};
|
|
10311
10278
|
font-family: "Open Sans", sans-serif;
|
|
@@ -10323,13 +10290,13 @@ var Paragraph = import_styled_components60.default.p`
|
|
|
10323
10290
|
`;
|
|
10324
10291
|
function DxcParagraph({ children }) {
|
|
10325
10292
|
const colorsTheme = (0, import_react60.useContext)(HalstackContext);
|
|
10326
|
-
return /* @__PURE__ */ (0,
|
|
10293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_styled_components60.ThemeProvider, { theme: colorsTheme.paragraph, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Paragraph, { children }) });
|
|
10327
10294
|
}
|
|
10328
10295
|
|
|
10329
10296
|
// src/password-input/PasswordInput.tsx
|
|
10330
10297
|
var import_react61 = require("react");
|
|
10331
10298
|
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10332
|
-
var
|
|
10299
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
10333
10300
|
var setInputType = (type, element) => {
|
|
10334
10301
|
element?.getElementsByTagName("input")[0]?.setAttribute("type", type);
|
|
10335
10302
|
};
|
|
@@ -10380,7 +10347,7 @@ var DxcPasswordInput = (0, import_react61.forwardRef)(
|
|
|
10380
10347
|
}
|
|
10381
10348
|
})();
|
|
10382
10349
|
}, [isPasswordVisible, passwordInput]);
|
|
10383
|
-
return /* @__PURE__ */ (0,
|
|
10350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PasswordInput, { ref, size, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
10384
10351
|
TextInput_default,
|
|
10385
10352
|
{
|
|
10386
10353
|
label,
|
|
@@ -10434,7 +10401,7 @@ var auxTextStyles = import_styled_components62.css`
|
|
|
10434
10401
|
`;
|
|
10435
10402
|
|
|
10436
10403
|
// src/progress-bar/ProgressBar.tsx
|
|
10437
|
-
var
|
|
10404
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
10438
10405
|
var ProgressBarContainer = import_styled_components63.default.div`
|
|
10439
10406
|
display: flex;
|
|
10440
10407
|
flex-wrap: wrap;
|
|
@@ -10548,17 +10515,17 @@ var DxcProgressBar = ({
|
|
|
10548
10515
|
(0, import_react62.useEffect)(() => {
|
|
10549
10516
|
if (value != null) setInnerValue(value < 0 ? 0 : value > 100 ? 100 : value);
|
|
10550
10517
|
}, [value]);
|
|
10551
|
-
return /* @__PURE__ */ (0,
|
|
10552
|
-
overlay && /* @__PURE__ */ (0,
|
|
10553
|
-
/* @__PURE__ */ (0,
|
|
10554
|
-
/* @__PURE__ */ (0,
|
|
10555
|
-
label && /* @__PURE__ */ (0,
|
|
10556
|
-
innerValue != null && showValue && /* @__PURE__ */ (0,
|
|
10518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(ProgressBarContainer, { overlay, children: [
|
|
10519
|
+
overlay && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Overlay4, {}),
|
|
10520
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(MainContainer3, { overlay, margin, children: [
|
|
10521
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Flex_default, { justifyContent: "space-between", children: [
|
|
10522
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ProgressBarLabel, { id: labelId, overlay, children: label }),
|
|
10523
|
+
innerValue != null && showValue && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(ProgressBarProgress, { overlay, children: [
|
|
10557
10524
|
innerValue,
|
|
10558
10525
|
" %"
|
|
10559
10526
|
] })
|
|
10560
10527
|
] }),
|
|
10561
|
-
/* @__PURE__ */ (0,
|
|
10528
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10562
10529
|
LinearProgress,
|
|
10563
10530
|
{
|
|
10564
10531
|
"aria-label": label ? void 0 : ariaLabel,
|
|
@@ -10569,7 +10536,7 @@ var DxcProgressBar = ({
|
|
|
10569
10536
|
helperText,
|
|
10570
10537
|
role: "progressbar",
|
|
10571
10538
|
overlay,
|
|
10572
|
-
children: /* @__PURE__ */ (0,
|
|
10539
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10573
10540
|
LinearProgressBar,
|
|
10574
10541
|
{
|
|
10575
10542
|
overlay,
|
|
@@ -10579,7 +10546,7 @@ var DxcProgressBar = ({
|
|
|
10579
10546
|
)
|
|
10580
10547
|
}
|
|
10581
10548
|
),
|
|
10582
|
-
helperText && /* @__PURE__ */ (0,
|
|
10549
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(HelperText3, { overlay, children: helperText })
|
|
10583
10550
|
] })
|
|
10584
10551
|
] });
|
|
10585
10552
|
};
|
|
@@ -10589,7 +10556,7 @@ var ProgressBar_default = DxcProgressBar;
|
|
|
10589
10556
|
var import_react63 = require("react");
|
|
10590
10557
|
var import_slugify = __toESM(require("slugify"));
|
|
10591
10558
|
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10592
|
-
var
|
|
10559
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
10593
10560
|
var QuickNavContainer = import_styled_components64.default.div`
|
|
10594
10561
|
display: flex;
|
|
10595
10562
|
flex-direction: column;
|
|
@@ -10642,17 +10609,17 @@ var Link4 = import_styled_components64.default.a`
|
|
|
10642
10609
|
`;
|
|
10643
10610
|
function DxcQuickNav({ links, title }) {
|
|
10644
10611
|
const translatedLabels = (0, import_react63.useContext)(HalstackLanguageContext);
|
|
10645
|
-
return /* @__PURE__ */ (0,
|
|
10646
|
-
/* @__PURE__ */ (0,
|
|
10647
|
-
/* @__PURE__ */ (0,
|
|
10648
|
-
/* @__PURE__ */ (0,
|
|
10649
|
-
link.links?.length && /* @__PURE__ */ (0,
|
|
10612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(QuickNavContainer, { children: [
|
|
10613
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(DxcHeading, { level: 5, text: title ?? translatedLabels.quickNav.contentTitle }),
|
|
10614
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ListColumn, { children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("li", { children: [
|
|
10615
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Link4, { href: `#${(0, import_slugify.default)(link.label, { lower: true })}`, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: link.label }) }),
|
|
10616
|
+
link.links?.length && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ListSecondColumn, { children: link.links?.map((sublink) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
10650
10617
|
Link4,
|
|
10651
10618
|
{
|
|
10652
10619
|
href: `#${(0, import_slugify.default)(link?.label, { lower: true })}-${(0, import_slugify.default)(sublink?.label, {
|
|
10653
10620
|
lower: true
|
|
10654
10621
|
})}`,
|
|
10655
|
-
children: /* @__PURE__ */ (0,
|
|
10622
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: sublink.label })
|
|
10656
10623
|
}
|
|
10657
10624
|
) }, sublink.label)) })
|
|
10658
10625
|
] }, link.label)) })
|
|
@@ -10668,7 +10635,7 @@ var import_react64 = require("react");
|
|
|
10668
10635
|
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10669
10636
|
|
|
10670
10637
|
// src/radio-group/utils.tsx
|
|
10671
|
-
var
|
|
10638
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
10672
10639
|
function getRadioInputStyles(disabled, error, readOnly, status) {
|
|
10673
10640
|
switch (true) {
|
|
10674
10641
|
case disabled:
|
|
@@ -10682,15 +10649,15 @@ function getRadioInputStyles(disabled, error, readOnly, status) {
|
|
|
10682
10649
|
}
|
|
10683
10650
|
}
|
|
10684
10651
|
var icons2 = {
|
|
10685
|
-
checked: /* @__PURE__ */ (0,
|
|
10686
|
-
/* @__PURE__ */ (0,
|
|
10652
|
+
checked: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
10653
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10687
10654
|
"path",
|
|
10688
10655
|
{
|
|
10689
10656
|
d: "M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12ZM5.00194 12C5.00194 15.8649 8.13508 18.9981 12 18.9981C15.8649 18.9981 18.9981 15.8649 18.9981 12C18.9981 8.13508 15.8649 5.00194 12 5.00194C8.13508 5.00194 5.00194 8.13508 5.00194 12Z",
|
|
10690
10657
|
fill: "currentColor"
|
|
10691
10658
|
}
|
|
10692
10659
|
),
|
|
10693
|
-
/* @__PURE__ */ (0,
|
|
10660
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10694
10661
|
"path",
|
|
10695
10662
|
{
|
|
10696
10663
|
d: "M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z",
|
|
@@ -10698,7 +10665,7 @@ var icons2 = {
|
|
|
10698
10665
|
}
|
|
10699
10666
|
)
|
|
10700
10667
|
] }),
|
|
10701
|
-
unchecked: /* @__PURE__ */ (0,
|
|
10668
|
+
unchecked: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10702
10669
|
"path",
|
|
10703
10670
|
{
|
|
10704
10671
|
d: "M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12ZM5.00194 12C5.00194 15.8649 8.13508 18.9981 12 18.9981C15.8649 18.9981 18.9981 15.8649 18.9981 12C18.9981 8.13508 15.8649 5.00194 12 5.00194C8.13508 5.00194 5.00194 8.13508 5.00194 12Z",
|
|
@@ -10708,7 +10675,7 @@ var icons2 = {
|
|
|
10708
10675
|
};
|
|
10709
10676
|
|
|
10710
10677
|
// src/radio-group/RadioInput.tsx
|
|
10711
|
-
var
|
|
10678
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
10712
10679
|
var Label7 = import_styled_components65.default.span`
|
|
10713
10680
|
color: ${({ disabled }) => disabled ? "var(--color-fg-neutral-medium)" : "var(--color-fg-neutral-dark)"};
|
|
10714
10681
|
font-family: var(--typography-font-family);
|
|
@@ -10757,7 +10724,7 @@ var RadioInput = ({ checked, disabled, error, focused, label, onClick, readOnly,
|
|
|
10757
10724
|
onClick();
|
|
10758
10725
|
document.activeElement !== ref.current && ref.current?.focus();
|
|
10759
10726
|
};
|
|
10760
|
-
return /* @__PURE__ */ (0,
|
|
10727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
10761
10728
|
RadioInputContainer,
|
|
10762
10729
|
{
|
|
10763
10730
|
disabled,
|
|
@@ -10765,7 +10732,7 @@ var RadioInput = ({ checked, disabled, error, focused, label, onClick, readOnly,
|
|
|
10765
10732
|
onClick: disabled ? void 0 : handleOnClick,
|
|
10766
10733
|
readOnly,
|
|
10767
10734
|
children: [
|
|
10768
|
-
/* @__PURE__ */ (0,
|
|
10735
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
10769
10736
|
RadioButton,
|
|
10770
10737
|
{
|
|
10771
10738
|
"aria-checked": checked,
|
|
@@ -10780,7 +10747,7 @@ var RadioInput = ({ checked, disabled, error, focused, label, onClick, readOnly,
|
|
|
10780
10747
|
children: checked ? icons2.checked : icons2.unchecked
|
|
10781
10748
|
}
|
|
10782
10749
|
),
|
|
10783
|
-
/* @__PURE__ */ (0,
|
|
10750
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Label7, { disabled, id: radioLabelId, children: label })
|
|
10784
10751
|
]
|
|
10785
10752
|
}
|
|
10786
10753
|
);
|
|
@@ -10788,7 +10755,7 @@ var RadioInput = ({ checked, disabled, error, focused, label, onClick, readOnly,
|
|
|
10788
10755
|
var RadioInput_default = (0, import_react64.memo)(RadioInput);
|
|
10789
10756
|
|
|
10790
10757
|
// src/radio-group/RadioGroup.tsx
|
|
10791
|
-
var
|
|
10758
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
10792
10759
|
var RadioGroupContainer = import_styled_components66.default.div`
|
|
10793
10760
|
box-sizing: border-box;
|
|
10794
10761
|
display: inline-flex;
|
|
@@ -10910,13 +10877,13 @@ var DxcRadioGroup = (0, import_react65.forwardRef)(
|
|
|
10910
10877
|
break;
|
|
10911
10878
|
}
|
|
10912
10879
|
};
|
|
10913
|
-
return /* @__PURE__ */ (0,
|
|
10914
|
-
label && /* @__PURE__ */ (0,
|
|
10880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(RadioGroupContainer, { ref, children: [
|
|
10881
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Label_default, { disabled, hasMargin: !helperText, id: labelId, children: [
|
|
10915
10882
|
label,
|
|
10916
|
-
optional && /* @__PURE__ */ (0,
|
|
10883
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: ` ${translatedLabels.formFields.optionalLabel}` })
|
|
10917
10884
|
] }),
|
|
10918
|
-
helperText && /* @__PURE__ */ (0,
|
|
10919
|
-
/* @__PURE__ */ (0,
|
|
10885
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(HelperText_default, { disabled, hasMargin: true, children: helperText }),
|
|
10886
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
10920
10887
|
RadioGroup,
|
|
10921
10888
|
{
|
|
10922
10889
|
"aria-disabled": disabled,
|
|
@@ -10933,8 +10900,8 @@ var DxcRadioGroup = (0, import_react65.forwardRef)(
|
|
|
10933
10900
|
role: "radiogroup",
|
|
10934
10901
|
stacking,
|
|
10935
10902
|
children: [
|
|
10936
|
-
/* @__PURE__ */ (0,
|
|
10937
|
-
innerOptions.map((option, index) => /* @__PURE__ */ (0,
|
|
10903
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("input", { disabled, name, readOnly: true, type: "hidden", value: value ?? innerValue ?? "" }),
|
|
10904
|
+
innerOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
10938
10905
|
RadioInput_default,
|
|
10939
10906
|
{
|
|
10940
10907
|
checked: (value ?? innerValue) === option.value,
|
|
@@ -10954,7 +10921,7 @@ var DxcRadioGroup = (0, import_react65.forwardRef)(
|
|
|
10954
10921
|
]
|
|
10955
10922
|
}
|
|
10956
10923
|
),
|
|
10957
|
-
!disabled && typeof error === "string" && /* @__PURE__ */ (0,
|
|
10924
|
+
!disabled && typeof error === "string" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ErrorMessage_default, { error, id: errorId })
|
|
10958
10925
|
] });
|
|
10959
10926
|
}
|
|
10960
10927
|
);
|
|
@@ -10993,7 +10960,7 @@ var sortArray = (index, order, resultset) => resultset.slice().sort((element1, e
|
|
|
10993
10960
|
});
|
|
10994
10961
|
|
|
10995
10962
|
// src/resultset-table/ResultsetTable.tsx
|
|
10996
|
-
var
|
|
10963
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
10997
10964
|
var ResultsetTableContainer = import_styled_components67.default.div`
|
|
10998
10965
|
width: ${({ margin }) => calculateWidth10(margin)};
|
|
10999
10966
|
margin: ${({ margin }) => margin && typeof margin !== "object" ? spaces[margin] : "0px"};
|
|
@@ -11069,13 +11036,13 @@ var DxcResultsetTable = ({
|
|
|
11069
11036
|
prevRowCountRef.current = rows.length;
|
|
11070
11037
|
}
|
|
11071
11038
|
}, [hidePaginator, page, rows]);
|
|
11072
|
-
return /* @__PURE__ */ (0,
|
|
11073
|
-
/* @__PURE__ */ (0,
|
|
11074
|
-
/* @__PURE__ */ (0,
|
|
11039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(ResultsetTableContainer, { margin, children: [
|
|
11040
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Table_default, { mode, children: [
|
|
11041
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("tr", { children: columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
11075
11042
|
"th",
|
|
11076
11043
|
{
|
|
11077
11044
|
"aria-sort": column.isSortable ? sortColumnIndex === index ? sortOrder : "none" : void 0,
|
|
11078
|
-
children: /* @__PURE__ */ (0,
|
|
11045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
11079
11046
|
SortingHeader,
|
|
11080
11047
|
{
|
|
11081
11048
|
"aria-label": column.isSortable ? "Sort column" : void 0,
|
|
@@ -11089,8 +11056,8 @@ var DxcResultsetTable = ({
|
|
|
11089
11056
|
role: column.isSortable ? "button" : void 0,
|
|
11090
11057
|
tabIndex: column.isSortable ? tabIndex : -1,
|
|
11091
11058
|
children: [
|
|
11092
|
-
/* @__PURE__ */ (0,
|
|
11093
|
-
column.isSortable && /* @__PURE__ */ (0,
|
|
11059
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: column.displayValue }),
|
|
11060
|
+
column.isSortable && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
11094
11061
|
DxcIcon,
|
|
11095
11062
|
{
|
|
11096
11063
|
icon: sortColumnIndex === index ? sortOrder === "ascending" ? "arrow_upward" : "arrow_downward" : "unfold_more"
|
|
@@ -11102,9 +11069,9 @@ var DxcResultsetTable = ({
|
|
|
11102
11069
|
},
|
|
11103
11070
|
`tableHeader_${index}`
|
|
11104
11071
|
)) }) }),
|
|
11105
|
-
/* @__PURE__ */ (0,
|
|
11072
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("tbody", { children: filteredResultset.map((row) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("tr", { children: row.cells.map((cellContent, cellIndex) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("td", { children: cellContent.displayValue }, `resultSetTableCellContent_${cellIndex}`)) }, `resultSetTableCell_${row.id}`)) })
|
|
11106
11073
|
] }),
|
|
11107
|
-
!hidePaginator && rows.length > itemsPerPage && /* @__PURE__ */ (0,
|
|
11074
|
+
!hidePaginator && rows.length > itemsPerPage && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
11108
11075
|
Paginator_default,
|
|
11109
11076
|
{
|
|
11110
11077
|
currentPage: page,
|
|
@@ -11158,7 +11125,7 @@ var roundUp = (target, step, min, max) => {
|
|
|
11158
11125
|
};
|
|
11159
11126
|
|
|
11160
11127
|
// src/slider/Slider.tsx
|
|
11161
|
-
var
|
|
11128
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
11162
11129
|
var SliderContainer = import_styled_components68.default.div`
|
|
11163
11130
|
display: flex;
|
|
11164
11131
|
flex-direction: column;
|
|
@@ -11318,14 +11285,14 @@ var DxcSlider = (0, import_react67.forwardRef)(
|
|
|
11318
11285
|
else if (textInputIntegerValue > maxValue) changeValue(maxValue.toString());
|
|
11319
11286
|
else changeValue(roundUp(textInputIntegerValue, step, minValue, maxValue).toString());
|
|
11320
11287
|
};
|
|
11321
|
-
return /* @__PURE__ */ (0,
|
|
11322
|
-
label && /* @__PURE__ */ (0,
|
|
11323
|
-
helperText && /* @__PURE__ */ (0,
|
|
11324
|
-
/* @__PURE__ */ (0,
|
|
11325
|
-
/* @__PURE__ */ (0,
|
|
11326
|
-
showLimitsValues && /* @__PURE__ */ (0,
|
|
11327
|
-
/* @__PURE__ */ (0,
|
|
11328
|
-
/* @__PURE__ */ (0,
|
|
11288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(SliderContainer, { margin, size, ref, children: [
|
|
11289
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Label_default, { id: labelId, disabled, children: label }),
|
|
11290
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(HelperText_default, { disabled, children: helperText }),
|
|
11291
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(MainContainer4, { showInput, children: [
|
|
11292
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(LimitsValueGrid, { showLimitsValues, children: [
|
|
11293
|
+
showLimitsValues && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(LimitLabel, { disabled, children: minLabel }),
|
|
11294
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(SliderInputContainer, { children: [
|
|
11295
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
11329
11296
|
SliderInput,
|
|
11330
11297
|
{
|
|
11331
11298
|
"aria-label": label ? void 0 : ariaLabel,
|
|
@@ -11345,9 +11312,9 @@ var DxcSlider = (0, import_react67.forwardRef)(
|
|
|
11345
11312
|
value: roundedUpValue
|
|
11346
11313
|
}
|
|
11347
11314
|
),
|
|
11348
|
-
marks && /* @__PURE__ */ (0,
|
|
11315
|
+
marks && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TicksContainer, { children: Array.from({ length: Math.floor((maxValue - minValue) / step) + 1 }, (_, index) => {
|
|
11349
11316
|
const tick = minValue + index * step;
|
|
11350
|
-
return /* @__PURE__ */ (0,
|
|
11317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
11351
11318
|
Tick,
|
|
11352
11319
|
{
|
|
11353
11320
|
currentTick: roundedUpValue === stepPrecision(tick, step),
|
|
@@ -11358,9 +11325,9 @@ var DxcSlider = (0, import_react67.forwardRef)(
|
|
|
11358
11325
|
);
|
|
11359
11326
|
}) })
|
|
11360
11327
|
] }),
|
|
11361
|
-
showLimitsValues && /* @__PURE__ */ (0,
|
|
11328
|
+
showLimitsValues && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(LimitLabel, { disabled, children: maxLabel })
|
|
11362
11329
|
] }),
|
|
11363
|
-
showInput && /* @__PURE__ */ (0,
|
|
11330
|
+
showInput && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
11364
11331
|
NumberInput_default,
|
|
11365
11332
|
{
|
|
11366
11333
|
disabled,
|
|
@@ -11382,7 +11349,7 @@ var Slider_default = DxcSlider;
|
|
|
11382
11349
|
// src/spinner/Spinner.tsx
|
|
11383
11350
|
var import_react68 = require("react");
|
|
11384
11351
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
11385
|
-
var
|
|
11352
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
11386
11353
|
var SpinnerContainer = import_styled_components69.default.div`
|
|
11387
11354
|
${({ mode }) => mode === "overlay" && `
|
|
11388
11355
|
position: fixed;
|
|
@@ -11529,9 +11496,9 @@ var DxcSpinner = ({
|
|
|
11529
11496
|
const text = event.currentTarget;
|
|
11530
11497
|
setHasTooltip(text.scrollWidth > text.clientWidth);
|
|
11531
11498
|
};
|
|
11532
|
-
return /* @__PURE__ */ (0,
|
|
11533
|
-
mode === "overlay" && /* @__PURE__ */ (0,
|
|
11534
|
-
/* @__PURE__ */ (0,
|
|
11499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SpinnerContainer, { margin, mode, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(MainContainer5, { mode, children: [
|
|
11500
|
+
mode === "overlay" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Overlay5, {}),
|
|
11501
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SVGTotalTrack, { viewBox: mode === "small" ? "0 0 16 16" : "0 0 140 140", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
11535
11502
|
TotalTrack,
|
|
11536
11503
|
{
|
|
11537
11504
|
cx: mode === "small" ? "8" : "70",
|
|
@@ -11540,7 +11507,7 @@ var DxcSpinner = ({
|
|
|
11540
11507
|
r: mode === "small" ? "6" : "65"
|
|
11541
11508
|
}
|
|
11542
11509
|
) }),
|
|
11543
|
-
/* @__PURE__ */ (0,
|
|
11510
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
11544
11511
|
Spinner,
|
|
11545
11512
|
{
|
|
11546
11513
|
"aria-label": !label || mode === "small" ? ariaLabel : void 0,
|
|
@@ -11549,7 +11516,7 @@ var DxcSpinner = ({
|
|
|
11549
11516
|
"aria-valuemin": determined ? 0 : void 0,
|
|
11550
11517
|
"aria-valuenow": determined && showValue ? value : void 0,
|
|
11551
11518
|
role: determined ? "progressbar" : "status",
|
|
11552
|
-
children: /* @__PURE__ */ (0,
|
|
11519
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SVGSpinner, { determined, viewBox: mode === "small" ? "0 0 16 16" : "0 0 140 140", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
11553
11520
|
CircleSpinner,
|
|
11554
11521
|
{
|
|
11555
11522
|
cx: mode === "small" ? "8" : "70",
|
|
@@ -11563,9 +11530,9 @@ var DxcSpinner = ({
|
|
|
11563
11530
|
) })
|
|
11564
11531
|
}
|
|
11565
11532
|
),
|
|
11566
|
-
mode !== "small" && /* @__PURE__ */ (0,
|
|
11567
|
-
label && /* @__PURE__ */ (0,
|
|
11568
|
-
(value || value === 0) && showValue && /* @__PURE__ */ (0,
|
|
11533
|
+
mode !== "small" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TooltipWrapper, { condition: hasTooltip, label, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Labels, { mode, children: [
|
|
11534
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { id: labelId, onMouseEnter: handleLabelOnMouseEnter, children: label }),
|
|
11535
|
+
(value || value === 0) && showValue && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("strong", { children: [
|
|
11569
11536
|
value,
|
|
11570
11537
|
"%"
|
|
11571
11538
|
] })
|
|
@@ -11576,7 +11543,7 @@ var Spinner_default = DxcSpinner;
|
|
|
11576
11543
|
|
|
11577
11544
|
// src/status-light/StatusLight.tsx
|
|
11578
11545
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
11579
|
-
var
|
|
11546
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
11580
11547
|
var getModeColor = (mode) => {
|
|
11581
11548
|
switch (mode) {
|
|
11582
11549
|
case "default":
|
|
@@ -11633,16 +11600,16 @@ var Label8 = import_styled_components70.default.span`
|
|
|
11633
11600
|
white-space: nowrap;
|
|
11634
11601
|
`;
|
|
11635
11602
|
function DxcStatusLight({ label, mode = "default", size = "medium" }) {
|
|
11636
|
-
return /* @__PURE__ */ (0,
|
|
11637
|
-
/* @__PURE__ */ (0,
|
|
11638
|
-
/* @__PURE__ */ (0,
|
|
11603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(StatusLightContainer, { role: "status", size, children: [
|
|
11604
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Dot, { mode, size, "aria-hidden": "true" }),
|
|
11605
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Label8, { mode, size, children: label })
|
|
11639
11606
|
] });
|
|
11640
11607
|
}
|
|
11641
11608
|
|
|
11642
11609
|
// src/switch/Switch.tsx
|
|
11643
11610
|
var import_react69 = require("react");
|
|
11644
11611
|
var import_styled_components71 = __toESM(require("styled-components"));
|
|
11645
|
-
var
|
|
11612
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
11646
11613
|
var sizes7 = {
|
|
11647
11614
|
small: "60px",
|
|
11648
11615
|
medium: "240px",
|
|
@@ -11753,7 +11720,7 @@ var DxcSwitch = (0, import_react69.forwardRef)(
|
|
|
11753
11720
|
break;
|
|
11754
11721
|
}
|
|
11755
11722
|
};
|
|
11756
|
-
return /* @__PURE__ */ (0,
|
|
11723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
11757
11724
|
SwitchContainer,
|
|
11758
11725
|
{
|
|
11759
11726
|
"aria-checked": checked ?? innerChecked,
|
|
@@ -11769,12 +11736,12 @@ var DxcSwitch = (0, import_react69.forwardRef)(
|
|
|
11769
11736
|
size,
|
|
11770
11737
|
tabIndex: disabled ? -1 : tabIndex,
|
|
11771
11738
|
children: [
|
|
11772
|
-
label && /* @__PURE__ */ (0,
|
|
11773
|
-
/* @__PURE__ */ (0,
|
|
11774
|
-
optional && /* @__PURE__ */ (0,
|
|
11739
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(LabelContainer3, { disabled, labelPosition, children: [
|
|
11740
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Label9, { children: label }),
|
|
11741
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(OptionalLabel2, { disabled, children: translatedLabels.formFields.optionalLabel })
|
|
11775
11742
|
] }),
|
|
11776
|
-
/* @__PURE__ */ (0,
|
|
11777
|
-
/* @__PURE__ */ (0,
|
|
11743
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Switch, { checked: checked ?? innerChecked, disabled }),
|
|
11744
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
11778
11745
|
"input",
|
|
11779
11746
|
{
|
|
11780
11747
|
"aria-hidden": true,
|
|
@@ -11806,7 +11773,7 @@ var TabsContext_default = (0, import_react70.createContext)(null);
|
|
|
11806
11773
|
// src/tabs/Tab.tsx
|
|
11807
11774
|
var import_react71 = require("react");
|
|
11808
11775
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11809
|
-
var
|
|
11776
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
11810
11777
|
var sharedTabStyles = `
|
|
11811
11778
|
background-color: var(--color-bg-neutral-lightest);
|
|
11812
11779
|
color: var(--color-fg-neutral-stronger);
|
|
@@ -11877,7 +11844,7 @@ var Underline3 = import_styled_components72.default.span`
|
|
|
11877
11844
|
background-color: ${({ active }) => active ? "var(--border-color-primary-stronger)" : "var(--border-color-neutral-medium)"};
|
|
11878
11845
|
`;
|
|
11879
11846
|
var DxcTab = (0, import_react71.forwardRef)(
|
|
11880
|
-
({ active, disabled, icon, label, notificationNumber, onClick, onHover, title, tabId }, ref) => {
|
|
11847
|
+
({ active, disabled, icon, label, notificationNumber, onClick, onHover, title, tabId = label }, ref) => {
|
|
11881
11848
|
const {
|
|
11882
11849
|
activeTabId,
|
|
11883
11850
|
focusedTabId,
|
|
@@ -11902,9 +11869,9 @@ var DxcTab = (0, import_react71.forwardRef)(
|
|
|
11902
11869
|
if (focusedTabId === tabId) tabRef?.current?.focus();
|
|
11903
11870
|
}, [focusedTabId, tabId]);
|
|
11904
11871
|
(0, import_react71.useEffect)(() => {
|
|
11905
|
-
if (active) setActiveTabId?.(tabId);
|
|
11872
|
+
if (active) setActiveTabId?.(tabId ?? "");
|
|
11906
11873
|
}, [active, tabId, setActiveTabId]);
|
|
11907
|
-
return /* @__PURE__ */ (0,
|
|
11874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Tooltip, { label: title, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
11908
11875
|
Tab2,
|
|
11909
11876
|
{
|
|
11910
11877
|
"aria-selected": activeTabId === tabId,
|
|
@@ -11912,7 +11879,9 @@ var DxcTab = (0, import_react71.forwardRef)(
|
|
|
11912
11879
|
hasLabelAndIcon: Boolean(icon && label),
|
|
11913
11880
|
iconPosition,
|
|
11914
11881
|
onClick: () => {
|
|
11915
|
-
if (!isControlled)
|
|
11882
|
+
if (!isControlled) {
|
|
11883
|
+
setActiveTabId?.(tabId ?? "");
|
|
11884
|
+
}
|
|
11916
11885
|
onClick?.();
|
|
11917
11886
|
},
|
|
11918
11887
|
onKeyDown: handleOnKeyDown,
|
|
@@ -11930,12 +11899,13 @@ var DxcTab = (0, import_react71.forwardRef)(
|
|
|
11930
11899
|
role: "tab",
|
|
11931
11900
|
tabIndex: activeTabId === label && !disabled ? tabIndex : -1,
|
|
11932
11901
|
type: "button",
|
|
11902
|
+
"aria-label": label ?? tabId ?? "tab",
|
|
11933
11903
|
children: [
|
|
11934
|
-
/* @__PURE__ */ (0,
|
|
11935
|
-
icon && /* @__PURE__ */ (0,
|
|
11936
|
-
/* @__PURE__ */ (0,
|
|
11904
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(LabelIconContainer, { iconPosition, children: [
|
|
11905
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IconContainer8, { children: typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DxcIcon, { icon }) : icon }),
|
|
11906
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Label10, { children: label })
|
|
11937
11907
|
] }),
|
|
11938
|
-
!disabled && notificationNumber && /* @__PURE__ */ (0,
|
|
11908
|
+
!disabled && notificationNumber && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(BadgeContainer2, { hasLabelAndIcon: Boolean(icon && label), iconPosition, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
11939
11909
|
Badge_default,
|
|
11940
11910
|
{
|
|
11941
11911
|
label: typeof notificationNumber === "number" ? notificationNumber : void 0,
|
|
@@ -11943,7 +11913,7 @@ var DxcTab = (0, import_react71.forwardRef)(
|
|
|
11943
11913
|
size: "small"
|
|
11944
11914
|
}
|
|
11945
11915
|
) }),
|
|
11946
|
-
/* @__PURE__ */ (0,
|
|
11916
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Underline3, { active: activeTabId === tabId })
|
|
11947
11917
|
]
|
|
11948
11918
|
}
|
|
11949
11919
|
) });
|
|
@@ -11958,9 +11928,9 @@ var import_styled_components74 = __toESM(require("styled-components"));
|
|
|
11958
11928
|
// src/tabs/TabLegacy.tsx
|
|
11959
11929
|
var import_react72 = require("react");
|
|
11960
11930
|
var import_styled_components73 = __toESM(require("styled-components"));
|
|
11961
|
-
var
|
|
11931
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
11962
11932
|
var Tab3 = (0, import_react72.forwardRef)(
|
|
11963
|
-
({ active, tab, tabIndex, hasLabelAndIcon, iconPosition, onClick, onMouseEnter, onMouseLeave }, ref) => /* @__PURE__ */ (0,
|
|
11933
|
+
({ active, tab, tabIndex, hasLabelAndIcon, iconPosition, onClick, onMouseEnter, onMouseLeave }, ref) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
11964
11934
|
TabContainer2,
|
|
11965
11935
|
{
|
|
11966
11936
|
role: "tab",
|
|
@@ -11981,7 +11951,7 @@ var Tab3 = (0, import_react72.forwardRef)(
|
|
|
11981
11951
|
onMouseLeave();
|
|
11982
11952
|
},
|
|
11983
11953
|
children: [
|
|
11984
|
-
/* @__PURE__ */ (0,
|
|
11954
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
11985
11955
|
MainLabelContainer,
|
|
11986
11956
|
{
|
|
11987
11957
|
notificationNumber: tab.notificationNumber,
|
|
@@ -11989,12 +11959,12 @@ var Tab3 = (0, import_react72.forwardRef)(
|
|
|
11989
11959
|
iconPosition,
|
|
11990
11960
|
disabled: tab.isDisabled,
|
|
11991
11961
|
children: [
|
|
11992
|
-
tab.icon && /* @__PURE__ */ (0,
|
|
11993
|
-
/* @__PURE__ */ (0,
|
|
11962
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TabIconContainer, { hasLabelAndIcon, iconPosition, children: typeof tab.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(DxcIcon, { icon: tab.icon }) : tab.icon }),
|
|
11963
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LabelContainer4, { disabled: tab.isDisabled, active, children: tab.label })
|
|
11994
11964
|
]
|
|
11995
11965
|
}
|
|
11996
11966
|
),
|
|
11997
|
-
tab.notificationNumber && !tab.isDisabled && /* @__PURE__ */ (0,
|
|
11967
|
+
tab.notificationNumber && !tab.isDisabled && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(BadgeContainer3, { hasLabelAndIcon, iconPosition, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
11998
11968
|
Badge_default,
|
|
11999
11969
|
{
|
|
12000
11970
|
mode: "notification",
|
|
@@ -12106,7 +12076,7 @@ var TabIconContainer = import_styled_components73.default.div`
|
|
|
12106
12076
|
var TabLegacy_default = (0, import_react72.memo)(Tab3);
|
|
12107
12077
|
|
|
12108
12078
|
// src/tabs/TabsLegacy.tsx
|
|
12109
|
-
var
|
|
12079
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
12110
12080
|
var useResize = (refTabList) => {
|
|
12111
12081
|
const [viewWidth, setViewWidth] = (0, import_react73.useState)(0);
|
|
12112
12082
|
const handleWindowSizeChange = (0, import_react73.useCallback)(() => {
|
|
@@ -12303,10 +12273,10 @@ var DxcTabs = ({
|
|
|
12303
12273
|
};
|
|
12304
12274
|
const isTabActive = (index) => activeTabIndex != null && activeTabIndex >= 0 ? activeTabIndex === index : innerActiveTabIndex === index;
|
|
12305
12275
|
const isActiveIndicatorDisabled = firstFocus === -1 || tabs != null && activeTabIndex !== void 0 && activeTabIndex >= 0 && !!tabs[activeTabIndex]?.isDisabled;
|
|
12306
|
-
return /* @__PURE__ */ (0,
|
|
12307
|
-
/* @__PURE__ */ (0,
|
|
12308
|
-
/* @__PURE__ */ (0,
|
|
12309
|
-
/* @__PURE__ */ (0,
|
|
12276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_styled_components74.ThemeProvider, { theme: colorsTheme.tabs, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(TabsContainer, { margin, children: [
|
|
12277
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Underline4, {}),
|
|
12278
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Tabs, { hasLabelAndIcon, iconPosition, children: [
|
|
12279
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
12310
12280
|
ScrollIndicator,
|
|
12311
12281
|
{
|
|
12312
12282
|
onClick: scrollLeft,
|
|
@@ -12315,11 +12285,11 @@ var DxcTabs = ({
|
|
|
12315
12285
|
"aria-label": translatedLabels.tabs.scrollLeft,
|
|
12316
12286
|
tabIndex: scrollLeftEnabled ? tabIndex : -1,
|
|
12317
12287
|
minHeightTabs,
|
|
12318
|
-
children: /* @__PURE__ */ (0,
|
|
12288
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(DxcIcon, { icon: "keyboard_arrow_left" })
|
|
12319
12289
|
}
|
|
12320
12290
|
),
|
|
12321
|
-
/* @__PURE__ */ (0,
|
|
12322
|
-
/* @__PURE__ */ (0,
|
|
12291
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TabsContent, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(TabsContentScroll, { translateScroll, ref: refTabList, enabled: enabledIndicator, children: [
|
|
12292
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TabList, { role: "tablist", onKeyDown: handleOnKeyDown, minHeightTabs, children: tabs?.map((tab, i) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
12323
12293
|
TabLegacy_default,
|
|
12324
12294
|
{
|
|
12325
12295
|
tab,
|
|
@@ -12344,7 +12314,7 @@ var DxcTabs = ({
|
|
|
12344
12314
|
},
|
|
12345
12315
|
`tab-${i}`
|
|
12346
12316
|
)) }),
|
|
12347
|
-
/* @__PURE__ */ (0,
|
|
12317
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
12348
12318
|
ActiveIndicator,
|
|
12349
12319
|
{
|
|
12350
12320
|
tabWidth: activeIndicatorWidth,
|
|
@@ -12353,7 +12323,7 @@ var DxcTabs = ({
|
|
|
12353
12323
|
}
|
|
12354
12324
|
)
|
|
12355
12325
|
] }) }),
|
|
12356
|
-
/* @__PURE__ */ (0,
|
|
12326
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
12357
12327
|
ScrollIndicator,
|
|
12358
12328
|
{
|
|
12359
12329
|
onClick: scrollRight,
|
|
@@ -12362,7 +12332,7 @@ var DxcTabs = ({
|
|
|
12362
12332
|
"aria-label": translatedLabels.tabs.scrollRight,
|
|
12363
12333
|
tabIndex: scrollRightEnabled ? tabIndex : -1,
|
|
12364
12334
|
minHeightTabs,
|
|
12365
|
-
children: /* @__PURE__ */ (0,
|
|
12335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(DxcIcon, { icon: "keyboard_arrow_right" })
|
|
12366
12336
|
}
|
|
12367
12337
|
)
|
|
12368
12338
|
] })
|
|
@@ -12488,7 +12458,7 @@ var getPreviousTabIndex2 = (array, initialIndex) => {
|
|
|
12488
12458
|
};
|
|
12489
12459
|
|
|
12490
12460
|
// src/tabs/Tabs.tsx
|
|
12491
|
-
var
|
|
12461
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
12492
12462
|
var TabsContainer2 = import_styled_components75.default.div`
|
|
12493
12463
|
position: relative;
|
|
12494
12464
|
margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
|
|
@@ -12567,7 +12537,7 @@ var DxcTabs2 = ({
|
|
|
12567
12537
|
const initialActiveTab = hasActiveChild ? childrenArray.find(
|
|
12568
12538
|
(child) => (0, import_react74.isValidElement)(child) && (child.props.active || child.props.defaultActive) && !child.props.disabled
|
|
12569
12539
|
) : childrenArray.find((child) => (0, import_react74.isValidElement)(child) && !child.props.disabled);
|
|
12570
|
-
return (0, import_react74.isValidElement)(initialActiveTab) ? initialActiveTab.props.tabId : "";
|
|
12540
|
+
return (0, import_react74.isValidElement)(initialActiveTab) ? initialActiveTab.props.label ?? initialActiveTab.props.tabId : "";
|
|
12571
12541
|
});
|
|
12572
12542
|
const [countClick, setCountClick] = (0, import_react74.useState)(0);
|
|
12573
12543
|
const [innerFocusIndex, setInnerFocusIndex] = (0, import_react74.useState)(null);
|
|
@@ -12582,7 +12552,7 @@ var DxcTabs2 = ({
|
|
|
12582
12552
|
const focusedChild = innerFocusIndex != null ? childrenArray[innerFocusIndex] : null;
|
|
12583
12553
|
return {
|
|
12584
12554
|
activeTabId,
|
|
12585
|
-
focusedTabId: (0, import_react74.isValidElement)(focusedChild) ? focusedChild.props.tabId : "",
|
|
12555
|
+
focusedTabId: (0, import_react74.isValidElement)(focusedChild) ? focusedChild.props.label ?? focusedChild.props.tabId : "",
|
|
12586
12556
|
iconPosition,
|
|
12587
12557
|
isControlled: childrenArray.some((child) => (0, import_react74.isValidElement)(child) && typeof child.props.active !== "undefined"),
|
|
12588
12558
|
setActiveTabId,
|
|
@@ -12620,7 +12590,9 @@ var DxcTabs2 = ({
|
|
|
12620
12590
|
setCountClick(moveX);
|
|
12621
12591
|
};
|
|
12622
12592
|
const handleOnKeyDown = (event) => {
|
|
12623
|
-
const activeTab = childrenArray.findIndex(
|
|
12593
|
+
const activeTab = childrenArray.findIndex(
|
|
12594
|
+
(child) => (child.props.label ?? child.props.tabId) === activeTabId
|
|
12595
|
+
);
|
|
12624
12596
|
switch (event.key) {
|
|
12625
12597
|
case "Left":
|
|
12626
12598
|
case "ArrowLeft":
|
|
@@ -12651,21 +12623,21 @@ var DxcTabs2 = ({
|
|
|
12651
12623
|
return total;
|
|
12652
12624
|
});
|
|
12653
12625
|
}, []);
|
|
12654
|
-
return children ? /* @__PURE__ */ (0,
|
|
12655
|
-
/* @__PURE__ */ (0,
|
|
12656
|
-
/* @__PURE__ */ (0,
|
|
12657
|
-
/* @__PURE__ */ (0,
|
|
12658
|
-
viewWidth < totalTabsWidth && /* @__PURE__ */ (0,
|
|
12626
|
+
return children ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
12627
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(TabsContainer2, { margin, children: [
|
|
12628
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Underline5, {}),
|
|
12629
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(Tabs2, { children: [
|
|
12630
|
+
viewWidth < totalTabsWidth && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
12659
12631
|
ScrollIndicatorButton,
|
|
12660
12632
|
{
|
|
12661
12633
|
"aria-label": translatedLabels.tabs.scrollLeft,
|
|
12662
12634
|
disabled: !scrollLeftEnabled,
|
|
12663
12635
|
onClick: scrollLeft,
|
|
12664
12636
|
tabIndex: scrollLeftEnabled ? tabIndex : -1,
|
|
12665
|
-
children: /* @__PURE__ */ (0,
|
|
12637
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(DxcIcon, { icon: "keyboard_arrow_left" })
|
|
12666
12638
|
}
|
|
12667
12639
|
),
|
|
12668
|
-
/* @__PURE__ */ (0,
|
|
12640
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabsContent2, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
12669
12641
|
ScrollableTabsList,
|
|
12670
12642
|
{
|
|
12671
12643
|
enabled: viewWidth < totalTabsWidth,
|
|
@@ -12674,17 +12646,17 @@ var DxcTabs2 = ({
|
|
|
12674
12646
|
ref: refTabList,
|
|
12675
12647
|
role: "tablist",
|
|
12676
12648
|
translateScroll,
|
|
12677
|
-
children: /* @__PURE__ */ (0,
|
|
12649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabsContext_default.Provider, { value: contextValue, children })
|
|
12678
12650
|
}
|
|
12679
12651
|
) }),
|
|
12680
|
-
viewWidth < totalTabsWidth && /* @__PURE__ */ (0,
|
|
12652
|
+
viewWidth < totalTabsWidth && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
12681
12653
|
ScrollIndicatorButton,
|
|
12682
12654
|
{
|
|
12683
12655
|
"aria-label": translatedLabels.tabs.scrollRight,
|
|
12684
12656
|
disabled: !scrollRightEnabled,
|
|
12685
12657
|
onClick: scrollRight,
|
|
12686
12658
|
tabIndex: scrollRightEnabled ? tabIndex : -1,
|
|
12687
|
-
children: /* @__PURE__ */ (0,
|
|
12659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(DxcIcon, { icon: "keyboard_arrow_right" })
|
|
12688
12660
|
}
|
|
12689
12661
|
)
|
|
12690
12662
|
] })
|
|
@@ -12693,7 +12665,7 @@ var DxcTabs2 = ({
|
|
|
12693
12665
|
children,
|
|
12694
12666
|
(child) => (0, import_react74.isValidElement)(child) && child.props.tabId === activeTabId ? child.props.children : null
|
|
12695
12667
|
)
|
|
12696
|
-
] }) : tabs != null && /* @__PURE__ */ (0,
|
|
12668
|
+
] }) : tabs != null && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
12697
12669
|
TabsLegacy_default,
|
|
12698
12670
|
{
|
|
12699
12671
|
activeTabIndex,
|
|
@@ -12713,7 +12685,7 @@ var Tabs_default = DxcTabs2;
|
|
|
12713
12685
|
// src/textarea/Textarea.tsx
|
|
12714
12686
|
var import_react75 = require("react");
|
|
12715
12687
|
var import_styled_components76 = __toESM(require("styled-components"));
|
|
12716
|
-
var
|
|
12688
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
12717
12689
|
var sizes8 = {
|
|
12718
12690
|
small: "240px",
|
|
12719
12691
|
medium: "360px",
|
|
@@ -12834,14 +12806,14 @@ var DxcTextarea = (0, import_react75.forwardRef)(
|
|
|
12834
12806
|
prevValueRef.current = value ?? innerValue;
|
|
12835
12807
|
}
|
|
12836
12808
|
}, [innerValue, rows, value, verticalGrow]);
|
|
12837
|
-
return /* @__PURE__ */ (0,
|
|
12838
|
-
label && /* @__PURE__ */ (0,
|
|
12809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(TextareaContainer, { margin, size, ref, children: [
|
|
12810
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Label_default, { disabled, hasMargin: !helperText, htmlFor: textareaId, children: [
|
|
12839
12811
|
label,
|
|
12840
12812
|
" ",
|
|
12841
|
-
optional && /* @__PURE__ */ (0,
|
|
12813
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: translatedLabels.formFields.optionalLabel })
|
|
12842
12814
|
] }),
|
|
12843
|
-
helperText && /* @__PURE__ */ (0,
|
|
12844
|
-
/* @__PURE__ */ (0,
|
|
12815
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(HelperText_default, { disabled, hasMargin: true, children: helperText }),
|
|
12816
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
12845
12817
|
Textarea,
|
|
12846
12818
|
{
|
|
12847
12819
|
"aria-errormessage": error ? errorId : void 0,
|
|
@@ -12866,7 +12838,7 @@ var DxcTextarea = (0, import_react75.forwardRef)(
|
|
|
12866
12838
|
verticalGrow
|
|
12867
12839
|
}
|
|
12868
12840
|
),
|
|
12869
|
-
!disabled && typeof error === "string" && /* @__PURE__ */ (0,
|
|
12841
|
+
!disabled && typeof error === "string" && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ErrorMessage_default, { error, id: errorId })
|
|
12870
12842
|
] });
|
|
12871
12843
|
}
|
|
12872
12844
|
);
|
|
@@ -12943,7 +12915,7 @@ function generateUniqueToastId(toasts) {
|
|
|
12943
12915
|
|
|
12944
12916
|
// src/toast/ToastIcon.tsx
|
|
12945
12917
|
var import_react77 = require("react");
|
|
12946
|
-
var
|
|
12918
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
12947
12919
|
var ToastIcon = (0, import_react77.memo)(
|
|
12948
12920
|
({
|
|
12949
12921
|
icon,
|
|
@@ -12951,15 +12923,15 @@ var ToastIcon = (0, import_react77.memo)(
|
|
|
12951
12923
|
loading,
|
|
12952
12924
|
semantic
|
|
12953
12925
|
}) => {
|
|
12954
|
-
if (semantic === "default") return typeof icon === "string" ? /* @__PURE__ */ (0,
|
|
12955
|
-
else if (semantic === "info" && loading) return /* @__PURE__ */ (0,
|
|
12956
|
-
else return !hideSemanticIcon && /* @__PURE__ */ (0,
|
|
12926
|
+
if (semantic === "default") return typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DxcIcon, { icon }) : icon;
|
|
12927
|
+
else if (semantic === "info" && loading) return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Spinner_default, { inheritColor: true, mode: "small" });
|
|
12928
|
+
else return !hideSemanticIcon && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DxcIcon, { icon: getSemantic(semantic).icon });
|
|
12957
12929
|
}
|
|
12958
12930
|
);
|
|
12959
12931
|
var ToastIcon_default = ToastIcon;
|
|
12960
12932
|
|
|
12961
12933
|
// src/toast/Toast.tsx
|
|
12962
|
-
var
|
|
12934
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
12963
12935
|
var fadeInUp = import_styled_components77.keyframes`
|
|
12964
12936
|
0% {
|
|
12965
12937
|
transform: translateY(100%);
|
|
@@ -13045,13 +13017,13 @@ var DxcToast = ({
|
|
|
13045
13017
|
},
|
|
13046
13018
|
loading ? void 0 : duration
|
|
13047
13019
|
);
|
|
13048
|
-
return /* @__PURE__ */ (0,
|
|
13049
|
-
/* @__PURE__ */ (0,
|
|
13050
|
-
/* @__PURE__ */ (0,
|
|
13051
|
-
/* @__PURE__ */ (0,
|
|
13020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Toast, { isClosing, role: "status", semantic, children: [
|
|
13021
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(ContentContainer2, { loading, semantic, children: [
|
|
13022
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToastIcon_default, { hideSemanticIcon, icon, loading, semantic }),
|
|
13023
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Message2, { children: message })
|
|
13052
13024
|
] }),
|
|
13053
|
-
/* @__PURE__ */ (0,
|
|
13054
|
-
action && /* @__PURE__ */ (0,
|
|
13025
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Flex_default, { alignItems: "center", gap: "var(--spacing-gap-xs)", children: [
|
|
13026
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
13055
13027
|
Button_default,
|
|
13056
13028
|
{
|
|
13057
13029
|
icon: action.icon,
|
|
@@ -13062,7 +13034,7 @@ var DxcToast = ({
|
|
|
13062
13034
|
size: { height: "small" }
|
|
13063
13035
|
}
|
|
13064
13036
|
),
|
|
13065
|
-
/* @__PURE__ */ (0,
|
|
13037
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
13066
13038
|
ActionIcon_default,
|
|
13067
13039
|
{
|
|
13068
13040
|
icon: "clear",
|
|
@@ -13089,7 +13061,7 @@ var import_react79 = require("react");
|
|
|
13089
13061
|
var ToastContext_default = (0, import_react79.createContext)(null);
|
|
13090
13062
|
|
|
13091
13063
|
// src/toast/ToastsQueue.tsx
|
|
13092
|
-
var
|
|
13064
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
13093
13065
|
var ToastsQueue = import_styled_components78.default.section`
|
|
13094
13066
|
box-sizing: border-box;
|
|
13095
13067
|
position: fixed;
|
|
@@ -13125,9 +13097,9 @@ function DxcToastsQueue({ children, duration = 3e3 }) {
|
|
|
13125
13097
|
(0, import_react80.useEffect)(() => {
|
|
13126
13098
|
setIsMounted(true);
|
|
13127
13099
|
}, []);
|
|
13128
|
-
return /* @__PURE__ */ (0,
|
|
13100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(ToastContext_default.Provider, { value: add, children: [
|
|
13129
13101
|
isMounted && (0, import_react_dom3.createPortal)(
|
|
13130
|
-
/* @__PURE__ */ (0,
|
|
13102
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ToastsQueue, { children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
13131
13103
|
Toast_default,
|
|
13132
13104
|
{
|
|
13133
13105
|
duration: adjustedDuration,
|
|
@@ -13147,7 +13119,7 @@ function DxcToastsQueue({ children, duration = 3e3 }) {
|
|
|
13147
13119
|
// src/toggle-group/ToggleGroup.tsx
|
|
13148
13120
|
var import_react81 = require("react");
|
|
13149
13121
|
var import_styled_components79 = __toESM(require("styled-components"));
|
|
13150
|
-
var
|
|
13122
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
13151
13123
|
var ToggleGroup = import_styled_components79.default.div`
|
|
13152
13124
|
display: flex;
|
|
13153
13125
|
&[aria-orientation="vertical"] {
|
|
@@ -13227,9 +13199,9 @@ function DxcToggleGroup({
|
|
|
13227
13199
|
break;
|
|
13228
13200
|
}
|
|
13229
13201
|
};
|
|
13230
|
-
return /* @__PURE__ */ (0,
|
|
13202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ToggleGroup, { "aria-orientation": orientation, margin, role: "toolbar", children: options.map((option, i) => {
|
|
13231
13203
|
const selected = !option.disabled && isToggleButtonSelected(multiple, option.value, value ?? selectedValue);
|
|
13232
|
-
return /* @__PURE__ */ (0,
|
|
13204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Tooltip, { label: option.title, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
13233
13205
|
ToggleButton,
|
|
13234
13206
|
{
|
|
13235
13207
|
"aria-label": option.title,
|
|
@@ -13245,8 +13217,8 @@ function DxcToggleGroup({
|
|
|
13245
13217
|
selected,
|
|
13246
13218
|
tabIndex: !option.disabled ? tabIndex : -1,
|
|
13247
13219
|
children: [
|
|
13248
|
-
option.icon && /* @__PURE__ */ (0,
|
|
13249
|
-
option.label && /* @__PURE__ */ (0,
|
|
13220
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(IconContainer9, { children: typeof option.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DxcIcon, { icon: option.icon }) : option.icon }),
|
|
13221
|
+
option.label && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { children: option.label })
|
|
13250
13222
|
]
|
|
13251
13223
|
}
|
|
13252
13224
|
) }, `toggle-${i}-${option.label}`);
|
|
@@ -13258,16 +13230,16 @@ var import_react82 = require("react");
|
|
|
13258
13230
|
var import_styled_components80 = __toESM(require("styled-components"));
|
|
13259
13231
|
|
|
13260
13232
|
// src/wizard/Icons.tsx
|
|
13261
|
-
var
|
|
13233
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
13262
13234
|
var icons3 = {
|
|
13263
|
-
valid: /* @__PURE__ */ (0,
|
|
13235
|
+
valid: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
13264
13236
|
"path",
|
|
13265
13237
|
{
|
|
13266
13238
|
d: "M9 0C7.21997 0 5.47991 0.527841 3.99987 1.51677C2.51983 2.50571 1.36628 3.91131 0.685088 5.55585C0.00389949 7.20038 -0.17433 9.00998 0.172937 10.7558C0.520203 12.5016 1.37737 14.1053 2.63604 15.364C3.89471 16.6226 5.49836 17.4798 7.24419 17.8271C8.99002 18.1743 10.7996 17.9961 12.4442 17.3149C14.0887 16.6337 15.4943 15.4802 16.4832 14.0001C17.4722 12.5201 18 10.78 18 9C17.9978 6.61373 17.0488 4.32584 15.3615 2.6385C13.6742 0.951152 11.3863 0.00222614 9 0ZM9 16.1995C7.57607 16.1995 6.18412 15.7773 5.00016 14.9862C3.81621 14.1951 2.89343 13.0707 2.34851 11.7551C1.8036 10.4396 1.66103 8.99201 1.93882 7.59544C2.21662 6.19887 2.9023 4.91604 3.90917 3.90917C4.91605 2.9023 6.19888 2.21661 7.59545 1.93882C8.99202 1.66102 10.4396 1.8036 11.7551 2.34851C13.0707 2.89343 14.1951 3.81621 14.9862 5.00016C15.7773 6.18411 16.1995 7.57607 16.1995 9C16.1976 10.9088 15.4385 12.739 14.0887 14.0887C12.739 15.4385 10.9088 16.1976 9 16.1995ZM13.1307 5.02189L7.19952 10.953L4.86935 8.63125L3.60337 9.89964L7.20673 13.503L14.4062 6.30348L13.1307 5.02189Z",
|
|
13267
13239
|
fill: "currentColor"
|
|
13268
13240
|
}
|
|
13269
13241
|
) }),
|
|
13270
|
-
invalid: /* @__PURE__ */ (0,
|
|
13242
|
+
invalid: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
13271
13243
|
"path",
|
|
13272
13244
|
{
|
|
13273
13245
|
d: "M11.3328 5.4L9 7.7316L6.6696 5.4L5.4 6.6696L7.7316 9L5.4 11.3328L6.6696 12.6L9 10.2696L11.3328 12.6L12.6 11.3328L10.2696 9L12.6 6.6696L11.3328 5.4ZM9 2.88488e-06C7.21997 2.88488e-06 5.47991 0.527844 3.99987 1.51678C2.51983 2.50571 1.36628 3.91132 0.685088 5.55585C0.00389957 7.20038 -0.17433 9.00998 0.172936 10.7558C0.520203 12.5016 1.37737 14.1053 2.63604 15.364C3.89471 16.6226 5.49836 17.4798 7.24419 17.8271C8.99002 18.1743 10.7996 17.9961 12.4441 17.3149C14.0887 16.6337 15.4943 15.4802 16.4832 14.0001C17.4722 12.5201 18 10.78 18 9C18.0009 7.81784 17.7688 6.64709 17.3168 5.55473C16.8649 4.46237 16.202 3.46985 15.3661 2.63393C14.5302 1.79801 13.5376 1.13512 12.4453 0.683158C11.3529 0.231201 10.1822 -0.000943982 9 2.88488e-06ZM9 16.2C7.57598 16.2 6.18393 15.7777 4.9999 14.9866C3.81586 14.1954 2.89302 13.0709 2.34807 11.7553C1.80312 10.4397 1.66054 8.99201 1.93835 7.59535C2.21616 6.19869 2.9019 4.91577 3.90883 3.90883C4.91577 2.9019 6.19869 2.21616 7.59535 1.93835C8.99201 1.66053 10.4397 1.80312 11.7553 2.34807C13.0709 2.89302 14.1954 3.81586 14.9866 4.9999C15.7777 6.18393 16.2 7.57597 16.2 9C16.1971 10.9087 15.4377 12.7384 14.088 14.088C12.7384 15.4377 10.9087 16.1971 9 16.2Z",
|
|
@@ -13278,7 +13250,7 @@ var icons3 = {
|
|
|
13278
13250
|
var Icons_default2 = icons3;
|
|
13279
13251
|
|
|
13280
13252
|
// src/wizard/Wizard.tsx
|
|
13281
|
-
var
|
|
13253
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
13282
13254
|
var Wizard = import_styled_components80.default.div`
|
|
13283
13255
|
display: flex;
|
|
13284
13256
|
flex-direction: ${({ mode }) => mode === "vertical" ? "column" : "row"};
|
|
@@ -13407,8 +13379,8 @@ function DxcWizard({
|
|
|
13407
13379
|
setInnerCurrentStep(newValue);
|
|
13408
13380
|
onStepClick?.(newValue);
|
|
13409
13381
|
};
|
|
13410
|
-
return /* @__PURE__ */ (0,
|
|
13411
|
-
/* @__PURE__ */ (0,
|
|
13382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Wizard, { margin, mode, role: "group", children: steps.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(StepContainer, { lastStep: i === steps.length - 1, mode, children: [
|
|
13383
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
13412
13384
|
Step,
|
|
13413
13385
|
{
|
|
13414
13386
|
"aria-current": (currentStep ?? innerCurrent) === i ? "step" : false,
|
|
@@ -13420,26 +13392,26 @@ function DxcWizard({
|
|
|
13420
13392
|
tabIndex,
|
|
13421
13393
|
unvisited: i > (currentStep ?? innerCurrent),
|
|
13422
13394
|
children: [
|
|
13423
|
-
/* @__PURE__ */ (0,
|
|
13424
|
-
/* @__PURE__ */ (0,
|
|
13395
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(StepIndicator, { hasValidityIcon: step.valid != null, children: [
|
|
13396
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
13425
13397
|
IconContainer10,
|
|
13426
13398
|
{
|
|
13427
13399
|
current: i === (currentStep ?? innerCurrent),
|
|
13428
13400
|
disabled: step.disabled,
|
|
13429
13401
|
visited: i < (currentStep ?? innerCurrent),
|
|
13430
|
-
children: step.icon ? typeof step.icon === "string" ? /* @__PURE__ */ (0,
|
|
13402
|
+
children: step.icon ? typeof step.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(DxcIcon, { icon: step.icon }) : step.icon : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Number3, { children: i + 1 })
|
|
13431
13403
|
}
|
|
13432
13404
|
),
|
|
13433
|
-
step.valid != null && /* @__PURE__ */ (0,
|
|
13405
|
+
step.valid != null && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ValidityIconContainer, { disabled: step.disabled, valid: step.valid, children: step.valid ? Icons_default2.valid : Icons_default2.invalid })
|
|
13434
13406
|
] }),
|
|
13435
|
-
(step.label || step.description) && /* @__PURE__ */ (0,
|
|
13436
|
-
step.label && /* @__PURE__ */ (0,
|
|
13437
|
-
step.description && /* @__PURE__ */ (0,
|
|
13407
|
+
(step.label || step.description) && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Flex_default, { direction: "column", alignItems: "flex-start", children: [
|
|
13408
|
+
step.label && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Label11, { children: step.label }),
|
|
13409
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Description, { children: step.description })
|
|
13438
13410
|
] })
|
|
13439
13411
|
]
|
|
13440
13412
|
}
|
|
13441
13413
|
),
|
|
13442
|
-
i !== steps.length - 1 && /* @__PURE__ */ (0,
|
|
13414
|
+
i !== steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(DividerContainer, { mode, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(DxcDivider, { color: "darkGrey", orientation: mode }) })
|
|
13443
13415
|
] }, `step${i}`)) });
|
|
13444
13416
|
}
|
|
13445
13417
|
|