@dxc-technology/halstack-react 0.0.0-d004266 → 0.0.0-d016030

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.mjs CHANGED
@@ -583,15 +583,8 @@ var componentTokens = {
583
583
  dialog: {
584
584
  overlayColor: coreTokens_default.color_grey_800_a,
585
585
  backgroundColor: coreTokens_default.color_white,
586
- closeIconSize: "24px",
587
- closeIconTopPosition: "20px",
588
- closeIconRightPosition: "20px",
589
586
  closeIconBackgroundColor: coreTokens_default.color_transparent,
590
- closeIconBorderColor: coreTokens_default.border_none,
591
587
  closeIconColor: coreTokens_default.color_black,
592
- closeIconBorderThickness: coreTokens_default.border_width_0,
593
- closeIconBorderStyle: coreTokens_default.border_solid,
594
- closeIconBorderRadius: "2px",
595
588
  boxShadowOffsetX: "0px",
596
589
  boxShadowOffsetY: "1px",
597
590
  boxShadowBlur: "3px",
@@ -726,15 +719,15 @@ var componentTokens = {
726
719
  },
727
720
  header: {
728
721
  backgroundColor: coreTokens_default.color_white,
729
- hamburguerFocusColor: coreTokens_default.color_blue_600,
730
- hamburguerFontFamily: coreTokens_default.type_sans,
731
- hamburguerFontStyle: coreTokens_default.type_normal,
732
- hamburguerFontColor: coreTokens_default.color_black,
733
- hamburguerFontSize: "10px",
734
- hamburguerFontWeight: coreTokens_default.type_semibold,
735
- hamburguerTextTransform: coreTokens_default.type_uppercase,
736
- hamburguerIconColor: coreTokens_default.color_black,
737
- hamburguerHoverColor: coreTokens_default.color_grey_200,
722
+ hamburgerFocusColor: coreTokens_default.color_blue_600,
723
+ hamburgerFontFamily: coreTokens_default.type_sans,
724
+ hamburgerFontStyle: coreTokens_default.type_normal,
725
+ hamburgerFontColor: coreTokens_default.color_black,
726
+ hamburgerFontSize: "10px",
727
+ hamburgerFontWeight: coreTokens_default.type_semibold,
728
+ hamburgerTextTransform: coreTokens_default.type_uppercase,
729
+ hamburgerIconColor: coreTokens_default.color_black,
730
+ hamburgerHoverColor: coreTokens_default.color_grey_200,
738
731
  logo: "",
739
732
  logoResponsive: "",
740
733
  logoHeight: "40px",
@@ -1554,7 +1547,7 @@ var defaultTranslatedComponentLabels = {
1554
1547
  },
1555
1548
  header: {
1556
1549
  closeIcon: "Close menu",
1557
- hamburguerTitle: "Menu"
1550
+ hamburgerTitle: "Menu"
1558
1551
  },
1559
1552
  numberInput: {
1560
1553
  valueGreaterThanOrEqualToErrorMessage: (value) => `Value must be greater than or equal to ${value}.`,
@@ -1732,9 +1725,9 @@ var parseTheme = (theme) => {
1732
1725
  headerTokens.backgroundColor = theme.header?.baseColor ?? headerTokens.backgroundColor;
1733
1726
  headerTokens.underlinedColor = theme.header?.accentColor ?? headerTokens.underlinedColor;
1734
1727
  headerTokens.menuBackgroundColor = theme.header?.menuBaseColor ?? headerTokens.menuBackgroundColor;
1735
- headerTokens.hamburguerFontColor = theme.header?.fontColor ?? headerTokens.hamburguerFontColor;
1736
- headerTokens.hamburguerIconColor = theme.header?.hamburguerColor ?? headerTokens.hamburguerIconColor;
1737
- headerTokens.hamburguerHoverColor = addLightness(90, theme.header?.hamburguerColor) ?? headerTokens.hamburguerHoverColor;
1728
+ headerTokens.hamburgerFontColor = theme.header?.fontColor ?? headerTokens.hamburgerFontColor;
1729
+ headerTokens.hamburgerIconColor = theme.header?.hamburgerColor ?? headerTokens.hamburgerIconColor;
1730
+ headerTokens.hamburgerHoverColor = addLightness(90, theme.header?.hamburgerColor) ?? headerTokens.hamburgerHoverColor;
1738
1731
  headerTokens.logo = theme.header?.logo ?? headerTokens.logo;
1739
1732
  headerTokens.logoResponsive = theme.header?.logoResponsive ?? headerTokens.logoResponsive;
1740
1733
  headerTokens.contentColor = theme.header?.contentColor ?? headerTokens.contentColor;
@@ -1916,7 +1909,6 @@ var DxcIcon = ({ icon }) => /* @__PURE__ */ jsx2(
1916
1909
  IconContainer,
1917
1910
  {
1918
1911
  role: "img",
1919
- "aria-label": icon,
1920
1912
  filled: icon.startsWith("filled_"),
1921
1913
  icon: icon.startsWith("filled_") ? icon.replace(/filled_/g, "") : icon,
1922
1914
  "aria-hidden": "true"
@@ -1947,53 +1939,6 @@ var Icon_default = DxcIcon;
1947
1939
 
1948
1940
  // src/accordion/Accordion.tsx
1949
1941
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
1950
- var DxcAccordion = ({
1951
- label = "",
1952
- defaultIsExpanded,
1953
- isExpanded,
1954
- icon,
1955
- assistiveText = "",
1956
- disabled = false,
1957
- onChange,
1958
- children,
1959
- margin,
1960
- tabIndex = 0
1961
- }) => {
1962
- const id = useId();
1963
- const [innerIsExpanded, setInnerIsExpanded] = useState(defaultIsExpanded ?? false);
1964
- const colorsTheme = useContext(HalstackContext);
1965
- const handleAccordionState = () => {
1966
- if (isExpanded == null) {
1967
- setInnerIsExpanded((innerIsCurrentlyExpanded) => !innerIsCurrentlyExpanded);
1968
- }
1969
- onChange?.(isExpanded != null ? !isExpanded : !innerIsExpanded);
1970
- };
1971
- return /* @__PURE__ */ jsx3(ThemeProvider, { theme: colorsTheme.accordion, children: /* @__PURE__ */ jsxs(AccordionContainer, { isExpanded: isExpanded ?? innerIsExpanded, margin, children: [
1972
- /* @__PURE__ */ jsx3(AccordionHeader, { children: /* @__PURE__ */ jsxs(
1973
- AccordionTrigger,
1974
- {
1975
- id: `accordion-${id}`,
1976
- onClick: disabled ? void 0 : handleAccordionState,
1977
- disabled,
1978
- tabIndex: disabled ? -1 : tabIndex,
1979
- "aria-expanded": isExpanded ?? innerIsExpanded,
1980
- "aria-controls": `accordion-panel-${id}`,
1981
- isExpanded: isExpanded ?? innerIsExpanded,
1982
- children: [
1983
- /* @__PURE__ */ jsxs(AccordionInfo, { children: [
1984
- /* @__PURE__ */ jsxs(AccordionLabel, { disabled, children: [
1985
- icon && /* @__PURE__ */ jsx3(IconContainer2, { disabled, children: typeof icon === "string" ? /* @__PURE__ */ jsx3(Icon_default, { icon }) : icon }),
1986
- label
1987
- ] }),
1988
- assistiveText && /* @__PURE__ */ jsx3(AccordionAssistiveText, { disabled, children: assistiveText })
1989
- ] }),
1990
- /* @__PURE__ */ jsx3(CollapseIndicator, { disabled, children: /* @__PURE__ */ jsx3(Icon_default, { icon: isExpanded ?? innerIsExpanded ? "expand_less" : "expand_more" }) })
1991
- ]
1992
- }
1993
- ) }),
1994
- (isExpanded ?? innerIsExpanded) && /* @__PURE__ */ jsx3(AccordionPanel, { id: `accordion-panel-${id}`, role: "region", "aria-labelledby": `accordion-${id}`, children })
1995
- ] }) });
1996
- };
1997
1942
  var calculateWidth = (margin) => `calc(100% - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})`;
1998
1943
  var AccordionContainer = styled2.div`
1999
1944
  display: flex;
@@ -2092,6 +2037,53 @@ var AccordionPanel = styled2.div`
2092
2037
  border-bottom-left-radius: ${(props) => props.theme.borderRadius};
2093
2038
  border-bottom-right-radius: ${(props) => props.theme.borderRadius};
2094
2039
  `;
2040
+ var DxcAccordion = ({
2041
+ label = "",
2042
+ defaultIsExpanded = false,
2043
+ isExpanded,
2044
+ icon,
2045
+ assistiveText = "",
2046
+ disabled = false,
2047
+ onChange,
2048
+ children,
2049
+ margin,
2050
+ tabIndex = 0
2051
+ }) => {
2052
+ const id = useId();
2053
+ const [innerIsExpanded, setInnerIsExpanded] = useState(defaultIsExpanded);
2054
+ const colorsTheme = useContext(HalstackContext);
2055
+ const handleAccordionState = () => {
2056
+ if (isExpanded == null) {
2057
+ setInnerIsExpanded((innerIsCurrentlyExpanded) => !innerIsCurrentlyExpanded);
2058
+ }
2059
+ onChange?.(isExpanded != null ? !isExpanded : !innerIsExpanded);
2060
+ };
2061
+ return /* @__PURE__ */ jsx3(ThemeProvider, { theme: colorsTheme.accordion, children: /* @__PURE__ */ jsxs(AccordionContainer, { isExpanded: isExpanded ?? innerIsExpanded, margin, children: [
2062
+ /* @__PURE__ */ jsx3(AccordionHeader, { children: /* @__PURE__ */ jsxs(
2063
+ AccordionTrigger,
2064
+ {
2065
+ id: `accordion-${id}`,
2066
+ onClick: disabled ? void 0 : handleAccordionState,
2067
+ disabled,
2068
+ tabIndex: disabled ? -1 : tabIndex,
2069
+ "aria-expanded": isExpanded ?? innerIsExpanded,
2070
+ "aria-controls": `accordion-panel-${id}`,
2071
+ isExpanded: isExpanded ?? innerIsExpanded,
2072
+ children: [
2073
+ /* @__PURE__ */ jsxs(AccordionInfo, { children: [
2074
+ /* @__PURE__ */ jsxs(AccordionLabel, { disabled, children: [
2075
+ icon && /* @__PURE__ */ jsx3(IconContainer2, { disabled, children: typeof icon === "string" ? /* @__PURE__ */ jsx3(Icon_default, { icon }) : icon }),
2076
+ label
2077
+ ] }),
2078
+ assistiveText && /* @__PURE__ */ jsx3(AccordionAssistiveText, { disabled, children: assistiveText })
2079
+ ] }),
2080
+ /* @__PURE__ */ jsx3(CollapseIndicator, { disabled, children: /* @__PURE__ */ jsx3(Icon_default, { icon: isExpanded ?? innerIsExpanded ? "expand_less" : "expand_more" }) })
2081
+ ]
2082
+ }
2083
+ ) }),
2084
+ (isExpanded ?? innerIsExpanded) && /* @__PURE__ */ jsx3(AccordionPanel, { id: `accordion-panel-${id}`, role: "region", "aria-labelledby": `accordion-${id}`, children })
2085
+ ] }) });
2086
+ };
2095
2087
  var Accordion_default = DxcAccordion;
2096
2088
 
2097
2089
  // src/accordion-group/AccordionGroup.tsx
@@ -4124,7 +4116,7 @@ var DxcHeader = ({
4124
4116
  isResponsive && responsiveContent && /* @__PURE__ */ jsxs11(Flex_default, { grow: 1, children: [
4125
4117
  /* @__PURE__ */ jsx19(ChildContainer, { children: /* @__PURE__ */ jsxs11(HamburgerTrigger, { tabIndex, onClick: handleMenu, "aria-label": "Show options", children: [
4126
4118
  /* @__PURE__ */ jsx19(Icon_default, { icon: "menu" }),
4127
- translatedLabels.header.hamburguerTitle
4119
+ translatedLabels.header.hamburgerTitle
4128
4120
  ] }) }),
4129
4121
  /* @__PURE__ */ jsxs11(ResponsiveMenu, { hasVisibility: isMenuVisible, children: [
4130
4122
  /* @__PURE__ */ jsxs11(Flex_default, { justifyContent: "space-between", alignItems: "center", children: [
@@ -4214,23 +4206,23 @@ var HamburgerTrigger = styled15.button`
4214
4206
  border-radius: 2px;
4215
4207
  background-color: transparent;
4216
4208
  :hover {
4217
- background-color: ${(props) => props.theme.hamburguerHoverColor};
4209
+ background-color: ${(props) => props.theme.hamburgerHoverColor};
4218
4210
  }
4219
4211
  &:focus {
4220
- outline: ${(props) => props.theme.hamburguerFocusColor} auto 1px;
4212
+ outline: ${(props) => props.theme.hamburgerFocusColor} auto 1px;
4221
4213
  }
4222
4214
  & > svg {
4223
- fill: ${(props) => props.theme.hamburguerIconColor};
4215
+ fill: ${(props) => props.theme.hamburgerIconColor};
4224
4216
  }
4225
4217
  & > span {
4226
4218
  font-size: 24px;
4227
4219
  }
4228
- font-family: ${(props) => props.theme.hamburguerFontFamily};
4229
- font-style: ${(props) => props.theme.hamburguerFontStyle};
4230
- font-size: ${(props) => props.theme.hamburguerFontSize};
4231
- text-transform: ${(props) => props.theme.hamburguerTextTransform};
4232
- font-weight: ${(props) => props.theme.hamburguerFontWeight};
4233
- color: ${(props) => props.theme.hamburguerFontColor};
4220
+ font-family: ${(props) => props.theme.hamburgerFontFamily};
4221
+ font-style: ${(props) => props.theme.hamburgerFontStyle};
4222
+ font-size: ${(props) => props.theme.hamburgerFontSize};
4223
+ text-transform: ${(props) => props.theme.hamburgerTextTransform};
4224
+ font-weight: ${(props) => props.theme.hamburgerFontWeight};
4225
+ color: ${(props) => props.theme.hamburgerFontColor};
4234
4226
  `;
4235
4227
  var ResponsiveMenu = styled15.div`
4236
4228
  display: flex;
@@ -4275,7 +4267,7 @@ var CloseAction = styled15.button`
4275
4267
 
4276
4268
  :focus,
4277
4269
  :focus-visible {
4278
- outline: ${(props) => props.theme.hamburguerFocusColor} auto 1px;
4270
+ outline: ${(props) => props.theme.hamburgerFocusColor} auto 1px;
4279
4271
  }
4280
4272
  font-size: 24px;
4281
4273
  svg {
@@ -4341,9 +4333,9 @@ var Bleed = ({ space, horizontal, vertical, top, right, bottom, left, children }
4341
4333
  var Bleed_default = Bleed;
4342
4334
 
4343
4335
  // src/sidenav/SidenavContext.tsx
4344
- import { createContext as createContext5, useContext as useContext10 } from "react";
4345
- var SidenavContext = createContext5(null);
4346
- var GroupContext = createContext5(null);
4336
+ import { createContext as createContext4, useContext as useContext10 } from "react";
4337
+ var SidenavContext = createContext4(null);
4338
+ var GroupContext = createContext4(null);
4347
4339
  var SidenavContextProvider = SidenavContext.Provider;
4348
4340
  var GroupContextProvider = GroupContext.Provider;
4349
4341
  var useResponsiveSidenavVisibility = () => {
@@ -5143,8 +5135,8 @@ import { useContext as useContext13, useMemo as useMemo5 } from "react";
5143
5135
  import styled22 from "styled-components";
5144
5136
 
5145
5137
  // src/typography/TypographyContext.tsx
5146
- import { createContext as createContext6 } from "react";
5147
- var TypographyContext_default = createContext6({
5138
+ import { createContext as createContext5 } from "react";
5139
+ var TypographyContext_default = createContext5({
5148
5140
  as: "span",
5149
5141
  color: "#000000",
5150
5142
  display: "inline",
@@ -5375,7 +5367,8 @@ var DxcCheckbox = forwardRef4(
5375
5367
  onChange,
5376
5368
  margin,
5377
5369
  size = "fitContent",
5378
- tabIndex = 0
5370
+ tabIndex = 0,
5371
+ ariaLabel = "Checkbox"
5379
5372
  }, ref) => {
5380
5373
  const labelId = `label-checkbox-${useId4()}`;
5381
5374
  const [innerChecked, setInnerChecked] = useState12(defaultChecked);
@@ -5440,7 +5433,7 @@ var DxcCheckbox = forwardRef4(
5440
5433
  "aria-readonly": readOnly,
5441
5434
  "aria-required": !disabled && !optional,
5442
5435
  "aria-labelledby": label ? labelId : void 0,
5443
- "aria-label": label ? void 0 : "Checkbox",
5436
+ "aria-label": label ? void 0 : ariaLabel,
5444
5437
  checked: checked ?? innerChecked,
5445
5438
  disabled,
5446
5439
  readOnly,
@@ -5843,8 +5836,8 @@ var Text2 = styled28.span`
5843
5836
  var ItemAction_default = ItemAction;
5844
5837
 
5845
5838
  // src/contextual-menu/ContextualMenuContext.tsx
5846
- import { createContext as createContext7 } from "react";
5847
- var ContextualMenuContext_default = createContext7(null);
5839
+ import { createContext as createContext6 } from "react";
5840
+ var ContextualMenuContext_default = createContext6(null);
5848
5841
 
5849
5842
  // src/contextual-menu/GroupItem.tsx
5850
5843
  import { Fragment as Fragment10, jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
@@ -8447,8 +8440,8 @@ import {
8447
8440
  import styled43, { ThemeProvider as ThemeProvider18 } from "styled-components";
8448
8441
 
8449
8442
  // src/number-input/NumberInputContext.tsx
8450
- import { createContext as createContext8 } from "react";
8451
- var NumberInputContext_default = createContext8(null);
8443
+ import { createContext as createContext7 } from "react";
8444
+ var NumberInputContext_default = createContext7(null);
8452
8445
 
8453
8446
  // src/text-input/Suggestions.tsx
8454
8447
  import { memo as memo9, useContext as useContext28, useEffect as useEffect11, useRef as useRef10 } from "react";
@@ -8457,7 +8450,35 @@ import styled42 from "styled-components";
8457
8450
  // src/text-input/Suggestion.tsx
8458
8451
  import { memo as memo8, useMemo as useMemo11 } from "react";
8459
8452
  import styled41 from "styled-components";
8460
- import { Fragment as Fragment11, jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
8453
+
8454
+ // src/text-input/utils.ts
8455
+ var sizes4 = {
8456
+ small: "240px",
8457
+ medium: "360px",
8458
+ large: "480px",
8459
+ fillParent: "100%"
8460
+ };
8461
+ var calculateWidth9 = (margin, size) => size === "fillParent" ? `calc(${sizes4[size]} - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})` : size && sizes4[size];
8462
+ var makeCancelable = (promise) => {
8463
+ let hasCanceled_ = false;
8464
+ const wrappedPromise = new Promise((resolve, reject) => {
8465
+ promise.then(
8466
+ (val) => hasCanceled_ ? reject(Error("Is canceled")) : resolve(val),
8467
+ (promiseError) => hasCanceled_ ? reject(Error("Is canceled")) : reject(promiseError)
8468
+ );
8469
+ });
8470
+ return {
8471
+ promise: wrappedPromise,
8472
+ cancel() {
8473
+ hasCanceled_ = true;
8474
+ }
8475
+ };
8476
+ };
8477
+ var hasSuggestions = (suggestions) => typeof suggestions === "function" || (suggestions ? suggestions.length > 0 : false);
8478
+ var isRequired = (value, optional) => value === "" && !optional;
8479
+ var isLengthIncorrect = (value, minLength, maxLength) => value != null && (minLength != null && value.length < minLength || maxLength != null && value.length > maxLength);
8480
+ var isNumberIncorrect = (value, minNumber, maxNumber) => minNumber != null && value < minNumber || maxNumber != null && value > maxNumber;
8481
+ var patternMismatch = (pattern, value) => pattern != null && !new RegExp(pattern).test(value);
8461
8482
  var transformSpecialChars = (str) => {
8462
8483
  const specialCharsRegex = /[\\*()[\]{}+?/]/;
8463
8484
  let value = str;
@@ -8470,6 +8491,32 @@ var transformSpecialChars = (str) => {
8470
8491
  }
8471
8492
  return value;
8472
8493
  };
8494
+
8495
+ // src/text-input/Suggestion.tsx
8496
+ import { Fragment as Fragment11, jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
8497
+ var SuggestionContainer = styled41.li`
8498
+ display: flex;
8499
+ padding: 0 0.5rem;
8500
+ line-height: 1.715em;
8501
+ cursor: pointer;
8502
+ box-shadow: inset 0 0 0 2px
8503
+ ${(props) => props.visuallyFocused ? props.theme.focusListOptionBorderColor : "transparent"};
8504
+
8505
+ &:hover {
8506
+ background-color: ${(props) => props.theme.hoverListOptionBackgroundColor};
8507
+ }
8508
+ &:active {
8509
+ background-color: ${(props) => props.theme.activeListOptionBackgroundColor};
8510
+ }
8511
+ `;
8512
+ var StyledSuggestion = styled41.span`
8513
+ width: 100%;
8514
+ overflow: hidden;
8515
+ text-overflow: ellipsis;
8516
+ white-space: nowrap;
8517
+ padding: 0.25rem 0.5rem 0.188rem 0.5rem;
8518
+ ${(props) => props.isLast || props.visuallyFocused ? `border-bottom: 1px solid transparent` : `border-bottom: 1px solid ${props.theme.listOptionDividerColor}`};
8519
+ `;
8473
8520
  var Suggestion = ({
8474
8521
  id,
8475
8522
  value,
@@ -8500,33 +8547,51 @@ var Suggestion = ({
8500
8547
  }
8501
8548
  );
8502
8549
  };
8503
- var SuggestionContainer = styled41.li`
8504
- display: flex;
8505
- padding: 0 0.5rem;
8506
- line-height: 1.715em;
8507
- cursor: pointer;
8508
- box-shadow: inset 0 0 0 2px
8509
- ${(props) => props.visuallyFocused ? props.theme.focusListOptionBorderColor : "transparent"};
8510
-
8511
- &:hover {
8512
- background-color: ${(props) => props.theme.hoverListOptionBackgroundColor};
8513
- }
8514
- &:active {
8515
- background-color: ${(props) => props.theme.activeListOptionBackgroundColor};
8516
- }
8517
- `;
8518
- var StyledSuggestion = styled41.span`
8519
- width: 100%;
8520
- overflow: hidden;
8521
- text-overflow: ellipsis;
8522
- white-space: nowrap;
8523
- padding: 0.25rem 0.5rem 0.188rem 0.5rem;
8524
- ${(props) => props.isLast || props.visuallyFocused ? `border-bottom: 1px solid transparent` : `border-bottom: 1px solid ${props.theme.listOptionDividerColor}`};
8525
- `;
8526
8550
  var Suggestion_default = memo8(Suggestion);
8527
8551
 
8528
8552
  // src/text-input/Suggestions.tsx
8529
8553
  import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
8554
+ var SuggestionsContainer = styled42.ul`
8555
+ box-sizing: border-box;
8556
+ max-height: 304px;
8557
+ overflow-y: auto;
8558
+ margin: 0;
8559
+ padding: 0.25rem 0;
8560
+ background-color: ${(props) => props.error ? props.theme.errorListDialogBackgroundColor : props.theme.listDialogBackgroundColor};
8561
+ border: 1px solid
8562
+ ${(props) => props.error ? props.theme.errorListDialogBorderColor : props.theme.listDialogBorderColor};
8563
+
8564
+ border-radius: 0.25rem;
8565
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
8566
+ color: ${(props) => props.theme.listOptionFontColor};
8567
+ font-family: ${(props) => props.theme.fontFamily};
8568
+ font-size: ${(props) => props.theme.listOptionFontSize};
8569
+ font-style: ${(props) => props.theme.listOptionFontStyle};
8570
+ font-weight: ${(props) => props.theme.listOptionFontWeight};
8571
+ `;
8572
+ var SuggestionsSystemMessage = styled42.span`
8573
+ display: flex;
8574
+ padding: 0.25rem 1rem;
8575
+ color: ${(props) => props.theme.systemMessageFontColor};
8576
+ line-height: 1.715em;
8577
+ `;
8578
+ var SuggestionsErrorIcon = styled42.span`
8579
+ display: flex;
8580
+ flex-wrap: wrap;
8581
+ align-content: center;
8582
+ margin-right: 0.5rem;
8583
+ height: 18px;
8584
+ width: 18px;
8585
+ font-size: 18px;
8586
+ color: ${(props) => props.theme.errorIconColor};
8587
+ `;
8588
+ var SuggestionsError = styled42.span`
8589
+ display: flex;
8590
+ padding: 0.25rem 1rem;
8591
+ align-items: center;
8592
+ line-height: 1.715em;
8593
+ color: ${(props) => props.theme.errorListDialogFontColor};
8594
+ `;
8530
8595
  var Suggestions = ({
8531
8596
  id,
8532
8597
  value,
@@ -8582,79 +8647,133 @@ var Suggestions = ({
8582
8647
  }
8583
8648
  );
8584
8649
  };
8585
- var SuggestionsContainer = styled42.ul`
8586
- box-sizing: border-box;
8587
- max-height: 304px;
8588
- overflow-y: auto;
8589
- margin: 0;
8590
- padding: 0.25rem 0;
8591
- background-color: ${(props) => props.error ? props.theme.errorListDialogBackgroundColor : props.theme.listDialogBackgroundColor};
8592
- border: 1px solid
8593
- ${(props) => props.error ? props.theme.errorListDialogBorderColor : props.theme.listDialogBorderColor};
8650
+ var Suggestions_default = memo9(Suggestions);
8594
8651
 
8595
- border-radius: 0.25rem;
8596
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
8597
- color: ${(props) => props.theme.listOptionFontColor};
8598
- font-family: ${(props) => props.theme.fontFamily};
8599
- font-size: ${(props) => props.theme.listOptionFontSize};
8600
- font-style: ${(props) => props.theme.listOptionFontStyle};
8601
- font-weight: ${(props) => props.theme.listOptionFontWeight};
8602
- `;
8603
- var SuggestionsSystemMessage = styled42.span`
8652
+ // src/text-input/TextInput.tsx
8653
+ import { Fragment as Fragment12, jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
8654
+ var TextInputContainer = styled43.div`
8655
+ box-sizing: border-box;
8604
8656
  display: flex;
8605
- padding: 0.25rem 1rem;
8606
- color: ${(props) => props.theme.systemMessageFontColor};
8607
- line-height: 1.715em;
8657
+ flex-direction: column;
8658
+ width: ${(props) => calculateWidth9(props.margin, props.size)};
8659
+ ${(props) => props.size !== "fillParent" && `min-width:${calculateWidth9(props.margin, props.size)}`};
8660
+ margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
8661
+ margin-top: ${(props) => props.margin && typeof props.margin === "object" && props.margin.top ? spaces[props.margin.top] : ""};
8662
+ margin-right: ${(props) => props.margin && typeof props.margin === "object" && props.margin.right ? spaces[props.margin.right] : ""};
8663
+ margin-bottom: ${(props) => props.margin && typeof props.margin === "object" && props.margin.bottom ? spaces[props.margin.bottom] : ""};
8664
+ margin-left: ${(props) => props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""};
8665
+ font-family: ${(props) => props.theme.fontFamily};
8608
8666
  `;
8609
- var SuggestionsErrorIcon = styled42.span`
8610
- display: flex;
8611
- flex-wrap: wrap;
8612
- align-content: center;
8613
- margin-right: 0.5rem;
8667
+ var Label4 = styled43.label`
8668
+ color: ${(props) => props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor};
8669
+ font-size: ${(props) => props.theme.labelFontSize};
8670
+ font-style: ${(props) => props.theme.labelFontStyle};
8671
+ font-weight: ${(props) => props.theme.labelFontWeight};
8672
+ line-height: ${(props) => props.theme.labelLineHeight};
8673
+ ${(props) => !props.hasHelperText && `margin-bottom: 0.25rem`}
8674
+ `;
8675
+ var OptionalLabel2 = styled43.span`
8676
+ font-weight: ${(props) => props.theme.optionalLabelFontWeight};
8677
+ `;
8678
+ var HelperText2 = styled43.span`
8679
+ color: ${(props) => props.disabled ? props.theme.disabledHelperTextFontColor : props.theme.helperTextFontColor};
8680
+ font-size: ${(props) => props.theme.helperTextFontSize};
8681
+ font-style: ${(props) => props.theme.helperTextFontStyle};
8682
+ font-weight: ${(props) => props.theme.helperTextFontWeight};
8683
+ line-height: ${(props) => props.theme.helperTextLineHeight};
8684
+ margin-bottom: 0.25rem;
8685
+ `;
8686
+ var InputContainer = styled43.div`
8687
+ position: relative;
8688
+ display: flex;
8689
+ align-items: center;
8690
+ height: calc(2.5rem - 2px);
8691
+ padding: 0 0.5rem;
8692
+
8693
+ ${(props) => props.disabled && `background-color: ${props.theme.disabledContainerFillColor};`}
8694
+ box-shadow: 0 0 0 2px transparent;
8695
+ border-radius: 4px;
8696
+ border: 1px solid
8697
+ ${(props) => props.disabled ? props.theme.disabledBorderColor : props.readOnly ? props.theme.readOnlyBorderColor : props.theme.enabledBorderColor};
8698
+ ${(props) => props.error && !props.disabled && `border-color: transparent;
8699
+ box-shadow: 0 0 0 2px ${props.theme.errorBorderColor};
8700
+ `}
8701
+ ${(props) => !props.disabled ? `
8702
+ &:hover {
8703
+ border-color: ${props.error ? "transparent" : props.readOnly ? props.theme.hoverReadOnlyBorderColor : props.theme.hoverBorderColor};
8704
+ ${props.error ? `box-shadow: 0 0 0 2px ${props.theme.hoverErrorBorderColor};` : ""}
8705
+ }
8706
+ &:focus-within {
8707
+ border-color: transparent;
8708
+ box-shadow: 0 0 0 2px ${props.theme.focusBorderColor};
8709
+ }
8710
+ ` : "cursor: not-allowed;"};
8711
+ `;
8712
+ var Input = styled43.input`
8713
+ height: calc(2.5rem - 2px);
8714
+ width: 100%;
8715
+ background: none;
8716
+ border: none;
8717
+ outline: none;
8718
+ padding: 0 0.5rem;
8719
+ overflow: hidden;
8720
+ text-overflow: ellipsis;
8721
+ white-space: nowrap;
8722
+ color: ${(props) => props.disabled ? props.theme.disabledValueFontColor : props.theme.valueFontColor};
8723
+ font-family: ${(props) => props.theme.fontFamily};
8724
+ font-size: ${(props) => props.theme.valueFontSize};
8725
+ font-style: ${(props) => props.theme.valueFontStyle};
8726
+ font-weight: ${(props) => props.theme.valueFontWeight};
8727
+ line-height: 1.5em;
8728
+ ${(props) => props.disabled && `cursor: not-allowed;`}
8729
+
8730
+ ::placeholder {
8731
+ color: ${(props) => props.disabled ? props.theme.disabledPlaceholderFontColor : props.theme.placeholderFontColor};
8732
+ }
8733
+ `;
8734
+ var Prefix = styled43.span`
8735
+ height: 1.5rem;
8736
+ margin-left: 0.25rem;
8737
+ padding-right: ${(props) => props.theme.prefixDividerPaddingRight};
8738
+ ${(props) => {
8739
+ const color = props.disabled ? props.theme.disabledPrefixColor : props.theme.prefixColor;
8740
+ return `color: ${color}; border-right: ${props.theme.prefixDividerBorderWidth} ${props.theme.prefixDividerBorderStyle} ${color};`;
8741
+ }};
8742
+ font-size: 1rem;
8743
+ line-height: 1.5rem;
8744
+ pointer-events: none;
8745
+ `;
8746
+ var Suffix = styled43.span`
8747
+ height: 1.5rem;
8748
+ margin: 0 0.25rem;
8749
+ padding-left: ${(props) => props.theme.suffixDividerPaddingLeft};
8750
+ ${(props) => {
8751
+ const color = props.disabled ? props.theme.disabledSuffixColor : props.theme.suffixColor;
8752
+ return `color: ${color}; border-left: ${props.theme.suffixDividerBorderWidth} ${props.theme.suffixDividerBorderStyle} ${color};`;
8753
+ }};
8754
+ font-size: 1rem;
8755
+ line-height: 1.5rem;
8756
+ pointer-events: none;
8757
+ `;
8758
+ var ErrorIcon2 = styled43.span`
8759
+ display: flex;
8760
+ flex-wrap: wrap;
8761
+ align-content: center;
8762
+ padding: 3px;
8614
8763
  height: 18px;
8615
8764
  width: 18px;
8616
8765
  font-size: 18px;
8617
8766
  color: ${(props) => props.theme.errorIconColor};
8618
8767
  `;
8619
- var SuggestionsError = styled42.span`
8620
- display: flex;
8621
- padding: 0.25rem 1rem;
8622
- align-items: center;
8623
- line-height: 1.715em;
8624
- color: ${(props) => props.theme.errorListDialogFontColor};
8768
+ var ErrorMessageContainer = styled43.span`
8769
+ min-height: 1.5em;
8770
+ color: ${(props) => props.theme.errorMessageColor};
8771
+ font-size: 0.75rem;
8772
+ font-weight: 400;
8773
+ line-height: 1.5em;
8774
+ margin-top: 0.25rem;
8625
8775
  `;
8626
- var Suggestions_default = memo9(Suggestions);
8627
-
8628
- // src/text-input/TextInput.tsx
8629
- import { Fragment as Fragment12, jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
8630
- var sizes4 = {
8631
- small: "240px",
8632
- medium: "360px",
8633
- large: "480px",
8634
- fillParent: "100%"
8635
- };
8636
8776
  var AutosuggestWrapper = ({ condition, wrapper, children }) => /* @__PURE__ */ jsx51(Fragment12, { children: condition ? wrapper(children) : children });
8637
- var calculateWidth9 = (margin, size) => size === "fillParent" ? `calc(${sizes4[size]} - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})` : size && sizes4[size];
8638
- var makeCancelable = (promise) => {
8639
- let hasCanceled_ = false;
8640
- const wrappedPromise = new Promise((resolve, reject) => {
8641
- promise.then(
8642
- (val) => hasCanceled_ ? reject(Error("Is canceled")) : resolve(val),
8643
- (promiseError) => hasCanceled_ ? reject(Error("Is canceled")) : reject(promiseError)
8644
- );
8645
- });
8646
- return {
8647
- promise: wrappedPromise,
8648
- cancel() {
8649
- hasCanceled_ = true;
8650
- }
8651
- };
8652
- };
8653
- var hasSuggestions = (suggestions) => typeof suggestions === "function" || (suggestions ? suggestions.length > 0 : false);
8654
- var isRequired = (value, optional) => value === "" && !optional;
8655
- var isLengthIncorrect = (value, minLength, maxLength) => value != null && (minLength != null && value.length < minLength || maxLength != null && value.length > maxLength);
8656
- var isNumberIncorrect = (value, minNumber, maxNumber) => minNumber != null && value < minNumber || maxNumber != null && value > maxNumber;
8657
- var patternMismatch = (pattern, value) => pattern != null && !new RegExp(pattern).test(value);
8658
8777
  var DxcTextInput = forwardRef6(
8659
8778
  ({
8660
8779
  label,
@@ -8680,24 +8799,25 @@ var DxcTextInput = forwardRef6(
8680
8799
  autocomplete = "off",
8681
8800
  margin,
8682
8801
  size = "medium",
8683
- tabIndex = 0
8802
+ tabIndex = 0,
8803
+ ariaLabel = "Text input"
8684
8804
  }, ref) => {
8685
8805
  const inputId = `input-${useId10()}`;
8686
8806
  const autosuggestId = `suggestions-${inputId}`;
8687
8807
  const errorId = `error-${inputId}`;
8808
+ const colorsTheme = useContext29(HalstackContext);
8809
+ const translatedLabels = useContext29(HalstackLanguageContext);
8810
+ const numberInputContext = useContext29(NumberInputContext_default);
8811
+ const inputRef = useRef11(null);
8812
+ const inputContainerRef = useRef11(null);
8813
+ const actionRef = useRef11(null);
8688
8814
  const [innerValue, setInnerValue] = useState22(defaultValue);
8689
8815
  const [isOpen, changeIsOpen] = useState22(false);
8690
8816
  const [isSearching, changeIsSearching] = useState22(false);
8691
8817
  const [isAutosuggestError, changeIsAutosuggestError] = useState22(false);
8692
8818
  const [filteredSuggestions, changeFilteredSuggestions] = useState22([]);
8693
8819
  const [visualFocusIndex, changeVisualFocusIndex] = useState22(-1);
8694
- const inputRef = useRef11(null);
8695
- const inputContainerRef = useRef11(null);
8696
- const actionRef = useRef11(null);
8697
8820
  const width = useWidth_default(inputContainerRef.current);
8698
- const colorsTheme = useContext29(HalstackContext);
8699
- const translatedLabels = useContext29(HalstackLanguageContext);
8700
- const numberInputContext = useContext29(NumberInputContext_default);
8701
8821
  const getNumberErrorMessage = (checkedValue) => numberInputContext?.minNumber != null && checkedValue < numberInputContext?.minNumber ? translatedLabels.numberInput.valueGreaterThanOrEqualToErrorMessage?.(numberInputContext.minNumber) : numberInputContext?.maxNumber != null && checkedValue > numberInputContext?.maxNumber ? translatedLabels.numberInput.valueLessThanOrEqualToErrorMessage?.(numberInputContext.maxNumber) : void 0;
8702
8822
  const openSuggestions = () => {
8703
8823
  if (hasSuggestions(suggestions)) {
@@ -8821,7 +8941,7 @@ var DxcTextInput = forwardRef6(
8821
8941
  openSuggestions();
8822
8942
  if (!isAutosuggestError && !isSearching && filteredSuggestions.length > 0) {
8823
8943
  changeVisualFocusIndex(
8824
- (visualFocusedSuggIndex) => visualFocusedSuggIndex < filteredSuggestions.length - 1 ? visualFocusedSuggIndex + 1 : visualFocusedSuggIndex === filteredSuggestions.length - 1 ? 0 : -1
8944
+ (visualFocusedSuggestionIndex) => visualFocusedSuggestionIndex < filteredSuggestions.length - 1 ? visualFocusedSuggestionIndex + 1 : visualFocusedSuggestionIndex === filteredSuggestions.length - 1 ? 0 : -1
8825
8945
  );
8826
8946
  }
8827
8947
  }
@@ -8835,7 +8955,7 @@ var DxcTextInput = forwardRef6(
8835
8955
  openSuggestions();
8836
8956
  if (!isAutosuggestError && !isSearching && filteredSuggestions.length > 0) {
8837
8957
  changeVisualFocusIndex(
8838
- (visualFocusedSuggIndex) => visualFocusedSuggIndex === 0 || visualFocusedSuggIndex === -1 ? filteredSuggestions.length > 0 ? filteredSuggestions.length - 1 : (suggestions?.length ?? 0) - 1 : visualFocusedSuggIndex - 1
8958
+ (visualFocusedSuggestionIndex) => visualFocusedSuggestionIndex === 0 || visualFocusedSuggestionIndex === -1 ? filteredSuggestions.length > 0 ? filteredSuggestions.length - 1 : (suggestions?.length ?? 0) - 1 : visualFocusedSuggestionIndex - 1
8839
8959
  );
8840
8960
  }
8841
8961
  }
@@ -9040,7 +9160,8 @@ var DxcTextInput = forwardRef6(
9040
9160
  "aria-activedescendant": hasSuggestions(suggestions) && isOpen && visualFocusIndex !== -1 ? `suggestion-${visualFocusIndex}` : void 0,
9041
9161
  "aria-invalid": !!error,
9042
9162
  "aria-errormessage": error ? errorId : void 0,
9043
- "aria-required": !disabled && !optional
9163
+ "aria-required": !disabled && !optional,
9164
+ "aria-label": label ? void 0 : ariaLabel
9044
9165
  }
9045
9166
  ),
9046
9167
  !disabled && error && /* @__PURE__ */ jsx51(ErrorIcon2, { "aria-hidden": "true", children: /* @__PURE__ */ jsx51(Icon_default, { icon: "filled_error" }) }),
@@ -9099,128 +9220,6 @@ var DxcTextInput = forwardRef6(
9099
9220
  ] }) });
9100
9221
  }
9101
9222
  );
9102
- var TextInputContainer = styled43.div`
9103
- box-sizing: border-box;
9104
- display: flex;
9105
- flex-direction: column;
9106
- width: ${(props) => calculateWidth9(props.margin, props.size)};
9107
- ${(props) => props.size !== "fillParent" && `min-width:${calculateWidth9(props.margin, props.size)}`};
9108
- margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
9109
- margin-top: ${(props) => props.margin && typeof props.margin === "object" && props.margin.top ? spaces[props.margin.top] : ""};
9110
- margin-right: ${(props) => props.margin && typeof props.margin === "object" && props.margin.right ? spaces[props.margin.right] : ""};
9111
- margin-bottom: ${(props) => props.margin && typeof props.margin === "object" && props.margin.bottom ? spaces[props.margin.bottom] : ""};
9112
- margin-left: ${(props) => props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""};
9113
- font-family: ${(props) => props.theme.fontFamily};
9114
- `;
9115
- var Label4 = styled43.label`
9116
- color: ${(props) => props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor};
9117
- font-size: ${(props) => props.theme.labelFontSize};
9118
- font-style: ${(props) => props.theme.labelFontStyle};
9119
- font-weight: ${(props) => props.theme.labelFontWeight};
9120
- line-height: ${(props) => props.theme.labelLineHeight};
9121
- ${(props) => !props.hasHelperText && `margin-bottom: 0.25rem`}
9122
- `;
9123
- var OptionalLabel2 = styled43.span`
9124
- font-weight: ${(props) => props.theme.optionalLabelFontWeight};
9125
- `;
9126
- var HelperText2 = styled43.span`
9127
- color: ${(props) => props.disabled ? props.theme.disabledHelperTextFontColor : props.theme.helperTextFontColor};
9128
- font-size: ${(props) => props.theme.helperTextFontSize};
9129
- font-style: ${(props) => props.theme.helperTextFontStyle};
9130
- font-weight: ${(props) => props.theme.helperTextFontWeight};
9131
- line-height: ${(props) => props.theme.helperTextLineHeight};
9132
- margin-bottom: 0.25rem;
9133
- `;
9134
- var InputContainer = styled43.div`
9135
- position: relative;
9136
- display: flex;
9137
- align-items: center;
9138
- height: calc(2.5rem - 2px);
9139
- padding: 0 0.5rem;
9140
-
9141
- ${(props) => props.disabled && `background-color: ${props.theme.disabledContainerFillColor};`}
9142
- box-shadow: 0 0 0 2px transparent;
9143
- border-radius: 4px;
9144
- border: 1px solid
9145
- ${(props) => props.disabled ? props.theme.disabledBorderColor : props.readOnly ? props.theme.readOnlyBorderColor : props.theme.enabledBorderColor};
9146
- ${(props) => props.error && !props.disabled && `border-color: transparent;
9147
- box-shadow: 0 0 0 2px ${props.theme.errorBorderColor};
9148
- `}
9149
- ${(props) => !props.disabled ? `
9150
- &:hover {
9151
- border-color: ${props.error ? "transparent" : props.readOnly ? props.theme.hoverReadOnlyBorderColor : props.theme.hoverBorderColor};
9152
- ${props.error ? `box-shadow: 0 0 0 2px ${props.theme.hoverErrorBorderColor};` : ""}
9153
- }
9154
- &:focus-within {
9155
- border-color: transparent;
9156
- box-shadow: 0 0 0 2px ${props.theme.focusBorderColor};
9157
- }
9158
- ` : "cursor: not-allowed;"};
9159
- `;
9160
- var Input = styled43.input`
9161
- height: calc(2.5rem - 2px);
9162
- width: 100%;
9163
- background: none;
9164
- border: none;
9165
- outline: none;
9166
- padding: 0 0.5rem;
9167
- overflow: hidden;
9168
- text-overflow: ellipsis;
9169
- white-space: nowrap;
9170
- color: ${(props) => props.disabled ? props.theme.disabledValueFontColor : props.theme.valueFontColor};
9171
- font-family: ${(props) => props.theme.fontFamily};
9172
- font-size: ${(props) => props.theme.valueFontSize};
9173
- font-style: ${(props) => props.theme.valueFontStyle};
9174
- font-weight: ${(props) => props.theme.valueFontWeight};
9175
- line-height: 1.5em;
9176
- ${(props) => props.disabled && `cursor: not-allowed;`}
9177
-
9178
- ::placeholder {
9179
- color: ${(props) => props.disabled ? props.theme.disabledPlaceholderFontColor : props.theme.placeholderFontColor};
9180
- }
9181
- `;
9182
- var Prefix = styled43.span`
9183
- height: 1.5rem;
9184
- margin-left: 0.25rem;
9185
- padding-right: ${(props) => props.theme.prefixDividerPaddingRight};
9186
- ${(props) => {
9187
- const color = props.disabled ? props.theme.disabledPrefixColor : props.theme.prefixColor;
9188
- return `color: ${color}; border-right: ${props.theme.prefixDividerBorderWidth} ${props.theme.prefixDividerBorderStyle} ${color};`;
9189
- }};
9190
- font-size: 1rem;
9191
- line-height: 1.5rem;
9192
- pointer-events: none;
9193
- `;
9194
- var Suffix = styled43.span`
9195
- height: 1.5rem;
9196
- margin: 0 0.25rem;
9197
- padding-left: ${(props) => props.theme.suffixDividerPaddingLeft};
9198
- ${(props) => {
9199
- const color = props.disabled ? props.theme.disabledSuffixColor : props.theme.suffixColor;
9200
- return `color: ${color}; border-left: ${props.theme.suffixDividerBorderWidth} ${props.theme.suffixDividerBorderStyle} ${color};`;
9201
- }};
9202
- font-size: 1rem;
9203
- line-height: 1.5rem;
9204
- pointer-events: none;
9205
- `;
9206
- var ErrorIcon2 = styled43.span`
9207
- display: flex;
9208
- flex-wrap: wrap;
9209
- align-content: center;
9210
- padding: 3px;
9211
- height: 18px;
9212
- width: 18px;
9213
- font-size: 18px;
9214
- color: ${(props) => props.theme.errorIconColor};
9215
- `;
9216
- var ErrorMessageContainer = styled43.span`
9217
- min-height: 1.5em;
9218
- color: ${(props) => props.theme.errorMessageColor};
9219
- font-size: 0.75rem;
9220
- font-weight: 400;
9221
- line-height: 1.5em;
9222
- margin-top: 0.25rem;
9223
- `;
9224
9223
  var TextInput_default = DxcTextInput;
9225
9224
 
9226
9225
  // src/date-input/DateInput.tsx
@@ -9265,7 +9264,8 @@ var DxcDateInput = forwardRef7(
9265
9264
  autocomplete,
9266
9265
  margin,
9267
9266
  size,
9268
- tabIndex
9267
+ tabIndex,
9268
+ ariaLabel = "Date input"
9269
9269
  }, ref) => {
9270
9270
  const [innerValue, setInnerValue] = useState23(defaultValue);
9271
9271
  const [isOpen, setIsOpen] = useState23(false);
@@ -9432,7 +9432,8 @@ var DxcDateInput = forwardRef7(
9432
9432
  autocomplete,
9433
9433
  size,
9434
9434
  tabIndex,
9435
- ref: dateRef
9435
+ ref: dateRef,
9436
+ ariaLabel
9436
9437
  }
9437
9438
  ) }),
9438
9439
  /* @__PURE__ */ jsx52(Popover4.Portal, { children: /* @__PURE__ */ jsx52(
@@ -9539,44 +9540,17 @@ var Dialog = styled45.div`
9539
9540
  min-width: 92%;
9540
9541
  }
9541
9542
  `;
9542
- var CloseIconAction = styled45.button`
9543
- all: unset;
9543
+ var CloseIconActionContainer = styled45.div`
9544
9544
  position: absolute;
9545
9545
  top: 24px;
9546
9546
  right: 24px;
9547
- display: flex;
9548
- align-items: center;
9549
- justify-content: center;
9550
- background-color: ${(props) => props.theme.closeIconBackgroundColor};
9551
- box-shadow: 0 0 0 2px transparent;
9552
- color: ${(props) => props.theme.closeIconColor};
9553
- border-radius: ${(props) => props.theme.closeIconBorderRadius};
9554
- border-width: ${(props) => props.theme.closeIconBorderThickness};
9555
- border-style: ${(props) => props.theme.closeIconBorderStyle};
9556
- border-color: ${(props) => props.theme.closeIconBorderColor};
9557
- cursor: pointer;
9558
- z-index: 1;
9559
-
9560
- &:focus {
9561
- outline: none;
9562
- box-shadow: 0 0 0 2px #0095ff;
9563
- }
9564
- &:hover {
9565
- background-color: #f2f2f2;
9566
- }
9567
- &:active {
9568
- background-color: #cccccc;
9569
- }
9570
- span {
9571
- font-size: ${(props) => props.theme.closeIconSize};
9572
- }
9573
9547
  `;
9574
9548
  var DxcDialog = ({
9549
+ children,
9575
9550
  closable = true,
9551
+ onBackgroundClick,
9576
9552
  onCloseClick,
9577
- children,
9578
9553
  overlay = true,
9579
- onBackgroundClick,
9580
9554
  tabIndex = 0
9581
9555
  }) => {
9582
9556
  const colorsTheme = useContext31(HalstackContext);
@@ -9594,28 +9568,28 @@ var DxcDialog = ({
9594
9568
  };
9595
9569
  }, [onCloseClick]);
9596
9570
  return /* @__PURE__ */ jsxs37(ThemeProvider20, { theme: colorsTheme.dialog, children: [
9597
- /* @__PURE__ */ jsx53(BodyStyle2, {}),
9598
- createPortal2(
9599
- /* @__PURE__ */ jsxs37(DialogContainer, { children: [
9600
- overlay && /* @__PURE__ */ jsx53(
9601
- Overlay3,
9602
- {
9603
- onClick: () => {
9604
- onBackgroundClick?.();
9605
- }
9606
- }
9607
- ),
9608
- /* @__PURE__ */ jsx53(Dialog, { role: "dialog", "aria-modal": overlay, closable, "aria-label": "Dialog", children: /* @__PURE__ */ jsxs37(FocusLock_default, { children: [
9571
+ /* @__PURE__ */ jsx53(BodyStyle2, {}),
9572
+ createPortal2(
9573
+ /* @__PURE__ */ jsxs37(DialogContainer, { children: [
9574
+ overlay && /* @__PURE__ */ jsx53(Overlay3, { onClick: onBackgroundClick }),
9575
+ /* @__PURE__ */ jsx53(Dialog, { "aria-label": "Dialog", "aria-modal": overlay, closable, role: "dialog", children: /* @__PURE__ */ jsxs37(FocusLock_default, { children: [
9609
9576
  children,
9610
9577
  closable && /* @__PURE__ */ jsx53(
9611
- CloseIconAction,
9578
+ ThemeProvider20,
9612
9579
  {
9613
- onClick: () => {
9614
- onCloseClick?.();
9580
+ theme: {
9581
+ actionBackgroundColor: colorsTheme.dialog.closeIconBackgroundColor,
9582
+ actionIconColor: colorsTheme.dialog.closeIconColor
9615
9583
  },
9616
- "aria-label": translatedLabels.dialog.closeIconAriaLabel,
9617
- tabIndex,
9618
- children: /* @__PURE__ */ jsx53(Icon_default, { icon: "close" })
9584
+ children: /* @__PURE__ */ jsx53(CloseIconActionContainer, { children: /* @__PURE__ */ jsx53(
9585
+ ActionIcon_default,
9586
+ {
9587
+ icon: "close",
9588
+ onClick: onCloseClick,
9589
+ tabIndex,
9590
+ title: translatedLabels.dialog.closeIconAriaLabel
9591
+ }
9592
+ ) })
9619
9593
  }
9620
9594
  )
9621
9595
  ] }) })
@@ -9627,46 +9601,13 @@ var DxcDialog = ({
9627
9601
  var Dialog_default = DxcDialog;
9628
9602
 
9629
9603
  // src/file-input/FileInput.tsx
9630
- import { useCallback as useCallback8, useContext as useContext33, useEffect as useEffect15, useId as useId12, useState as useState24, forwardRef as forwardRef8 } from "react";
9631
- import styled47, { ThemeProvider as ThemeProvider22 } from "styled-components";
9604
+ import { useCallback as useCallback8, useContext as useContext33, useEffect as useEffect15, useId as useId13, useState as useState24, forwardRef as forwardRef8 } from "react";
9605
+ import styled47, { ThemeProvider as ThemeProvider21 } from "styled-components";
9632
9606
 
9633
9607
  // src/file-input/FileItem.tsx
9634
- import { memo as memo10, useContext as useContext32 } from "react";
9635
- import styled46, { ThemeProvider as ThemeProvider21 } from "styled-components";
9608
+ import { memo as memo10, useContext as useContext32, useId as useId12 } from "react";
9609
+ import styled46 from "styled-components";
9636
9610
  import { jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
9637
- var FileItem = ({
9638
- fileName = "",
9639
- error = "",
9640
- singleFileMode,
9641
- showPreview,
9642
- preview,
9643
- type,
9644
- onDelete,
9645
- tabIndex
9646
- }) => {
9647
- const colorsTheme = useContext32(HalstackContext);
9648
- const translatedLabels = useContext32(HalstackLanguageContext);
9649
- const getIconAriaLabel = () => type.includes("video") ? "video" : type.includes("audio") ? "audio" : "file";
9650
- return /* @__PURE__ */ jsx54(ThemeProvider21, { theme: colorsTheme.fileInput, children: /* @__PURE__ */ jsxs38(MainContainer3, { error, singleFileMode, showPreview, children: [
9651
- showPreview && (type.includes("image") ? /* @__PURE__ */ jsx54(ImagePreview, { src: preview, alt: fileName }) : /* @__PURE__ */ jsx54(IconPreview, { error, role: "document", "aria-label": getIconAriaLabel(), children: /* @__PURE__ */ jsx54(Icon_default, { icon: preview }) })),
9652
- /* @__PURE__ */ jsxs38(FileItemContent, { children: [
9653
- /* @__PURE__ */ jsx54(FileName, { children: fileName }),
9654
- /* @__PURE__ */ jsxs38(Flex_default, { gap: "0.25rem", children: [
9655
- error && /* @__PURE__ */ jsx54(ErrorIcon3, { children: /* @__PURE__ */ jsx54(Icon_default, { icon: "filled_error" }) }),
9656
- /* @__PURE__ */ jsx54(
9657
- ActionIcon_default,
9658
- {
9659
- onClick: () => onDelete(fileName),
9660
- icon: "close",
9661
- tabIndex,
9662
- title: translatedLabels.fileInput.deleteFileActionTitle
9663
- }
9664
- )
9665
- ] }),
9666
- error && !singleFileMode && /* @__PURE__ */ jsx54(ErrorMessage, { role: "alert", "aria-live": "assertive", children: error })
9667
- ] })
9668
- ] }) });
9669
- };
9670
9611
  var MainContainer3 = styled46.div`
9671
9612
  box-sizing: border-box;
9672
9613
  display: flex;
@@ -9738,10 +9679,41 @@ var ErrorMessage = styled46.span`
9738
9679
  font-weight: ${(props) => props.theme.errorMessageFontWeight};
9739
9680
  line-height: ${(props) => props.theme.errorMessageLineHeight};
9740
9681
  `;
9682
+ var FileItem = ({
9683
+ fileName = "",
9684
+ error = "",
9685
+ singleFileMode,
9686
+ showPreview,
9687
+ preview,
9688
+ type,
9689
+ onDelete,
9690
+ tabIndex
9691
+ }) => {
9692
+ const translatedLabels = useContext32(HalstackLanguageContext);
9693
+ const fileNameId = useId12();
9694
+ return /* @__PURE__ */ jsxs38(MainContainer3, { error, role: "listitem", singleFileMode, showPreview, children: [
9695
+ showPreview && (type.includes("image") ? /* @__PURE__ */ jsx54(ImagePreview, { src: preview, alt: fileName }) : /* @__PURE__ */ jsx54(IconPreview, { "aria-labelledby": fileNameId, error, role: "img", children: /* @__PURE__ */ jsx54(Icon_default, { icon: preview }) })),
9696
+ /* @__PURE__ */ jsxs38(FileItemContent, { children: [
9697
+ /* @__PURE__ */ jsx54(FileName, { id: fileNameId, children: fileName }),
9698
+ /* @__PURE__ */ jsxs38(Flex_default, { gap: "0.25rem", children: [
9699
+ error && /* @__PURE__ */ jsx54(ErrorIcon3, { children: /* @__PURE__ */ jsx54(Icon_default, { icon: "filled_error" }) }),
9700
+ /* @__PURE__ */ jsx54(
9701
+ ActionIcon_default,
9702
+ {
9703
+ onClick: () => onDelete(fileName),
9704
+ icon: "close",
9705
+ tabIndex,
9706
+ title: translatedLabels.fileInput.deleteFileActionTitle
9707
+ }
9708
+ )
9709
+ ] }),
9710
+ error && !singleFileMode && /* @__PURE__ */ jsx54(ErrorMessage, { role: "alert", "aria-live": "assertive", children: error })
9711
+ ] })
9712
+ ] });
9713
+ };
9741
9714
  var FileItem_default = memo10(FileItem);
9742
9715
 
9743
- // src/file-input/FileInput.tsx
9744
- import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
9716
+ // src/file-input/utils.ts
9745
9717
  var getFilePreview = async (file) => {
9746
9718
  if (file.type.includes("video")) return "filled_movie";
9747
9719
  else if (file.type.includes("audio")) return "music_video";
@@ -9761,6 +9733,101 @@ var isFileIncluded = (file, fileList) => {
9761
9733
  ({ name, size, type, lastModified, webkitRelativePath }) => name === file.file.name && size === file.file.size && type === file.file.type && lastModified === file.file.lastModified && webkitRelativePath === file.file.webkitRelativePath
9762
9734
  );
9763
9735
  };
9736
+
9737
+ // src/file-input/FileInput.tsx
9738
+ import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
9739
+ var FileInputContainer = styled47.div`
9740
+ display: flex;
9741
+ flex-direction: column;
9742
+ margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
9743
+ margin-top: ${(props) => props.margin && typeof props.margin === "object" && props.margin.top ? spaces[props.margin.top] : ""};
9744
+ margin-right: ${(props) => props.margin && typeof props.margin === "object" && props.margin.right ? spaces[props.margin.right] : ""};
9745
+ margin-bottom: ${(props) => props.margin && typeof props.margin === "object" && props.margin.bottom ? spaces[props.margin.bottom] : ""};
9746
+ margin-left: ${(props) => props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""};
9747
+ width: fit-content;
9748
+ `;
9749
+ var Label6 = styled47.label`
9750
+ color: ${(props) => props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor};
9751
+ font-family: ${(props) => props.theme.labelFontFamily};
9752
+ font-size: ${(props) => props.theme.labelFontSize};
9753
+ font-weight: ${(props) => props.theme.labelFontWeight};
9754
+ line-height: ${(props) => props.theme.labelLineHeight};
9755
+ `;
9756
+ var HelperText4 = styled47.span`
9757
+ color: ${(props) => props.disabled ? props.theme.disabledHelperTextFontColor : props.theme.helperTextFontColor};
9758
+ font-family: ${(props) => props.theme.helperTextFontFamily};
9759
+ font-size: ${(props) => props.theme.helperTextFontSize};
9760
+ font-weight: ${(props) => props.theme.helperTextFontWeight};
9761
+ line-height: ${(props) => props.theme.helperTextLineHeight};
9762
+ `;
9763
+ var FileContainer = styled47.div`
9764
+ display: flex;
9765
+ ${(props) => props.singleFileMode ? "flex-direction: row; column-gap: 0.25rem;" : "flex-direction: column; row-gap: 0.25rem;"}
9766
+ margin-top: 0.25rem;
9767
+ `;
9768
+ var ValueInput2 = styled47.input`
9769
+ display: none;
9770
+ `;
9771
+ var FileItemListContainer = styled47.div`
9772
+ display: flex;
9773
+ flex-direction: column;
9774
+ row-gap: 0.25rem;
9775
+ `;
9776
+ var Container2 = styled47.div`
9777
+ display: flex;
9778
+ flex-direction: column;
9779
+ row-gap: 0.25rem;
9780
+ margin-top: 0.25rem;
9781
+ `;
9782
+ var DragDropArea = styled47.div`
9783
+ box-sizing: border-box;
9784
+ display: flex;
9785
+ ${(props) => props.mode === "filedrop" ? "flex-direction: row; column-gap: 0.75rem; height: 48px;" : "justify-content: center; flex-direction: column; row-gap: 0.5rem; height: 160px;"}
9786
+ align-items: center;
9787
+ width: 320px;
9788
+ padding: ${(props) => props.mode === "filedrop" ? `calc(4px - ${props.theme.dropBorderThickness}) 1rem calc(4px - ${props.theme.dropBorderThickness}) calc(4px - ${props.theme.dropBorderThickness})` : "1rem"};
9789
+ overflow: hidden;
9790
+ box-shadow: 0 0 0 2px transparent;
9791
+ border-radius: ${(props) => props.theme.dropBorderRadius};
9792
+ border-width: ${(props) => props.theme.dropBorderThickness};
9793
+ border-style: ${(props) => props.theme.dropBorderStyle};
9794
+ border-color: ${(props) => props.disabled ? props.theme.disabledDropBorderColor : props.theme.dropBorderColor};
9795
+ ${(props) => props.isDragging && `
9796
+ background-color: ${props.theme.dragoverDropBackgroundColor};
9797
+ border-color: transparent;
9798
+ box-shadow: 0 0 0 2px ${props.theme.focusDropBorderColor};
9799
+ `}
9800
+ cursor: ${(props) => props.disabled && "not-allowed"};
9801
+ `;
9802
+ var DropzoneLabel = styled47.div`
9803
+ display: -webkit-box;
9804
+ -webkit-box-orient: vertical;
9805
+ overflow: hidden;
9806
+ text-overflow: ellipsis;
9807
+ -webkit-line-clamp: 3;
9808
+ text-align: center;
9809
+ color: ${(props) => props.disabled ? props.theme.disabledDropLabelFontColor : props.theme.dropLabelFontColor};
9810
+ font-family: ${(props) => props.theme.dropLabelFontFamily};
9811
+ font-size: ${(props) => props.theme.dropLabelFontSize};
9812
+ font-weight: ${(props) => props.theme.dropLabelFontWeight};
9813
+ `;
9814
+ var FiledropLabel = styled47.span`
9815
+ overflow: hidden;
9816
+ white-space: nowrap;
9817
+ text-overflow: ellipsis;
9818
+ color: ${(props) => props.disabled ? props.theme.disabledDropLabelFontColor : props.theme.dropLabelFontColor};
9819
+ font-family: ${(props) => props.theme.dropLabelFontFamily};
9820
+ font-size: ${(props) => props.theme.dropLabelFontSize};
9821
+ font-weight: ${(props) => props.theme.dropLabelFontWeight};
9822
+ `;
9823
+ var ErrorMessage2 = styled47.div`
9824
+ color: ${(props) => props.theme.errorMessageFontColor};
9825
+ font-family: ${(props) => props.theme.errorMessageFontFamily};
9826
+ font-size: ${(props) => props.theme.errorMessageFontSize};
9827
+ font-weight: ${(props) => props.theme.errorMessageFontWeight};
9828
+ line-height: ${(props) => props.theme.errorMessageLineHeight};
9829
+ margin-top: 0.25rem;
9830
+ `;
9764
9831
  var DxcFileInput = forwardRef8(
9765
9832
  ({
9766
9833
  mode = "file",
@@ -9781,7 +9848,7 @@ var DxcFileInput = forwardRef8(
9781
9848
  }, ref) => {
9782
9849
  const [isDragging, setIsDragging] = useState24(false);
9783
9850
  const [files, setFiles] = useState24([]);
9784
- const fileInputId = `file-input-${useId12()}`;
9851
+ const fileInputId = `file-input-${useId13()}`;
9785
9852
  const colorsTheme = useContext33(HalstackContext);
9786
9853
  const translatedLabels = useContext33(HalstackLanguageContext);
9787
9854
  const checkFileSize = (file) => {
@@ -9872,7 +9939,7 @@ var DxcFileInput = forwardRef8(
9872
9939
  };
9873
9940
  getFiles();
9874
9941
  }, [value]);
9875
- return /* @__PURE__ */ jsx55(ThemeProvider22, { theme: colorsTheme.fileInput, children: /* @__PURE__ */ jsxs39(FileInputContainer, { margin, ref, children: [
9942
+ return /* @__PURE__ */ jsx55(ThemeProvider21, { theme: colorsTheme.fileInput, children: /* @__PURE__ */ jsxs39(FileInputContainer, { margin, ref, children: [
9876
9943
  /* @__PURE__ */ jsx55(Label6, { htmlFor: fileInputId, disabled, children: label }),
9877
9944
  /* @__PURE__ */ jsx55(HelperText4, { disabled, children: helperText }),
9878
9945
  mode === "file" ? /* @__PURE__ */ jsxs39(FileContainer, { singleFileMode: !multiple && files.length === 1, children: [
@@ -9899,7 +9966,7 @@ var DxcFileInput = forwardRef8(
9899
9966
  tabIndex
9900
9967
  }
9901
9968
  ),
9902
- files.length > 0 && /* @__PURE__ */ jsx55(FileItemListContainer, { children: files.map((file, index) => /* @__PURE__ */ jsx55(
9969
+ files.length > 0 && /* @__PURE__ */ jsx55(FileItemListContainer, { role: "list", children: files.map((file, index) => /* @__PURE__ */ jsx55(
9903
9970
  FileItem_default,
9904
9971
  {
9905
9972
  fileName: file.file.name,
@@ -9951,7 +10018,7 @@ var DxcFileInput = forwardRef8(
9951
10018
  ]
9952
10019
  }
9953
10020
  ),
9954
- files.length > 0 && /* @__PURE__ */ jsx55(FileItemListContainer, { children: files.map((file, index) => /* @__PURE__ */ jsx55(
10021
+ files.length > 0 && /* @__PURE__ */ jsx55(FileItemListContainer, { role: "list", children: files.map((file, index) => /* @__PURE__ */ jsx55(
9955
10022
  FileItem_default,
9956
10023
  {
9957
10024
  fileName: file.file.name,
@@ -9970,98 +10037,6 @@ var DxcFileInput = forwardRef8(
9970
10037
  ] }) });
9971
10038
  }
9972
10039
  );
9973
- var FileInputContainer = styled47.div`
9974
- display: flex;
9975
- flex-direction: column;
9976
- margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
9977
- margin-top: ${(props) => props.margin && typeof props.margin === "object" && props.margin.top ? spaces[props.margin.top] : ""};
9978
- margin-right: ${(props) => props.margin && typeof props.margin === "object" && props.margin.right ? spaces[props.margin.right] : ""};
9979
- margin-bottom: ${(props) => props.margin && typeof props.margin === "object" && props.margin.bottom ? spaces[props.margin.bottom] : ""};
9980
- margin-left: ${(props) => props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""};
9981
- width: fit-content;
9982
- `;
9983
- var Label6 = styled47.label`
9984
- color: ${(props) => props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor};
9985
- font-family: ${(props) => props.theme.labelFontFamily};
9986
- font-size: ${(props) => props.theme.labelFontSize};
9987
- font-weight: ${(props) => props.theme.labelFontWeight};
9988
- line-height: ${(props) => props.theme.labelLineHeight};
9989
- `;
9990
- var HelperText4 = styled47.span`
9991
- color: ${(props) => props.disabled ? props.theme.disabledHelperTextFontColor : props.theme.helperTextFontColor};
9992
- font-family: ${(props) => props.theme.helperTextFontFamily};
9993
- font-size: ${(props) => props.theme.helperTextFontSize};
9994
- font-weight: ${(props) => props.theme.helperTextFontWeight};
9995
- line-height: ${(props) => props.theme.helperTextLineHeight};
9996
- `;
9997
- var FileContainer = styled47.div`
9998
- display: flex;
9999
- ${(props) => props.singleFileMode ? "flex-direction: row; column-gap: 0.25rem;" : "flex-direction: column; row-gap: 0.25rem;"}
10000
- margin-top: 0.25rem;
10001
- `;
10002
- var ValueInput2 = styled47.input`
10003
- display: none;
10004
- `;
10005
- var FileItemListContainer = styled47.div`
10006
- display: flex;
10007
- flex-direction: column;
10008
- row-gap: 0.25rem;
10009
- `;
10010
- var Container2 = styled47.div`
10011
- display: flex;
10012
- flex-direction: column;
10013
- row-gap: 0.25rem;
10014
- margin-top: 0.25rem;
10015
- `;
10016
- var DragDropArea = styled47.div`
10017
- box-sizing: border-box;
10018
- display: flex;
10019
- ${(props) => props.mode === "filedrop" ? "flex-direction: row; column-gap: 0.75rem; height: 48px;" : "justify-content: center; flex-direction: column; row-gap: 0.5rem; height: 160px;"}
10020
- align-items: center;
10021
- width: 320px;
10022
- padding: ${(props) => props.mode === "filedrop" ? `calc(4px - ${props.theme.dropBorderThickness}) 1rem calc(4px - ${props.theme.dropBorderThickness}) calc(4px - ${props.theme.dropBorderThickness})` : "1rem"};
10023
- overflow: hidden;
10024
- box-shadow: 0 0 0 2px transparent;
10025
- border-radius: ${(props) => props.theme.dropBorderRadius};
10026
- border-width: ${(props) => props.theme.dropBorderThickness};
10027
- border-style: ${(props) => props.theme.dropBorderStyle};
10028
- border-color: ${(props) => props.disabled ? props.theme.disabledDropBorderColor : props.theme.dropBorderColor};
10029
- ${(props) => props.isDragging && `
10030
- background-color: ${props.theme.dragoverDropBackgroundColor};
10031
- border-color: transparent;
10032
- box-shadow: 0 0 0 2px ${props.theme.focusDropBorderColor};
10033
- `}
10034
- cursor: ${(props) => props.disabled && "not-allowed"};
10035
- `;
10036
- var DropzoneLabel = styled47.div`
10037
- display: -webkit-box;
10038
- -webkit-box-orient: vertical;
10039
- overflow: hidden;
10040
- text-overflow: ellipsis;
10041
- -webkit-line-clamp: 3;
10042
- text-align: center;
10043
- color: ${(props) => props.disabled ? props.theme.disabledDropLabelFontColor : props.theme.dropLabelFontColor};
10044
- font-family: ${(props) => props.theme.dropLabelFontFamily};
10045
- font-size: ${(props) => props.theme.dropLabelFontSize};
10046
- font-weight: ${(props) => props.theme.dropLabelFontWeight};
10047
- `;
10048
- var FiledropLabel = styled47.span`
10049
- overflow: hidden;
10050
- white-space: nowrap;
10051
- text-overflow: ellipsis;
10052
- color: ${(props) => props.disabled ? props.theme.disabledDropLabelFontColor : props.theme.dropLabelFontColor};
10053
- font-family: ${(props) => props.theme.dropLabelFontFamily};
10054
- font-size: ${(props) => props.theme.dropLabelFontSize};
10055
- font-weight: ${(props) => props.theme.dropLabelFontWeight};
10056
- `;
10057
- var ErrorMessage2 = styled47.div`
10058
- color: ${(props) => props.theme.errorMessageFontColor};
10059
- font-family: ${(props) => props.theme.errorMessageFontFamily};
10060
- font-size: ${(props) => props.theme.errorMessageFontSize};
10061
- font-weight: ${(props) => props.theme.errorMessageFontWeight};
10062
- line-height: ${(props) => props.theme.errorMessageLineHeight};
10063
- margin-top: 0.25rem;
10064
- `;
10065
10040
  var FileInput_default = DxcFileInput;
10066
10041
 
10067
10042
  // src/grid/Grid.tsx
@@ -10098,7 +10073,7 @@ DxcGrid.Item = GridItem;
10098
10073
  var Grid_default = DxcGrid;
10099
10074
 
10100
10075
  // src/heading/Heading.tsx
10101
- import styled49, { ThemeProvider as ThemeProvider23 } from "styled-components";
10076
+ import styled49, { ThemeProvider as ThemeProvider22 } from "styled-components";
10102
10077
  import { useContext as useContext34 } from "react";
10103
10078
  import { jsx as jsx57 } from "react/jsx-runtime";
10104
10079
  var DxcHeading = ({ level = 1, text = "", as, weight, margin }) => {
@@ -10106,7 +10081,7 @@ var DxcHeading = ({ level = 1, text = "", as, weight, margin }) => {
10106
10081
  const checkValidAs = () => {
10107
10082
  if (as === "h1" || as === "h2" || as === "h3" || as === "h4" || as === "h5") return as;
10108
10083
  };
10109
- return /* @__PURE__ */ jsx57(ThemeProvider23, { theme: colorsTheme.heading, children: /* @__PURE__ */ jsx57(HeadingContainer, { margin, children: level === 1 ? /* @__PURE__ */ jsx57(HeadingLevel1, { as: checkValidAs(), weight, children: text }) : level === 2 ? /* @__PURE__ */ jsx57(HeadingLevel2, { as: checkValidAs(), weight, children: text }) : level === 3 ? /* @__PURE__ */ jsx57(HeadingLevel3, { as: checkValidAs(), weight, children: text }) : level === 4 ? /* @__PURE__ */ jsx57(HeadingLevel4, { as: checkValidAs(), weight, children: text }) : /* @__PURE__ */ jsx57(HeadingLevel5, { as: checkValidAs(), weight, children: text }) }) });
10084
+ return /* @__PURE__ */ jsx57(ThemeProvider22, { theme: colorsTheme.heading, children: /* @__PURE__ */ jsx57(HeadingContainer, { margin, children: level === 1 ? /* @__PURE__ */ jsx57(HeadingLevel1, { as: checkValidAs(), weight, children: text }) : level === 2 ? /* @__PURE__ */ jsx57(HeadingLevel2, { as: checkValidAs(), weight, children: text }) : level === 3 ? /* @__PURE__ */ jsx57(HeadingLevel3, { as: checkValidAs(), weight, children: text }) : level === 4 ? /* @__PURE__ */ jsx57(HeadingLevel4, { as: checkValidAs(), weight, children: text }) : /* @__PURE__ */ jsx57(HeadingLevel5, { as: checkValidAs(), weight, children: text }) }) });
10110
10085
  };
10111
10086
  var HeadingContainer = styled49.div`
10112
10087
  margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
@@ -10168,7 +10143,7 @@ var HeadingLevel5 = styled49.h5`
10168
10143
  var Heading_default = DxcHeading;
10169
10144
 
10170
10145
  // src/image/Image.tsx
10171
- import styled50, { ThemeProvider as ThemeProvider24 } from "styled-components";
10146
+ import styled50, { ThemeProvider as ThemeProvider23 } from "styled-components";
10172
10147
  import { useContext as useContext35 } from "react";
10173
10148
  import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
10174
10149
  var Figure = styled50.figure`
@@ -10206,7 +10181,7 @@ function DxcImage({
10206
10181
  onError
10207
10182
  }) {
10208
10183
  const colorsTheme = useContext35(HalstackContext);
10209
- return /* @__PURE__ */ jsx58(ThemeProvider24, { theme: colorsTheme.image, children: /* @__PURE__ */ jsx58(CaptionWrapper, { caption, children: /* @__PURE__ */ jsx58(
10184
+ return /* @__PURE__ */ jsx58(ThemeProvider23, { theme: colorsTheme.image, children: /* @__PURE__ */ jsx58(CaptionWrapper, { caption, children: /* @__PURE__ */ jsx58(
10210
10185
  "img",
10211
10186
  {
10212
10187
  alt,
@@ -10253,7 +10228,7 @@ var Inset_default = Inset;
10253
10228
 
10254
10229
  // src/link/Link.tsx
10255
10230
  import { forwardRef as forwardRef9, useContext as useContext36 } from "react";
10256
- import styled52, { ThemeProvider as ThemeProvider25 } from "styled-components";
10231
+ import styled52, { ThemeProvider as ThemeProvider24 } from "styled-components";
10257
10232
  import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
10258
10233
  var StyledLink = styled52.a`
10259
10234
  all: unset;
@@ -10332,7 +10307,7 @@ var DxcLink = forwardRef9(
10332
10307
  ...otherProps
10333
10308
  }, ref) => {
10334
10309
  const colorsTheme = useContext36(HalstackContext);
10335
- return /* @__PURE__ */ jsx60(ThemeProvider25, { theme: colorsTheme.link, children: /* @__PURE__ */ jsx60(
10310
+ return /* @__PURE__ */ jsx60(ThemeProvider24, { theme: colorsTheme.link, children: /* @__PURE__ */ jsx60(
10336
10311
  StyledLink,
10337
10312
  {
10338
10313
  as: onClick && !href ? "button" : "a",
@@ -10357,15 +10332,15 @@ var Link_default = DxcLink;
10357
10332
 
10358
10333
  // src/nav-tabs/NavTabs.tsx
10359
10334
  import { Children as Children4, useContext as useContext38, useEffect as useEffect17, useMemo as useMemo12, useRef as useRef14, useState as useState25 } from "react";
10360
- import styled54, { ThemeProvider as ThemeProvider26 } from "styled-components";
10335
+ import styled54, { ThemeProvider as ThemeProvider25 } from "styled-components";
10361
10336
 
10362
10337
  // src/nav-tabs/Tab.tsx
10363
10338
  import { useEffect as useEffect16, forwardRef as forwardRef10, useContext as useContext37, useRef as useRef13, useImperativeHandle } from "react";
10364
10339
  import styled53 from "styled-components";
10365
10340
 
10366
10341
  // src/nav-tabs/NavTabsContext.tsx
10367
- import { createContext as createContext9 } from "react";
10368
- var NavTabsContext_default = createContext9(null);
10342
+ import { createContext as createContext8 } from "react";
10343
+ var NavTabsContext_default = createContext8(null);
10369
10344
 
10370
10345
  // src/nav-tabs/Tab.tsx
10371
10346
  import { jsx as jsx61, jsxs as jsxs42 } from "react/jsx-runtime";
@@ -10568,7 +10543,7 @@ var DxcNavTabs = ({ iconPosition = "top", tabIndex = 0, children }) => {
10568
10543
  break;
10569
10544
  }
10570
10545
  };
10571
- return /* @__PURE__ */ jsx62(ThemeProvider26, { theme: colorsTheme.navTabs, children: /* @__PURE__ */ jsxs43(NavTabsContainer, { onKeyDown: handleOnKeyDown, ref: refNavTabList, role: "tablist", "aria-label": "Navigation tabs", children: [
10546
+ return /* @__PURE__ */ jsx62(ThemeProvider25, { theme: colorsTheme.navTabs, children: /* @__PURE__ */ jsxs43(NavTabsContainer, { onKeyDown: handleOnKeyDown, ref: refNavTabList, role: "tablist", "aria-label": "Navigation tabs", children: [
10572
10547
  /* @__PURE__ */ jsx62(NavTabsContext_default.Provider, { value: contextValue, children }),
10573
10548
  /* @__PURE__ */ jsx62(Underline, { underlineWidth: underlineWidth ?? 0 })
10574
10549
  ] }) });
@@ -10617,7 +10592,8 @@ var DxcNumberInput = forwardRef11(
10617
10592
  autocomplete,
10618
10593
  margin,
10619
10594
  size,
10620
- tabIndex
10595
+ tabIndex,
10596
+ ariaLabel = "Number input"
10621
10597
  }, ref) => {
10622
10598
  const numberInputRef = useRef15(null);
10623
10599
  const contextValue = useMemo13(
@@ -10660,7 +10636,8 @@ var DxcNumberInput = forwardRef11(
10660
10636
  margin,
10661
10637
  size,
10662
10638
  tabIndex,
10663
- ref
10639
+ ref,
10640
+ ariaLabel
10664
10641
  }
10665
10642
  ) }) });
10666
10643
  }
@@ -10683,7 +10660,7 @@ var NumberInput_default = DxcNumberInput;
10683
10660
 
10684
10661
  // src/paragraph/Paragraph.tsx
10685
10662
  import { useContext as useContext39 } from "react";
10686
- import styled56, { ThemeProvider as ThemeProvider27 } from "styled-components";
10663
+ import styled56, { ThemeProvider as ThemeProvider26 } from "styled-components";
10687
10664
  import { jsx as jsx64 } from "react/jsx-runtime";
10688
10665
  var Paragraph = styled56.p`
10689
10666
  display: ${(props) => props.theme.display};
@@ -10702,7 +10679,7 @@ var Paragraph = styled56.p`
10702
10679
  `;
10703
10680
  function DxcParagraph({ children }) {
10704
10681
  const colorsTheme = useContext39(HalstackContext);
10705
- return /* @__PURE__ */ jsx64(ThemeProvider27, { theme: colorsTheme.paragraph, children: /* @__PURE__ */ jsx64(Paragraph, { children }) });
10682
+ return /* @__PURE__ */ jsx64(ThemeProvider26, { theme: colorsTheme.paragraph, children: /* @__PURE__ */ jsx64(Paragraph, { children }) });
10706
10683
  }
10707
10684
 
10708
10685
  // src/password-input/PasswordInput.tsx
@@ -10712,10 +10689,9 @@ import { jsx as jsx65 } from "react/jsx-runtime";
10712
10689
  var setInputType = (type, element) => {
10713
10690
  element?.getElementsByTagName("input")[0]?.setAttribute("type", type);
10714
10691
  };
10715
- var setAriaAttributes = (ariaExpanded, ariaLabel, element) => {
10692
+ var setAriaAttributes = (ariaExpanded, element) => {
10716
10693
  const buttonElement = element?.getElementsByTagName("button")[0];
10717
10694
  buttonElement?.setAttribute("aria-expanded", ariaExpanded);
10718
- buttonElement?.setAttribute("aria-label", ariaLabel);
10719
10695
  };
10720
10696
  var DxcPasswordInput = forwardRef12(
10721
10697
  ({
@@ -10733,7 +10709,8 @@ var DxcPasswordInput = forwardRef12(
10733
10709
  autocomplete = "off",
10734
10710
  margin,
10735
10711
  size = "medium",
10736
- tabIndex = 0
10712
+ tabIndex = 0,
10713
+ ariaLabel = "Password input"
10737
10714
  }, ref) => {
10738
10715
  const [isPasswordVisible, setIsPasswordVisible] = useState26(false);
10739
10716
  const inputRef = useRef16(null);
@@ -10743,12 +10720,12 @@ var DxcPasswordInput = forwardRef12(
10743
10720
  if (isPasswordVisible) {
10744
10721
  setInputType("text", inputRef.current);
10745
10722
  if (passwordInput.inputHidePasswordTitle) {
10746
- setAriaAttributes("true", passwordInput.inputHidePasswordTitle, inputRef.current);
10723
+ setAriaAttributes("true", inputRef.current);
10747
10724
  }
10748
10725
  } else {
10749
10726
  setInputType("password", inputRef.current);
10750
10727
  if (passwordInput.inputShowPasswordTitle) {
10751
- setAriaAttributes("false", passwordInput.inputShowPasswordTitle, inputRef.current);
10728
+ setAriaAttributes("false", inputRef.current);
10752
10729
  }
10753
10730
  }
10754
10731
  })();
@@ -10778,7 +10755,8 @@ var DxcPasswordInput = forwardRef12(
10778
10755
  maxLength,
10779
10756
  autocomplete,
10780
10757
  ref: inputRef,
10781
- tabIndex
10758
+ tabIndex,
10759
+ ariaLabel
10782
10760
  }
10783
10761
  ) });
10784
10762
  }
@@ -10792,55 +10770,10 @@ var PasswordInput = styled57.div`
10792
10770
  var PasswordInput_default = DxcPasswordInput;
10793
10771
 
10794
10772
  // src/progress-bar/ProgressBar.tsx
10795
- import { useContext as useContext41, useEffect as useEffect20, useState as useState27 } from "react";
10796
- import styled58, { ThemeProvider as ThemeProvider28 } from "styled-components";
10773
+ import { useContext as useContext41, useEffect as useEffect20, useId as useId14, useState as useState27 } from "react";
10774
+ import styled58, { ThemeProvider as ThemeProvider27 } from "styled-components";
10797
10775
  import { jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
10798
- var DxcProgressBar = ({
10799
- label = "",
10800
- helperText = "",
10801
- overlay = false,
10802
- value,
10803
- showValue = false,
10804
- margin
10805
- }) => {
10806
- const colorsTheme = useContext41(HalstackContext);
10807
- const [valueProgressBar, setValueProgressBar] = useState27(0);
10808
- useEffect20(() => {
10809
- setValueProgressBar(
10810
- value === null || value === void 0 || value < 0 ? 0 : value >= 0 && value <= 100 ? value : 100
10811
- );
10812
- }, [value]);
10813
- return /* @__PURE__ */ jsx66(ThemeProvider28, { theme: colorsTheme.progressBar, children: /* @__PURE__ */ jsx66(BackgroundProgressBar, { overlay, children: /* @__PURE__ */ jsxs44(ProgressBarContainer, { overlay, margin, children: [
10814
- /* @__PURE__ */ jsxs44(InfoProgressBar, { children: [
10815
- /* @__PURE__ */ jsx66(ProgressBarLabel, { overlay, children: label }),
10816
- /* @__PURE__ */ jsxs44(ProgressBarProgress, { overlay, showValue, value: valueProgressBar, children: [
10817
- valueProgressBar,
10818
- " %"
10819
- ] })
10820
- ] }),
10821
- /* @__PURE__ */ jsx66(
10822
- LinearProgress,
10823
- {
10824
- role: "progressbar",
10825
- helperText,
10826
- "aria-valuenow": showValue ? valueProgressBar : void 0,
10827
- "aria-valuemin": 0,
10828
- "aria-valuemax": 100,
10829
- "aria-label": label || "Progress Bar",
10830
- children: /* @__PURE__ */ jsx66(
10831
- LinearProgressBar,
10832
- {
10833
- variant: value === null || value === void 0 ? "indeterminate" : "determinate",
10834
- container: "first",
10835
- value: valueProgressBar
10836
- }
10837
- )
10838
- }
10839
- ),
10840
- helperText && /* @__PURE__ */ jsx66(HelperText5, { overlay, children: helperText })
10841
- ] }) }) });
10842
- };
10843
- var BackgroundProgressBar = styled58.div`
10776
+ var Overlay4 = styled58.div`
10844
10777
  ${({ overlay, theme }) => overlay ? `background-color: ${theme.overlayColor};
10845
10778
  width: 100%;
10846
10779
  justify-content: center;
@@ -10852,30 +10785,23 @@ var BackgroundProgressBar = styled58.div`
10852
10785
  bottom: 0;
10853
10786
  left: 0;
10854
10787
  right: 0;
10855
- z-index: 1300;` : `background-color: "transparent";`}
10788
+ z-index: 1300;` : `background-color: transparent;`}
10856
10789
  display: flex;
10857
10790
  flex-wrap: wrap;
10858
10791
  min-width: 100px;
10859
10792
  width: 100%;
10860
10793
  `;
10861
- var ProgressBarContainer = styled58.div`
10862
- z-index: ${(props) => props.overlay === true && "100" || "0"};
10863
- width: ${(props) => props.overlay === true ? "80%" : "100%"};
10794
+ var MainContainer4 = styled58.div`
10795
+ width: ${(props) => props.overlay ? "80%" : "100%"};
10864
10796
  margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
10865
10797
  margin-top: ${(props) => props.margin && typeof props.margin === "object" && props.margin.top ? spaces[props.margin.top] : ""};
10866
10798
  margin-right: ${(props) => props.margin && typeof props.margin === "object" && props.margin.right ? spaces[props.margin.right] : ""};
10867
10799
  margin-bottom: ${(props) => props.margin && typeof props.margin === "object" && props.margin.bottom ? spaces[props.margin.bottom] : ""};
10868
10800
  margin-left: ${(props) => props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""};
10869
- `;
10870
- var InfoProgressBar = styled58.div`
10871
10801
  display: flex;
10872
- flex-direction: row;
10873
- width: 685px;
10874
- flex-wrap: wrap;
10875
- width: 100%;
10876
- margin-bottom: 8px;
10877
- align-items: baseline;
10878
- justify-content: space-between;
10802
+ flex-direction: column;
10803
+ gap: 0.5rem;
10804
+ z-index: ${(props) => props.overlay ? "100" : "0"};
10879
10805
  `;
10880
10806
  var ProgressBarLabel = styled58.div`
10881
10807
  font-family: ${(props) => props.theme.labelFontFamily};
@@ -10883,24 +10809,23 @@ var ProgressBarLabel = styled58.div`
10883
10809
  font-size: ${(props) => props.theme.labelFontSize};
10884
10810
  font-weight: ${(props) => props.theme.labelFontWeight};
10885
10811
  text-transform: ${(props) => props.theme.labelFontTextTransform};
10886
- color: ${(props) => props.overlay === true ? props.theme.overlayFontColor : props.theme.labelFontColor};
10812
+ color: ${(props) => props.overlay ? props.theme.overlayFontColor : props.theme.labelFontColor};
10887
10813
  overflow: hidden;
10888
10814
  text-overflow: ellipsis;
10889
10815
  white-space: nowrap;
10890
10816
  text-overflow: ellipsis;
10891
10817
  `;
10892
10818
  var ProgressBarProgress = styled58.div`
10819
+ flex-shrink: 0;
10820
+ color: ${(props) => props.overlay ? props.theme.overlayFontColor : props.theme.valueFontColor};
10893
10821
  font-family: ${(props) => props.theme.valueFontFamily};
10894
10822
  font-style: ${(props) => props.theme.valueFontStyle};
10895
10823
  font-size: ${(props) => props.theme.valueFontSize};
10896
10824
  font-weight: ${(props) => props.theme.valueFontWeight};
10897
10825
  text-transform: ${(props) => props.theme.valueFontTextTransform};
10898
- color: ${(props) => props.overlay === true ? props.theme.overlayFontColor : props.theme.valueFontColor};
10899
- display: ${(props) => props.value !== void 0 && props.value !== null && props.showValue === true && "block" || "none"};
10900
- flex-shrink: 0;
10901
10826
  `;
10902
10827
  var HelperText5 = styled58.span`
10903
- color: ${(props) => props.overlay === true ? props.theme.overlayFontColor : props.theme.helperTextFontColor};
10828
+ color: ${(props) => props.overlay ? props.theme.overlayFontColor : props.theme.helperTextFontColor};
10904
10829
  font-family: ${(props) => props.theme.helperTextFontFamily};
10905
10830
  font-size: ${(props) => props.theme.helperTextFontSize};
10906
10831
  font-style: ${(props) => props.theme.helperTextFontStyle};
@@ -10908,25 +10833,23 @@ var HelperText5 = styled58.span`
10908
10833
  line-height: 1.5em;
10909
10834
  `;
10910
10835
  var LinearProgress = styled58.div`
10836
+ position: relative;
10837
+ border-radius: ${(props) => props.theme.borderRadius};
10911
10838
  height: ${(props) => props.theme.thickness};
10912
10839
  background-color: ${(props) => props.theme.totalLineColor};
10913
- border-radius: ${(props) => props.theme.borderRadius};
10914
- margin-bottom: ${(props) => props.helperText !== "" && "8px"};
10915
10840
  overflow: hidden;
10916
- position: relative;
10917
10841
  `;
10918
10842
  var LinearProgressBar = styled58.span`
10919
- background-color: ${(props) => props.theme.trackLineColor};
10920
- transform: ${(props) => `translateX(-${props.variant === "determinate" ? 100 - (props.value ?? 0) : 0}%)`};
10843
+ position: absolute;
10921
10844
  top: 0;
10922
- left: 0;
10923
- width: 100%;
10924
10845
  bottom: 0;
10925
- position: absolute;
10846
+ left: 0;
10847
+ width: ${(props) => props.variant === "indeterminate" ? "auto" : "100%"};
10848
+ transform: ${(props) => `translateX(-${props.variant === "determinate" ? 100 - (props.value ?? 0) : 0}%)`};
10926
10849
  transition: ${(props) => props.variant === "determinate" ? "transform .4s linear" : "transform 0.2s linear"};
10927
10850
  transform-origin: left;
10928
- ${(props) => props.variant === "indeterminate" && "width: auto;"};
10929
- ${(props) => props.variant === "indeterminate" ? props.container === "first" ? "animation: keyframes-indeterminate-first 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;" : "animation: keyframes-indeterminate-second 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;" : ""};
10851
+ background-color: ${(props) => props.theme.trackLineColor};
10852
+ ${(props) => props.variant === "indeterminate" ? "animation: keyframes-indeterminate-first 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;" : ""};
10930
10853
 
10931
10854
  @keyframes keyframes-indeterminate-first {
10932
10855
  0% {
@@ -10958,17 +10881,55 @@ var LinearProgressBar = styled58.span`
10958
10881
  }
10959
10882
  }
10960
10883
  `;
10884
+ var DxcProgressBar = ({
10885
+ label,
10886
+ helperText,
10887
+ overlay,
10888
+ value,
10889
+ showValue,
10890
+ margin
10891
+ }) => {
10892
+ const colorsTheme = useContext41(HalstackContext);
10893
+ const labelId = `label-${useId14()}`;
10894
+ const [innerValue, setInnerValue] = useState27();
10895
+ useEffect20(() => {
10896
+ if (value != null) setInnerValue(value < 0 ? 0 : value > 100 ? 100 : value);
10897
+ }, [value]);
10898
+ return /* @__PURE__ */ jsx66(ThemeProvider27, { theme: colorsTheme.progressBar, children: /* @__PURE__ */ jsx66(Overlay4, { overlay, children: /* @__PURE__ */ jsxs44(MainContainer4, { overlay, margin, children: [
10899
+ /* @__PURE__ */ jsxs44(Flex_default, { justifyContent: "space-between", gap: "0.5rem", children: [
10900
+ label && /* @__PURE__ */ jsx66(ProgressBarLabel, { id: labelId, overlay, children: label }),
10901
+ innerValue != null && showValue && /* @__PURE__ */ jsxs44(ProgressBarProgress, { overlay, children: [
10902
+ innerValue,
10903
+ " %"
10904
+ ] })
10905
+ ] }),
10906
+ /* @__PURE__ */ jsx66(
10907
+ LinearProgress,
10908
+ {
10909
+ role: "progressbar",
10910
+ helperText,
10911
+ "aria-label": "Progress bar",
10912
+ "aria-labelledby": labelId,
10913
+ "aria-valuenow": innerValue,
10914
+ "aria-valuemin": 0,
10915
+ "aria-valuemax": 100,
10916
+ children: /* @__PURE__ */ jsx66(LinearProgressBar, { variant: innerValue == null ? "indeterminate" : "determinate", value: innerValue })
10917
+ }
10918
+ ),
10919
+ helperText && /* @__PURE__ */ jsx66(HelperText5, { overlay, children: helperText })
10920
+ ] }) }) });
10921
+ };
10961
10922
  var ProgressBar_default = DxcProgressBar;
10962
10923
 
10963
10924
  // src/quick-nav/QuickNav.tsx
10964
10925
  import { useContext as useContext42 } from "react";
10965
10926
  import slugify from "slugify";
10966
- import styled59, { ThemeProvider as ThemeProvider29 } from "styled-components";
10927
+ import styled59, { ThemeProvider as ThemeProvider28 } from "styled-components";
10967
10928
  import { jsx as jsx67, jsxs as jsxs45 } from "react/jsx-runtime";
10968
10929
  var DxcQuickNav = ({ title, links }) => {
10969
10930
  const translatedLabels = useContext42(HalstackLanguageContext);
10970
10931
  const colorsTheme = useContext42(HalstackContext);
10971
- return /* @__PURE__ */ jsx67(ThemeProvider29, { theme: colorsTheme.quickNav, children: /* @__PURE__ */ jsx67(QuickNavContainer, { children: /* @__PURE__ */ jsxs45(Flex_default, { direction: "column", gap: "0.5rem", children: [
10932
+ return /* @__PURE__ */ jsx67(ThemeProvider28, { theme: colorsTheme.quickNav, children: /* @__PURE__ */ jsx67(QuickNavContainer, { children: /* @__PURE__ */ jsxs45(Flex_default, { direction: "column", gap: "0.5rem", children: [
10972
10933
  /* @__PURE__ */ jsx67(Heading_default, { level: 4, text: title || translatedLabels.quickNav.contentTitle }),
10973
10934
  /* @__PURE__ */ jsx67(ListColumn, { children: links.map((link) => /* @__PURE__ */ jsx67("li", { children: /* @__PURE__ */ jsx67(Inset_default, { space: "0.25rem", children: /* @__PURE__ */ jsxs45(DxcTypography, { children: [
10974
10935
  /* @__PURE__ */ jsx67(Link3, { href: `#${slugify(link.label, { lower: true })}`, children: link.label }),
@@ -11033,12 +10994,12 @@ var Link3 = styled59.a`
11033
10994
  var QuickNav_default = DxcQuickNav;
11034
10995
 
11035
10996
  // src/radio-group/RadioGroup.tsx
11036
- import { forwardRef as forwardRef13, useCallback as useCallback10, useContext as useContext44, useId as useId14, useMemo as useMemo14, useState as useState29 } from "react";
11037
- import styled61, { ThemeProvider as ThemeProvider31 } from "styled-components";
10997
+ import { forwardRef as forwardRef13, useCallback as useCallback10, useContext as useContext44, useId as useId16, useMemo as useMemo14, useState as useState29 } from "react";
10998
+ import styled61, { ThemeProvider as ThemeProvider30 } from "styled-components";
11038
10999
 
11039
11000
  // src/radio-group/Radio.tsx
11040
- import { memo as memo11, useContext as useContext43, useEffect as useEffect21, useId as useId13, useRef as useRef17, useState as useState28 } from "react";
11041
- import styled60, { ThemeProvider as ThemeProvider30 } from "styled-components";
11001
+ import { memo as memo11, useContext as useContext43, useEffect as useEffect21, useId as useId15, useRef as useRef17, useState as useState28 } from "react";
11002
+ import styled60, { ThemeProvider as ThemeProvider29 } from "styled-components";
11042
11003
  import { jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
11043
11004
  var DxcRadio = ({
11044
11005
  label,
@@ -11050,7 +11011,7 @@ var DxcRadio = ({
11050
11011
  readOnly,
11051
11012
  tabIndex
11052
11013
  }) => {
11053
- const radioLabelId = `radio-${useId13()}`;
11014
+ const radioLabelId = `radio-${useId15()}`;
11054
11015
  const ref = useRef17(null);
11055
11016
  const colorsTheme = useContext43(HalstackContext);
11056
11017
  const handleOnClick = () => {
@@ -11065,7 +11026,7 @@ var DxcRadio = ({
11065
11026
  }
11066
11027
  focused && ref.current?.focus();
11067
11028
  }, [focused]);
11068
- return /* @__PURE__ */ jsx68(ThemeProvider30, { theme: colorsTheme.radioGroup, children: /* @__PURE__ */ jsx68(Flex_default, { children: /* @__PURE__ */ jsxs46(
11029
+ return /* @__PURE__ */ jsx68(ThemeProvider29, { theme: colorsTheme.radioGroup, children: /* @__PURE__ */ jsx68(Flex_default, { children: /* @__PURE__ */ jsxs46(
11069
11030
  RadioContainer,
11070
11031
  {
11071
11032
  error,
@@ -11189,7 +11150,7 @@ var DxcRadioGroup = forwardRef13(
11189
11150
  error,
11190
11151
  tabIndex = 0
11191
11152
  }, ref) => {
11192
- const radioGroupId = `radio-group-${useId14()}`;
11153
+ const radioGroupId = `radio-group-${useId16()}`;
11193
11154
  const radioGroupLabelId = `label-${radioGroupId}`;
11194
11155
  const errorId = `error-${radioGroupId}`;
11195
11156
  const [innerValue, setInnerValue] = useState29(defaultValue);
@@ -11291,7 +11252,7 @@ var DxcRadioGroup = forwardRef13(
11291
11252
  break;
11292
11253
  }
11293
11254
  };
11294
- return /* @__PURE__ */ jsx69(ThemeProvider31, { theme: colorsTheme.radioGroup, children: /* @__PURE__ */ jsxs47(RadioGroupContainer, { ref, children: [
11255
+ return /* @__PURE__ */ jsx69(ThemeProvider30, { theme: colorsTheme.radioGroup, children: /* @__PURE__ */ jsxs47(RadioGroupContainer, { ref, children: [
11295
11256
  label && /* @__PURE__ */ jsxs47(Label9, { id: radioGroupLabelId, helperText, disabled, children: [
11296
11257
  label,
11297
11258
  optional && /* @__PURE__ */ jsx69(OptionalLabel4, { children: ` ${translatedLabels.formFields.optionalLabel}` })
@@ -11387,7 +11348,7 @@ var RadioGroup_default = DxcRadioGroup;
11387
11348
 
11388
11349
  // src/resultset-table/ResultsetTable.tsx
11389
11350
  import { useContext as useContext45, useEffect as useEffect22, useMemo as useMemo15, useRef as useRef18, useState as useState30 } from "react";
11390
- import styled62, { ThemeProvider as ThemeProvider32 } from "styled-components";
11351
+ import styled62, { ThemeProvider as ThemeProvider31 } from "styled-components";
11391
11352
 
11392
11353
  // src/resultset-table/Icons.tsx
11393
11354
  import { jsx as jsx70, jsxs as jsxs48 } from "react/jsx-runtime";
@@ -11496,7 +11457,7 @@ var DxcResultsetTable = ({
11496
11457
  prevRowCountRef.current = rows.length;
11497
11458
  }
11498
11459
  }, [rows.length]);
11499
- return /* @__PURE__ */ jsx71(ThemeProvider32, { theme: colorsTheme.table, children: /* @__PURE__ */ jsxs49(DxcResultsetTableContainer, { margin, children: [
11460
+ return /* @__PURE__ */ jsx71(ThemeProvider31, { theme: colorsTheme.table, children: /* @__PURE__ */ jsxs49(DxcResultsetTableContainer, { margin, children: [
11500
11461
  /* @__PURE__ */ jsxs49(Table_default, { mode, children: [
11501
11462
  /* @__PURE__ */ jsx71("thead", { children: /* @__PURE__ */ jsx71("tr", { children: columns.map((column, index) => /* @__PURE__ */ jsx71(
11502
11463
  "th",
@@ -11518,196 +11479,70 @@ var DxcResultsetTable = ({
11518
11479
  children: [
11519
11480
  /* @__PURE__ */ jsx71("span", { children: column.displayValue }),
11520
11481
  column.isSortable && /* @__PURE__ */ jsx71(SortIcon, { children: sortColumnIndex === index ? sortOrder === "ascending" ? Icons_default2.arrowUp : Icons_default2.arrowDown : Icons_default2.bothArrows })
11521
- ]
11522
- }
11523
- )
11524
- },
11525
- `tableHeader_${index}`
11526
- )) }) }),
11527
- /* @__PURE__ */ jsx71("tbody", { children: filteredResultset.map((row) => /* @__PURE__ */ jsx71("tr", { children: row.cells.map((cellContent, cellIndex) => /* @__PURE__ */ jsx71("td", { children: cellContent.displayValue }, `resultSetTableCellContent_${cellIndex}`)) }, `resultSetTableCell_${row.id}`)) })
11528
- ] }),
11529
- !hidePaginator && /* @__PURE__ */ jsx71(
11530
- Paginator_default,
11531
- {
11532
- totalItems: rows.length,
11533
- itemsPerPage,
11534
- itemsPerPageOptions,
11535
- itemsPerPageFunction,
11536
- currentPage: page,
11537
- showGoToPage,
11538
- onPageChange: goToPage,
11539
- tabIndex
11540
- }
11541
- )
11542
- ] }) });
11543
- };
11544
- var calculateWidth11 = (margin) => `calc(100% - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})`;
11545
- var DxcResultsetTableContainer = styled62.div`
11546
- width: ${(props) => calculateWidth11(props.margin)};
11547
- margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
11548
- margin-top: ${(props) => props.margin && typeof props.margin === "object" && props.margin.top ? spaces[props.margin.top] : ""};
11549
- margin-right: ${(props) => props.margin && typeof props.margin === "object" && props.margin.right ? spaces[props.margin.right] : ""};
11550
- margin-bottom: ${(props) => props.margin && typeof props.margin === "object" && props.margin.bottom ? spaces[props.margin.bottom] : ""};
11551
- margin-left: ${(props) => props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""};
11552
- `;
11553
- var HeaderContainer3 = styled62.span`
11554
- display: flex;
11555
- align-items: center;
11556
- justify-content: ${(props) => props.theme.headerTextAlign === "center" ? "center" : props.theme.headerTextAlign === "right" ? "flex-end" : "flex-start"};
11557
- gap: ${coreTokens_default.spacing_8};
11558
- width: fit-content;
11559
- border: 1px solid transparent;
11560
- border-radius: 2px;
11561
- cursor: ${(props) => props.isSortable ? "pointer" : "default"};
11562
-
11563
- ${(props) => props.isSortable && `&:focus {
11564
- outline: #0095ff solid 2px;
11565
- }`}
11566
- `;
11567
- var SortIcon = styled62.span`
11568
- display: flex;
11569
- height: 14px;
11570
- width: 14px;
11571
- color: ${(props) => props.theme.sortIconColor};
11572
-
11573
- svg {
11574
- height: 100%;
11575
- width: 100%;
11576
- }
11577
- `;
11578
- DxcResultsetTable.ActionsCell = DxcActionsCell;
11579
- var ResultsetTable_default = DxcResultsetTable;
11580
-
11581
- // src/slider/Slider.tsx
11582
- import { forwardRef as forwardRef14, useContext as useContext46, useId as useId15, useMemo as useMemo16, useState as useState31 } from "react";
11583
- import styled63, { ThemeProvider as ThemeProvider33 } from "styled-components";
11584
- import { jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
11585
- var DxcSlider = forwardRef14(
11586
- ({
11587
- label = "",
11588
- name = "",
11589
- defaultValue,
11590
- value,
11591
- helperText = "",
11592
- minValue = 0,
11593
- maxValue = 100,
11594
- step = 1,
11595
- showLimitsValues = false,
11596
- showInput = false,
11597
- disabled = false,
11598
- marks = false,
11599
- onChange,
11600
- onDragEnd,
11601
- labelFormatCallback,
11602
- margin,
11603
- size = "fillParent"
11604
- }, ref) => {
11605
- const labelId = `label-${useId15()}`;
11606
- const [innerValue, setInnerValue] = useState31(defaultValue ?? 0);
11607
- const [dragging, setDragging] = useState31(false);
11608
- const colorsTheme = useContext46(HalstackContext);
11609
- const isFirefox = navigator.userAgent.indexOf("Firefox") !== -1;
11610
- const minLabel = useMemo16(
11611
- () => labelFormatCallback ? labelFormatCallback(minValue) : minValue,
11612
- [labelFormatCallback, minValue]
11613
- );
11614
- const maxLabel = useMemo16(
11615
- () => labelFormatCallback ? labelFormatCallback(maxValue) : maxValue,
11616
- [labelFormatCallback, maxValue]
11617
- );
11618
- const tickMarks = useMemo16(() => {
11619
- const numberOfMarks = Math.floor(maxValue / step - minValue / step);
11620
- const range = maxValue - minValue;
11621
- const ticks = [];
11622
- if (marks) {
11623
- for (let index = 0; index <= numberOfMarks; index++) {
11624
- ticks.push(
11625
- /* @__PURE__ */ jsx72(
11626
- TickMark,
11627
- {
11628
- disabled,
11629
- stepPosition: step * index / range,
11630
- stepValue: (value ?? innerValue) / maxValue
11631
- },
11632
- `tickmark-${index}-${labelId}`
11633
- )
11634
- );
11635
- }
11636
- return ticks;
11637
- }
11638
- return null;
11639
- }, [minValue, maxValue, step, value, innerValue]);
11640
- const handleSliderChange = (event) => {
11641
- const intValue = parseInt(event.target.value, 10);
11642
- if (intValue !== value || intValue !== innerValue) {
11643
- setInnerValue(intValue);
11644
- }
11645
- onChange?.(intValue);
11646
- };
11647
- const handleSliderDragging = () => {
11648
- setDragging(true);
11649
- };
11650
- const handleSliderOnChangeCommitted = (event) => {
11651
- const intValue = parseInt(event.target.value, 10);
11652
- if (dragging) {
11653
- setDragging(false);
11654
- onDragEnd?.(intValue);
11655
- }
11656
- };
11657
- const handlerInputChange = (event) => {
11658
- const intValue = parseInt(event.value, 10);
11659
- if (value == null) {
11660
- if (!Number.isNaN(intValue)) {
11661
- setInnerValue(intValue > maxValue ? maxValue : intValue);
11662
- }
11663
- }
11664
- if (!Number.isNaN(intValue)) {
11665
- onChange?.(intValue > maxValue ? maxValue : intValue);
11666
- }
11667
- };
11668
- return /* @__PURE__ */ jsx72(ThemeProvider33, { theme: colorsTheme.slider, children: /* @__PURE__ */ jsxs50(Container3, { margin, size, ref, children: [
11669
- /* @__PURE__ */ jsx72(Label10, { id: labelId, disabled, children: label }),
11670
- /* @__PURE__ */ jsx72(HelperText7, { disabled, children: helperText }),
11671
- /* @__PURE__ */ jsxs50(SliderContainer, { children: [
11672
- showLimitsValues && /* @__PURE__ */ jsx72(MinLabelContainer, { disabled, children: minLabel }),
11673
- /* @__PURE__ */ jsxs50(SliderInputContainer, { children: [
11674
- /* @__PURE__ */ jsx72(
11675
- SliderInput,
11676
- {
11677
- role: "slider",
11678
- type: "range",
11679
- value: value != null && value >= 0 ? value : innerValue,
11680
- min: minValue,
11681
- max: maxValue,
11682
- step,
11683
- disabled,
11684
- "aria-labelledby": labelId,
11685
- "aria-orientation": "horizontal",
11686
- "aria-valuemax": maxValue,
11687
- "aria-valuemin": minValue,
11688
- "aria-valuenow": value != null && value >= 0 ? value : innerValue,
11689
- onChange: handleSliderChange,
11690
- onMouseUp: handleSliderOnChangeCommitted,
11691
- onMouseDown: handleSliderDragging
11692
- }
11693
- ),
11694
- marks && /* @__PURE__ */ jsx72(MarksContainer, { isFirefox, children: tickMarks })
11695
- ] }),
11696
- showLimitsValues && /* @__PURE__ */ jsx72(MaxLabelContainer, { disabled, step, children: maxLabel }),
11697
- showInput && /* @__PURE__ */ jsx72(StyledTextInput, { children: /* @__PURE__ */ jsx72(
11698
- TextInput_default,
11699
- {
11700
- name,
11701
- value: value != null && value >= 0 ? value.toString() : innerValue.toString(),
11702
- disabled,
11703
- onChange: handlerInputChange,
11704
- size: "fillParent"
11705
- }
11706
- ) })
11707
- ] })
11708
- ] }) });
11482
+ ]
11483
+ }
11484
+ )
11485
+ },
11486
+ `tableHeader_${index}`
11487
+ )) }) }),
11488
+ /* @__PURE__ */ jsx71("tbody", { children: filteredResultset.map((row) => /* @__PURE__ */ jsx71("tr", { children: row.cells.map((cellContent, cellIndex) => /* @__PURE__ */ jsx71("td", { children: cellContent.displayValue }, `resultSetTableCellContent_${cellIndex}`)) }, `resultSetTableCell_${row.id}`)) })
11489
+ ] }),
11490
+ !hidePaginator && /* @__PURE__ */ jsx71(
11491
+ Paginator_default,
11492
+ {
11493
+ totalItems: rows.length,
11494
+ itemsPerPage,
11495
+ itemsPerPageOptions,
11496
+ itemsPerPageFunction,
11497
+ currentPage: page,
11498
+ showGoToPage,
11499
+ onPageChange: goToPage,
11500
+ tabIndex
11501
+ }
11502
+ )
11503
+ ] }) });
11504
+ };
11505
+ var calculateWidth11 = (margin) => `calc(100% - ${getMargin(margin, "left")} - ${getMargin(margin, "right")})`;
11506
+ var DxcResultsetTableContainer = styled62.div`
11507
+ width: ${(props) => calculateWidth11(props.margin)};
11508
+ margin: ${(props) => props.margin && typeof props.margin !== "object" ? spaces[props.margin] : "0px"};
11509
+ margin-top: ${(props) => props.margin && typeof props.margin === "object" && props.margin.top ? spaces[props.margin.top] : ""};
11510
+ margin-right: ${(props) => props.margin && typeof props.margin === "object" && props.margin.right ? spaces[props.margin.right] : ""};
11511
+ margin-bottom: ${(props) => props.margin && typeof props.margin === "object" && props.margin.bottom ? spaces[props.margin.bottom] : ""};
11512
+ margin-left: ${(props) => props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""};
11513
+ `;
11514
+ var HeaderContainer3 = styled62.span`
11515
+ display: flex;
11516
+ align-items: center;
11517
+ justify-content: ${(props) => props.theme.headerTextAlign === "center" ? "center" : props.theme.headerTextAlign === "right" ? "flex-end" : "flex-start"};
11518
+ gap: ${coreTokens_default.spacing_8};
11519
+ width: fit-content;
11520
+ border: 1px solid transparent;
11521
+ border-radius: 2px;
11522
+ cursor: ${(props) => props.isSortable ? "pointer" : "default"};
11523
+
11524
+ ${(props) => props.isSortable && `&:focus {
11525
+ outline: #0095ff solid 2px;
11526
+ }`}
11527
+ `;
11528
+ var SortIcon = styled62.span`
11529
+ display: flex;
11530
+ height: 14px;
11531
+ width: 14px;
11532
+ color: ${(props) => props.theme.sortIconColor};
11533
+
11534
+ svg {
11535
+ height: 100%;
11536
+ width: 100%;
11709
11537
  }
11710
- );
11538
+ `;
11539
+ DxcResultsetTable.ActionsCell = DxcActionsCell;
11540
+ var ResultsetTable_default = DxcResultsetTable;
11541
+
11542
+ // src/slider/Slider.tsx
11543
+ import { forwardRef as forwardRef14, useContext as useContext46, useId as useId17, useMemo as useMemo16, useState as useState31 } from "react";
11544
+ import styled63, { ThemeProvider as ThemeProvider32 } from "styled-components";
11545
+ import { jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
11711
11546
  var sizes6 = {
11712
11547
  medium: "360px",
11713
11548
  large: "480px",
@@ -11717,7 +11552,7 @@ var calculateWidth12 = (margin, size) => size === "fillParent" ? `calc(${sizes6[
11717
11552
  var getChromeStyles = () => `
11718
11553
  width: 100%;
11719
11554
  margin-right: 4px;`;
11720
- var getFireFoxStyles = () => `
11555
+ var getFirefoxStyles = () => `
11721
11556
  width: calc(100% - 16px);
11722
11557
  margin-right: 3px;`;
11723
11558
  var Container3 = styled63.div`
@@ -11831,7 +11666,6 @@ var SliderContainer = styled63.div`
11831
11666
  `;
11832
11667
  var LimitLabelContainer = styled63.span`
11833
11668
  color: ${(props) => props.disabled ? props.theme.disabledLimitValuesFontColor : props.theme.limitValuesFontColor};
11834
-
11835
11669
  font-family: ${(props) => props.theme.fontFamily};
11836
11670
  font-size: ${(props) => props.theme.limitValuesFontSize};
11837
11671
  font-style: ${(props) => props.theme.limitValuesFontStyle};
@@ -11857,7 +11691,7 @@ var SliderInputContainer = styled63.div`
11857
11691
  z-index: 0;
11858
11692
  `;
11859
11693
  var MarksContainer = styled63.div`
11860
- ${(props) => props.isFirefox ? getFireFoxStyles() : getChromeStyles()}
11694
+ ${(props) => props.isFirefox ? getFirefoxStyles() : getChromeStyles()}
11861
11695
  position: absolute;
11862
11696
  pointer-events: none;
11863
11697
  height: 100%;
@@ -11873,21 +11707,143 @@ var TickMark = styled63.span`
11873
11707
  left: ${(props) => `calc(${props.stepPosition} * 100%)`};
11874
11708
  z-index: ${(props) => props.stepValue != null && `${props.stepPosition <= props.stepValue ? "-1" : "0"}`};
11875
11709
  `;
11876
- var StyledTextInput = styled63.div`
11710
+ var TextInputContainer2 = styled63.div`
11877
11711
  margin-left: ${(props) => props.theme.inputMarginLeft};
11878
11712
  max-width: 70px;
11879
11713
  `;
11714
+ var DxcSlider = forwardRef14(
11715
+ ({
11716
+ label = "",
11717
+ name = "",
11718
+ defaultValue,
11719
+ value,
11720
+ helperText = "",
11721
+ minValue = 0,
11722
+ maxValue = 100,
11723
+ step = 1,
11724
+ showLimitsValues = false,
11725
+ showInput = false,
11726
+ disabled = false,
11727
+ marks = false,
11728
+ onChange,
11729
+ onDragEnd,
11730
+ labelFormatCallback,
11731
+ margin,
11732
+ size = "fillParent"
11733
+ }, ref) => {
11734
+ const labelId = `label-${useId17()}`;
11735
+ const [innerValue, setInnerValue] = useState31(defaultValue ?? 0);
11736
+ const [dragging, setDragging] = useState31(false);
11737
+ const colorsTheme = useContext46(HalstackContext);
11738
+ const isFirefox = navigator.userAgent.indexOf("Firefox") !== -1;
11739
+ const minLabel = useMemo16(
11740
+ () => labelFormatCallback ? labelFormatCallback(minValue) : minValue,
11741
+ [labelFormatCallback, minValue]
11742
+ );
11743
+ const maxLabel = useMemo16(
11744
+ () => labelFormatCallback ? labelFormatCallback(maxValue) : maxValue,
11745
+ [labelFormatCallback, maxValue]
11746
+ );
11747
+ const tickMarks = useMemo16(() => {
11748
+ const numberOfMarks = Math.floor(maxValue / step - minValue / step);
11749
+ const range = maxValue - minValue;
11750
+ const ticks = [];
11751
+ if (marks) {
11752
+ for (let index = 0; index <= numberOfMarks; index++) {
11753
+ ticks.push(
11754
+ /* @__PURE__ */ jsx72(
11755
+ TickMark,
11756
+ {
11757
+ disabled,
11758
+ stepPosition: step * index / range,
11759
+ stepValue: (value ?? innerValue) / maxValue
11760
+ },
11761
+ `tickmark-${index}`
11762
+ )
11763
+ );
11764
+ }
11765
+ return ticks;
11766
+ }
11767
+ return null;
11768
+ }, [minValue, maxValue, step, value, innerValue]);
11769
+ const handleSliderChange = (event) => {
11770
+ const intValue = parseInt(event.target.value, 10);
11771
+ if (intValue !== value || intValue !== innerValue) {
11772
+ setInnerValue(intValue);
11773
+ }
11774
+ onChange?.(intValue);
11775
+ };
11776
+ const handleSliderDragging = () => {
11777
+ setDragging(true);
11778
+ };
11779
+ const handleSliderOnChangeCommitted = (event) => {
11780
+ const intValue = parseInt(event.target.value, 10);
11781
+ if (dragging) {
11782
+ setDragging(false);
11783
+ onDragEnd?.(intValue);
11784
+ }
11785
+ };
11786
+ const handlerInputChange = (event) => {
11787
+ const intValue = parseInt(event.value, 10);
11788
+ if (!Number.isNaN(intValue)) {
11789
+ if (value == null) setInnerValue(intValue > maxValue ? maxValue : intValue);
11790
+ onChange?.(intValue > maxValue ? maxValue : intValue);
11791
+ }
11792
+ };
11793
+ return /* @__PURE__ */ jsx72(ThemeProvider32, { theme: colorsTheme.slider, children: /* @__PURE__ */ jsxs50(Container3, { margin, size, ref, children: [
11794
+ /* @__PURE__ */ jsx72(Label10, { id: labelId, disabled, children: label }),
11795
+ /* @__PURE__ */ jsx72(HelperText7, { disabled, children: helperText }),
11796
+ /* @__PURE__ */ jsxs50(SliderContainer, { children: [
11797
+ showLimitsValues && /* @__PURE__ */ jsx72(MinLabelContainer, { disabled, children: minLabel }),
11798
+ /* @__PURE__ */ jsxs50(SliderInputContainer, { children: [
11799
+ /* @__PURE__ */ jsx72(
11800
+ SliderInput,
11801
+ {
11802
+ role: "slider",
11803
+ type: "range",
11804
+ value: value != null && value >= 0 ? value : innerValue,
11805
+ min: minValue,
11806
+ max: maxValue,
11807
+ step,
11808
+ disabled,
11809
+ "aria-labelledby": labelId,
11810
+ "aria-orientation": "horizontal",
11811
+ "aria-valuemax": maxValue,
11812
+ "aria-valuemin": minValue,
11813
+ "aria-valuenow": value != null && value >= 0 ? value : innerValue,
11814
+ onChange: handleSliderChange,
11815
+ onMouseUp: handleSliderOnChangeCommitted,
11816
+ onMouseDown: handleSliderDragging
11817
+ }
11818
+ ),
11819
+ marks && /* @__PURE__ */ jsx72(MarksContainer, { isFirefox, children: tickMarks })
11820
+ ] }),
11821
+ showLimitsValues && /* @__PURE__ */ jsx72(MaxLabelContainer, { disabled, step, children: maxLabel }),
11822
+ showInput && /* @__PURE__ */ jsx72(TextInputContainer2, { children: /* @__PURE__ */ jsx72(
11823
+ TextInput_default,
11824
+ {
11825
+ name,
11826
+ value: value != null && value >= 0 ? value.toString() : innerValue.toString(),
11827
+ disabled,
11828
+ onChange: handlerInputChange,
11829
+ size: "fillParent"
11830
+ }
11831
+ ) })
11832
+ ] })
11833
+ ] }) });
11834
+ }
11835
+ );
11880
11836
  var Slider_default = DxcSlider;
11881
11837
 
11882
11838
  // src/spinner/Spinner.tsx
11883
- import { useContext as useContext47, useId as useId16, useMemo as useMemo17 } from "react";
11884
- import styled64, { ThemeProvider as ThemeProvider34 } from "styled-components";
11839
+ import { useContext as useContext47, useId as useId18, useMemo as useMemo17 } from "react";
11840
+ import styled64, { ThemeProvider as ThemeProvider33 } from "styled-components";
11885
11841
  import { jsx as jsx73, jsxs as jsxs51 } from "react/jsx-runtime";
11886
11842
  var DxcSpinner = ({ label, value, showValue = false, mode = "large", margin }) => {
11887
- const labelId = useId16();
11843
+ const labelId = useId18();
11888
11844
  const colorsTheme = useContext47(HalstackContext);
11889
11845
  const determinated = useMemo17(() => value != null && value >= 0 && value <= 100, [value]);
11890
- return /* @__PURE__ */ jsx73(ThemeProvider34, { theme: colorsTheme.spinner, children: /* @__PURE__ */ jsx73(DXCSpinner, { margin, mode, children: /* @__PURE__ */ jsxs51(SpinnerContainer, { mode, children: [
11846
+ return /* @__PURE__ */ jsx73(ThemeProvider33, { theme: colorsTheme.spinner, children: /* @__PURE__ */ jsx73(DXCSpinner, { margin, mode, children: /* @__PURE__ */ jsxs51(SpinnerContainer, { mode, children: [
11891
11847
  mode === "overlay" && /* @__PURE__ */ jsx73(BackOverlay, {}),
11892
11848
  /* @__PURE__ */ jsx73(BackgroundSpinner, { children: mode === "small" ? /* @__PURE__ */ jsx73(SVGBackground, { viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx73(CircleBackground, { cx: "8", cy: "8", r: "6", mode }) }) : /* @__PURE__ */ jsx73(SVGBackground, { viewBox: "0 0 140 140", children: /* @__PURE__ */ jsx73(CircleBackground, { cx: "70", cy: "70", r: "65", mode }) }) }),
11893
11849
  /* @__PURE__ */ jsx73(
@@ -12112,12 +12068,12 @@ var StatusLabel = styled65.span`
12112
12068
  var StatusLight_default = DxcStatusLight;
12113
12069
 
12114
12070
  // src/switch/Switch.tsx
12115
- import { forwardRef as forwardRef15, useContext as useContext48, useId as useId17, useRef as useRef19, useState as useState32 } from "react";
12116
- import styled66, { ThemeProvider as ThemeProvider35 } from "styled-components";
12071
+ import { forwardRef as forwardRef15, useContext as useContext48, useId as useId19, useRef as useRef19, useState as useState32 } from "react";
12072
+ import styled66, { ThemeProvider as ThemeProvider34 } from "styled-components";
12117
12073
  import { Fragment as Fragment13, jsx as jsx75, jsxs as jsxs53 } from "react/jsx-runtime";
12118
12074
  var DxcSwitch = forwardRef15(
12119
12075
  ({
12120
- defaultChecked,
12076
+ defaultChecked = false,
12121
12077
  checked,
12122
12078
  value,
12123
12079
  label = "",
@@ -12130,9 +12086,9 @@ var DxcSwitch = forwardRef15(
12130
12086
  size = "fitContent",
12131
12087
  tabIndex = 0
12132
12088
  }, ref) => {
12133
- const switchId = `switch-${useId17()}`;
12089
+ const switchId = `switch-${useId19()}`;
12134
12090
  const labelId = `label-${switchId}`;
12135
- const [innerChecked, setInnerChecked] = useState32(defaultChecked ?? false);
12091
+ const [innerChecked, setInnerChecked] = useState32(defaultChecked);
12136
12092
  const colorsTheme = useContext48(HalstackContext);
12137
12093
  const translatedLabels = useContext48(HalstackLanguageContext);
12138
12094
  const refTrack = useRef19(null);
@@ -12155,7 +12111,7 @@ var DxcSwitch = forwardRef15(
12155
12111
  }
12156
12112
  onChange?.(checked ? !checked : !innerChecked);
12157
12113
  };
12158
- return /* @__PURE__ */ jsx75(ThemeProvider35, { theme: colorsTheme.switch, children: /* @__PURE__ */ jsxs53(
12114
+ return /* @__PURE__ */ jsx75(ThemeProvider34, { theme: colorsTheme.switch, children: /* @__PURE__ */ jsxs53(
12159
12115
  SwitchContainer,
12160
12116
  {
12161
12117
  margin,
@@ -12362,11 +12318,11 @@ import {
12362
12318
  useRef as useRef22,
12363
12319
  useState as useState34
12364
12320
  } from "react";
12365
- import styled70, { ThemeProvider as ThemeProvider37 } from "styled-components";
12321
+ import styled70, { ThemeProvider as ThemeProvider36 } from "styled-components";
12366
12322
 
12367
12323
  // src/tabs/TabsContext.tsx
12368
- import { createContext as createContext10 } from "react";
12369
- var TabsContext_default = createContext10(null);
12324
+ import { createContext as createContext9 } from "react";
12325
+ var TabsContext_default = createContext9(null);
12370
12326
 
12371
12327
  // src/tabs/Tab.tsx
12372
12328
  import { forwardRef as forwardRef16, useContext as useContext49, useEffect as useEffect23, useRef as useRef20 } from "react";
@@ -12583,7 +12539,7 @@ var Tab_default2 = DxcTab2;
12583
12539
 
12584
12540
  // src/tabs/TabsLegacy.tsx
12585
12541
  import { useCallback as useCallback11, useContext as useContext50, useEffect as useEffect24, useMemo as useMemo18, useRef as useRef21, useState as useState33 } from "react";
12586
- import styled69, { ThemeProvider as ThemeProvider36 } from "styled-components";
12542
+ import styled69, { ThemeProvider as ThemeProvider35 } from "styled-components";
12587
12543
 
12588
12544
  // src/tabs/TabLegacy.tsx
12589
12545
  import { forwardRef as forwardRef17, memo as memo12 } from "react";
@@ -12933,7 +12889,7 @@ var DxcTabs = ({
12933
12889
  };
12934
12890
  const isTabActive = (index) => activeTabIndex != null && activeTabIndex >= 0 ? activeTabIndex === index : innerActiveTabIndex === index;
12935
12891
  const isActiveIndicatorDisabled = firstFocus === -1 || tabs != null && activeTabIndex !== void 0 && activeTabIndex >= 0 && !!tabs[activeTabIndex]?.isDisabled;
12936
- return /* @__PURE__ */ jsx78(ThemeProvider36, { theme: colorsTheme.tabs, children: /* @__PURE__ */ jsxs56(TabsContainer, { margin, children: [
12892
+ return /* @__PURE__ */ jsx78(ThemeProvider35, { theme: colorsTheme.tabs, children: /* @__PURE__ */ jsxs56(TabsContainer, { margin, children: [
12937
12893
  /* @__PURE__ */ jsx78(Underline2, {}),
12938
12894
  /* @__PURE__ */ jsxs56(Tabs, { hasLabelAndIcon, iconPosition, children: [
12939
12895
  /* @__PURE__ */ jsx78(
@@ -13247,7 +13203,7 @@ var DxcTabs2 = ({
13247
13203
  }
13248
13204
  };
13249
13205
  return children ? /* @__PURE__ */ jsxs57(Fragment14, { children: [
13250
- /* @__PURE__ */ jsx79(ThemeProvider37, { theme: colorsTheme.tabs, children: /* @__PURE__ */ jsxs57(TabsContainer2, { margin, children: [
13206
+ /* @__PURE__ */ jsx79(ThemeProvider36, { theme: colorsTheme.tabs, children: /* @__PURE__ */ jsxs57(TabsContainer2, { margin, children: [
13251
13207
  /* @__PURE__ */ jsx79(Underline3, {}),
13252
13208
  /* @__PURE__ */ jsxs57(Tabs2, { hasLabelAndIcon, iconPosition, children: [
13253
13209
  /* @__PURE__ */ jsx79(
@@ -13415,7 +13371,7 @@ var Tabs_default = DxcTabs2;
13415
13371
 
13416
13372
  // src/tag/Tag.tsx
13417
13373
  import { useContext as useContext52, useState as useState35 } from "react";
13418
- import styled71, { ThemeProvider as ThemeProvider38 } from "styled-components";
13374
+ import styled71, { ThemeProvider as ThemeProvider37 } from "styled-components";
13419
13375
  import { Fragment as Fragment15, jsx as jsx80, jsxs as jsxs58 } from "react/jsx-runtime";
13420
13376
  var TagWrapper = ({ condition, wrapper, children }) => /* @__PURE__ */ jsx80(Fragment15, { children: condition ? wrapper(children) : children });
13421
13377
  var DxcTag = ({
@@ -13432,7 +13388,7 @@ var DxcTag = ({
13432
13388
  }) => {
13433
13389
  const colorsTheme = useContext52(HalstackContext);
13434
13390
  const [isHovered, changeIsHovered] = useState35(false);
13435
- return /* @__PURE__ */ jsx80(ThemeProvider38, { theme: colorsTheme.tag, children: /* @__PURE__ */ jsx80(
13391
+ return /* @__PURE__ */ jsx80(ThemeProvider37, { theme: colorsTheme.tag, children: /* @__PURE__ */ jsx80(
13436
13392
  StyledDxcTag,
13437
13393
  {
13438
13394
  margin,
@@ -13542,8 +13498,8 @@ var TagLabel = styled71.div`
13542
13498
  var Tag_default = DxcTag;
13543
13499
 
13544
13500
  // src/textarea/Textarea.tsx
13545
- import { forwardRef as forwardRef18, useContext as useContext53, useEffect as useEffect26, useId as useId18, useRef as useRef23, useState as useState36 } from "react";
13546
- import styled72, { ThemeProvider as ThemeProvider39 } from "styled-components";
13501
+ import { forwardRef as forwardRef18, useContext as useContext53, useEffect as useEffect26, useId as useId20, useRef as useRef23, useState as useState36 } from "react";
13502
+ import styled72, { ThemeProvider as ThemeProvider38 } from "styled-components";
13547
13503
  import { jsx as jsx81, jsxs as jsxs59 } from "react/jsx-runtime";
13548
13504
  var patternMatch = (pattern, value) => new RegExp(pattern).test(value);
13549
13505
  var DxcTextarea = forwardRef18(
@@ -13568,10 +13524,11 @@ var DxcTextarea = forwardRef18(
13568
13524
  autocomplete = "off",
13569
13525
  margin,
13570
13526
  size = "medium",
13571
- tabIndex = 0
13527
+ tabIndex = 0,
13528
+ ariaLabel = "Text area"
13572
13529
  }, ref) => {
13573
13530
  const [innerValue, setInnerValue] = useState36(defaultValue);
13574
- const textareaId = `textarea-${useId18()}`;
13531
+ const textareaId = `textarea-${useId20()}`;
13575
13532
  const colorsTheme = useContext53(HalstackContext);
13576
13533
  const translatedLabels = useContext53(HalstackLanguageContext);
13577
13534
  const textareaRef = useRef23(null);
@@ -13636,7 +13593,7 @@ var DxcTextarea = forwardRef18(
13636
13593
  prevValueRef.current = value ?? innerValue;
13637
13594
  }
13638
13595
  }, [verticalGrow, value, innerValue, rows]);
13639
- return /* @__PURE__ */ jsx81(ThemeProvider39, { theme: colorsTheme.textarea, children: /* @__PURE__ */ jsxs59(TextareaContainer, { margin, size, ref, children: [
13596
+ return /* @__PURE__ */ jsx81(ThemeProvider38, { theme: colorsTheme.textarea, children: /* @__PURE__ */ jsxs59(TextareaContainer, { margin, size, ref, children: [
13640
13597
  label && /* @__PURE__ */ jsxs59(Label12, { htmlFor: textareaId, disabled, helperText, children: [
13641
13598
  label,
13642
13599
  " ",
@@ -13664,7 +13621,8 @@ var DxcTextarea = forwardRef18(
13664
13621
  tabIndex,
13665
13622
  "aria-invalid": !!error,
13666
13623
  "aria-errormessage": error ? errorId : void 0,
13667
- "aria-required": !disabled && !optional
13624
+ "aria-required": !disabled && !optional,
13625
+ "aria-label": label ? void 0 : ariaLabel
13668
13626
  }
13669
13627
  ),
13670
13628
  !disabled && typeof error === "string" && /* @__PURE__ */ jsx81(ErrorMessageContainer3, { id: errorId, role: "alert", "aria-live": error ? "assertive" : "off", children: error })
@@ -13729,7 +13687,7 @@ var Textarea = styled72.textarea`
13729
13687
  if (props.disabled) return props.theme.disabledBorderColor;
13730
13688
  else if (props.error) return "transparent";
13731
13689
  else if (props.readOnly) return props.theme.readOnlyBorderColor;
13732
- else props.theme.enabledBorderColor;
13690
+ else return props.theme.enabledBorderColor;
13733
13691
  }};
13734
13692
 
13735
13693
  ${(props) => props.error && !props.disabled && `box-shadow: 0 0 0 2px ${props.theme.errorBorderColor};
@@ -13966,8 +13924,8 @@ var DxcToast = ({
13966
13924
  var Toast_default = memo13(DxcToast);
13967
13925
 
13968
13926
  // src/toast/ToastContext.tsx
13969
- import { createContext as createContext11 } from "react";
13970
- var ToastContext_default = createContext11(null);
13927
+ import { createContext as createContext10 } from "react";
13928
+ var ToastContext_default = createContext10(null);
13971
13929
 
13972
13930
  // src/toast/ToastsQueue.tsx
13973
13931
  import { jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
@@ -14036,8 +13994,8 @@ var DxcToastsQueue = ({ children, duration = 3e3 }) => {
14036
13994
  var ToastsQueue_default = DxcToastsQueue;
14037
13995
 
14038
13996
  // src/toggle-group/ToggleGroup.tsx
14039
- import { useContext as useContext55, useId as useId19, useState as useState39 } from "react";
14040
- import styled75, { ThemeProvider as ThemeProvider40 } from "styled-components";
13997
+ import { useContext as useContext55, useId as useId21, useState as useState39 } from "react";
13998
+ import styled75, { ThemeProvider as ThemeProvider39 } from "styled-components";
14041
13999
  import { jsx as jsx84, jsxs as jsxs62 } from "react/jsx-runtime";
14042
14000
  var DxcToggleGroup = ({
14043
14001
  label,
@@ -14051,7 +14009,7 @@ var DxcToggleGroup = ({
14051
14009
  multiple = false,
14052
14010
  tabIndex = 0
14053
14011
  }) => {
14054
- const toggleGroupLabelId = `label-toggle-group-${useId19()}`;
14012
+ const toggleGroupLabelId = `label-toggle-group-${useId21()}`;
14055
14013
  const [selectedValue, setSelectedValue] = useState39(defaultValue ?? (multiple ? [] : -1));
14056
14014
  const colorsTheme = useContext55(HalstackContext);
14057
14015
  const handleToggleChange = (selectedOption) => {
@@ -14091,7 +14049,7 @@ var DxcToggleGroup = ({
14091
14049
  break;
14092
14050
  }
14093
14051
  };
14094
- return /* @__PURE__ */ jsx84(ThemeProvider40, { theme: colorsTheme.toggleGroup, children: /* @__PURE__ */ jsxs62(ToggleGroup, { margin, children: [
14052
+ return /* @__PURE__ */ jsx84(ThemeProvider39, { theme: colorsTheme.toggleGroup, children: /* @__PURE__ */ jsxs62(ToggleGroup, { margin, children: [
14095
14053
  /* @__PURE__ */ jsx84(Label13, { id: toggleGroupLabelId, disabled, children: label }),
14096
14054
  /* @__PURE__ */ jsx84(HelperText9, { disabled, children: helperText }),
14097
14055
  /* @__PURE__ */ jsx84(OptionsContainer, { "aria-labelledby": toggleGroupLabelId, children: options.map((option, i) => /* @__PURE__ */ jsx84(Tooltip, { label: option.title, children: /* @__PURE__ */ jsx84(
@@ -14205,11 +14163,13 @@ var IconContainer7 = styled75.div`
14205
14163
  var ToggleGroup_default = DxcToggleGroup;
14206
14164
 
14207
14165
  // src/wizard/Wizard.tsx
14208
- import { useContext as useContext56, useState as useState40 } from "react";
14209
- import styled76, { ThemeProvider as ThemeProvider41 } from "styled-components";
14166
+ import { useContext as useContext56, useMemo as useMemo21, useState as useState40 } from "react";
14167
+ import styled76, { ThemeProvider as ThemeProvider40 } from "styled-components";
14168
+
14169
+ // src/wizard/Icons.tsx
14210
14170
  import { jsx as jsx85, jsxs as jsxs63 } from "react/jsx-runtime";
14211
14171
  var icons2 = {
14212
- validIcon: /* @__PURE__ */ jsxs63("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", children: [
14172
+ valid: /* @__PURE__ */ jsxs63("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", children: [
14213
14173
  /* @__PURE__ */ jsx85("path", { "data-name": "Path 2946", d: "M0,0H18V18H0Z", fill: "none" }),
14214
14174
  /* @__PURE__ */ jsx85(
14215
14175
  "path",
@@ -14231,7 +14191,7 @@ var icons2 = {
14231
14191
  }
14232
14192
  )
14233
14193
  ] }),
14234
- invalidIcon: /* @__PURE__ */ jsxs63("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", children: [
14194
+ invalid: /* @__PURE__ */ jsxs63("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", children: [
14235
14195
  /* @__PURE__ */ jsx85("path", { "data-name": "Path 2943", d: "M0,0H18V18H0Z", fill: "none" }),
14236
14196
  /* @__PURE__ */ jsx85(
14237
14197
  "path",
@@ -14253,50 +14213,10 @@ var icons2 = {
14253
14213
  )
14254
14214
  ] })
14255
14215
  };
14256
- var DxcWizard = ({
14257
- mode = "horizontal",
14258
- defaultCurrentStep,
14259
- currentStep,
14260
- onStepClick,
14261
- steps,
14262
- margin,
14263
- tabIndex = 0
14264
- }) => {
14265
- const [innerCurrent, setInnerCurrentStep] = useState40(currentStep ?? defaultCurrentStep ?? 0);
14266
- const renderedCurrent = currentStep ?? innerCurrent;
14267
- const colorsTheme = useContext56(HalstackContext);
14268
- const handleStepClick = (newValue) => {
14269
- setInnerCurrentStep(newValue);
14270
- onStepClick?.(newValue);
14271
- };
14272
- return /* @__PURE__ */ jsx85(ThemeProvider41, { theme: colorsTheme.wizard, children: /* @__PURE__ */ jsx85(StepsContainer, { mode, margin, role: "group", children: steps.map((step, i) => /* @__PURE__ */ jsxs63(StepContainer, { mode, lastStep: i === steps.length - 1, children: [
14273
- /* @__PURE__ */ jsxs63(
14274
- Step,
14275
- {
14276
- onClick: () => {
14277
- handleStepClick(i);
14278
- },
14279
- disabled: step.disabled,
14280
- mode,
14281
- first: i === 0,
14282
- last: i === steps.length - 1,
14283
- "aria-current": renderedCurrent === i ? "step" : "false",
14284
- tabIndex,
14285
- children: [
14286
- /* @__PURE__ */ jsxs63(StepHeader, { validityIcon: step.valid !== void 0, children: [
14287
- /* @__PURE__ */ jsx85(IconContainer8, { current: i === renderedCurrent, visited: i < renderedCurrent, disabled: step.disabled, children: step.icon ? typeof step.icon === "string" ? /* @__PURE__ */ jsx85(Icon_default, { icon: step.icon }) : step.icon : /* @__PURE__ */ jsx85(Number3, { children: i + 1 }) }),
14288
- step.valid !== void 0 && (step.valid ? /* @__PURE__ */ jsx85(ValidityIconContainer, { children: icons2.validIcon }) : /* @__PURE__ */ jsx85(ValidityIconContainer, { children: icons2.invalidIcon }))
14289
- ] }),
14290
- (step.label || step.description) && /* @__PURE__ */ jsxs63(InfoContainer, { children: [
14291
- step.label && /* @__PURE__ */ jsx85(Label14, { current: i === renderedCurrent, disabled: step.disabled, visited: i <= innerCurrent, children: step.label }),
14292
- step.description && /* @__PURE__ */ jsx85(Description, { current: i === renderedCurrent, disabled: step.disabled, visited: i <= innerCurrent, children: step.description })
14293
- ] })
14294
- ]
14295
- }
14296
- ),
14297
- i === steps.length - 1 ? "" : /* @__PURE__ */ jsx85(StepSeparator, { mode })
14298
- ] }, `step${i}`)) }) });
14299
- };
14216
+ var Icons_default3 = icons2;
14217
+
14218
+ // src/wizard/Wizard.tsx
14219
+ import { jsx as jsx86, jsxs as jsxs64 } from "react/jsx-runtime";
14300
14220
  var StepsContainer = styled76.div`
14301
14221
  display: flex;
14302
14222
  flex-direction: ${(props) => props.mode === "vertical" ? "column" : "row"};
@@ -14320,6 +14240,7 @@ var Step = styled76.button`
14320
14240
  display: flex;
14321
14241
  justify-content: flex-start;
14322
14242
  align-items: center;
14243
+ gap: 0.75rem;
14323
14244
  border: none;
14324
14245
  border-radius: 0.25rem;
14325
14246
  background: inherit;
@@ -14378,9 +14299,6 @@ var ValidityIconContainer = styled76.div`
14378
14299
  top: 22.5px;
14379
14300
  left: 22.5px;
14380
14301
  `;
14381
- var InfoContainer = styled76.div`
14382
- margin-left: 12px;
14383
- `;
14384
14302
  var Label14 = styled76.p`
14385
14303
  text-align: ${(props) => props.theme.labelTextAlign};
14386
14304
  font-family: ${(props) => props.theme.labelFontFamily};
@@ -14410,13 +14328,57 @@ var StepSeparator = styled76.div`
14410
14328
  opacity: 1;
14411
14329
  flex-grow: 1;
14412
14330
  `;
14331
+ var DxcWizard = ({
14332
+ mode = "horizontal",
14333
+ defaultCurrentStep = 0,
14334
+ currentStep,
14335
+ onStepClick,
14336
+ steps,
14337
+ margin,
14338
+ tabIndex = 0
14339
+ }) => {
14340
+ const colorsTheme = useContext56(HalstackContext);
14341
+ const [innerCurrent, setInnerCurrentStep] = useState40(defaultCurrentStep);
14342
+ const renderedCurrent = useMemo21(() => currentStep ?? innerCurrent, [currentStep, innerCurrent]);
14343
+ const handleStepClick = (newValue) => {
14344
+ setInnerCurrentStep(newValue);
14345
+ onStepClick?.(newValue);
14346
+ };
14347
+ return /* @__PURE__ */ jsx86(ThemeProvider40, { theme: colorsTheme.wizard, children: /* @__PURE__ */ jsx86(StepsContainer, { mode, margin, role: "group", children: steps.map((step, i) => /* @__PURE__ */ jsxs64(StepContainer, { mode, lastStep: i === steps.length - 1, children: [
14348
+ /* @__PURE__ */ jsxs64(
14349
+ Step,
14350
+ {
14351
+ onClick: () => {
14352
+ handleStepClick(i);
14353
+ },
14354
+ disabled: step.disabled,
14355
+ mode,
14356
+ first: i === 0,
14357
+ last: i === steps.length - 1,
14358
+ "aria-current": renderedCurrent === i ? "step" : "false",
14359
+ tabIndex,
14360
+ children: [
14361
+ /* @__PURE__ */ jsxs64(StepHeader, { validityIcon: step.valid != null, children: [
14362
+ /* @__PURE__ */ jsx86(IconContainer8, { current: i === renderedCurrent, visited: i < renderedCurrent, disabled: step.disabled, children: step.icon ? typeof step.icon === "string" ? /* @__PURE__ */ jsx86(Icon_default, { icon: step.icon }) : step.icon : /* @__PURE__ */ jsx86(Number3, { children: i + 1 }) }),
14363
+ step.valid != null && /* @__PURE__ */ jsx86(ValidityIconContainer, { children: step.valid ? Icons_default3.valid : Icons_default3.invalid })
14364
+ ] }),
14365
+ (step.label || step.description) && /* @__PURE__ */ jsxs64("div", { children: [
14366
+ step.label && /* @__PURE__ */ jsx86(Label14, { current: i === renderedCurrent, disabled: step.disabled, visited: i <= innerCurrent, children: step.label }),
14367
+ step.description && /* @__PURE__ */ jsx86(Description, { current: i === renderedCurrent, disabled: step.disabled, visited: i <= innerCurrent, children: step.description })
14368
+ ] })
14369
+ ]
14370
+ }
14371
+ ),
14372
+ i === steps.length - 1 ? "" : /* @__PURE__ */ jsx86(StepSeparator, { mode })
14373
+ ] }, `step${i}`)) }) });
14374
+ };
14413
14375
  var Wizard_default = DxcWizard;
14414
14376
 
14415
14377
  // src/toast/useToast.tsx
14416
- import { useContext as useContext57, useMemo as useMemo21 } from "react";
14378
+ import { useContext as useContext57, useMemo as useMemo22 } from "react";
14417
14379
  var useToast = () => {
14418
14380
  const add = useContext57(ToastContext_default);
14419
- const toast = useMemo21(
14381
+ const toast = useMemo22(
14420
14382
  () => ({
14421
14383
  default: (toast2) => add?.(toast2, "default"),
14422
14384
  success: (toast2) => add?.(toast2, "success"),