@m4l/components 9.3.30-JA.beta-1 → 9.3.31

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 (94) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/commonjs/index.js +1 -0
  3. package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +3 -3
  4. package/components/Chip/slots/ChipSlots.d.ts +1 -1
  5. package/components/EditLabel/slots/EditLabelSlots.d.ts +1 -1
  6. package/components/HelperError/slots/HelperErrorSlots.d.ts +1 -1
  7. package/components/ImageText/slots/ImageTextSlots.d.ts +2 -2
  8. package/components/Label/slots/LabelSlots.d.ts +2 -2
  9. package/components/LoadingError/LoadingError.js +2 -1
  10. package/components/LoadingError/slots/LoadingErrorSlots.d.ts +1 -1
  11. package/components/Pager/slots/PagerSlots.d.ts +3 -3
  12. package/components/PaperForm/slots/PaperFormSlots.d.ts +1 -1
  13. package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +1 -1
  14. package/components/Stepper/slots/StepperSlot.d.ts +4 -4
  15. package/components/TabsNavigator/TabsNavigator.d.ts +5 -0
  16. package/components/TabsNavigator/TabsNavigator.js +53 -0
  17. package/components/TabsNavigator/TabsNavigator.styles.d.ts +2 -0
  18. package/components/TabsNavigator/TabsNavigator.styles.js +260 -0
  19. package/components/TabsNavigator/__tests__/TabNavigatorClusterComponent.test.d.ts +1 -0
  20. package/components/TabsNavigator/__tests__/TabNavigatorComponent.test.d.ts +1 -0
  21. package/components/TabsNavigator/__tests__/TabsNavigator.integration.test.d.ts +1 -0
  22. package/components/TabsNavigator/__tests__/TextMarquee.test.d.ts +1 -0
  23. package/components/TabsNavigator/__tests__/getClusterTabs.test.d.ts +1 -0
  24. package/components/TabsNavigator/__tests__/getFinalTabs.test.d.ts +1 -0
  25. package/components/TabsNavigator/__tests__/mocks/tabsNavigatorMocks.d.ts +36 -0
  26. package/components/TabsNavigator/__tests__/useTabsNavigator.test.d.ts +1 -0
  27. package/components/TabsNavigator/constants.d.ts +20 -0
  28. package/components/TabsNavigator/constants.js +18 -0
  29. package/components/TabsNavigator/dictionary.d.ts +4 -0
  30. package/components/TabsNavigator/dictionary.js +11 -0
  31. package/components/TabsNavigator/helpers/getClusterTabs/getClusterTabs.d.ts +13 -0
  32. package/components/TabsNavigator/helpers/getClusterTabs/getClusterTabs.js +12 -0
  33. package/components/TabsNavigator/helpers/getClusterTabs/index.d.ts +1 -0
  34. package/components/TabsNavigator/helpers/getClusterTabs/index.js +1 -0
  35. package/components/TabsNavigator/helpers/getFinalTabs/getFinalTabs.d.ts +13 -0
  36. package/components/TabsNavigator/helpers/getFinalTabs/getFinalTabs.js +27 -0
  37. package/components/TabsNavigator/helpers/getFinalTabs/index.d.ts +1 -0
  38. package/components/TabsNavigator/helpers/getFinalTabs/index.js +1 -0
  39. package/components/TabsNavigator/hooks/useTabsNavigator/types.d.ts +6 -0
  40. package/components/TabsNavigator/hooks/useTabsNavigator/useTabsNavigator.d.ts +11 -0
  41. package/components/TabsNavigator/hooks/useTabsNavigator/useTabsNavigator.js +28 -0
  42. package/components/TabsNavigator/icons.d.ts +3 -0
  43. package/components/TabsNavigator/icons.js +6 -0
  44. package/components/TabsNavigator/index.d.ts +3 -0
  45. package/components/TabsNavigator/index.js +1 -0
  46. package/components/TabsNavigator/slots/TabsNavigatorEnum.d.ts +16 -0
  47. package/components/TabsNavigator/slots/TabsNavigatorEnum.js +22 -0
  48. package/components/TabsNavigator/slots/TabsNavigatorSlots.d.ts +30 -0
  49. package/components/TabsNavigator/slots/TabsNavigatorSlots.js +60 -0
  50. package/components/TabsNavigator/subcomponents/TabNavigatorClusterComponent/TabNavigatorClusterComponent.d.ts +7 -0
  51. package/components/TabsNavigator/subcomponents/TabNavigatorClusterComponent/TabNavigatorClusterComponent.js +120 -0
  52. package/components/TabsNavigator/subcomponents/TabNavigatorComponent/TabNavigatorComponent.d.ts +7 -0
  53. package/components/TabsNavigator/subcomponents/TabNavigatorComponent/TabNavigatorComponent.js +77 -0
  54. package/components/TabsNavigator/subcomponents/TextMarquee/TextMarquee.d.ts +6 -0
  55. package/components/TabsNavigator/subcomponents/TextMarquee/TextMarquee.js +99 -0
  56. package/components/TabsNavigator/subcomponents/TextMarquee/index.d.ts +2 -0
  57. package/components/TabsNavigator/subcomponents/TextMarquee/index.js +1 -0
  58. package/components/TabsNavigator/subcomponents/TextMarquee/types.d.ts +8 -0
  59. package/components/TabsNavigator/types.d.ts +43 -0
  60. package/components/ToastContainer/slots/toastContainerSlots.d.ts +2 -2
  61. package/components/WindowBase/slots/WindowBaseSlots.d.ts +2 -2
  62. package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +1 -1
  63. package/components/areas/contexts/AreasContext/store.js +2 -2
  64. package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +1 -1
  65. package/components/formatters/ConcatenatedFormatter/slots/ConcatenatedFormatterSlots.d.ts +1 -1
  66. package/components/formatters/DateFormatter/slots/DateFormatterSlots.d.ts +1 -1
  67. package/components/formatters/DistanceToNowFormatter/slots/DistanceToNowFormatterSlots.d.ts +1 -1
  68. package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.d.ts +1 -1
  69. package/components/formatters/PointsFormatter/slots/ointsFormatterSlots.d.ts +1 -1
  70. package/components/formatters/PriceFormatter/slots/PriceFormatterSlots.d.ts +1 -1
  71. package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.d.ts +1 -1
  72. package/components/hook-form/RHFUpload/RHFUploadImage/slots/RHFUploadImageSlots.d.ts +1 -1
  73. package/components/hook-form/RHFUpload/RHFUploadSingleFile/slots/RHFUploadSingleFileSlots.d.ts +5 -5
  74. package/components/hook-form/RHFormProvider/RHFormProvider.d.ts +2 -19
  75. package/components/hook-form/RHFormProvider/RHFormProvider.js +10 -5
  76. package/components/hook-form/RHFormProvider/types.d.ts +8 -4
  77. package/components/index.d.ts +1 -0
  78. package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +1 -1
  79. package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +2 -2
  80. package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
  81. package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +1 -1
  82. package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
  83. package/components/mui_extended/NavLink/slots/NavLinkSlots.d.ts +1 -1
  84. package/components/mui_extended/Select/slots/SelectSlots.d.ts +3 -3
  85. package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
  86. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +3 -3
  87. package/components/mui_extended/Typography/Typography.d.ts +1 -1
  88. package/components/mui_extended/Typography/Typography.js +4 -2
  89. package/hooks/index.d.ts +1 -1
  90. package/hooks/useFormAddEdit/{index.d.ts → useFormAddEdit.d.ts} +2 -1
  91. package/index.js +31 -27
  92. package/not_recognized/index.js +627 -0
  93. package/package.json +1 -1
  94. /package/hooks/useFormAddEdit/{index.js → useFormAddEdit.js} +0 -0
@@ -0,0 +1,13 @@
1
+ import { GetLabelType } from '@m4l/core';
2
+ import { TabNavigator } from '../../types';
3
+ /**
4
+ * helper encargado de crear el cluster de tabs
5
+ * @param remainingTabs - tabs que se van a agrupar
6
+ * @param getLabel - función para obtener el label del cluster
7
+ * @returns objeto con el label, icono y children
8
+ */
9
+ export declare const getClusterTabs: (remainingTabs: TabNavigator[], getLabel: GetLabelType) => {
10
+ label: string;
11
+ icon: string;
12
+ children: TabNavigator[];
13
+ };
@@ -0,0 +1,12 @@
1
+ import { T as TABS_NAVIGATOR_DICTIONARY_KEYS } from "../../dictionary.js";
2
+ import { T as TABS_NAVIGATOR_ICONS } from "../../icons.js";
3
+ const getClusterTabs = (remainingTabs, getLabel) => {
4
+ return {
5
+ label: getLabel(TABS_NAVIGATOR_DICTIONARY_KEYS.CLUSTER_TABS),
6
+ icon: TABS_NAVIGATOR_ICONS.CLUSTER_TABS,
7
+ children: remainingTabs
8
+ };
9
+ };
10
+ export {
11
+ getClusterTabs as g
12
+ };
@@ -0,0 +1 @@
1
+ export { getClusterTabs } from './getClusterTabs';
@@ -0,0 +1,13 @@
1
+ import { GetLabelType } from '@m4l/core';
2
+ import { TabNavigator } from '../../types';
3
+ /**
4
+ * Get the final tabs based on the size state and orientation
5
+ */
6
+ export declare const getFinalTabs: (tabs: TabNavigator[], sizeState: {
7
+ width: number;
8
+ height: number;
9
+ }, getLabel: GetLabelType, variant: "horizontal" | "vertical") => (TabNavigator | {
10
+ label: string;
11
+ icon: string;
12
+ children: TabNavigator[];
13
+ })[];
@@ -0,0 +1,27 @@
1
+ import { b as TAB_MAX_WIDTH, a as TAB_MAX_HEIGHT } from "../../constants.js";
2
+ import { g as getClusterTabs } from "../getClusterTabs/getClusterTabs.js";
3
+ const getFinalTabs = (tabs, sizeState, getLabel, variant) => {
4
+ const tabsLength = tabs.length;
5
+ if (tabsLength === 0) {
6
+ return [];
7
+ }
8
+ const isHorizontal = variant === "horizontal";
9
+ const availableSize = isHorizontal ? sizeState.width : sizeState.height;
10
+ const maxTabSize = isHorizontal ? TAB_MAX_WIDTH : TAB_MAX_HEIGHT;
11
+ const maxTabs = Math.floor(availableSize / maxTabSize);
12
+ if (maxTabs >= tabsLength) {
13
+ return tabs;
14
+ }
15
+ if (maxTabs <= 0 || maxTabs === 1) {
16
+ const allTabsCluster = getClusterTabs(tabs, getLabel);
17
+ return [allTabsCluster];
18
+ }
19
+ const normalTabs = tabs.slice(0, maxTabs - 1);
20
+ const remainingTabs = tabs.slice(maxTabs - 1);
21
+ const clusterTab = getClusterTabs(remainingTabs, getLabel);
22
+ const finalTabs = [...normalTabs, clusterTab];
23
+ return finalTabs;
24
+ };
25
+ export {
26
+ getFinalTabs as g
27
+ };
@@ -0,0 +1 @@
1
+ export { getFinalTabs } from './getFinalTabs';
@@ -0,0 +1,6 @@
1
+ import { TabNavigator } from 'src/components/TabsNavigator/types';
2
+ export interface useTabsNavigatorProps {
3
+ element: HTMLElement | null;
4
+ tabs: TabNavigator[];
5
+ variant: 'horizontal' | 'vertical';
6
+ }
@@ -0,0 +1,11 @@
1
+ import { useTabsNavigatorProps } from './types';
2
+ /**
3
+ * Hook to use the tabs navigator
4
+ */
5
+ export declare const useTabsNavigator: (props: useTabsNavigatorProps) => {
6
+ finalTabs: (import('../..').TabNavigator | {
7
+ label: string;
8
+ icon: string;
9
+ children: import('../..').TabNavigator[];
10
+ })[];
11
+ };
@@ -0,0 +1,28 @@
1
+ import { useMemo } from "react";
2
+ import { useModuleDictionary } from "@m4l/core";
3
+ import { u as useSizeContainer } from "../../../../hooks/useSizeContainer/index.js";
4
+ import { g as getFinalTabs } from "../../helpers/getFinalTabs/getFinalTabs.js";
5
+ const useTabsNavigator = (props) => {
6
+ const { element, tabs, variant } = props;
7
+ const { getLabel } = useModuleDictionary();
8
+ const containerSize = useSizeContainer(element, {
9
+ throttleTime: 16,
10
+ trailing: true
11
+ });
12
+ const sizeState = useMemo(() => {
13
+ if (!containerSize) {
14
+ return { width: 0, height: 0 };
15
+ }
16
+ return {
17
+ width: containerSize.containerWidth,
18
+ height: containerSize.containerHeight
19
+ };
20
+ }, [containerSize]);
21
+ const finalTabs = useMemo(() => {
22
+ return getFinalTabs(tabs, sizeState, getLabel, variant);
23
+ }, [tabs, sizeState, getLabel, variant]);
24
+ return { finalTabs };
25
+ };
26
+ export {
27
+ useTabsNavigator as u
28
+ };
@@ -0,0 +1,3 @@
1
+ export declare const TABS_NAVIGATOR_ICONS: {
2
+ CLUSTER_TABS: string;
3
+ };
@@ -0,0 +1,6 @@
1
+ const TABS_NAVIGATOR_ICONS = {
2
+ CLUSTER_TABS: "frontend/components/tabs_navigator/assets/icons/more_options.svg"
3
+ };
4
+ export {
5
+ TABS_NAVIGATOR_ICONS as T
6
+ };
@@ -0,0 +1,3 @@
1
+ export { TabsNavigator } from './TabsNavigator';
2
+ export { getTabsNavigatorComponentsDictionary } from './dictionary';
3
+ export type { TabsNavigatorProps, TabNavigator } from './types';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,16 @@
1
+ export declare enum TabsNavigatorSlots {
2
+ root = "root",
3
+ tabNavigatorContainer = "tabNavigatorContainer",
4
+ tabNavigatorIconContainer = "tabNavigatorIconContainer",
5
+ tabNavigatorIcon = "tabNavigatorIcon",
6
+ tabNavigatorLabel = "tabNavigatorLabel",
7
+ contentPopover = "contentPopover",
8
+ tabNavigatorPositionedContainer = "tabNavigatorPositionedContainer",
9
+ typographyTextMarqueeContainer = "typographyTextMarqueeContainer",
10
+ typographyTextMarquee = "typographyTextMarquee",
11
+ popover = "popover"
12
+ }
13
+ export declare enum TabsNavigatorComplementaryClasses {
14
+ normal = "normal",
15
+ cluster = "cluster"
16
+ }
@@ -0,0 +1,22 @@
1
+ var TabsNavigatorSlots = /* @__PURE__ */ ((TabsNavigatorSlots2) => {
2
+ TabsNavigatorSlots2["root"] = "root";
3
+ TabsNavigatorSlots2["tabNavigatorContainer"] = "tabNavigatorContainer";
4
+ TabsNavigatorSlots2["tabNavigatorIconContainer"] = "tabNavigatorIconContainer";
5
+ TabsNavigatorSlots2["tabNavigatorIcon"] = "tabNavigatorIcon";
6
+ TabsNavigatorSlots2["tabNavigatorLabel"] = "tabNavigatorLabel";
7
+ TabsNavigatorSlots2["contentPopover"] = "contentPopover";
8
+ TabsNavigatorSlots2["tabNavigatorPositionedContainer"] = "tabNavigatorPositionedContainer";
9
+ TabsNavigatorSlots2["typographyTextMarqueeContainer"] = "typographyTextMarqueeContainer";
10
+ TabsNavigatorSlots2["typographyTextMarquee"] = "typographyTextMarquee";
11
+ TabsNavigatorSlots2["popover"] = "popover";
12
+ return TabsNavigatorSlots2;
13
+ })(TabsNavigatorSlots || {});
14
+ var TabsNavigatorComplementaryClasses = /* @__PURE__ */ ((TabsNavigatorComplementaryClasses2) => {
15
+ TabsNavigatorComplementaryClasses2["normal"] = "normal";
16
+ TabsNavigatorComplementaryClasses2["cluster"] = "cluster";
17
+ return TabsNavigatorComplementaryClasses2;
18
+ })(TabsNavigatorComplementaryClasses || {});
19
+ export {
20
+ TabsNavigatorComplementaryClasses as T,
21
+ TabsNavigatorSlots as a
22
+ };
@@ -0,0 +1,30 @@
1
+ export declare const TabsNavigatorRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
2
+ ownerState?: any;
3
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
+ export declare const TabNavigatorContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
5
+ ownerState?: any;
6
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
7
+ export declare const ContentPopoverStyled: import('@emotion/styled').StyledComponent<Pick<import('../../ContainerFlow').ContainerFlowProps, keyof import('../../ContainerFlow').ContainerFlowProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
8
+ ownerState?: any;
9
+ }, {}, {}>;
10
+ export declare const TabNavigatorPositionedContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
11
+ ownerState?: any;
12
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
13
+ export declare const TabNavigatorIconContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
14
+ ownerState?: any;
15
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
16
+ export declare const TypographyTextMarqueeContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
17
+ ownerState?: any;
18
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
19
+ export declare const TypographyTextMarqueeStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/Typography/types').TypographyProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "size" | "children" | "title" | "component" | "zIndex" | "id" | "disabled" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "flex" | "hidden" | "color" | "left" | "right" | "bottom" | "top" | "ellipsis" | "content" | "style" | "position" | "padding" | "variant" | "borderRadius" | "width" | "display" | "borderColor" | "height" | "gap" | "minHeight" | "margin" | "overflow" | "boxShadow" | "minWidth" | "justifyContent" | "alignItems" | "paddingLeft" | "borderLeft" | "borderTop" | "maxWidth" | "flexDirection" | "paddingRight" | "borderRight" | "flexGrow" | "marginLeft" | "textOverflow" | "borderBottom" | "gridTemplateColumns" | "marginBottom" | "dataTestid" | "alignContent" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateRows" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginRight" | "marginTop" | "maxHeight" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingTop" | "rowGap" | "textAlign" | "translate" | "visibility" | "whiteSpace" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "className" | "classes" | "sx" | "p" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "htmlFor" | "gutterBottom" | "noWrap" | "variantMapping" | "skeletonWidth" | "skeletonRows" | keyof import('react').RefAttributes<HTMLSpanElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
20
+ ownerState?: any;
21
+ }, {}, {}>;
22
+ export declare const TabNavigatorIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
23
+ ownerState?: any;
24
+ }, {}, {}>;
25
+ export declare const TabNavigatorLabelStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/Typography/types').TypographyProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "size" | "children" | "title" | "component" | "zIndex" | "id" | "disabled" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "flex" | "hidden" | "color" | "left" | "right" | "bottom" | "top" | "ellipsis" | "content" | "style" | "position" | "padding" | "variant" | "borderRadius" | "width" | "display" | "borderColor" | "height" | "gap" | "minHeight" | "margin" | "overflow" | "boxShadow" | "minWidth" | "justifyContent" | "alignItems" | "paddingLeft" | "borderLeft" | "borderTop" | "maxWidth" | "flexDirection" | "paddingRight" | "borderRight" | "flexGrow" | "marginLeft" | "textOverflow" | "borderBottom" | "gridTemplateColumns" | "marginBottom" | "dataTestid" | "alignContent" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateRows" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginRight" | "marginTop" | "maxHeight" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingTop" | "rowGap" | "textAlign" | "translate" | "visibility" | "whiteSpace" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "className" | "classes" | "sx" | "p" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "htmlFor" | "gutterBottom" | "noWrap" | "variantMapping" | "skeletonWidth" | "skeletonRows" | keyof import('react').RefAttributes<HTMLSpanElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
26
+ ownerState?: any;
27
+ }, {}, {}>;
28
+ export declare const PopoverStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Popover/types').PopoverProps, keyof import('../../mui_extended/Popover/types').PopoverProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
29
+ ownerState?: any;
30
+ }, {}, {}>;
@@ -0,0 +1,60 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { a as TabsNavigatorSlots } from "./TabsNavigatorEnum.js";
3
+ import { c as TABS_NAVIGATOR_KEY_COMPONENT } from "../constants.js";
4
+ import { t as tabsNavigatorStyles } from "../TabsNavigator.styles.js";
5
+ import { C as ContainerFlow } from "../../ContainerFlow/ContainerFlow.js";
6
+ import { T as Typography } from "../../mui_extended/Typography/Typography.js";
7
+ import { I as Icon } from "../../Icon/Icon.js";
8
+ import { P as Popover } from "../../mui_extended/Popover/Popover.js";
9
+ const TabsNavigatorRootStyled = styled("div", {
10
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
11
+ slot: TabsNavigatorSlots.root
12
+ })(tabsNavigatorStyles.root);
13
+ const TabNavigatorContainerStyled = styled("div", {
14
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
15
+ slot: TabsNavigatorSlots.tabNavigatorContainer
16
+ })(tabsNavigatorStyles.tabNavigatorContainer);
17
+ const ContentPopoverStyled = styled(ContainerFlow, {
18
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
19
+ slot: TabsNavigatorSlots.contentPopover
20
+ })(tabsNavigatorStyles.contentPopover);
21
+ const TabNavigatorPositionedContainerStyled = styled("div", {
22
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
23
+ slot: TabsNavigatorSlots.tabNavigatorPositionedContainer
24
+ })(tabsNavigatorStyles.tabNavigatorPositionedContainer);
25
+ const TabNavigatorIconContainerStyled = styled("div", {
26
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
27
+ slot: TabsNavigatorSlots.tabNavigatorIconContainer
28
+ })(tabsNavigatorStyles.tabNavigatorIconContainer);
29
+ const TypographyTextMarqueeContainerStyled = styled("div", {
30
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
31
+ slot: TabsNavigatorSlots.typographyTextMarqueeContainer
32
+ })(tabsNavigatorStyles.typographyTextMarqueeContainer);
33
+ const TypographyTextMarqueeStyled = styled(Typography, {
34
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
35
+ slot: TabsNavigatorSlots.typographyTextMarquee
36
+ })(tabsNavigatorStyles.typographyTextMarquee);
37
+ const TabNavigatorIconStyled = styled(Icon, {
38
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
39
+ slot: TabsNavigatorSlots.tabNavigatorIcon
40
+ })(tabsNavigatorStyles.tabNavigatorIcon);
41
+ const TabNavigatorLabelStyled = styled(Typography, {
42
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
43
+ slot: TabsNavigatorSlots.tabNavigatorLabel
44
+ })(tabsNavigatorStyles.tabNavigatorLabel);
45
+ const PopoverStyled = styled(Popover, {
46
+ name: TABS_NAVIGATOR_KEY_COMPONENT,
47
+ slot: TabsNavigatorSlots.popover
48
+ })(tabsNavigatorStyles.popover);
49
+ export {
50
+ ContentPopoverStyled as C,
51
+ PopoverStyled as P,
52
+ TabsNavigatorRootStyled as T,
53
+ TabNavigatorContainerStyled as a,
54
+ TabNavigatorPositionedContainerStyled as b,
55
+ TabNavigatorIconContainerStyled as c,
56
+ TabNavigatorIconStyled as d,
57
+ TabNavigatorLabelStyled as e,
58
+ TypographyTextMarqueeContainerStyled as f,
59
+ TypographyTextMarqueeStyled as g
60
+ };
@@ -0,0 +1,7 @@
1
+ import { TabNavigatorCluster } from '../../types';
2
+ /**
3
+ * Tab Navigator Component
4
+ */
5
+ export declare const TabNavigatorClusterComponent: (data: TabNavigatorCluster & {
6
+ selectedId: string | undefined;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,120 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { a as TabNavigatorContainerStyled, b as TabNavigatorPositionedContainerStyled, c as TabNavigatorIconContainerStyled, d as TabNavigatorIconStyled, P as PopoverStyled, C as ContentPopoverStyled } from "../../slots/TabsNavigatorSlots.js";
4
+ import { useState, useRef, useMemo } from "react";
5
+ import { T as TabNavigatorComponent } from "../TabNavigatorComponent/TabNavigatorComponent.js";
6
+ import { useEnvironment } from "@m4l/core";
7
+ import { T as TABS_NAVIGATOR_CLASSES } from "../../constants.js";
8
+ import { useTheme } from "@mui/material/styles";
9
+ import { T as TextMarquee } from "../TextMarquee/TextMarquee.js";
10
+ import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
11
+ const TabNavigatorClusterComponent = (data) => {
12
+ const { label, icon, children, selectedId, onChangeSelectedId, variant, maxColumnsPopover = 3 } = data;
13
+ const [open, setOpen] = useState(false);
14
+ const anchorEl = useRef(null);
15
+ const { host_static_assets, environment_assets } = useEnvironment();
16
+ const { currentSize } = useComponentSize();
17
+ const selected = children.some((child) => child.id === selectedId);
18
+ const ownerState = useMemo(() => ({
19
+ selected,
20
+ variant,
21
+ size: currentSize,
22
+ maxColumnsPopover,
23
+ totalTabs: children.length
24
+ }), [selected, variant, currentSize, maxColumnsPopover, children.length]);
25
+ const theme = useTheme();
26
+ const handleKeyDown = (event) => {
27
+ if (event.key === "Enter" || event.key === " ") {
28
+ setOpen(!open);
29
+ }
30
+ };
31
+ const MemoizedRenderTabs = useMemo(() => {
32
+ return children.map((child) => /* @__PURE__ */ jsx(
33
+ TabNavigatorComponent,
34
+ {
35
+ ...child,
36
+ type: "cluster",
37
+ selectedId,
38
+ onChangeSelectedId,
39
+ onClick: () => {
40
+ child.onClick?.();
41
+ setOpen(false);
42
+ }
43
+ },
44
+ child.label
45
+ ));
46
+ }, [children, selectedId, onChangeSelectedId]);
47
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
48
+ /* @__PURE__ */ jsx(
49
+ TabNavigatorContainerStyled,
50
+ {
51
+ tabIndex: 0,
52
+ "aria-selected": selected,
53
+ role: "button",
54
+ "aria-label": "cluster tabs",
55
+ "aria-expanded": open,
56
+ "aria-haspopup": "menu",
57
+ className: TABS_NAVIGATOR_CLASSES.tabNavigatorContainer,
58
+ onClick: () => setOpen(!open),
59
+ onKeyDown: handleKeyDown,
60
+ ownerState,
61
+ children: /* @__PURE__ */ jsxs(
62
+ TabNavigatorPositionedContainerStyled,
63
+ {
64
+ className: clsx(
65
+ TABS_NAVIGATOR_CLASSES.tabNavigatorPositionedContainer,
66
+ TABS_NAVIGATOR_CLASSES.normal
67
+ ),
68
+ children: [
69
+ /* @__PURE__ */ jsx(TabNavigatorIconContainerStyled, { ref: anchorEl, className: TABS_NAVIGATOR_CLASSES.tabNavigatorIconContainer, ownerState, children: /* @__PURE__ */ jsx(TabNavigatorIconStyled, { className: TABS_NAVIGATOR_CLASSES.tabNavigatorIcon, src: `${host_static_assets}/${environment_assets}/${icon}`, ownerState }) }),
70
+ /* @__PURE__ */ jsx(
71
+ TextMarquee,
72
+ {
73
+ speed: 3,
74
+ variant: selected ? "bodyDens" : "body",
75
+ size: currentSize,
76
+ children: label
77
+ }
78
+ )
79
+ ]
80
+ }
81
+ )
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsx(
85
+ PopoverStyled,
86
+ {
87
+ open,
88
+ onClose: () => setOpen(false),
89
+ anchorEl: anchorEl.current,
90
+ sx: {
91
+ ml: variant === "vertical" ? theme.vars.size.baseSpacings.sp6 : 0,
92
+ mb: variant === "horizontal" ? theme.vars.size.baseSpacings.sp6 : 0
93
+ },
94
+ ...variant === "vertical" ? {
95
+ anchorOrigin: {
96
+ vertical: "center",
97
+ horizontal: "right"
98
+ },
99
+ transformOrigin: {
100
+ vertical: "center",
101
+ horizontal: "left"
102
+ }
103
+ } : {
104
+ anchorOrigin: {
105
+ vertical: "top",
106
+ horizontal: "center"
107
+ },
108
+ transformOrigin: {
109
+ vertical: "bottom",
110
+ horizontal: "center"
111
+ }
112
+ },
113
+ children: /* @__PURE__ */ jsx(ContentPopoverStyled, { variant: "flex-wrap", className: TABS_NAVIGATOR_CLASSES.contentPopover, ownerState, children: MemoizedRenderTabs })
114
+ }
115
+ )
116
+ ] });
117
+ };
118
+ export {
119
+ TabNavigatorClusterComponent as T
120
+ };
@@ -0,0 +1,7 @@
1
+ import { TabNavigator } from '../../types';
2
+ /**
3
+ * Tab Navigator Component
4
+ */
5
+ export declare const TabNavigatorComponent: (data: TabNavigator & {
6
+ type?: "cluster" | "normal";
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,77 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { a as TabNavigatorContainerStyled, b as TabNavigatorPositionedContainerStyled, c as TabNavigatorIconContainerStyled, d as TabNavigatorIconStyled, e as TabNavigatorLabelStyled } from "../../slots/TabsNavigatorSlots.js";
4
+ import { T as TABS_NAVIGATOR_CLASSES } from "../../constants.js";
5
+ import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
6
+ import { T as TextMarquee } from "../TextMarquee/TextMarquee.js";
7
+ const TabNavigatorComponent = (data) => {
8
+ const {
9
+ id,
10
+ label,
11
+ icon,
12
+ onClick,
13
+ selectedId,
14
+ onChangeSelectedId,
15
+ type = "normal"
16
+ } = data;
17
+ const { currentSize } = useComponentSize();
18
+ const selected = id === selectedId;
19
+ const ownerState = {
20
+ size: currentSize,
21
+ selected
22
+ };
23
+ const handleClick = () => {
24
+ onChangeSelectedId?.(id);
25
+ onClick?.();
26
+ };
27
+ const handleKeyDown = (event) => {
28
+ if (event.key === "Enter" || event.key === " ") {
29
+ handleClick();
30
+ }
31
+ };
32
+ return /* @__PURE__ */ jsx(
33
+ TabNavigatorContainerStyled,
34
+ {
35
+ tabIndex: 0,
36
+ "aria-selected": selected,
37
+ className: TABS_NAVIGATOR_CLASSES.tabNavigatorContainer,
38
+ onClick: handleClick,
39
+ onKeyDown: handleKeyDown,
40
+ ownerState: { selected },
41
+ children: /* @__PURE__ */ jsxs(
42
+ TabNavigatorPositionedContainerStyled,
43
+ {
44
+ className: clsx(
45
+ TABS_NAVIGATOR_CLASSES.tabNavigatorPositionedContainer,
46
+ type === "normal" ? TABS_NAVIGATOR_CLASSES.normal : TABS_NAVIGATOR_CLASSES.cluster
47
+ ),
48
+ children: [
49
+ /* @__PURE__ */ jsx(TabNavigatorIconContainerStyled, { className: TABS_NAVIGATOR_CLASSES.tabNavigatorIconContainer, ownerState, children: /* @__PURE__ */ jsx(TabNavigatorIconStyled, { className: TABS_NAVIGATOR_CLASSES.tabNavigatorIcon, src: icon, ownerState }) }),
50
+ type === "normal" ? /* @__PURE__ */ jsx(
51
+ TextMarquee,
52
+ {
53
+ speed: 3,
54
+ variant: selected ? "bodyDens" : "body",
55
+ size: currentSize,
56
+ children: label
57
+ }
58
+ ) : /* @__PURE__ */ jsx(
59
+ TabNavigatorLabelStyled,
60
+ {
61
+ variant: selected ? "bodyDens" : "body",
62
+ size: currentSize,
63
+ ellipsis: true,
64
+ ownerState,
65
+ className: TABS_NAVIGATOR_CLASSES.tabNavigatorLabel,
66
+ children: label
67
+ }
68
+ )
69
+ ]
70
+ }
71
+ )
72
+ }
73
+ );
74
+ };
75
+ export {
76
+ TabNavigatorComponent as T
77
+ };
@@ -0,0 +1,6 @@
1
+ import { TextMarqueeProps } from './types';
2
+ /**
3
+ * Componente que muestra un texto en movimiento cuando está truncado.
4
+ * La animación se activa al hacer hover sobre el contenedor.
5
+ */
6
+ export declare const TextMarquee: (props: TextMarqueeProps) => import("react/jsx-runtime").JSX.Element;