kiban-design-system 1.1.13-hotfix.0 → 1.1.15-hotfix.0

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.
Files changed (29) hide show
  1. package/dist/assets/ArrowLeftIcon.d.ts +3 -0
  2. package/dist/assets/ArrowRightIcon.d.ts +3 -0
  3. package/dist/assets/SideBarIcon.d.ts +3 -0
  4. package/dist/components/Alert/Alert.props.d.ts +1 -1
  5. package/dist/components/AlertProvider/AlertProvider.d.ts +2 -1
  6. package/dist/components/AlertProvider/AlertProvider.props.d.ts +8 -3
  7. package/dist/components/AlphaSideMenu/AlphaSideMenu.d.ts +8 -0
  8. package/dist/components/AlphaSideMenu/AlphaSideMenu.props.d.ts +10 -0
  9. package/dist/components/AlphaSideMenu/components/Item/Item.d.ts +5 -0
  10. package/dist/components/AlphaSideMenu/components/Item/Item.props.d.ts +28 -0
  11. package/dist/components/AlphaSideMenu/components/Item/index.d.ts +2 -0
  12. package/dist/components/AlphaSideMenu/components/Section/Section.d.ts +5 -0
  13. package/dist/components/AlphaSideMenu/components/Section/Section.props.d.ts +8 -0
  14. package/dist/components/AlphaSideMenu/components/Section/index.d.ts +2 -0
  15. package/dist/components/AlphaSideMenu/components/Tier/Tier.d.ts +5 -0
  16. package/dist/components/AlphaSideMenu/components/Tier/Tier.props.d.ts +11 -0
  17. package/dist/components/AlphaSideMenu/components/Tier/index.d.ts +2 -0
  18. package/dist/components/AlphaSideMenu/components/index.d.ts +3 -0
  19. package/dist/components/AlphaSideMenu/index.d.ts +3 -0
  20. package/dist/components/AlphaSideMenu/utils/context.d.ts +10 -0
  21. package/dist/components/AlphaSideMenu/utils/index.d.ts +2 -0
  22. package/dist/components/Header/Header.props.d.ts +2 -1
  23. package/dist/components/SideMenu/SideMenu.d.ts +1 -0
  24. package/dist/components/index.d.ts +1 -1
  25. package/dist/index.css +7 -7
  26. package/dist/index.css.map +1 -1
  27. package/dist/index.js +235 -66
  28. package/dist/index.js.map +1 -1
  29. package/package.json +5 -1
package/dist/index.js CHANGED
@@ -1012,11 +1012,14 @@ const Alert = ({ icon, appearance = 'info', content, onDismiss, id, }) => {
1012
1012
  ]
1013
1013
  .filter(Boolean)
1014
1014
  .join(' ');
1015
- return (jsxs("div", Object.assign({ className: className }, { children: [jsxs("div", Object.assign({ className: `${MAIN_CLASS$t}__content` }, { children: [icon && (jsx("div", Object.assign({ className: `${MAIN_CLASS$t}__icon` }, { children: jsx(Icon, { name: icon }, void 0) }), void 0)), jsx("span", { children: content }, void 0)] }), void 0), onDismiss ? (jsx("div", Object.assign({ className: `${MAIN_CLASS$t}__close`, onClick: () => onDismiss(id) }, { children: jsx(Icon, { name: 'Close' }, void 0) }), void 0)) : null] }), void 0));
1015
+ const iconMarkup = appearance !== 'loading' && icon ? (jsx("div", Object.assign({ className: `${MAIN_CLASS$t}__icon` }, { children: jsx(Icon, { name: icon }, void 0) }), void 0)) : null;
1016
+ const loadingMarkup = appearance === 'loading' ? (jsx("div", Object.assign({ className: `${MAIN_CLASS$t}__loading` }, { children: jsx(Icon, { name: 'Loader' }, void 0) }), void 0)) : null;
1017
+ return (jsxs("div", Object.assign({ className: className }, { children: [jsxs("div", Object.assign({ className: `${MAIN_CLASS$t}__content` }, { children: [iconMarkup, loadingMarkup, jsx("span", { children: content }, void 0)] }), void 0), onDismiss ? (jsx("div", Object.assign({ className: `${MAIN_CLASS$t}__close`, onClick: () => onDismiss(id) }, { children: jsx(Icon, { name: 'Close' }, void 0) }), void 0)) : null] }), void 0));
1016
1018
  };
1017
1019
 
1018
1020
  const AlertContext = createContext({
1019
1021
  addAlert: () => null,
1022
+ deleteAlert: () => null,
1020
1023
  limit: 0,
1021
1024
  });
1022
1025
 
@@ -1037,8 +1040,18 @@ const AlertProvider = ({ children, limit }) => {
1037
1040
  }
1038
1041
  }, [newAlert]);
1039
1042
  const countDownAlerts = () => {
1040
- let alerts = alertList.map((alertElem) => (Object.assign(Object.assign({}, alertElem), { duration: alertElem.duration - 1000 })));
1041
- alerts = alerts.filter((alertElement) => alertElement.duration > 0);
1043
+ let alerts = alertList.map((alertElem) => (Object.assign(Object.assign({}, alertElem), { duration: alertElem.duration === 'infinite'
1044
+ ? 'infinite'
1045
+ : alertElem.duration - 1000 })));
1046
+ // Trigger on dismiss event when an alert is dismissed
1047
+ alerts.forEach((alertElement) => {
1048
+ var _a;
1049
+ if (alertElement.duration === 0) {
1050
+ (_a = alertElement.onDismiss) === null || _a === void 0 ? void 0 : _a.call(alertElement, alertElement.id);
1051
+ }
1052
+ });
1053
+ alerts = alerts.filter((alertElement) => alertElement.duration === 'infinite' ||
1054
+ (typeof alertElement.duration === 'number' && alertElement.duration > 0));
1042
1055
  setAlertList(alerts);
1043
1056
  };
1044
1057
  useEffect(() => {
@@ -1053,7 +1066,7 @@ const AlertProvider = ({ children, limit }) => {
1053
1066
  clearInterval(interval);
1054
1067
  };
1055
1068
  }, [alertList]);
1056
- const addAlert = ({ icon, appearance, content, duration, }) => {
1069
+ const addAlert = ({ icon, appearance, content, duration, onDismiss, dismissible = false, }) => {
1057
1070
  const id = Math.floor(Math.random() * 100 + 1);
1058
1071
  const alertAddProps = {
1059
1072
  icon,
@@ -1061,27 +1074,34 @@ const AlertProvider = ({ children, limit }) => {
1061
1074
  content,
1062
1075
  duration,
1063
1076
  id,
1077
+ onDismiss,
1078
+ dismissible,
1064
1079
  };
1065
1080
  setNewAlert(alertAddProps);
1081
+ return id;
1066
1082
  };
1067
1083
  const deleteAlert = (index) => {
1068
1084
  if (index !== undefined) {
1069
1085
  setAlertList(alertList.filter((filterItem) => filterItem.id !== index));
1070
1086
  }
1071
1087
  };
1072
- return (jsxs(AlertContext.Provider, Object.assign({ value: { addAlert, limit } }, { children: [children, portalTarget &&
1088
+ return (jsxs(AlertContext.Provider, Object.assign({ value: { addAlert, limit, deleteAlert } }, { children: [children, portalTarget &&
1073
1089
  alertList.length > 0 &&
1074
- createPortal(jsx("div", Object.assign({ className: 'AlertProvider' }, { children: alertList.map((alertItem) => (jsx(Alert, { icon: alertItem.icon, appearance: alertItem.appearance, duration: alertItem.duration, onDismiss: alertItem.id ? () => deleteAlert(alertItem.id) : undefined, content: alertItem.content, id: alertItem.id }, alertItem.id))) }), void 0), portalTarget)] }), void 0));
1090
+ createPortal(jsx("div", Object.assign({ className: 'AlertProvider' }, { children: alertList.map((alertItem) => (jsx(Alert, { icon: alertItem.icon, appearance: alertItem.appearance, duration: alertItem.duration === 'infinite'
1091
+ ? undefined
1092
+ : alertItem.duration, onDismiss: alertItem.dismissible
1093
+ ? () => deleteAlert(alertItem.id)
1094
+ : undefined, content: alertItem.content, id: alertItem.id }, alertItem.id))) }), void 0), portalTarget)] }), void 0));
1075
1095
  };
1076
1096
  const useShowAlert = () => {
1077
1097
  const { addAlert } = useContext(AlertContext);
1078
1098
  return addAlert;
1079
1099
  };
1080
1100
 
1081
- const COMPONENT_NAME$B = 'AlphaAttributeInput';
1101
+ const COMPONENT_NAME$F = 'AlphaAttributeInput';
1082
1102
  const AlphaAttributeInput = ({ items, divider, label, isRequired, }) => {
1083
1103
  const [isFocused, setIsFocused] = useState(false);
1084
- const className = cssClassName(COMPONENT_NAME$B, isFocused && 'isFocused');
1104
+ const className = cssClassName(COMPONENT_NAME$F, isFocused && 'isFocused');
1085
1105
  const handleBlur = (callback) => {
1086
1106
  setIsFocused(false);
1087
1107
  if (callback) {
@@ -1100,25 +1120,25 @@ const AlphaAttributeInput = ({ items, divider, label, isRequired, }) => {
1100
1120
  item.onChange(event.target.value);
1101
1121
  }
1102
1122
  };
1103
- const itemLabelMarkup = item.label ? (jsx("label", Object.assign({ className: `${COMPONENT_NAME$B}__ItemLabelWrapper` }, { children: item.label }), void 0)) : null;
1104
- const dividerMarkup = divider && index < items.length - 1 ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$B}__Divider` }, { children: divider }), void 0)) : null;
1105
- return (jsxs(Fragment$1, { children: [jsxs("div", Object.assign({ className: `${COMPONENT_NAME$B}__Item` }, { children: [itemLabelMarkup, jsx("input", { type: item.type, value: item.value, onChange: handleChange, onBlur: () => handleBlur(item.onBlur), onFocus: () => handleFocus(item.onFocus), placeholder: item.placeholder, min: item.min, max: item.max, minLength: item.minLength, maxLength: item.maxLength }, void 0)] }), index), dividerMarkup] }, index));
1123
+ const itemLabelMarkup = item.label ? (jsx("label", Object.assign({ className: `${COMPONENT_NAME$F}__ItemLabelWrapper` }, { children: item.label }), void 0)) : null;
1124
+ const dividerMarkup = divider && index < items.length - 1 ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$F}__Divider` }, { children: divider }), void 0)) : null;
1125
+ return (jsxs(Fragment$1, { children: [jsxs("div", Object.assign({ className: `${COMPONENT_NAME$F}__Item` }, { children: [itemLabelMarkup, jsx("input", { type: item.type, value: item.value, onChange: handleChange, onBlur: () => handleBlur(item.onBlur), onFocus: () => handleFocus(item.onFocus), placeholder: item.placeholder, min: item.min, max: item.max, minLength: item.minLength, maxLength: item.maxLength }, void 0)] }), index), dividerMarkup] }, index));
1106
1126
  };
1107
- const labelMarkup = label ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$B}__LabelWrapper` }, { children: jsxs("label", Object.assign({ className: `${COMPONENT_NAME$B}__Label` }, { children: [label, isRequired ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$B}__IsRequiredSign` }, { children: "*" }), void 0)) : null] }), void 0) }), void 0)) : null;
1108
- const itemsMarkup = (jsx("div", Object.assign({ className: `${COMPONENT_NAME$B}__ItemsWrapper` }, { children: items.map(renderItem) }), void 0));
1127
+ const labelMarkup = label ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$F}__LabelWrapper` }, { children: jsxs("label", Object.assign({ className: `${COMPONENT_NAME$F}__Label` }, { children: [label, isRequired ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$F}__IsRequiredSign` }, { children: "*" }), void 0)) : null] }), void 0) }), void 0)) : null;
1128
+ const itemsMarkup = (jsx("div", Object.assign({ className: `${COMPONENT_NAME$F}__ItemsWrapper` }, { children: items.map(renderItem) }), void 0));
1109
1129
  return (jsxs("div", Object.assign({ className: className }, { children: [labelMarkup, itemsMarkup] }), void 0));
1110
1130
  };
1111
1131
 
1112
- const COMPONENT_NAME$A = 'AlphaBadge';
1132
+ const COMPONENT_NAME$E = 'AlphaBadge';
1113
1133
  const AlphaBadge = ({ theme: themeProp, children, isSuccess, isWarning, isDanger, isPrimary, }) => {
1114
1134
  const { theme } = useTheme();
1115
1135
  const THEME_CLASS = `${theme}`;
1116
- const className = cssClassName(COMPONENT_NAME$A, !themeProp && THEME_CLASS, isPrimary && 'isPrimary', isDanger && 'isDanger', isSuccess && 'isSuccess', isWarning && 'isWarning', themeProp && `${themeProp.toUpperCase()}`);
1117
- const childrenMarkup = children && (jsx("span", Object.assign({ className: `${COMPONENT_NAME$A}__TextWrapper` }, { children: children }), void 0));
1136
+ const className = cssClassName(COMPONENT_NAME$E, !themeProp && THEME_CLASS, isPrimary && 'isPrimary', isDanger && 'isDanger', isSuccess && 'isSuccess', isWarning && 'isWarning', themeProp && `${themeProp.toUpperCase()}`);
1137
+ const childrenMarkup = children && (jsx("span", Object.assign({ className: `${COMPONENT_NAME$E}__TextWrapper` }, { children: children }), void 0));
1118
1138
  return jsx("span", Object.assign({ className: className }, { children: childrenMarkup }), void 0);
1119
1139
  };
1120
1140
 
1121
- const COMPONENT_NAME$z = 'AlphaIcon';
1141
+ const COMPONENT_NAME$D = 'AlphaIcon';
1122
1142
  const ICON_COLOR_VARIANTS = [
1123
1143
  'danger',
1124
1144
  'darkGray',
@@ -1145,9 +1165,9 @@ const AlphaIcon = ({ source, size, color, filled, hasBackdrop, outlined, }) => {
1145
1165
  if (color && !ICON_COLOR_VARIANTS.includes(color)) {
1146
1166
  console.warn(`The color ${color} is not supported for the AlphaIcon component when hasBackdrop is true.`);
1147
1167
  }
1148
- const className = cssClassName(COMPONENT_NAME$z, color && `is-${color}`, filled && 'isFilled', outlined && 'isOutlined', size && `is-${size}`, hasBackdrop && 'hasBackdrop', source && `source-${sourceType}`);
1168
+ const className = cssClassName(COMPONENT_NAME$D, color && `is-${color}`, filled && 'isFilled', outlined && 'isOutlined', size && `is-${size}`, hasBackdrop && 'hasBackdrop', source && `source-${sourceType}`);
1149
1169
  const Source = source;
1150
- const StringSource = (jsx("div", Object.assign({ className: `${COMPONENT_NAME$z}__StringSource` }, { children: jsx("span", { children: source }, void 0) }), void 0));
1170
+ const StringSource = (jsx("div", Object.assign({ className: `${COMPONENT_NAME$D}__StringSource` }, { children: jsx("span", { children: source }, void 0) }), void 0));
1151
1171
  const content = {
1152
1172
  function: jsx(Source, {}, void 0),
1153
1173
  string: StringSource,
@@ -1155,9 +1175,9 @@ const AlphaIcon = ({ source, size, color, filled, hasBackdrop, outlined, }) => {
1155
1175
  return jsx("span", Object.assign({ className: className }, { children: content[sourceType] }), void 0);
1156
1176
  };
1157
1177
 
1158
- const COMPONENT_NAME$y = 'AlphaSpinner';
1178
+ const COMPONENT_NAME$C = 'AlphaSpinner';
1159
1179
  const AlphaSpinner = ({ icon, size }) => {
1160
- const className = cssClassName(COMPONENT_NAME$y);
1180
+ const className = cssClassName(COMPONENT_NAME$C);
1161
1181
  let iconSource;
1162
1182
  if (icon) {
1163
1183
  if (isValidIcon(icon.icon)) {
@@ -1167,16 +1187,16 @@ const AlphaSpinner = ({ icon, size }) => {
1167
1187
  iconSource = icon.icon;
1168
1188
  }
1169
1189
  }
1170
- const iconMarkup = icon ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$y}__IconWrapper` }, { children: iconSource }), void 0)) : null;
1190
+ const iconMarkup = icon ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$C}__IconWrapper` }, { children: iconSource }), void 0)) : null;
1171
1191
  return jsx("div", Object.assign({ className: className }, { children: iconMarkup }), void 0);
1172
1192
  };
1173
1193
 
1174
- const COMPONENT_NAME$x = 'AlphaButton';
1194
+ const COMPONENT_NAME$B = 'AlphaButton';
1175
1195
  const AlphaButton = ({ ariaLabel, children, icon, spinnerIcon, iconPosition = 'left', id, isDanger, isDisabled, isFullWidth, isLink, isLoading, isPrimary, isSubmit, isTertiary, size = 'medium', textAlign = 'center', isRounded, theme: themeProp, onClick, onFocus, onBlur, onKeyPress, onKeyUp, onKeyDown, onMouseEnter, onMouseLeave, onTouchStart, onTouchEnd, }) => {
1176
1196
  const { theme } = useTheme();
1177
1197
  const THEME_CLASS = `${theme}`;
1178
1198
  const isIconOnly = !children && icon;
1179
- const className = cssClassName(COMPONENT_NAME$x, !themeProp && THEME_CLASS, isPrimary && 'isPrimary', isDanger && 'isDanger', isTertiary && 'isTertiary', isFullWidth && 'isFullWidth', isLink && 'isLink', isDisabled && 'isDisabled', isLoading && 'isLoading', size && `is-${size}`, textAlign && `has-text-${textAlign}`, icon && `has-icon-${iconPosition}`, isIconOnly && 'onlyIcon', isIconOnly && isRounded && 'isRounded', themeProp && `${themeProp.toUpperCase()}`);
1199
+ const className = cssClassName(COMPONENT_NAME$B, !themeProp && THEME_CLASS, isPrimary && 'isPrimary', isDanger && 'isDanger', isTertiary && 'isTertiary', isFullWidth && 'isFullWidth', isLink && 'isLink', isDisabled && 'isDisabled', isLoading && 'isLoading', size && `is-${size}`, textAlign && `has-text-${textAlign}`, icon && `has-icon-${iconPosition}`, isIconOnly && 'onlyIcon', isIconOnly && isRounded && 'isRounded', themeProp && `${themeProp.toUpperCase()}`);
1180
1200
  const buttonProps = {
1181
1201
  id,
1182
1202
  type: isSubmit ? 'submit' : 'button',
@@ -1193,7 +1213,7 @@ const AlphaButton = ({ ariaLabel, children, icon, spinnerIcon, iconPosition = 'l
1193
1213
  onTouchStart,
1194
1214
  onTouchEnd,
1195
1215
  };
1196
- const childrenMarkup = children ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$x}__TextWrapper` }, { children: children }), void 0)) : null;
1216
+ const childrenMarkup = children ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$B}__TextWrapper` }, { children: children }), void 0)) : null;
1197
1217
  let iconSource;
1198
1218
  let spinnerIconSource;
1199
1219
  if (icon) {
@@ -1212,18 +1232,18 @@ const AlphaButton = ({ ariaLabel, children, icon, spinnerIcon, iconPosition = 'l
1212
1232
  spinnerIconSource = spinnerIcon.icon;
1213
1233
  }
1214
1234
  }
1215
- const iconMarkup = icon ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$x}__IconWrapper` }, { children: iconSource }), void 0)) : null;
1216
- const spinnerMarkup = isLoading && (jsx("span", Object.assign({ className: `${COMPONENT_NAME$x}__SpinnerWrapper` }, { children: spinnerIconSource }), void 0));
1235
+ const iconMarkup = icon ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$B}__IconWrapper` }, { children: iconSource }), void 0)) : null;
1236
+ const spinnerMarkup = isLoading && (jsx("span", Object.assign({ className: `${COMPONENT_NAME$B}__SpinnerWrapper` }, { children: spinnerIconSource }), void 0));
1217
1237
  return (jsxs("button", Object.assign({ className: className }, buttonProps, { children: [spinnerMarkup, iconMarkup, childrenMarkup] }), void 0));
1218
1238
  };
1219
1239
 
1220
- const COMPONENT_NAME$w = 'AlphaChip';
1240
+ const COMPONENT_NAME$A = 'AlphaChip';
1221
1241
  const AlphaChip = ({ children, hasError, removeButtonIcon, isDisabled, theme, onRemove, }) => {
1222
1242
  const { theme: currentTheme } = useTheme();
1223
1243
  const THEME_CLASS = `${currentTheme}`;
1224
- const className = cssClassName(COMPONENT_NAME$w, hasError && 'hasError', isDisabled && 'isDisabled', theme && `${theme.toUpperCase()}`, THEME_CLASS);
1225
- const childrenMarkup = children ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$w}__TextWrapper` }, { children: children }), void 0)) : null;
1226
- const closeButtonMarkup = removeButtonIcon && (jsx("div", Object.assign({ className: `${COMPONENT_NAME$w}__CloseButtonWrapper` }, { children: jsx(AlphaButton, { onClick: onRemove, icon: removeButtonIcon }, void 0) }), void 0));
1244
+ const className = cssClassName(COMPONENT_NAME$A, hasError && 'hasError', isDisabled && 'isDisabled', theme && `${theme.toUpperCase()}`, THEME_CLASS);
1245
+ const childrenMarkup = children ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$A}__TextWrapper` }, { children: children }), void 0)) : null;
1246
+ const closeButtonMarkup = removeButtonIcon && (jsx("div", Object.assign({ className: `${COMPONENT_NAME$A}__CloseButtonWrapper` }, { children: jsx(AlphaButton, { onClick: onRemove, icon: removeButtonIcon }, void 0) }), void 0));
1227
1247
  return (jsxs("div", Object.assign({ className: className }, { children: [childrenMarkup, closeButtonMarkup] }), void 0));
1228
1248
  };
1229
1249
 
@@ -1423,10 +1443,10 @@ const Panel$1 = ({ id, children, isHidden }) => {
1423
1443
  return (jsx("div", Object.assign({ className: className, id: id }, { children: children }), void 0));
1424
1444
  };
1425
1445
 
1426
- const COMPONENT_NAME$v = 'Tabs';
1446
+ const COMPONENT_NAME$z = 'Tabs';
1427
1447
  const Tabs = ({ onSelect, selected, tabs, children, className, areFitted, }) => {
1428
1448
  const { theme } = useTheme();
1429
- const classNames = cssClassName(COMPONENT_NAME$v, `is${themeClassConverter(theme)}`);
1449
+ const classNames = cssClassName(COMPONENT_NAME$z, `is${themeClassConverter(theme)}`);
1430
1450
  const panelMarkup = children
1431
1451
  ? tabs.map((tab, index) => selected === index ? (jsx(Panel$1, Object.assign({ id: tab.panelID || `${tab.id}-panel` }, { children: children }), tab.id)) : (jsx(Panel$1, { id: tab.panelID || `${tab.id}-panel`, isHidden: true }, tab.id)))
1432
1452
  : null;
@@ -1584,10 +1604,10 @@ const getPosition = (activator, tooltip, alignment) => {
1584
1604
  };
1585
1605
  };
1586
1606
 
1587
- const COMPONENT_NAME$u = 'Alpha__TooltipOverlay';
1607
+ const COMPONENT_NAME$y = 'Alpha__TooltipOverlay';
1588
1608
  const Overlay = ({ children, activator, active, zIndexOverride, position = 'bottom', appearance = 'default', width, parentTooltip, theme, onClick, }) => {
1589
1609
  const tooltipRef = useRef(null);
1590
- const overlayClassName = cssClassName(COMPONENT_NAME$u, position && `is-${position}`, appearance && `is-${appearance}`, theme && appearance === 'default' && `is-${theme}`);
1610
+ const overlayClassName = cssClassName(COMPONENT_NAME$y, position && `is-${position}`, appearance && `is-${appearance}`, theme && appearance === 'default' && `is-${theme}`);
1591
1611
  const [positionStyles, setPositionStyles] = useState({
1592
1612
  '--tooltip-overlay-top': 0,
1593
1613
  '--tooltip-overlay-left': 0,
@@ -1623,7 +1643,7 @@ const Overlay = ({ children, activator, active, zIndexOverride, position = 'bott
1623
1643
  return markup;
1624
1644
  };
1625
1645
 
1626
- const COMPONENT_NAME$t = 'AlphaTooltip';
1646
+ const COMPONENT_NAME$x = 'AlphaTooltip';
1627
1647
  const AlphaTooltip = ({ content, children, activatorWrapper = 'span', isActive: isActiveProp = false, onClose, onOpen, position, width, parentTooltip, zIndexOverride, appearance, persistence, theme, }) => {
1628
1648
  const [activatorNode, setActivatorNode] = useState(null);
1629
1649
  const [isActive, setIsActive] = useState(isActiveProp);
@@ -1631,7 +1651,7 @@ const AlphaTooltip = ({ content, children, activatorWrapper = 'span', isActive:
1631
1651
  const isMouseOver = useRef(false);
1632
1652
  const activatorContainer = useRef(null);
1633
1653
  const WrapperComponent = activatorWrapper;
1634
- const className = cssClassName(COMPONENT_NAME$t);
1654
+ const className = cssClassName(COMPONENT_NAME$x);
1635
1655
  const handleOpen = useCallback(() => {
1636
1656
  if (!isActivePersistence) {
1637
1657
  setIsActive(true);
@@ -2210,10 +2230,10 @@ const Popover$1 = ({ activator, children, isActive, onClose, isFullWidth = false
2210
2230
  };
2211
2231
  Popover$1.Pane = Pane$1;
2212
2232
 
2213
- const COMPONENT_NAME$s = 'Divider';
2233
+ const COMPONENT_NAME$w = 'Divider';
2214
2234
  const Divider = ({ alignment = 'left', label }) => {
2215
- const className = cssClassName(COMPONENT_NAME$s, alignment, !label && 'no-label');
2216
- const labelMarkup = label ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$s}__LabelWrapper` }, { children: jsx("span", Object.assign({ className: `${COMPONENT_NAME$s}__Label` }, { children: label }), void 0) }), void 0)) : null;
2235
+ const className = cssClassName(COMPONENT_NAME$w, alignment, !label && 'no-label');
2236
+ const labelMarkup = label ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$w}__LabelWrapper` }, { children: jsx("span", Object.assign({ className: `${COMPONENT_NAME$w}__Label` }, { children: label }), void 0) }), void 0)) : null;
2217
2237
  return jsx("div", Object.assign({ className: className }, { children: labelMarkup }), void 0);
2218
2238
  };
2219
2239
 
@@ -9712,7 +9732,7 @@ function formatDate(date, toISO) {
9712
9732
  return DateTime.fromJSDate(date).toFormat('dd/MM/yyyy');
9713
9733
  }
9714
9734
 
9715
- const COMPONENT_NAME$r = 'DateInput';
9735
+ const COMPONENT_NAME$v = 'DateInput';
9716
9736
  const AlphaInputDate = ({ ariaLabel, disabled, label, onChange, value, isRequired, placeholder, onBlur, errorMessage, months, weekdays, }) => {
9717
9737
  const [isPopoverActive, setIsPopoverActive] = useState(false);
9718
9738
  const [{ month, year }, setDate] = useState({
@@ -9723,7 +9743,7 @@ const AlphaInputDate = ({ ariaLabel, disabled, label, onChange, value, isRequire
9723
9743
  const [isErrorTooltipActive, setIsErrorTooltipActive] = useState(false);
9724
9744
  const [selectedDate, setSelectedDate] = useState();
9725
9745
  const inputRef = useRef(null);
9726
- const className = cssClassName(COMPONENT_NAME$r);
9746
+ const className = cssClassName(COMPONENT_NAME$v);
9727
9747
  const handleMonthChange = (monthValue, yearValue) => {
9728
9748
  setDate({ month: monthValue, year: yearValue });
9729
9749
  };
@@ -9845,7 +9865,7 @@ const AlphaInputDate = ({ ariaLabel, disabled, label, onChange, value, isRequire
9845
9865
  }
9846
9866
  }, [selectedDate]);
9847
9867
  const datePickerMarkup = (jsx(DatePicker, { weekStartsOn: 1, month: month, year: year, onMonthChange: handleMonthChange, onChange: handleDateChange, selected: selectedDate || undefined, months: months, weekDays: weekdays }, void 0));
9848
- const inputMarkup = (jsx("div", Object.assign({ className: `${COMPONENT_NAME$r}__InputWrapper`, onClick: () => setIsPopoverActive(true), ref: inputRef }, { children: jsx(AlphaTooltip, Object.assign({ persistence: true, isActive: isErrorTooltipActive, content: errorMessage, appearance: 'error' }, { children: jsx(InputText, { ariaLabel: ariaLabel, disabled: disabled, label: label, onChange: handleInputChange, value: inputValue, maxLength: 10, placeholder: placeholder, onBlur: handleInputBlur, icon: 'Calendar', isRequired: isRequired }, void 0) }), void 0) }), void 0));
9868
+ const inputMarkup = (jsx("div", Object.assign({ className: `${COMPONENT_NAME$v}__InputWrapper`, onClick: () => setIsPopoverActive(true), ref: inputRef }, { children: jsx(AlphaTooltip, Object.assign({ persistence: true, isActive: isErrorTooltipActive, content: errorMessage, appearance: 'error' }, { children: jsx(InputText, { ariaLabel: ariaLabel, disabled: disabled, label: label, onChange: handleInputChange, value: inputValue, maxLength: 10, placeholder: placeholder, onBlur: handleInputBlur, icon: 'Calendar', isRequired: isRequired }, void 0) }), void 0) }), void 0));
9849
9869
  const popoverMarkup = (jsx(Popover$1, Object.assign({ activator: inputMarkup, isActive: isPopoverActive, isFullWidth: true, onClose: () => setIsPopoverActive(false) }, { children: datePickerMarkup }), void 0));
9850
9870
  return jsx("div", Object.assign({ className: className }, { children: popoverMarkup }), void 0);
9851
9871
  };
@@ -9935,9 +9955,9 @@ const AlphaFilterControl = ({ primaryAction, secondaryActions, sections, title,
9935
9955
  return (jsxs("div", Object.assign({ className: `${MAIN_CLASS$k}` }, { children: [headerMarkup, bodyMarkup, actionsMarkup] }), void 0));
9936
9956
  };
9937
9957
 
9938
- const COMPONENT_NAME$q = 'AlphaInlineError';
9958
+ const COMPONENT_NAME$u = 'AlphaInlineError';
9939
9959
  const AlphaInlineError = ({ icon, children }) => {
9940
- const className = cssClassName(COMPONENT_NAME$q);
9960
+ const className = cssClassName(COMPONENT_NAME$u);
9941
9961
  let iconSource;
9942
9962
  if (icon) {
9943
9963
  if (isValidIcon(icon.icon)) {
@@ -9947,23 +9967,23 @@ const AlphaInlineError = ({ icon, children }) => {
9947
9967
  iconSource = icon.icon;
9948
9968
  }
9949
9969
  }
9950
- const iconMarkup = icon ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$q}__IconWrapper` }, { children: iconSource }), void 0)) : null;
9951
- const messageMarkup = children ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$q}__MessageWrapper` }, { children: children }), void 0)) : null;
9970
+ const iconMarkup = icon ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$u}__IconWrapper` }, { children: iconSource }), void 0)) : null;
9971
+ const messageMarkup = children ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$u}__MessageWrapper` }, { children: children }), void 0)) : null;
9952
9972
  return (jsxs("div", Object.assign({ className: className }, { children: [iconMarkup, messageMarkup] }), void 0));
9953
9973
  };
9954
9974
 
9955
- const COMPONENT_NAME$p = 'AlphaLabel';
9956
- const className$1 = cssClassName(COMPONENT_NAME$p);
9975
+ const COMPONENT_NAME$t = 'AlphaLabel';
9976
+ const className$1 = cssClassName(COMPONENT_NAME$t);
9957
9977
  const AlphaLabel = ({ children, isRequired, action, id }) => {
9958
- const requiredSignMarkup = isRequired ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$p}__RequiredSign` }, { children: "*" }), void 0)) : null;
9978
+ const requiredSignMarkup = isRequired ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$t}__RequiredSign` }, { children: "*" }), void 0)) : null;
9959
9979
  const labelMarkup = (jsxs("label", Object.assign({ htmlFor: id }, { children: [children, requiredSignMarkup] }), void 0));
9960
- const actionMarkup = action ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$p}__ActionWrapper` }, { children: jsx(AlphaButton, Object.assign({ id: action.id, isDanger: action.isDanger, onMouseEnter: action.onMouseEnter, onTouchStart: action.onTouchStart, isLink: true, onClick: action.onClick, isDisabled: action.isDisabled }, { children: action.content }), void 0) }), void 0)) : null;
9980
+ const actionMarkup = action ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$t}__ActionWrapper` }, { children: jsx(AlphaButton, Object.assign({ id: action.id, isDanger: action.isDanger, onMouseEnter: action.onMouseEnter, onTouchStart: action.onTouchStart, isLink: true, onClick: action.onClick, isDisabled: action.isDisabled }, { children: action.content }), void 0) }), void 0)) : null;
9961
9981
  return (jsxs("div", Object.assign({ className: className$1 }, { children: [labelMarkup, actionMarkup] }), void 0));
9962
9982
  };
9963
9983
 
9964
- const COMPONENT_NAME$o = 'AlphaLabelledField__HelpText';
9984
+ const COMPONENT_NAME$s = 'AlphaLabelledField__HelpText';
9965
9985
  const HelpText = ({ message, icon }) => {
9966
- const className = cssClassName(COMPONENT_NAME$o);
9986
+ const className = cssClassName(COMPONENT_NAME$s);
9967
9987
  let iconSource;
9968
9988
  if (icon) {
9969
9989
  if (isValidIcon(icon.icon)) {
@@ -9973,27 +9993,175 @@ const HelpText = ({ message, icon }) => {
9973
9993
  iconSource = icon.icon;
9974
9994
  }
9975
9995
  }
9976
- const iconMarkup = iconSource ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$o}__IconWrapper` }, { children: iconSource }), void 0)) : null;
9977
- const messageMarkup = message ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$o}__MessageWrapper` }, { children: message }), void 0)) : null;
9996
+ const iconMarkup = iconSource ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$s}__IconWrapper` }, { children: iconSource }), void 0)) : null;
9997
+ const messageMarkup = message ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$s}__MessageWrapper` }, { children: message }), void 0)) : null;
9978
9998
  return (jsxs("div", Object.assign({ className: className }, { children: [iconMarkup, messageMarkup] }), void 0));
9979
9999
  };
9980
10000
 
9981
- const COMPONENT_NAME$n = 'AlphaLabelledField';
10001
+ const COMPONENT_NAME$r = 'AlphaLabelledField';
9982
10002
  const AlphaLabelledField = ({ label, children, action, error, helpText, id, isRequired, }) => {
9983
- const className = cssClassName(COMPONENT_NAME$n);
9984
- const labelMarkup = label ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$n}__LabelWrapper` }, { children: jsx(AlphaLabel, Object.assign({ action: action, id: id, isRequired: isRequired }, { children: label }), void 0) }), void 0)) : null;
9985
- const errorMarkup = error ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$n}__ErrorWrapper` }, { children: jsx(AlphaInlineError, Object.assign({ icon: error.icon }, { children: error.message }), void 0) }), void 0)) : null;
10003
+ const className = cssClassName(COMPONENT_NAME$r);
10004
+ const labelMarkup = label ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$r}__LabelWrapper` }, { children: jsx(AlphaLabel, Object.assign({ action: action, id: id, isRequired: isRequired }, { children: label }), void 0) }), void 0)) : null;
10005
+ const errorMarkup = error ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$r}__ErrorWrapper` }, { children: jsx(AlphaInlineError, Object.assign({ icon: error.icon }, { children: error.message }), void 0) }), void 0)) : null;
9986
10006
  const helpTextMarkup = helpText ? (jsx(HelpText, { message: helpText.message, icon: helpText.icon }, void 0)) : null;
9987
- const contentMarkup = errorMarkup ? (jsx(AlphaTooltip, Object.assign({ persistence: true, content: errorMarkup, isActive: Boolean(errorMarkup), appearance: 'error' }, { children: jsx("div", Object.assign({ className: `${COMPONENT_NAME$n}__ContentWrapper` }, { children: children }), void 0) }), void 0)) : (children);
10007
+ const contentMarkup = errorMarkup ? (jsx(AlphaTooltip, Object.assign({ persistence: true, content: errorMarkup, isActive: Boolean(errorMarkup), appearance: 'error' }, { children: jsx("div", Object.assign({ className: `${COMPONENT_NAME$r}__ContentWrapper` }, { children: children }), void 0) }), void 0)) : (children);
9988
10008
  return (jsxs("div", Object.assign({ className: className }, { children: [labelMarkup, contentMarkup, helpTextMarkup] }), void 0));
9989
10009
  };
9990
10010
 
9991
- const COMPONENT_NAME$m = 'AlphaInputText';
10011
+ const COMPONENT_NAME$q = 'AlphaInputText';
9992
10012
  const AlphaInputText = ({ isDisabled, label }) => {
9993
- const className = cssClassName(COMPONENT_NAME$m, isDisabled && 'isDisabled');
10013
+ const className = cssClassName(COMPONENT_NAME$q, isDisabled && 'isDisabled');
9994
10014
  return (jsx(AlphaLabelledField, Object.assign({ label: label }, { children: jsx("div", { className: className }, void 0) }), void 0));
9995
10015
  };
9996
10016
 
10017
+ const SideMenuContext = createContext({});
10018
+
10019
+ const COMPONENT_NAME$p = 'AlphaSideMenu__Item';
10020
+ const Item$3 = ({ label, isDisabled, icon, onClick, isActive: isActiveProp, subNavigationItems, truncateText, anchorProps, isCollapsed: isCollapsedProp, isSubNavigation, isExternal, isExact, url, isVisible, }) => {
10021
+ const { anchorComponent, collapsed, setCurrentTierItems, location } = useContext(SideMenuContext);
10022
+ const isCollapsed = isCollapsedProp !== undefined ? isCollapsedProp : collapsed;
10023
+ const AnchorComponent = !isExternal ? anchorComponent || 'a' : 'a';
10024
+ const isActive = useMemo(() => {
10025
+ if (location && url) {
10026
+ return isExact
10027
+ ? location.pathname === url
10028
+ : location.pathname.includes(url);
10029
+ }
10030
+ return isActiveProp;
10031
+ }, [location, isExact, isActiveProp, url]);
10032
+ useEffect(() => {
10033
+ if (isActive && subNavigationItems) {
10034
+ setCurrentTierItems === null || setCurrentTierItems === void 0 ? void 0 : setCurrentTierItems(subNavigationItems || [], {
10035
+ label,
10036
+ url,
10037
+ isDisabled,
10038
+ isActive: isActiveProp,
10039
+ subNavigationItems: subNavigationItems || [],
10040
+ truncateText,
10041
+ anchorProps,
10042
+ isExternal,
10043
+ isExact,
10044
+ isVisible,
10045
+ });
10046
+ }
10047
+ }, [isActive]);
10048
+ const labelMarkup = label ? (jsx("span", Object.assign({ className: `${COMPONENT_NAME$p}__Label` }, { children: label }), void 0)) : null;
10049
+ const iconSource = icon && isValidIcon(icon === null || icon === void 0 ? void 0 : icon.icon) ? (jsx(AlphaIcon, { source: icon === null || icon === void 0 ? void 0 : icon.icon, outlined: icon === null || icon === void 0 ? void 0 : icon.outlined }, void 0)) : (jsx(Fragment, { children: icon }, void 0));
10050
+ const iconMarkup = icon ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME$p}__IconWrapper` }, { children: iconSource }), void 0)) : null;
10051
+ const handleClick = () => {
10052
+ if (!isDisabled) {
10053
+ onClick === null || onClick === void 0 ? void 0 : onClick();
10054
+ if (!isSubNavigation) {
10055
+ setCurrentTierItems === null || setCurrentTierItems === void 0 ? void 0 : setCurrentTierItems(subNavigationItems || [], {
10056
+ label,
10057
+ url,
10058
+ isDisabled,
10059
+ isActive: isActiveProp,
10060
+ subNavigationItems: subNavigationItems || [],
10061
+ truncateText,
10062
+ anchorProps,
10063
+ isExternal,
10064
+ isExact,
10065
+ isVisible,
10066
+ });
10067
+ }
10068
+ }
10069
+ };
10070
+ const anchorMarkup = (jsxs(AnchorComponent, Object.assign({}, anchorProps, { target: isExternal ? '_blank' : undefined, onClick: handleClick }, { children: [iconMarkup, labelMarkup] }), void 0));
10071
+ const tooltipAnchorMarkup = isCollapsed ? (jsx(AlphaTooltip, Object.assign({ content: label, position: 'right' }, { children: anchorMarkup }), void 0)) : null;
10072
+ const classNames = cssClassName(COMPONENT_NAME$p, isDisabled && 'isDisabled', isActive && 'isActive', truncateText && 'isTruncated', (isCollapsed !== undefined ? isCollapsed : collapsed) && 'isCollapsed');
10073
+ if (isVisible !== undefined &&
10074
+ !isVisible(location, {
10075
+ label,
10076
+ url,
10077
+ isDisabled,
10078
+ isActive: isActiveProp,
10079
+ subNavigationItems: subNavigationItems || [],
10080
+ truncateText,
10081
+ anchorProps,
10082
+ })) {
10083
+ return null;
10084
+ }
10085
+ return jsx("li", Object.assign({ className: classNames }, { children: tooltipAnchorMarkup || anchorMarkup }), void 0);
10086
+ };
10087
+
10088
+ const COMPONENT_NAME$o = 'AlphaSideMenu__Section';
10089
+ const Section$1 = ({ items, fill, title, isCollapsed: isCollapsedProp, areSubNavigationItems, }) => {
10090
+ const { collapsed } = useContext(SideMenuContext);
10091
+ const isCollapsed = isCollapsedProp !== undefined ? isCollapsedProp : collapsed;
10092
+ const titleClassNames = cssClassName(`${COMPONENT_NAME$o}__TitleWrapper`, (isCollapsed !== undefined ? isCollapsed : collapsed) && 'isCollapsed');
10093
+ const titleMarkup = title ? (jsx("div", Object.assign({
10094
+ // layout
10095
+ className: titleClassNames }, { children: jsx("span", { children: title }, void 0) }), void 0)) : null;
10096
+ const renderItem = (item, index) => {
10097
+ const { label, isDisabled, icon, onClick, isActive, subNavigationItems, truncateText, anchorProps, url, isExact, isExternal, isVisible, } = item;
10098
+ return (jsx(Item$3, { label: label, isDisabled: isDisabled, icon: icon, onClick: onClick, isActive: isActive, subNavigationItems: subNavigationItems, truncateText: truncateText, anchorProps: anchorProps, isCollapsed: isCollapsed, isSubNavigation: areSubNavigationItems, url: url, isExact: isExact, isExternal: isExternal, isVisible: isVisible }, `alpha-side-menu-item-${index}`));
10099
+ };
10100
+ const itemsMarkup = items && items.length > 0 ? (jsx("ul", Object.assign({ className: `${COMPONENT_NAME$o}__Items` }, { children: items.map(renderItem) }), void 0)) : null;
10101
+ const classNames = cssClassName(COMPONENT_NAME$o, fill && 'isFill');
10102
+ return (jsxs("div", Object.assign({ className: classNames }, { children: [titleMarkup, itemsMarkup] }), void 0));
10103
+ };
10104
+
10105
+ const COMPONENT_NAME$n = 'AlphaSideMenu__Tier';
10106
+ const Tier = ({ children, title, isCollapsed, onExpand, hasSubNavigation, collapseExpandIcon, }) => {
10107
+ const { collapsed } = useContext(SideMenuContext);
10108
+ const isMenuCollapsed = isCollapsed !== undefined ? isCollapsed : collapsed;
10109
+ const titleMarkup = title ? (jsx("div", Object.assign({
10110
+ // layout
10111
+ className: `${COMPONENT_NAME$n}__TitleWrapper` }, { children: jsx("span", { children: title }, void 0) }), void 0)) : null;
10112
+ const cssExpandButtonWrapperClassName = cssClassName(`${COMPONENT_NAME$n}__ExpandButtonWrapper`, hasSubNavigation && 'isCollapsed');
10113
+ const expandButtonMarkup = (jsx("div", Object.assign({
10114
+ // layout
10115
+ className: cssExpandButtonWrapperClassName }, { children: jsx(AlphaButton, { icon: collapseExpandIcon, size: 'small', onClick: onExpand }, void 0) }), void 0));
10116
+ const classNames = cssClassName(COMPONENT_NAME$n, isMenuCollapsed && 'isCollapsed');
10117
+ return (jsxs("div", Object.assign({ className: classNames }, { children: [titleMarkup, expandButtonMarkup, children] }), void 0));
10118
+ };
10119
+
10120
+ const COMPONENT_NAME$m = 'AlphaSideMenu';
10121
+ const AlphaSideMenu = ({ children, collapsed, anchorComponent, collapseExpandIcon, location, }) => {
10122
+ const [isCollapsed, setIsCollapsed] = useState(false);
10123
+ const [subNavigationTierItems, setSubNavigationTierItems] = useState([]);
10124
+ const [subNavigationTierTitle, setSubNavigationTierTitle] = useState(undefined);
10125
+ useEffect(() => {
10126
+ if (collapsed !== undefined) {
10127
+ setIsCollapsed(collapsed);
10128
+ }
10129
+ }, [collapsed]);
10130
+ Children.forEach(children, (child) => {
10131
+ if (!isValidElement(child) || child.type !== Section$1) {
10132
+ console.error('AlphaSideMenu only accepts Section components as children');
10133
+ }
10134
+ });
10135
+ const cssClassNames = cssClassName(COMPONENT_NAME$m, isCollapsed && 'isCollapsed');
10136
+ const handleSetCurrentTierItems = (items, item) => {
10137
+ if (!(item === null || item === void 0 ? void 0 : item.isExternal)) {
10138
+ if (!items.length) {
10139
+ setSubNavigationTierItems([]);
10140
+ setSubNavigationTierTitle(undefined);
10141
+ setIsCollapsed(false);
10142
+ return;
10143
+ }
10144
+ setSubNavigationTierItems(items);
10145
+ setSubNavigationTierTitle(item === null || item === void 0 ? void 0 : item.label);
10146
+ setIsCollapsed(true);
10147
+ }
10148
+ };
10149
+ const handleExpand = () => {
10150
+ setIsCollapsed(!isCollapsed);
10151
+ };
10152
+ const contextValue = {
10153
+ anchorComponent,
10154
+ collapsed: isCollapsed,
10155
+ setCurrentTierItems: handleSetCurrentTierItems,
10156
+ location,
10157
+ };
10158
+ const subNavigationSectionMarkup = (jsx(Section$1, { isCollapsed: false, items: subNavigationTierItems, areSubNavigationItems: true }, void 0));
10159
+ const subNavigationTierMarkup = subNavigationTierItems.length ? (jsx(Tier, Object.assign({ title: subNavigationTierTitle, isCollapsed: false }, { children: subNavigationSectionMarkup }), void 0)) : null;
10160
+ const mainTierNavMarkup = (jsx(Tier, Object.assign({ onExpand: handleExpand, hasSubNavigation: subNavigationTierItems.length > 0, collapseExpandIcon: collapseExpandIcon }, { children: children }), void 0));
10161
+ return (jsx(SideMenuContext.Provider, Object.assign({ value: contextValue }, { children: jsxs("div", Object.assign({ className: cssClassNames }, { children: [mainTierNavMarkup, subNavigationTierMarkup] }), void 0) }), void 0));
10162
+ };
10163
+ AlphaSideMenu.Section = Section$1;
10164
+
9997
10165
  const StepDefault = {
9998
10166
  status: 'incomplete',
9999
10167
  };
@@ -28153,7 +28321,7 @@ FormLayout.Group = Group;
28153
28321
  * @param {ReactNode} FrameProps.sideMenu - Component to display as menu, left side
28154
28322
  * @param {ReactNode} FrameProps.content - Component to display as content
28155
28323
  */
28156
- const Frame = ({ header, navigation, children }) => (jsxs("div", Object.assign({ className: 'Frame' }, { children: [header && jsx("div", Object.assign({ className: 'Frame__Header' }, { children: header }), void 0), navigation && jsx("div", Object.assign({ className: 'Frame__Navigation' }, { children: navigation }), void 0), jsx("div", Object.assign({ className: 'Frame__Content' }, { children: children }), void 0)] }), void 0));
28324
+ const Frame = ({ header, navigation, children }) => (jsxs("div", Object.assign({ className: 'Frame' }, { children: [header && jsx("div", Object.assign({ className: 'Frame__Header' }, { children: header }), void 0), jsxs("div", Object.assign({ className: 'Frame__Container' }, { children: [navigation && jsx("div", Object.assign({ className: 'Frame__Navigation' }, { children: navigation }), void 0), jsx("div", Object.assign({ className: 'Frame__Content' }, { children: children }), void 0)] }), void 0)] }), void 0));
28157
28325
 
28158
28326
  const KibanCloud = ({ size }) => (jsxs("svg", Object.assign({ className: `Logo Logo--${size}`, viewBox: '0 0 384 48', fill: 'none' }, { children: [jsxs("g", Object.assign({ clipPath: 'url(#clip0_47_16047)' }, { children: [jsxs("g", Object.assign({ clipPath: 'url(#clip1_47_16047)' }, { children: [jsx("path", { d: 'M48 48.3363V0.337029L47.6361 0.358307C41.5229 0.715759 35.7795 3.40131 31.5881 7.86215C27.3971 12.3226 25.0768 18.2186 25.1046 24.3367C25.0768 30.4548 27.3971 36.3508 31.5881 40.8112C35.7795 45.272 41.5229 47.9576 47.6361 48.315L48 48.3363Z', fill: '#0047FF' }, void 0), jsx("path", { d: 'M0 23.2516V0.337029H29.4276L29.4221 0.423215C29.0332 6.47079 26.4067 12.1575 22.0534 16.377C17.7002 20.5965 11.9316 23.0469 5.87019 23.2514L5.85842 23.2516H0Z', fill: '#0000CC' }, void 0), jsx("path", { d: 'M29.4201 48.3374C29.0246 42.301 26.3995 36.626 22.0534 32.4135C17.7002 28.194 11.9316 25.7436 5.87019 25.5391L5.85842 25.5389H0V48.3374H29.4201Z', fill: '#0000CC' }, void 0)] }), void 0), jsxs("g", Object.assign({ clipPath: 'url(#clip2_47_16047)' }, { children: [jsx("path", { d: 'M68.1528 0H59.52V47.4651H68.1528V0Z', fill: 'black' }, void 0), jsx("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M116.427 47.4651V43.5771C118.119 46.2583 121.981 48 126.183 48C136.418 48 142.451 40.896 142.451 30.576C142.451 20.256 136.418 13.152 126.322 13.152C122.051 13.152 118.39 14.8937 116.427 17.4377V0H107.885V47.4651H116.427ZM124.963 20.4274C130.385 20.4274 133.977 24.4457 133.977 30.5486V30.576C133.977 36.672 130.448 40.6971 124.963 40.6971C119.478 40.6971 115.886 36.6788 115.886 30.576C115.886 24.4731 119.541 20.4274 124.963 20.4274Z', fill: 'black' }, void 0), jsx("path", { d: 'M102.656 0.0137492H94.1206V8.45489H102.656V0.0137492Z', fill: 'black' }, void 0), jsx("path", { d: 'M102.67 13.6868H94.1276V47.4651H102.67V13.6868Z', fill: 'black' }, void 0), jsx("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M178.694 47.4652H170.152V43.5772C168.46 46.2583 164.667 48 160.396 48C150.161 48 144.115 40.896 144.115 30.576C144.115 20.256 150.147 13.152 160.243 13.152C164.514 13.152 168.176 14.8938 170.138 17.4377V13.7143H178.681L178.694 47.4652ZM170.693 30.576C170.693 24.4732 167.101 20.4549 161.616 20.4549C156.131 20.4549 152.602 24.4732 152.602 30.576C152.602 36.6789 156.194 40.6972 161.616 40.6972C167.038 40.6972 170.693 36.672 170.693 30.576Z', fill: 'black' }, void 0), jsx("path", { d: 'M192.465 13.7143H183.923V47.4651H192.445V32.6537C192.445 25.0766 195.489 20.6537 200.71 20.6537C204.711 20.6537 207.214 23.4034 207.214 27.36V47.4651H215.784V25.3714C215.784 17.9794 210.764 13.1794 203.303 13.1794C201.164 13.1415 199.049 13.6375 197.155 14.6215C195.261 15.6054 193.648 17.0457 192.465 18.8091V13.7143Z', fill: 'black' }, void 0), jsx("path", { d: 'M92.1167 13.6731L76.4459 29.0057L94.1206 47.4651H82.2982L68.1598 31.9131V26.544L81.0847 13.6731H92.1167Z', fill: 'black' }, void 0)] }), void 0)] }), void 0), jsx("g", Object.assign({ clipPath: 'url(#clip3_47_16047)' }, { children: jsxs("g", Object.assign({ opacity: '0.6' }, { children: [jsx("path", { d: 'M241.623 48C238.422 48 235.537 47.2787 232.967 45.836C230.442 44.3483 228.436 42.2971 226.948 39.6823C225.506 37.0224 224.784 33.9343 224.784 30.4179C224.784 26.9015 225.506 23.8359 226.948 21.2211C228.436 18.5612 230.442 16.51 232.967 15.0673C235.537 13.5796 238.422 12.8358 241.623 12.8358C245.59 12.8358 248.926 13.8727 251.631 15.9465C254.381 18.0202 256.117 20.7928 256.838 24.2641H251.022C250.571 22.1904 249.467 20.5899 247.709 19.4629C245.951 18.2907 243.899 17.7047 241.555 17.7047C239.662 17.7047 237.881 18.178 236.213 19.1248C234.545 20.0715 233.192 21.4916 232.155 23.385C231.118 25.2785 230.6 27.6228 230.6 30.4179C230.6 33.213 231.118 35.5573 232.155 37.4507C233.192 39.3442 234.545 40.7868 236.213 41.7786C237.881 42.7254 239.662 43.1987 241.555 43.1987C243.899 43.1987 245.951 42.6352 247.709 41.5081C249.467 40.336 250.571 38.6905 251.022 36.5716H256.838C256.162 39.9528 254.449 42.7028 251.699 44.8217C248.949 46.9406 245.59 48 241.623 48Z', fill: 'black' }, void 0), jsx("path", { d: 'M262.742 47.1885V0H268.423V47.1885H262.742Z', fill: 'black' }, void 0), jsx("path", { d: 'M290.987 48C287.831 48 284.991 47.2787 282.467 45.836C279.942 44.3934 277.936 42.3647 276.448 39.7499C275.006 37.0901 274.284 33.9794 274.284 30.4179C274.284 26.8564 275.028 23.7682 276.516 21.1535C278.004 18.4936 280.01 16.4424 282.534 14.9997C285.104 13.5571 287.967 12.8358 291.123 12.8358C294.278 12.8358 297.118 13.5571 299.643 14.9997C302.168 16.4424 304.151 18.4936 305.594 21.1535C307.082 23.7682 307.826 26.8564 307.826 30.4179C307.826 33.9794 307.082 37.0901 305.594 39.7499C304.106 42.3647 302.078 44.3934 299.508 45.836C296.983 47.2787 294.143 48 290.987 48ZM290.987 43.1311C292.926 43.1311 294.729 42.6577 296.397 41.711C298.065 40.7643 299.418 39.3442 300.455 37.4507C301.491 35.5573 302.01 33.213 302.01 30.4179C302.01 27.6228 301.491 25.2785 300.455 23.385C299.463 21.4916 298.133 20.0715 296.465 19.1248C294.797 18.178 293.016 17.7047 291.123 17.7047C289.184 17.7047 287.381 18.178 285.713 19.1248C284.045 20.0715 282.692 21.4916 281.655 23.385C280.618 25.2785 280.1 27.6228 280.1 30.4179C280.1 33.213 280.618 35.5573 281.655 37.4507C282.692 39.3442 284.022 40.7643 285.645 41.711C287.313 42.6577 289.094 43.1311 290.987 43.1311Z', fill: 'black' }, void 0), jsx("path", { d: 'M325.935 48C321.968 48 318.812 46.8053 316.468 44.416C314.123 41.9815 312.951 38.2622 312.951 33.2581V13.6473H318.632V32.6495C318.632 39.6372 321.494 43.1311 327.22 43.1311C330.15 43.1311 332.562 42.0942 334.455 40.0204C336.394 37.9016 337.363 34.9036 337.363 31.0265V13.6473H343.044V47.1885H337.904L337.499 41.17C336.462 43.2889 334.906 44.9569 332.832 46.1742C330.804 47.3914 328.505 48 325.935 48Z', fill: 'black' }, void 0), jsx("path", { d: 'M365.58 48C362.244 48 359.314 47.2336 356.789 45.7008C354.31 44.168 352.371 42.0717 350.974 39.4118C349.621 36.752 348.945 33.7314 348.945 30.3503C348.945 26.9691 349.644 23.9711 351.041 21.3563C352.439 18.6965 354.377 16.6227 356.857 15.135C359.336 13.6022 362.267 12.8358 365.648 12.8358C368.398 12.8358 370.832 13.3993 372.951 14.5264C375.07 15.6534 376.716 17.2313 377.888 19.26V0H383.568V47.1885H378.429L377.888 41.6434C376.806 43.2664 375.25 44.7315 373.222 46.0389C371.193 47.3463 368.646 48 365.58 48ZM366.189 43.0635C368.443 43.0635 370.427 42.545 372.14 41.5081C373.898 40.4262 375.25 38.9384 376.197 37.045C377.189 35.1515 377.685 32.9425 377.685 30.4179C377.685 27.8933 377.189 25.6842 376.197 23.7908C375.25 21.8973 373.898 20.4321 372.14 19.3953C370.427 18.3133 368.443 17.7723 366.189 17.7723C363.98 17.7723 361.996 18.3133 360.238 19.3953C358.525 20.4321 357.172 21.8973 356.181 23.7908C355.234 25.6842 354.76 27.8933 354.76 30.4179C354.76 32.9425 355.234 35.1515 356.181 37.045C357.172 38.9384 358.525 40.4262 360.238 41.5081C361.996 42.545 363.98 43.0635 366.189 43.0635Z', fill: 'black' }, void 0)] }), void 0) }), void 0), jsxs("defs", { children: [jsx("clipPath", Object.assign({ id: 'clip0_47_16047' }, { children: jsx("rect", { width: '215.784', height: '48', fill: 'white' }, void 0) }), void 0), jsx("clipPath", Object.assign({ id: 'clip1_47_16047' }, { children: jsx("rect", { width: '48', height: '48', fill: 'white' }, void 0) }), void 0), jsx("clipPath", Object.assign({ id: 'clip2_47_16047' }, { children: jsx("rect", { width: '156.264', height: '48', fill: 'white', transform: 'translate(59.52)' }, void 0) }), void 0), jsx("clipPath", Object.assign({ id: 'clip3_47_16047' }, { children: jsx("rect", { width: '158.784', height: '48', fill: 'white', transform: 'translate(224.784)' }, void 0) }), void 0)] }, void 0)] }), void 0));
28159
28327
 
@@ -28290,8 +28458,8 @@ const Header$1 = ({ leftContent, rightContent, actions, userMenu, logo, extraAct
28290
28458
  const { theme } = useTheme();
28291
28459
  const renderAction = (item, index) => (jsx("div", Object.assign({ className: 'User-menu__secondary-action', onClick: item.onClick }, { children: jsx(Icon, { name: item.icon }, void 0) }), index || ''));
28292
28460
  const renderActionWithTooltip = (item, index) => {
28293
- var _a, _b;
28294
- return (jsx(Tooltip, Object.assign({ position: (_a = item.tooltip) === null || _a === void 0 ? void 0 : _a.position, text: (item.tooltip && item.tooltip.text) || '', id: (item.tooltip && item.tooltip.id) || '', toggleType: (_b = item.tooltip) === null || _b === void 0 ? void 0 : _b.toogleType }, { children: renderAction(item) }), index));
28461
+ var _a;
28462
+ return (jsx(AlphaTooltip, Object.assign({ position: (_a = item.tooltip) === null || _a === void 0 ? void 0 : _a.position, content: (item.tooltip && item.tooltip.text) || '', appearance: 'default', theme: 'cloud' }, { children: renderAction(item) }), index));
28295
28463
  };
28296
28464
  return (jsxs(Fragment, { children: [jsxs("div", Object.assign({ className: `Header__${theme} Header__container` }, { children: [jsxs("div", Object.assign({ className: 'Header__container-logo' }, { children: [extraAction && (extraAction === null || extraAction === void 0 ? void 0 : extraAction.icon) && (jsx("div", Object.assign({ className: 'Header__container-logo__extra-action' }, { children: jsx(IconButton, { onClick: extraAction === null || extraAction === void 0 ? void 0 : extraAction.onClick, icon: extraAction.icon, isRound: true, size: 'small', appearance: 'tertiary' }, void 0) }), void 0)), logo && jsx(Logo, { name: logo, size: 'small' }, void 0), leftContent && (jsx("div", Object.assign({ className: 'Header__container-content-left' }, { children: leftContent }), void 0))] }), void 0), jsxs("div", Object.assign({ className: 'Header__right-container' }, { children: [rightContent && (jsx("div", Object.assign({ className: 'Header__right-content' }, { children: rightContent }), void 0)), jsxs("div", Object.assign({ className: 'Header__menus-container' }, { children: [jsx("hr", { className: 'User-menu__divider-left' }, void 0), actions === null || actions === void 0 ? void 0 : actions.map((item, i) => item.tooltip
28297
28465
  ? renderActionWithTooltip(item, i)
@@ -30007,6 +30175,7 @@ const Section = ({ items, title, empty }) => {
30007
30175
  /**
30008
30176
  * The Side Menu is used to show navigation.
30009
30177
  *
30178
+ * @deprecated This component is deprecated and will be removed in a future version. Please use the new SideMenu component when it becomes available.
30010
30179
  * @param {SideMenuProps} SideMenuProps -SideMenuProps
30011
30180
  * @param {object} SideMenuProps.itemsBottom - Element to render section inside this component
30012
30181
  * @returns {symbol} - Element SideMenu
@@ -30603,5 +30772,5 @@ const AlphaSegmentedControl = ({ children, title, segments, selected, onSelected
30603
30772
  return (jsxs("div", Object.assign({ className: `${MAINCLASS}__Container` }, { children: [headerMarkup, contentMarkup] }), void 0));
30604
30773
  };
30605
30774
 
30606
- export { ActionList, Alert, AlertProvider, AlphaAttributeInput, AlphaBadge, AlphaButton, AlphaChip, AlphaFilterControl, AlphaGraphicCard, AlphaIcon, AlphaInlineError, AlphaInputDate, InputTag$1 as AlphaInputTag, AlphaInputText, AlphaLabel, AlphaLabelledField, AlphaMultiSelectionPicker, AlphaSegmentedControl, AlphaSpinner, AlphaStepper, AlphaTag, AlphaTile, AlphaTooltip, Totalizer as AlphaTotalizer, AlphaZipCodeInput, AnnotatedSection, Avatar, Badge, Banner, Button, CalendarPicker, Card, Checkbox, ChoiceList, Collapsible, Connector, Container, Cover, DataTable, DatePicker, DeletableSection, Divider, DynamicForm, EmptyState, ErrorIcon, FileDownloader, Filedrop, FilterControl, Filters, Footer, Form, FormField, FormLayout, Frame, Grid, GridItem, Header$1 as Header, Icon, IconButton, IndexList, InlineEdit, InputPhoneNumber, InputTag, InputText, JsonViewer, Label, Link, ListInfo, Loader, Logo, Media, Modal, ModalHeader, Nip, OptionList, Page, PageActions, Pagination, Pane, Panel, PanelFooter, PanelHeader, PendingIcon, Popover$1 as Popover, Progress, RadioButton, SectionForm, Select, SideMenu, SkeletonInput, SkeletonMedia, SkeletonTabs, SkeletonText, SkeletonTitle, SortableList, Spinner, Stack, StepDefault, SuccessIcon, Table, Tabs, Tag, ThemeProvider, ThreadItem, Thumbnail, Tile, TimeSelector, Title, Toggle, Tooltip, WarningIcon, capitalize, cssClassName, formatDate, formatFileSize, isComponentTypeOf, isValidIcon, themeClassConverter, useShowAlert, useTheme };
30775
+ export { ActionList, Alert, AlertProvider, AlphaAttributeInput, AlphaBadge, AlphaButton, AlphaChip, AlphaFilterControl, AlphaGraphicCard, AlphaIcon, AlphaInlineError, AlphaInputDate, InputTag$1 as AlphaInputTag, AlphaInputText, AlphaLabel, AlphaLabelledField, AlphaMultiSelectionPicker, AlphaSegmentedControl, AlphaSideMenu, AlphaSpinner, AlphaStepper, AlphaTag, AlphaTile, AlphaTooltip, Totalizer as AlphaTotalizer, AlphaZipCodeInput, AnnotatedSection, Avatar, Badge, Banner, Button, CalendarPicker, Card, Checkbox, ChoiceList, Collapsible, Connector, Container, Cover, DataTable, DatePicker, DeletableSection, Divider, DynamicForm, EmptyState, ErrorIcon, FileDownloader, Filedrop, FilterControl, Filters, Footer, Form, FormField, FormLayout, Frame, Grid, GridItem, Header$1 as Header, Icon, IconButton, IndexList, InlineEdit, InputPhoneNumber, InputTag, InputText, Item$3 as Item, JsonViewer, Label, Link, ListInfo, Loader, Logo, Media, Modal, ModalHeader, Nip, OptionList, Page, PageActions, Pagination, Pane, Panel, PanelFooter, PanelHeader, PendingIcon, Popover$1 as Popover, Progress, RadioButton, Section$1 as Section, SectionForm, Select, SideMenu, SkeletonInput, SkeletonMedia, SkeletonTabs, SkeletonText, SkeletonTitle, SortableList, Spinner, Stack, StepDefault, SuccessIcon, Table, Tabs, Tag, ThemeProvider, ThreadItem, Thumbnail, Tier, Tile, TimeSelector, Title, Toggle, Tooltip, WarningIcon, capitalize, cssClassName, formatDate, formatFileSize, isComponentTypeOf, isValidIcon, themeClassConverter, useShowAlert, useTheme };
30607
30776
  //# sourceMappingURL=index.js.map