@elliemae/ds-tabs 3.53.1-rc.0 → 3.54.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSTabsCTX.js +7 -1
- package/dist/cjs/DSTabsCTX.js.map +2 -2
- package/dist/cjs/{parts/tabBar → config}/useResizeObserver.js.map +1 -1
- package/dist/cjs/config/useTabs.js +105 -3
- package/dist/cjs/config/useTabs.js.map +2 -2
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/carousel/Carousel.js +7 -2
- package/dist/cjs/parts/carousel/Carousel.js.map +2 -2
- package/dist/cjs/parts/carousel/styles.js +15 -2
- package/dist/cjs/parts/carousel/styles.js.map +2 -2
- package/dist/cjs/parts/tabBar/TabBar.js +15 -12
- package/dist/cjs/parts/tabBar/TabBar.js.map +2 -2
- package/dist/cjs/parts/tabBar/TabBarItemRenderer.js +9 -8
- package/dist/cjs/parts/tabBar/TabBarItemRenderer.js.map +2 -2
- package/dist/cjs/parts/tabBar/styles.js +19 -3
- package/dist/cjs/parts/tabBar/styles.js.map +2 -2
- package/dist/cjs/parts/tabsContent/TabsContent.js +5 -4
- package/dist/cjs/parts/tabsContent/TabsContent.js.map +2 -2
- package/dist/cjs/parts/tabsContent/styles.js +4 -1
- package/dist/cjs/parts/tabsContent/styles.js.map +2 -2
- package/dist/cjs/parts/tabsPanel/TabsPanels.js +16 -9
- package/dist/cjs/parts/tabsPanel/TabsPanels.js.map +2 -2
- package/dist/cjs/parts/tabsPanel/styles.js +5 -1
- package/dist/cjs/parts/tabsPanel/styles.js.map +2 -2
- package/dist/cjs/sharedTypes.js.map +1 -1
- package/dist/esm/DSTabsCTX.js +7 -1
- package/dist/esm/DSTabsCTX.js.map +2 -2
- package/dist/esm/{parts/tabBar → config}/useResizeObserver.js.map +1 -1
- package/dist/esm/config/useTabs.js +105 -3
- package/dist/esm/config/useTabs.js.map +2 -2
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/parts/carousel/Carousel.js +14 -3
- package/dist/esm/parts/carousel/Carousel.js.map +2 -2
- package/dist/esm/parts/carousel/styles.js +17 -4
- package/dist/esm/parts/carousel/styles.js.map +2 -2
- package/dist/esm/parts/tabBar/TabBar.js +15 -12
- package/dist/esm/parts/tabBar/TabBar.js.map +2 -2
- package/dist/esm/parts/tabBar/TabBarItemRenderer.js +10 -9
- package/dist/esm/parts/tabBar/TabBarItemRenderer.js.map +2 -2
- package/dist/esm/parts/tabBar/styles.js +21 -5
- package/dist/esm/parts/tabBar/styles.js.map +2 -2
- package/dist/esm/parts/tabsContent/TabsContent.js +7 -6
- package/dist/esm/parts/tabsContent/TabsContent.js.map +2 -2
- package/dist/esm/parts/tabsContent/styles.js +4 -1
- package/dist/esm/parts/tabsContent/styles.js.map +2 -2
- package/dist/esm/parts/tabsPanel/TabsPanels.js +16 -9
- package/dist/esm/parts/tabsPanel/TabsPanels.js.map +2 -2
- package/dist/esm/parts/tabsPanel/styles.js +5 -1
- package/dist/esm/parts/tabsPanel/styles.js.map +2 -2
- package/dist/types/DSTabs.d.ts +0 -1
- package/dist/types/DSTabsCTX.d.ts +0 -1
- package/dist/types/{parts/tabBar → config}/useResizeObserver.d.ts +0 -1
- package/dist/types/exported-related/DSTab.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/parts/carousel/Carousel.d.ts +0 -1
- package/dist/types/parts/carousel/styles.d.ts +2 -2
- package/dist/types/parts/carousel/useCarousel.d.ts +0 -1
- package/dist/types/parts/carousel/useCarouselCallbacks.d.ts +0 -1
- package/dist/types/parts/tabBar/TabBar.d.ts +0 -1
- package/dist/types/parts/tabBar/styles.d.ts +1 -0
- package/dist/types/parts/tabsContent/TabsContent.d.ts +0 -1
- package/dist/types/parts/tabsContent/styles.d.ts +1 -0
- package/dist/types/parts/tabsPanel/TabsPanels.d.ts +0 -1
- package/dist/types/react-desc-prop-types.d.ts +0 -1
- package/dist/types/sharedTypes.d.ts +11 -1
- package/dist/types/tests/DSTabs.PUI-16477.test.d.ts +1 -0
- package/package.json +10 -9
- package/dist/cjs/parts/tabBar/useTabBar.js +0 -105
- package/dist/cjs/parts/tabBar/useTabBar.js.map +0 -7
- package/dist/cjs/utils/hooks/useTabsCallbacks.js +0 -66
- package/dist/cjs/utils/hooks/useTabsCallbacks.js.map +0 -7
- package/dist/esm/parts/tabBar/useTabBar.js +0 -75
- package/dist/esm/parts/tabBar/useTabBar.js.map +0 -7
- package/dist/esm/utils/hooks/useTabsCallbacks.js +0 -36
- package/dist/esm/utils/hooks/useTabsCallbacks.js.map +0 -7
- package/dist/types/parts/tabBar/useTabBar.d.ts +0 -11
- package/dist/types/utils/hooks/useTabsCallbacks.d.ts +0 -7
- /package/dist/cjs/{parts/tabBar → config}/useResizeObserver.js +0 -0
- /package/dist/esm/{parts/tabBar → config}/useResizeObserver.js +0 -0
|
@@ -5,7 +5,6 @@ import React2, { useMemo, useContext, useCallback } from "react";
|
|
|
5
5
|
import SwipeableViews from "react-swipeable-views";
|
|
6
6
|
import { StyledPanelContainer } from "./styles.js";
|
|
7
7
|
import { DSTabsContext } from "../../DSTabsCTX.js";
|
|
8
|
-
import { useTabsCallbacks } from "../../utils/hooks/useTabsCallbacks.js";
|
|
9
8
|
const TabsPanels = () => {
|
|
10
9
|
const {
|
|
11
10
|
actualActiveTab,
|
|
@@ -18,9 +17,9 @@ const TabsPanels = () => {
|
|
|
18
17
|
isDSMobile,
|
|
19
18
|
tabPanelsProps,
|
|
20
19
|
swipeableViewsContainerProps
|
|
21
|
-
}
|
|
20
|
+
},
|
|
21
|
+
globalClickHandler
|
|
22
22
|
} = useContext(DSTabsContext);
|
|
23
|
-
const { handleOnTabChange, handleOnMouseDown } = useTabsCallbacks();
|
|
24
23
|
const handleOnChangeIndex = useCallback(
|
|
25
24
|
(index, indexLatest) => {
|
|
26
25
|
if (!focusableTabsRef.current) return;
|
|
@@ -30,32 +29,40 @@ const TabsPanels = () => {
|
|
|
30
29
|
const newFocusableIndex = currentIndexFocusable >= 0 ? currentIndexFocusable + offset : -1;
|
|
31
30
|
if (newFocusableIndex < 0 || newFocusableIndex > focusableTabsRef.current?.length || !focusableTabsRef.current?.[newFocusableIndex])
|
|
32
31
|
return;
|
|
33
|
-
|
|
32
|
+
globalClickHandler({
|
|
33
|
+
event: { type: "click" },
|
|
34
|
+
target: "swipeableViews",
|
|
35
|
+
tabId: focusableTabsRef.current[newFocusableIndex].dataset.tabId
|
|
36
|
+
});
|
|
34
37
|
focusableTabsRef.current[newFocusableIndex].click();
|
|
35
38
|
}
|
|
36
39
|
},
|
|
37
|
-
[actualActiveTab, focusableTabsRef,
|
|
40
|
+
[actualActiveTab, focusableTabsRef, globalClickHandler]
|
|
38
41
|
);
|
|
39
42
|
const panels = useMemo(() => {
|
|
40
43
|
const emptyPanelRender = animated ? /* @__PURE__ */ jsx("div", {}) : null;
|
|
41
44
|
return React2.Children.map(tabs, (tab) => {
|
|
42
|
-
const { tabId: panelId = "", style, children: content, disabled } = tab.props;
|
|
45
|
+
const { tabId: panelId = "", style, children: content, disabled, applyAriaDisabled } = tab.props;
|
|
43
46
|
const isActive = actualActiveTab === panelId;
|
|
44
47
|
const shouldRender = !onlyRenderActiveTab || isActive;
|
|
48
|
+
const getOwnerProps = () => tab.props;
|
|
49
|
+
const getOwnerPropsArguments = () => ({ panelId });
|
|
45
50
|
if (disabled) return emptyPanelRender;
|
|
46
51
|
if (!shouldRender) return emptyPanelRender;
|
|
47
52
|
return /* @__PURE__ */ createElement(
|
|
48
53
|
StyledPanelContainer,
|
|
49
54
|
{
|
|
50
55
|
...tabPanelsProps,
|
|
56
|
+
getOwnerProps,
|
|
57
|
+
getOwnerPropsArguments,
|
|
51
58
|
key: panelId,
|
|
52
59
|
id: panelId,
|
|
53
60
|
"aria-labelledby": `${panelId}-label`,
|
|
54
|
-
"aria-hidden": !isActive,
|
|
61
|
+
"aria-hidden": !isActive || !!applyAriaDisabled,
|
|
55
62
|
"data-panel-id": panelId,
|
|
56
63
|
"data-testid": "ds-tabs-tab-panel",
|
|
57
64
|
hide: !isActive,
|
|
58
|
-
|
|
65
|
+
onClick: (event) => globalClickHandler({ event, target: "panel" }),
|
|
59
66
|
role: "tabpanel",
|
|
60
67
|
style: {
|
|
61
68
|
...tabPanelsProps?.style || {},
|
|
@@ -66,7 +73,7 @@ const TabsPanels = () => {
|
|
|
66
73
|
content
|
|
67
74
|
);
|
|
68
75
|
});
|
|
69
|
-
}, [animated, tabs, actualActiveTab, onlyRenderActiveTab, tabPanelsProps,
|
|
76
|
+
}, [animated, tabs, actualActiveTab, onlyRenderActiveTab, tabPanelsProps, globalClickHandler, isDSMobile]);
|
|
70
77
|
const indexExclusiveToSwipeableIndexThatReliesOnReactChildrenToArrayWhichAutoFiltersNull = useMemo(() => {
|
|
71
78
|
const childrenArray = React2.Children.toArray(tabs);
|
|
72
79
|
const index = childrenArray.findIndex((tab) => tab.props.tabId === actualActiveTab);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabsPanel/TabsPanels.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable arrow-body-style */\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport SwipeableViews from 'react-swipeable-views';\nimport { StyledPanelContainer } from './styles.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable arrow-body-style */\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport SwipeableViews from 'react-swipeable-views';\nimport { StyledPanelContainer } from './styles.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\nimport type { DSTabT } from '../../react-desc-prop-types.js';\n\nexport const TabsPanels = (): JSX.Element | JSX.Element[] => {\n const {\n actualActiveTab,\n focusableTabsRef,\n props: {\n animated,\n enableMouseEvents,\n onlyRenderActiveTab,\n children: tabs,\n isDSMobile,\n tabPanelsProps,\n swipeableViewsContainerProps,\n },\n globalClickHandler,\n } = useContext(DSTabsContext);\n\n /** [PUI-15772] - Tabs Pre Refactor\n * Handler for swipe gestures and tab index changes. It:\n * 1. Calculates the offset between current and new tab index\n * 2. Finds the new focusable tab based on the offset\n * 3. Updates the active tab and forces a click event\n * 4. May cause unnecessary rerenders due to forced click events\n */\n const handleOnChangeIndex = useCallback(\n (index: number, indexLatest: number) => {\n if (!focusableTabsRef.current) return;\n\n const offset = index - indexLatest;\n\n if (focusableTabsRef.current) {\n const currentIndexFocusable = focusableTabsRef.current?.findIndex((el) => el.dataset.tabId === actualActiveTab);\n\n const newFocusableIndex = currentIndexFocusable >= 0 ? currentIndexFocusable + offset : -1;\n\n if (\n newFocusableIndex < 0 ||\n newFocusableIndex > focusableTabsRef.current?.length ||\n !focusableTabsRef.current?.[newFocusableIndex]\n )\n return;\n globalClickHandler({\n event: { type: 'click' } as React.MouseEvent<HTMLDivElement>,\n target: 'swipeableViews',\n tabId: focusableTabsRef.current[newFocusableIndex].dataset.tabId,\n });\n\n // swiping does not trigger centerTab function inside handleOnTabChange because there is no event\n // by clicking we are manually forcing to center the tab\n\n focusableTabsRef.current[newFocusableIndex].click();\n }\n },\n [actualActiveTab, focusableTabsRef, globalClickHandler],\n );\n\n const panels = useMemo(() => {\n // this component is based on React.children, swipeable views want an index in the array, not a tabId\n // two bad patterns relying on each others results in:\n // - because of react.children,\n // to guarantee predictability in finding the index based on tabId we should never return \"null\" which is not part of React.Children.toArray\n //\n // when not using swipeable views, we don't need to find the index based on tabId\n // so even if we return null the variable\n // indexExclusiveToSwipeableIndexThatReliesOnReactChildrenToArrayWhichAutoFiltersNull\n // (which will be calculating the wrong index)\n // will have no impact on the rendering\n // https://react.dev/reference/react/Children#children-toarray-caveats\n // Caveats\n // Empty nodes (null, undefined, and Booleans) will be omitted in the returned array.\n //\n // So, long story short,\n // 1 - do not remove next line, keep the <div /> instead of null when \"animated\"\n // 2 - NEVER EVER BUILD API BASED ON REACT.CHILDREN (if you are writing code post 2022 and you are not working on a legacy codebase)\n const emptyPanelRender = animated ? <div /> : null;\n return React.Children.map(tabs, (tab: React.ReactElement<DSTabT.Props>) => {\n const { tabId: panelId = '', style, children: content, disabled, applyAriaDisabled } = tab.props;\n const isActive = actualActiveTab === panelId;\n const shouldRender = !onlyRenderActiveTab || isActive;\n const getOwnerProps = () => tab.props;\n const getOwnerPropsArguments = () => ({ panelId });\n\n if (disabled) return emptyPanelRender;\n if (!shouldRender) return emptyPanelRender;\n return (\n <StyledPanelContainer\n {...tabPanelsProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n key={panelId}\n id={panelId}\n aria-labelledby={`${panelId}-label`}\n aria-hidden={!isActive || !!applyAriaDisabled}\n data-panel-id={panelId}\n data-testid=\"ds-tabs-tab-panel\"\n hide={!isActive}\n onClick={(event) => globalClickHandler({ event, target: 'panel' })}\n role=\"tabpanel\"\n style={{\n ...(tabPanelsProps?.style || {}),\n ...(style || {}),\n }}\n isDSMobile={isDSMobile}\n >\n {content}\n </StyledPanelContainer>\n );\n });\n }, [animated, tabs, actualActiveTab, onlyRenderActiveTab, tabPanelsProps, globalClickHandler, isDSMobile]);\n\n const indexExclusiveToSwipeableIndexThatReliesOnReactChildrenToArrayWhichAutoFiltersNull = useMemo(() => {\n const childrenArray = React.Children.toArray(tabs) as React.ReactElement<DSTabT.Props>[];\n const index = childrenArray.findIndex((tab) => tab.props.tabId === actualActiveTab);\n\n if (index === -1) return 0;\n return index;\n }, [actualActiveTab, tabs]);\n\n if (animated) {\n // Ignore ts errors on the next line because the 'react-swipeable-views' package does not export a type for the SwipeableViews component\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n const Comp = (SwipeableViews as any)?.default ?? SwipeableViews;\n return (\n <Comp\n {...swipeableViewsContainerProps}\n style={{\n overflow: 'hidden', // https://jira.elliemae.io/browse/PUI-9906\n ...(swipeableViewsContainerProps?.style || {}),\n }}\n enableMouseEvents={enableMouseEvents}\n index={indexExclusiveToSwipeableIndexThatReliesOnReactChildrenToArrayWhichAutoFiltersNull}\n onChangeIndex={handleOnChangeIndex}\n >\n {panels}\n </Comp>\n );\n }\n\n return panels;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiFiB;AAWhC;AA1FR,OAAOA,UAAS,SAAS,YAAY,mBAAmB;AACxD,OAAO,oBAAoB;AAC3B,SAAS,4BAA4B;AACrC,SAAS,qBAAqB;AAGvB,MAAM,aAAa,MAAmC;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF,IAAI,WAAW,aAAa;AAS5B,QAAM,sBAAsB;AAAA,IAC1B,CAAC,OAAe,gBAAwB;AACtC,UAAI,CAAC,iBAAiB,QAAS;AAE/B,YAAM,SAAS,QAAQ;AAEvB,UAAI,iBAAiB,SAAS;AAC5B,cAAM,wBAAwB,iBAAiB,SAAS,UAAU,CAAC,OAAO,GAAG,QAAQ,UAAU,eAAe;AAE9G,cAAM,oBAAoB,yBAAyB,IAAI,wBAAwB,SAAS;AAExF,YACE,oBAAoB,KACpB,oBAAoB,iBAAiB,SAAS,UAC9C,CAAC,iBAAiB,UAAU,iBAAiB;AAE7C;AACF,2BAAmB;AAAA,UACjB,OAAO,EAAE,MAAM,QAAQ;AAAA,UACvB,QAAQ;AAAA,UACR,OAAO,iBAAiB,QAAQ,iBAAiB,EAAE,QAAQ;AAAA,QAC7D,CAAC;AAKD,yBAAiB,QAAQ,iBAAiB,EAAE,MAAM;AAAA,MACpD;AAAA,IACF;AAAA,IACA,CAAC,iBAAiB,kBAAkB,kBAAkB;AAAA,EACxD;AAEA,QAAM,SAAS,QAAQ,MAAM;AAkB3B,UAAM,mBAAmB,WAAW,oBAAC,SAAI,IAAK;AAC9C,WAAOA,OAAM,SAAS,IAAI,MAAM,CAAC,QAA0C;AACzE,YAAM,EAAE,OAAO,UAAU,IAAI,OAAO,UAAU,SAAS,UAAU,kBAAkB,IAAI,IAAI;AAC3F,YAAM,WAAW,oBAAoB;AACrC,YAAM,eAAe,CAAC,uBAAuB;AAC7C,YAAM,gBAAgB,MAAM,IAAI;AAChC,YAAM,yBAAyB,OAAO,EAAE,QAAQ;AAEhD,UAAI,SAAU,QAAO;AACrB,UAAI,CAAC,aAAc,QAAO;AAC1B,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA;AAAA,UACA,KAAK;AAAA,UACL,IAAI;AAAA,UACJ,mBAAiB,GAAG,OAAO;AAAA,UAC3B,eAAa,CAAC,YAAY,CAAC,CAAC;AAAA,UAC5B,iBAAe;AAAA,UACf,eAAY;AAAA,UACZ,MAAM,CAAC;AAAA,UACP,SAAS,CAAC,UAAU,mBAAmB,EAAE,OAAO,QAAQ,QAAQ,CAAC;AAAA,UACjE,MAAK;AAAA,UACL,OAAO;AAAA,YACL,GAAI,gBAAgB,SAAS,CAAC;AAAA,YAC9B,GAAI,SAAS,CAAC;AAAA,UAChB;AAAA,UACA;AAAA;AAAA,QAEC;AAAA,MACH;AAAA,IAEJ,CAAC;AAAA,EACH,GAAG,CAAC,UAAU,MAAM,iBAAiB,qBAAqB,gBAAgB,oBAAoB,UAAU,CAAC;AAEzG,QAAM,qFAAqF,QAAQ,MAAM;AACvG,UAAM,gBAAgBA,OAAM,SAAS,QAAQ,IAAI;AACjD,UAAM,QAAQ,cAAc,UAAU,CAAC,QAAQ,IAAI,MAAM,UAAU,eAAe;AAElF,QAAI,UAAU,GAAI,QAAO;AACzB,WAAO;AAAA,EACT,GAAG,CAAC,iBAAiB,IAAI,CAAC;AAE1B,MAAI,UAAU;AAGZ,UAAM,OAAQ,gBAAwB,WAAW;AACjD,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,OAAO;AAAA,UACL,UAAU;AAAA;AAAA,UACV,GAAI,8BAA8B,SAAS,CAAC;AAAA,QAC9C;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,eAAe;AAAA,QAEd;AAAA;AAAA,IACH;AAAA,EAEJ;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { styled } from "@elliemae/ds-system";
|
|
3
|
-
|
|
3
|
+
import { TABS_SLOTS, DSTabsName } from "../../constants/index.js";
|
|
4
|
+
const StyledPanelContainer = styled("div", {
|
|
5
|
+
name: DSTabsName,
|
|
6
|
+
slot: TABS_SLOTS.TAB_PANEL
|
|
7
|
+
})`
|
|
4
8
|
padding-top: 8px;
|
|
5
9
|
&:focus {
|
|
6
10
|
outline: none;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabsPanel/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\n\ninterface StyledPanelContainerPropsT {\n hide: boolean;\n isDSMobile: boolean;\n}\n\nexport const StyledPanelContainer = styled.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { TABS_SLOTS, DSTabsName } from '../../constants/index.js';\n\ninterface StyledPanelContainerPropsT {\n hide: boolean;\n isDSMobile: boolean;\n}\n\nexport const StyledPanelContainer = styled('div', {\n name: DSTabsName,\n slot: TABS_SLOTS.TAB_PANEL,\n})<StyledPanelContainerPropsT>`\n padding-top: 8px;\n &:focus {\n outline: none;\n }\n\n ${({ hide }) => (hide ? 'visibility: hidden; position: absolute;' : '')}\n\n ${({ isDSMobile }) => (isDSMobile ? `padding-top: 0;` : ``)}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY,kBAAkB;AAOhC,MAAM,uBAAuB,OAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,WAAW;AACnB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMG,CAAC,EAAE,KAAK,MAAO,OAAO,4CAA4C,EAAG;AAAA;AAAA,IAErE,CAAC,EAAE,WAAW,MAAO,aAAa,oBAAoB,EAAG;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/DSTabs.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DSTabsInternalsT } from './sharedTypes.js';
|
|
3
2
|
export declare const DSTabsContext: import("react").Context<DSTabsInternalsT.DSTabsUseTabsContextT>;
|
|
4
3
|
export declare const DSTabsCrossRefContext: import("react").Context<DSTabsInternalsT.DSTabsUseCrossRefContextT>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { DSTabs, DSTabsWithSchema } from './DSTabs.js';
|
|
2
2
|
export type { DSTabT, DSTabsT } from './react-desc-prop-types.js';
|
|
3
|
-
export { TABS_SLOTS, TABS_DATA_TESTID, TABS_DATA_TESTID as DSTabsDatatestid, TAB_TYPES, TAB_TYPES as TabTypes, } from './constants/index.js';
|
|
3
|
+
export { TABS_SLOTS, TABS_DATA_TESTID, TABS_DATA_TESTID as DSTabsDatatestid, TAB_TYPES, TAB_TYPES as TabTypes, DSTabsName, } from './constants/index.js';
|
|
4
4
|
export { DSTab, DSTabWithSchema } from './exported-related/DSTab.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DSButtonV2 } from '@elliemae/ds-button-v2';
|
|
2
1
|
import type { DSTabsInternalsT } from '../../sharedTypes.js';
|
|
3
2
|
interface StyledCarouselButtonWrapperPropsT {
|
|
4
3
|
right?: boolean;
|
|
5
4
|
tabType: DSTabsInternalsT.TabTypesT;
|
|
6
5
|
}
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const StyledCarouselBtnLeft: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>, import("@elliemae/ds-system").Theme, import("styled-components").ThemeProps<import("@xstyled/styled-components").Theme> & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>>, never>;
|
|
7
|
+
export declare const StyledCarouselBtnRight: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>, import("@elliemae/ds-system").Theme, import("styled-components").ThemeProps<import("@xstyled/styled-components").Theme> & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>>, never>;
|
|
8
8
|
export declare const StyledCarouselWrapper: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
9
9
|
export declare const StyledChildrenWrap: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
10
10
|
export declare const StyledCarouselButtonWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledCarouselButtonWrapperPropsT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
@@ -42,6 +42,7 @@ export declare const StyledMobileGradient: import("styled-components").StyledCom
|
|
|
42
42
|
/** CSS Setters */
|
|
43
43
|
export declare const StyledTabWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledTabWrapperPropsT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
44
44
|
export declare const StyledTabButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, StyledTabButtonPropsT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"button">, never>;
|
|
45
|
+
export declare const StyledSubTabButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, StyledTabButtonPropsT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"button">, never>;
|
|
45
46
|
export declare const StyledSubTabsList: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledSubTabsListPropsT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
46
47
|
export declare const StyledTabList: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledTabListPropsT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
47
48
|
export declare const StyledRequiredMark: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
export declare const StyledTabsContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
1
2
|
export declare const StyledTabBarContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
3
2
|
import type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
4
3
|
import type { SwipeableViewsProps } from 'react-swipeable-views';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { TAB_TYPES } from './constants/index.js';
|
|
3
2
|
import type { DSTabsT } from './react-desc-prop-types.js';
|
|
4
3
|
export declare namespace DSTabsInternalsT {
|
|
@@ -15,6 +14,11 @@ export declare namespace DSTabsInternalsT {
|
|
|
15
14
|
right: boolean;
|
|
16
15
|
left: boolean;
|
|
17
16
|
}
|
|
17
|
+
interface GlobalClickHandlerT {
|
|
18
|
+
event: React.MouseEvent;
|
|
19
|
+
target: 'panel' | 'tabItem' | 'tabsList' | 'swipeableViews';
|
|
20
|
+
tabId?: string;
|
|
21
|
+
}
|
|
18
22
|
interface DSTabsUseTabsContextT {
|
|
19
23
|
props: DSTabsT.InternalProps;
|
|
20
24
|
tabsRef: React.MutableRefObject<Record<number, HTMLButtonElement> | null>;
|
|
@@ -25,6 +29,12 @@ export declare namespace DSTabsInternalsT {
|
|
|
25
29
|
carouselOnlyListRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
26
30
|
setInternalActiveTab: React.Dispatch<React.SetStateAction<string>>;
|
|
27
31
|
actualActiveTab: string;
|
|
32
|
+
globalClickHandler: (data: GlobalClickHandlerT) => void;
|
|
33
|
+
updateIndicatorStyle: () => void;
|
|
34
|
+
updateMobileGradients: () => void;
|
|
35
|
+
setIndicatorStyle: React.Dispatch<React.SetStateAction<DSTabsInternalsT.IndicatorStyleT>>;
|
|
36
|
+
indicatorStyle: DSTabsInternalsT.IndicatorStyleT;
|
|
37
|
+
mobileGradients: DSTabsInternalsT.MobileGradientsT;
|
|
28
38
|
}
|
|
29
39
|
interface DSTabsUseCrossRefContextT {
|
|
30
40
|
lastTabInternalRef: React.MutableRefObject<HTMLButtonElement | null | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-tabs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.54.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Tabs",
|
|
6
6
|
"files": [
|
|
@@ -38,18 +38,19 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@react-hook/resize-observer": "~1.2.6",
|
|
40
40
|
"react-swipeable-views": "~0.14.0",
|
|
41
|
-
"@elliemae/ds-button-v2": "3.
|
|
42
|
-
"@elliemae/ds-icon": "3.
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
45
|
-
"@elliemae/ds-
|
|
46
|
-
"@elliemae/ds-
|
|
41
|
+
"@elliemae/ds-button-v2": "3.54.0-next.2",
|
|
42
|
+
"@elliemae/ds-icon": "3.54.0-next.2",
|
|
43
|
+
"@elliemae/ds-icons": "3.54.0-next.2",
|
|
44
|
+
"@elliemae/ds-props-helpers": "3.54.0-next.2",
|
|
45
|
+
"@elliemae/ds-typescript-helpers": "3.54.0-next.2",
|
|
46
|
+
"@elliemae/ds-system": "3.54.0-next.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
49
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
50
50
|
"jest": "~29.7.0",
|
|
51
51
|
"styled-components": "~5.3.9",
|
|
52
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
52
|
+
"@elliemae/ds-monorepo-devops": "3.54.0-next.2",
|
|
53
|
+
"@elliemae/ds-test-utils": "3.54.0-next.2"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"lodash-es": "^4.17.21",
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var useTabBar_exports = {};
|
|
30
|
-
__export(useTabBar_exports, {
|
|
31
|
-
useTabBar: () => useTabBar
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(useTabBar_exports);
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
var import_useResizeObserver = require("./useResizeObserver.js");
|
|
37
|
-
var import_helpers = require("../../utils/helpers.js");
|
|
38
|
-
var import_DSTabsCTX = require("../../DSTabsCTX.js");
|
|
39
|
-
var import_constants = require("../../constants/index.js");
|
|
40
|
-
const useTabBar = () => {
|
|
41
|
-
const {
|
|
42
|
-
actualActiveTab,
|
|
43
|
-
actualActiveTabRef,
|
|
44
|
-
tabsListRef,
|
|
45
|
-
props: { showSelectionIndicator, isDSMobile, fixedTabsHeaders }
|
|
46
|
-
} = (0, import_react.useContext)(import_DSTabsCTX.DSTabsContext);
|
|
47
|
-
const [mobileGradients, setMobileGradients] = (0, import_react.useState)({
|
|
48
|
-
left: false,
|
|
49
|
-
right: false
|
|
50
|
-
});
|
|
51
|
-
const [indicatorStyle, setIndicatorStyle] = (0, import_react.useState)(import_constants.DEFAULT_INDICATOR_STYLES);
|
|
52
|
-
const getIndicatorStyles = (0, import_react.useCallback)(() => {
|
|
53
|
-
if (tabsListRef.current) {
|
|
54
|
-
const tabList = tabsListRef.current;
|
|
55
|
-
const activeTabButton = actualActiveTabRef.current;
|
|
56
|
-
if (!activeTabButton || !(0, import_helpers.isElementVisible)(activeTabButton, tabList)) return import_constants.DEFAULT_INDICATOR_STYLES;
|
|
57
|
-
const missingMargins = isDSMobile ? 0 : 16;
|
|
58
|
-
const tabClientWidth = isDSMobile && !fixedTabsHeaders ? activeTabButton.clientWidth : activeTabButton.clientWidth + missingMargins * 2;
|
|
59
|
-
const position = isDSMobile && !fixedTabsHeaders ? activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left + tabList.scrollLeft : activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left - missingMargins;
|
|
60
|
-
return {
|
|
61
|
-
left: Math.round(position),
|
|
62
|
-
width: Math.round(tabClientWidth)
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
return import_constants.DEFAULT_INDICATOR_STYLES;
|
|
66
|
-
}, [actualActiveTabRef, fixedTabsHeaders, isDSMobile, tabsListRef]);
|
|
67
|
-
const updateIndicatorStyle = (0, import_react.useCallback)(
|
|
68
|
-
() => setTimeout(() => setIndicatorStyle(getIndicatorStyles()), 100),
|
|
69
|
-
[getIndicatorStyles, setIndicatorStyle]
|
|
70
|
-
);
|
|
71
|
-
(0, import_useResizeObserver.useResizeObserver)(updateIndicatorStyle, tabsListRef.current);
|
|
72
|
-
(0, import_useResizeObserver.useResizeObserver)(updateIndicatorStyle, actualActiveTabRef.current);
|
|
73
|
-
const updateMobileGradients = (0, import_react.useCallback)(() => {
|
|
74
|
-
if (tabsListRef.current && isDSMobile && !fixedTabsHeaders) {
|
|
75
|
-
const { scrollLeft, scrollWidth, clientWidth } = tabsListRef.current;
|
|
76
|
-
setMobileGradients({
|
|
77
|
-
left: (0, import_helpers.shouldHaveLeftGradient)(scrollLeft),
|
|
78
|
-
right: (0, import_helpers.shouldHaveRightGradient)(scrollLeft, clientWidth, scrollWidth)
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}, [fixedTabsHeaders, isDSMobile, tabsListRef]);
|
|
82
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
83
|
-
if (showSelectionIndicator) {
|
|
84
|
-
updateIndicatorStyle();
|
|
85
|
-
}
|
|
86
|
-
if (isDSMobile && !fixedTabsHeaders) {
|
|
87
|
-
updateMobileGradients();
|
|
88
|
-
}
|
|
89
|
-
}, [
|
|
90
|
-
updateMobileGradients,
|
|
91
|
-
showSelectionIndicator,
|
|
92
|
-
updateIndicatorStyle,
|
|
93
|
-
isDSMobile,
|
|
94
|
-
fixedTabsHeaders,
|
|
95
|
-
actualActiveTab
|
|
96
|
-
]);
|
|
97
|
-
return {
|
|
98
|
-
updateIndicatorStyle,
|
|
99
|
-
setIndicatorStyle,
|
|
100
|
-
indicatorStyle,
|
|
101
|
-
mobileGradients,
|
|
102
|
-
updateMobileGradients
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=useTabBar.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/parts/tabBar/useTabBar.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-statements */\nimport { useCallback, useLayoutEffect, useState, useContext } from 'react';\nimport { useResizeObserver } from './useResizeObserver.js';\nimport { isElementVisible, shouldHaveLeftGradient, shouldHaveRightGradient } from '../../utils/helpers.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\n\nimport type { DSTabsInternalsT } from '../../sharedTypes.js';\nimport { DEFAULT_INDICATOR_STYLES } from '../../constants/index.js';\n\ninterface UseTabBarReturnTypeT {\n updateIndicatorStyle: () => void;\n updateMobileGradients: () => void;\n setIndicatorStyle: React.Dispatch<React.SetStateAction<DSTabsInternalsT.IndicatorStyleT>>;\n indicatorStyle: DSTabsInternalsT.IndicatorStyleT;\n mobileGradients: DSTabsInternalsT.MobileGradientsT;\n}\n\nexport const useTabBar = (): UseTabBarReturnTypeT => {\n const {\n actualActiveTab,\n actualActiveTabRef,\n tabsListRef,\n props: { showSelectionIndicator, isDSMobile, fixedTabsHeaders },\n } = useContext(DSTabsContext);\n\n const [mobileGradients, setMobileGradients] = useState<DSTabsInternalsT.MobileGradientsT>({\n left: false,\n right: false,\n });\n const [indicatorStyle, setIndicatorStyle] = useState<DSTabsInternalsT.IndicatorStyleT>(DEFAULT_INDICATOR_STYLES);\n\n const getIndicatorStyles = useCallback(() => {\n if (tabsListRef.current) {\n const tabList = tabsListRef.current;\n const activeTabButton = actualActiveTabRef.current;\n\n if (!activeTabButton || !isElementVisible(activeTabButton, tabList)) return DEFAULT_INDICATOR_STYLES;\n\n // The missingMargins are to make the selection indicator white marks work properly in desktop, we need\n // the full width of the tab button with margins.\n const missingMargins = isDSMobile ? 0 : 16;\n\n const tabClientWidth =\n isDSMobile && !fixedTabsHeaders\n ? activeTabButton.clientWidth\n : activeTabButton.clientWidth + missingMargins * 2;\n\n // The reason why we use the tabList.scrollLeft is due to the centerOnTabChange (only in Mobile and FlexibleTabs)\n // behavior that adds scroll to the tabList\n const position =\n isDSMobile && !fixedTabsHeaders\n ? activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left + tabList.scrollLeft\n : activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left - missingMargins;\n\n return {\n left: Math.round(position),\n width: Math.round(tabClientWidth),\n };\n }\n return DEFAULT_INDICATOR_STYLES;\n }, [actualActiveTabRef, fixedTabsHeaders, isDSMobile, tabsListRef]);\n\n /** [PUI-15772] - Tabs Pre Refactor\n * Updates indicator style with a delay. It:\n * 1. Uses setTimeout to delay style updates\n * 2. Called on resize and tab changes\n */\n const updateIndicatorStyle = useCallback(\n () => setTimeout(() => setIndicatorStyle(getIndicatorStyles()), 100),\n [getIndicatorStyles, setIndicatorStyle],\n );\n\n useResizeObserver(updateIndicatorStyle, tabsListRef.current);\n useResizeObserver(updateIndicatorStyle, actualActiveTabRef.current);\n\n /** [PUI-15772] - Tabs Pre Refactor\n * Updates mobile gradient visibility. It:\n * 1. Calculates scroll position\n * 2. Updates gradient visibility based on scroll\n */\n const updateMobileGradients = useCallback(() => {\n if (tabsListRef.current && isDSMobile && !fixedTabsHeaders) {\n const { scrollLeft, scrollWidth, clientWidth } = tabsListRef.current;\n setMobileGradients({\n left: shouldHaveLeftGradient(scrollLeft),\n right: shouldHaveRightGradient(scrollLeft, clientWidth, scrollWidth),\n });\n }\n }, [fixedTabsHeaders, isDSMobile, tabsListRef]);\n\n useLayoutEffect(() => {\n if (showSelectionIndicator) {\n updateIndicatorStyle();\n }\n if (isDSMobile && !fixedTabsHeaders) {\n updateMobileGradients();\n }\n }, [\n updateMobileGradients,\n showSelectionIndicator,\n updateIndicatorStyle,\n isDSMobile,\n fixedTabsHeaders,\n actualActiveTab,\n ]);\n\n return {\n updateIndicatorStyle,\n setIndicatorStyle,\n indicatorStyle,\n mobileGradients,\n updateMobileGradients,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAmE;AACnE,+BAAkC;AAClC,qBAAkF;AAClF,uBAA8B;AAG9B,uBAAyC;AAUlC,MAAM,YAAY,MAA4B;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,wBAAwB,YAAY,iBAAiB;AAAA,EAChE,QAAI,yBAAW,8BAAa;AAE5B,QAAM,CAAC,iBAAiB,kBAAkB,QAAI,uBAA4C;AAAA,IACxF,MAAM;AAAA,IACN,OAAO;AAAA,EACT,CAAC;AACD,QAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAA2C,yCAAwB;AAE/G,QAAM,yBAAqB,0BAAY,MAAM;AAC3C,QAAI,YAAY,SAAS;AACvB,YAAM,UAAU,YAAY;AAC5B,YAAM,kBAAkB,mBAAmB;AAE3C,UAAI,CAAC,mBAAmB,KAAC,iCAAiB,iBAAiB,OAAO,EAAG,QAAO;AAI5E,YAAM,iBAAiB,aAAa,IAAI;AAExC,YAAM,iBACJ,cAAc,CAAC,mBACX,gBAAgB,cAChB,gBAAgB,cAAc,iBAAiB;AAIrD,YAAM,WACJ,cAAc,CAAC,mBACX,gBAAgB,sBAAsB,EAAE,OAAO,QAAQ,sBAAsB,EAAE,OAAO,QAAQ,aAC9F,gBAAgB,sBAAsB,EAAE,OAAO,QAAQ,sBAAsB,EAAE,OAAO;AAE5F,aAAO;AAAA,QACL,MAAM,KAAK,MAAM,QAAQ;AAAA,QACzB,OAAO,KAAK,MAAM,cAAc;AAAA,MAClC;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,kBAAkB,YAAY,WAAW,CAAC;AAOlE,QAAM,2BAAuB;AAAA,IAC3B,MAAM,WAAW,MAAM,kBAAkB,mBAAmB,CAAC,GAAG,GAAG;AAAA,IACnE,CAAC,oBAAoB,iBAAiB;AAAA,EACxC;AAEA,kDAAkB,sBAAsB,YAAY,OAAO;AAC3D,kDAAkB,sBAAsB,mBAAmB,OAAO;AAOlE,QAAM,4BAAwB,0BAAY,MAAM;AAC9C,QAAI,YAAY,WAAW,cAAc,CAAC,kBAAkB;AAC1D,YAAM,EAAE,YAAY,aAAa,YAAY,IAAI,YAAY;AAC7D,yBAAmB;AAAA,QACjB,UAAM,uCAAuB,UAAU;AAAA,QACvC,WAAO,wCAAwB,YAAY,aAAa,WAAW;AAAA,MACrE,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,kBAAkB,YAAY,WAAW,CAAC;AAE9C,oCAAgB,MAAM;AACpB,QAAI,wBAAwB;AAC1B,2BAAqB;AAAA,IACvB;AACA,QAAI,cAAc,CAAC,kBAAkB;AACnC,4BAAsB;AAAA,IACxB;AAAA,EACF,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var useTabsCallbacks_exports = {};
|
|
30
|
-
__export(useTabsCallbacks_exports, {
|
|
31
|
-
useTabsCallbacks: () => useTabsCallbacks
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(useTabsCallbacks_exports);
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
var import_helpers = require("../helpers.js");
|
|
37
|
-
var import_DSTabsCTX = require("../../DSTabsCTX.js");
|
|
38
|
-
const useTabsCallbacks = () => {
|
|
39
|
-
const {
|
|
40
|
-
setInternalActiveTab,
|
|
41
|
-
tabsListRef,
|
|
42
|
-
props: { onTabChange, isDSMobile, allowTextSelection, fixedTabsHeaders }
|
|
43
|
-
} = (0, import_react.useContext)(import_DSTabsCTX.DSTabsContext);
|
|
44
|
-
const handleOnTabChange = (0, import_react.useCallback)(
|
|
45
|
-
(tabId, e) => {
|
|
46
|
-
setInternalActiveTab(tabId);
|
|
47
|
-
onTabChange(tabId, e);
|
|
48
|
-
if (isDSMobile && !fixedTabsHeaders && e) {
|
|
49
|
-
(0, import_helpers.centerTab)({ e, listRef: tabsListRef });
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
[fixedTabsHeaders, isDSMobile, onTabChange, setInternalActiveTab, tabsListRef]
|
|
53
|
-
);
|
|
54
|
-
const handleOnMouseDown = (0, import_react.useCallback)(
|
|
55
|
-
(e) => {
|
|
56
|
-
const role = e.target.getAttribute("role");
|
|
57
|
-
if (role !== "tabpanel" && allowTextSelection) e.stopPropagation();
|
|
58
|
-
},
|
|
59
|
-
[allowTextSelection]
|
|
60
|
-
);
|
|
61
|
-
return {
|
|
62
|
-
handleOnTabChange,
|
|
63
|
-
handleOnMouseDown
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=useTabsCallbacks.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/utils/hooks/useTabsCallbacks.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react';\nimport { useCallback, useContext } from 'react';\nimport { centerTab } from '../helpers.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\n\ninterface UseTabsCallbacksReturnTypeT {\n handleOnTabChange: (tabId: string, e?: React.MouseEvent) => void;\n handleOnMouseDown: (e: React.MouseEvent) => void;\n}\n\nexport const useTabsCallbacks = (): UseTabsCallbacksReturnTypeT => {\n const {\n setInternalActiveTab,\n tabsListRef,\n props: { onTabChange, isDSMobile, allowTextSelection, fixedTabsHeaders },\n } = useContext(DSTabsContext);\n\n /** [PUI-15772] - Tabs Pre Refactor\n * Main handler for active tab changes. It is responsible for:\n * 1. Updating the internal active tab state\n * 2. Notifying the user through the onTabChange callback\n * 3. Centering the tab on mobile if needed\n */\n const handleOnTabChange = useCallback(\n (tabId: string, e?: React.MouseEvent) => {\n setInternalActiveTab(tabId);\n onTabChange(tabId, e);\n if (isDSMobile && !fixedTabsHeaders && e) {\n centerTab({ e, listRef: tabsListRef });\n }\n },\n [fixedTabsHeaders, isDSMobile, onTabChange, setInternalActiveTab, tabsListRef],\n );\n\n const handleOnMouseDown = useCallback(\n (e: React.MouseEvent) => {\n const role = (e.target as HTMLElement).getAttribute('role');\n if (role !== 'tabpanel' && allowTextSelection) e.stopPropagation();\n },\n [allowTextSelection],\n );\n\n return {\n handleOnTabChange,\n handleOnMouseDown,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwC;AACxC,qBAA0B;AAC1B,uBAA8B;AAOvB,MAAM,mBAAmB,MAAmC;AACjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO,EAAE,aAAa,YAAY,oBAAoB,iBAAiB;AAAA,EACzE,QAAI,yBAAW,8BAAa;AAQ5B,QAAM,wBAAoB;AAAA,IACxB,CAAC,OAAe,MAAyB;AACvC,2BAAqB,KAAK;AAC1B,kBAAY,OAAO,CAAC;AACpB,UAAI,cAAc,CAAC,oBAAoB,GAAG;AACxC,sCAAU,EAAE,GAAG,SAAS,YAAY,CAAC;AAAA,MACvC;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,YAAY,aAAa,sBAAsB,WAAW;AAAA,EAC/E;AAEA,QAAM,wBAAoB;AAAA,IACxB,CAAC,MAAwB;AACvB,YAAM,OAAQ,EAAE,OAAuB,aAAa,MAAM;AAC1D,UAAI,SAAS,cAAc,mBAAoB,GAAE,gBAAgB;AAAA,IACnE;AAAA,IACA,CAAC,kBAAkB;AAAA,EACrB;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useCallback, useLayoutEffect, useState, useContext } from "react";
|
|
3
|
-
import { useResizeObserver } from "./useResizeObserver.js";
|
|
4
|
-
import { isElementVisible, shouldHaveLeftGradient, shouldHaveRightGradient } from "../../utils/helpers.js";
|
|
5
|
-
import { DSTabsContext } from "../../DSTabsCTX.js";
|
|
6
|
-
import { DEFAULT_INDICATOR_STYLES } from "../../constants/index.js";
|
|
7
|
-
const useTabBar = () => {
|
|
8
|
-
const {
|
|
9
|
-
actualActiveTab,
|
|
10
|
-
actualActiveTabRef,
|
|
11
|
-
tabsListRef,
|
|
12
|
-
props: { showSelectionIndicator, isDSMobile, fixedTabsHeaders }
|
|
13
|
-
} = useContext(DSTabsContext);
|
|
14
|
-
const [mobileGradients, setMobileGradients] = useState({
|
|
15
|
-
left: false,
|
|
16
|
-
right: false
|
|
17
|
-
});
|
|
18
|
-
const [indicatorStyle, setIndicatorStyle] = useState(DEFAULT_INDICATOR_STYLES);
|
|
19
|
-
const getIndicatorStyles = useCallback(() => {
|
|
20
|
-
if (tabsListRef.current) {
|
|
21
|
-
const tabList = tabsListRef.current;
|
|
22
|
-
const activeTabButton = actualActiveTabRef.current;
|
|
23
|
-
if (!activeTabButton || !isElementVisible(activeTabButton, tabList)) return DEFAULT_INDICATOR_STYLES;
|
|
24
|
-
const missingMargins = isDSMobile ? 0 : 16;
|
|
25
|
-
const tabClientWidth = isDSMobile && !fixedTabsHeaders ? activeTabButton.clientWidth : activeTabButton.clientWidth + missingMargins * 2;
|
|
26
|
-
const position = isDSMobile && !fixedTabsHeaders ? activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left + tabList.scrollLeft : activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left - missingMargins;
|
|
27
|
-
return {
|
|
28
|
-
left: Math.round(position),
|
|
29
|
-
width: Math.round(tabClientWidth)
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return DEFAULT_INDICATOR_STYLES;
|
|
33
|
-
}, [actualActiveTabRef, fixedTabsHeaders, isDSMobile, tabsListRef]);
|
|
34
|
-
const updateIndicatorStyle = useCallback(
|
|
35
|
-
() => setTimeout(() => setIndicatorStyle(getIndicatorStyles()), 100),
|
|
36
|
-
[getIndicatorStyles, setIndicatorStyle]
|
|
37
|
-
);
|
|
38
|
-
useResizeObserver(updateIndicatorStyle, tabsListRef.current);
|
|
39
|
-
useResizeObserver(updateIndicatorStyle, actualActiveTabRef.current);
|
|
40
|
-
const updateMobileGradients = useCallback(() => {
|
|
41
|
-
if (tabsListRef.current && isDSMobile && !fixedTabsHeaders) {
|
|
42
|
-
const { scrollLeft, scrollWidth, clientWidth } = tabsListRef.current;
|
|
43
|
-
setMobileGradients({
|
|
44
|
-
left: shouldHaveLeftGradient(scrollLeft),
|
|
45
|
-
right: shouldHaveRightGradient(scrollLeft, clientWidth, scrollWidth)
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}, [fixedTabsHeaders, isDSMobile, tabsListRef]);
|
|
49
|
-
useLayoutEffect(() => {
|
|
50
|
-
if (showSelectionIndicator) {
|
|
51
|
-
updateIndicatorStyle();
|
|
52
|
-
}
|
|
53
|
-
if (isDSMobile && !fixedTabsHeaders) {
|
|
54
|
-
updateMobileGradients();
|
|
55
|
-
}
|
|
56
|
-
}, [
|
|
57
|
-
updateMobileGradients,
|
|
58
|
-
showSelectionIndicator,
|
|
59
|
-
updateIndicatorStyle,
|
|
60
|
-
isDSMobile,
|
|
61
|
-
fixedTabsHeaders,
|
|
62
|
-
actualActiveTab
|
|
63
|
-
]);
|
|
64
|
-
return {
|
|
65
|
-
updateIndicatorStyle,
|
|
66
|
-
setIndicatorStyle,
|
|
67
|
-
indicatorStyle,
|
|
68
|
-
mobileGradients,
|
|
69
|
-
updateMobileGradients
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export {
|
|
73
|
-
useTabBar
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=useTabBar.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabBar/useTabBar.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport { useCallback, useLayoutEffect, useState, useContext } from 'react';\nimport { useResizeObserver } from './useResizeObserver.js';\nimport { isElementVisible, shouldHaveLeftGradient, shouldHaveRightGradient } from '../../utils/helpers.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\n\nimport type { DSTabsInternalsT } from '../../sharedTypes.js';\nimport { DEFAULT_INDICATOR_STYLES } from '../../constants/index.js';\n\ninterface UseTabBarReturnTypeT {\n updateIndicatorStyle: () => void;\n updateMobileGradients: () => void;\n setIndicatorStyle: React.Dispatch<React.SetStateAction<DSTabsInternalsT.IndicatorStyleT>>;\n indicatorStyle: DSTabsInternalsT.IndicatorStyleT;\n mobileGradients: DSTabsInternalsT.MobileGradientsT;\n}\n\nexport const useTabBar = (): UseTabBarReturnTypeT => {\n const {\n actualActiveTab,\n actualActiveTabRef,\n tabsListRef,\n props: { showSelectionIndicator, isDSMobile, fixedTabsHeaders },\n } = useContext(DSTabsContext);\n\n const [mobileGradients, setMobileGradients] = useState<DSTabsInternalsT.MobileGradientsT>({\n left: false,\n right: false,\n });\n const [indicatorStyle, setIndicatorStyle] = useState<DSTabsInternalsT.IndicatorStyleT>(DEFAULT_INDICATOR_STYLES);\n\n const getIndicatorStyles = useCallback(() => {\n if (tabsListRef.current) {\n const tabList = tabsListRef.current;\n const activeTabButton = actualActiveTabRef.current;\n\n if (!activeTabButton || !isElementVisible(activeTabButton, tabList)) return DEFAULT_INDICATOR_STYLES;\n\n // The missingMargins are to make the selection indicator white marks work properly in desktop, we need\n // the full width of the tab button with margins.\n const missingMargins = isDSMobile ? 0 : 16;\n\n const tabClientWidth =\n isDSMobile && !fixedTabsHeaders\n ? activeTabButton.clientWidth\n : activeTabButton.clientWidth + missingMargins * 2;\n\n // The reason why we use the tabList.scrollLeft is due to the centerOnTabChange (only in Mobile and FlexibleTabs)\n // behavior that adds scroll to the tabList\n const position =\n isDSMobile && !fixedTabsHeaders\n ? activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left + tabList.scrollLeft\n : activeTabButton.getBoundingClientRect().left - tabList.getBoundingClientRect().left - missingMargins;\n\n return {\n left: Math.round(position),\n width: Math.round(tabClientWidth),\n };\n }\n return DEFAULT_INDICATOR_STYLES;\n }, [actualActiveTabRef, fixedTabsHeaders, isDSMobile, tabsListRef]);\n\n /** [PUI-15772] - Tabs Pre Refactor\n * Updates indicator style with a delay. It:\n * 1. Uses setTimeout to delay style updates\n * 2. Called on resize and tab changes\n */\n const updateIndicatorStyle = useCallback(\n () => setTimeout(() => setIndicatorStyle(getIndicatorStyles()), 100),\n [getIndicatorStyles, setIndicatorStyle],\n );\n\n useResizeObserver(updateIndicatorStyle, tabsListRef.current);\n useResizeObserver(updateIndicatorStyle, actualActiveTabRef.current);\n\n /** [PUI-15772] - Tabs Pre Refactor\n * Updates mobile gradient visibility. It:\n * 1. Calculates scroll position\n * 2. Updates gradient visibility based on scroll\n */\n const updateMobileGradients = useCallback(() => {\n if (tabsListRef.current && isDSMobile && !fixedTabsHeaders) {\n const { scrollLeft, scrollWidth, clientWidth } = tabsListRef.current;\n setMobileGradients({\n left: shouldHaveLeftGradient(scrollLeft),\n right: shouldHaveRightGradient(scrollLeft, clientWidth, scrollWidth),\n });\n }\n }, [fixedTabsHeaders, isDSMobile, tabsListRef]);\n\n useLayoutEffect(() => {\n if (showSelectionIndicator) {\n updateIndicatorStyle();\n }\n if (isDSMobile && !fixedTabsHeaders) {\n updateMobileGradients();\n }\n }, [\n updateMobileGradients,\n showSelectionIndicator,\n updateIndicatorStyle,\n isDSMobile,\n fixedTabsHeaders,\n actualActiveTab,\n ]);\n\n return {\n updateIndicatorStyle,\n setIndicatorStyle,\n indicatorStyle,\n mobileGradients,\n updateMobileGradients,\n };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,aAAa,iBAAiB,UAAU,kBAAkB;AACnE,SAAS,yBAAyB;AAClC,SAAS,kBAAkB,wBAAwB,+BAA+B;AAClF,SAAS,qBAAqB;AAG9B,SAAS,gCAAgC;AAUlC,MAAM,YAAY,MAA4B;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,wBAAwB,YAAY,iBAAiB;AAAA,EAChE,IAAI,WAAW,aAAa;AAE5B,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAA4C;AAAA,IACxF,MAAM;AAAA,IACN,OAAO;AAAA,EACT,CAAC;AACD,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAA2C,wBAAwB;AAE/G,QAAM,qBAAqB,YAAY,MAAM;AAC3C,QAAI,YAAY,SAAS;AACvB,YAAM,UAAU,YAAY;AAC5B,YAAM,kBAAkB,mBAAmB;AAE3C,UAAI,CAAC,mBAAmB,CAAC,iBAAiB,iBAAiB,OAAO,EAAG,QAAO;AAI5E,YAAM,iBAAiB,aAAa,IAAI;AAExC,YAAM,iBACJ,cAAc,CAAC,mBACX,gBAAgB,cAChB,gBAAgB,cAAc,iBAAiB;AAIrD,YAAM,WACJ,cAAc,CAAC,mBACX,gBAAgB,sBAAsB,EAAE,OAAO,QAAQ,sBAAsB,EAAE,OAAO,QAAQ,aAC9F,gBAAgB,sBAAsB,EAAE,OAAO,QAAQ,sBAAsB,EAAE,OAAO;AAE5F,aAAO;AAAA,QACL,MAAM,KAAK,MAAM,QAAQ;AAAA,QACzB,OAAO,KAAK,MAAM,cAAc;AAAA,MAClC;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,kBAAkB,YAAY,WAAW,CAAC;AAOlE,QAAM,uBAAuB;AAAA,IAC3B,MAAM,WAAW,MAAM,kBAAkB,mBAAmB,CAAC,GAAG,GAAG;AAAA,IACnE,CAAC,oBAAoB,iBAAiB;AAAA,EACxC;AAEA,oBAAkB,sBAAsB,YAAY,OAAO;AAC3D,oBAAkB,sBAAsB,mBAAmB,OAAO;AAOlE,QAAM,wBAAwB,YAAY,MAAM;AAC9C,QAAI,YAAY,WAAW,cAAc,CAAC,kBAAkB;AAC1D,YAAM,EAAE,YAAY,aAAa,YAAY,IAAI,YAAY;AAC7D,yBAAmB;AAAA,QACjB,MAAM,uBAAuB,UAAU;AAAA,QACvC,OAAO,wBAAwB,YAAY,aAAa,WAAW;AAAA,MACrE,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,kBAAkB,YAAY,WAAW,CAAC;AAE9C,kBAAgB,MAAM;AACpB,QAAI,wBAAwB;AAC1B,2BAAqB;AAAA,IACvB;AACA,QAAI,cAAc,CAAC,kBAAkB;AACnC,4BAAsB;AAAA,IACxB;AAAA,EACF,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|