@elliemae/ds-tabs 3.80.0-next.61 → 3.80.0-next.78
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/config/useTabs.js +3 -3
- package/dist/cjs/config/useTabs.js.map +2 -2
- package/dist/cjs/constants/index.js +11 -1
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/{exported-related → parts/DSTab}/DSTab.js +2 -4
- package/dist/cjs/parts/DSTab/DSTab.js.map +7 -0
- package/dist/cjs/parts/DSTab/index.js +37 -0
- package/dist/cjs/parts/DSTab/index.js.map +7 -0
- package/dist/cjs/parts/DSTab/react-desc-prop-types.js +55 -0
- package/dist/cjs/parts/DSTab/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/carousel/styles.js +2 -16
- package/dist/cjs/parts/carousel/styles.js.map +2 -2
- package/dist/cjs/parts/tabBar/TabBar.js +11 -1
- package/dist/cjs/parts/tabBar/TabBar.js.map +2 -2
- package/dist/cjs/parts/tabBar/TabBarItemRenderer.js.map +1 -1
- package/dist/cjs/parts/tabBar/styles.js +8 -20
- package/dist/cjs/parts/tabBar/styles.js.map +2 -2
- package/dist/cjs/parts/tabsContent/TabsContent.js +1 -1
- package/dist/cjs/parts/tabsContent/TabsContent.js.map +2 -2
- package/dist/cjs/parts/tabsContent/styles.js +1 -1
- package/dist/cjs/parts/tabsContent/styles.js.map +2 -2
- package/dist/cjs/parts/tabsPanel/TabsPanels.js +5 -4
- package/dist/cjs/parts/tabsPanel/TabsPanels.js.map +2 -2
- package/dist/cjs/parts/tabsPanel/styles.js.map +1 -1
- package/dist/cjs/react-desc-prop-types.js +1 -19
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +61 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/config/useTabs.js +3 -3
- package/dist/esm/config/useTabs.js.map +2 -2
- package/dist/esm/constants/index.js +11 -1
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/{exported-related → parts/DSTab}/DSTab.js +2 -4
- package/dist/esm/parts/DSTab/DSTab.js.map +7 -0
- package/dist/esm/parts/DSTab/index.js +7 -0
- package/dist/esm/parts/DSTab/index.js.map +7 -0
- package/dist/esm/parts/DSTab/react-desc-prop-types.js +30 -0
- package/dist/esm/parts/DSTab/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/carousel/styles.js +3 -17
- package/dist/esm/parts/carousel/styles.js.map +2 -2
- package/dist/esm/parts/tabBar/TabBar.js +11 -1
- package/dist/esm/parts/tabBar/TabBar.js.map +2 -2
- package/dist/esm/parts/tabBar/TabBarItemRenderer.js.map +1 -1
- package/dist/esm/parts/tabBar/styles.js +8 -20
- package/dist/esm/parts/tabBar/styles.js.map +2 -2
- package/dist/esm/parts/tabsContent/TabsContent.js +7 -2
- package/dist/esm/parts/tabsContent/TabsContent.js.map +2 -2
- package/dist/esm/parts/tabsContent/styles.js +1 -1
- package/dist/esm/parts/tabsContent/styles.js.map +2 -2
- package/dist/esm/parts/tabsPanel/TabsPanels.js +5 -4
- package/dist/esm/parts/tabsPanel/TabsPanels.js.map +2 -2
- package/dist/esm/parts/tabsPanel/styles.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +2 -20
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +38 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/types/constants/index.d.ts +31 -2
- package/dist/types/index.d.ts +3 -2
- package/dist/types/{exported-related → parts/DSTab}/DSTab.d.ts +1 -2
- package/dist/types/parts/DSTab/index.d.ts +2 -0
- package/dist/types/parts/DSTab/react-desc-prop-types.d.ts +36 -0
- package/dist/types/parts/carousel/styles.d.ts +0 -7
- package/dist/types/parts/tabBar/styles.d.ts +0 -2
- package/dist/types/parts/tabsPanel/styles.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +17 -23
- package/package.json +11 -11
- package/dist/cjs/exported-related/DSTab.js.map +0 -7
- package/dist/esm/exported-related/DSTab.js.map +0 -7
|
@@ -51,7 +51,17 @@ const TabBar = () => {
|
|
|
51
51
|
globalClickHandler({ event: e, target: "tabsList" });
|
|
52
52
|
},
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
StyledTabWrapper,
|
|
56
|
+
{
|
|
57
|
+
"data-testid": "tab-wrapper",
|
|
58
|
+
isDSMobile,
|
|
59
|
+
fixedTabsHeaders,
|
|
60
|
+
getOwnerProps,
|
|
61
|
+
getOwnerPropsArguments,
|
|
62
|
+
children: !isDSMobile && withCarousel ? /* @__PURE__ */ jsx(Carousel, { children: /* @__PURE__ */ jsx(TabBarItemRenderer, {}) }) : /* @__PURE__ */ jsx(TabBarItemRenderer, {})
|
|
63
|
+
}
|
|
64
|
+
),
|
|
55
65
|
isDSMobile && !fixedTabsHeaders && /* @__PURE__ */ jsx(
|
|
56
66
|
StyledMobileGradient,
|
|
57
67
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabBar/TabBar.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { Carousel } from '../carousel/Carousel.js';\nimport { StyledMobileGradient, StyledTabList, StyledTabWrapper, StyledSubTabsList } from './styles.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\n\nimport { TABS_DATA_TESTID, TAB_TYPES } from '../../constants/index.js';\n\nimport { TabBarItemRenderer } from './TabBarItemRenderer.js';\n\nexport const TabBar = (): JSX.Element => {\n const {\n tabsListRef,\n props,\n props: { type, fixedTabsHeaders, withCarousel, isDSMobile, tabsListAriaLabel },\n globalClickHandler,\n mobileGradients,\n updateMobileGradients,\n } = useContext(DSTabsContext);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n if (type === TAB_TYPES.SUBTABS && !isDSMobile) {\n return (\n <StyledSubTabsList\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n withCarousel={withCarousel}\n data-testid={TABS_DATA_TESTID.SUB_TAB_LIST}\n role={withCarousel ? undefined : 'tablist'}\n aria-label={withCarousel ? undefined : tabsListAriaLabel}\n innerRef={tabsListRef}\n >\n {withCarousel ? (\n <Carousel>\n <TabBarItemRenderer />\n </Carousel>\n ) : (\n <TabBarItemRenderer />\n )}\n </StyledSubTabsList>\n );\n }\n\n return (\n <StyledTabList\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n withCarousel={withCarousel}\n role={withCarousel ? undefined : 'tablist'}\n aria-label={withCarousel ? undefined : tabsListAriaLabel}\n innerRef={tabsListRef}\n data-testid={TABS_DATA_TESTID.TAB_LIST}\n isDSMobile={isDSMobile}\n fixedTabsHeaders={fixedTabsHeaders}\n mobileGradients={mobileGradients}\n onScroll={updateMobileGradients}\n tabType={type}\n onClick={(e) => {\n globalClickHandler({ event: e, target: 'tabsList' });\n }}\n >\n <StyledTabWrapper
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACmCX,cAUR,YAVQ;AAlCZ,SAAgB,kBAAkB;AAClC,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,sBAAsB,eAAe,kBAAkB,yBAAyB;AACzF,SAAS,qBAAqB;AAE9B,SAAS,kBAAkB,iBAAiB;AAE5C,SAAS,0BAA0B;AAE5B,MAAM,SAAS,MAAmB;AACvC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO,EAAE,MAAM,kBAAkB,cAAc,YAAY,kBAAkB;AAAA,IAC7E;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,aAAa;AAC5B,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAc,KAAK;AAErE,MAAI,SAAS,UAAU,WAAW,CAAC,YAAY;AAC7C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa,iBAAiB;AAAA,QAC9B,MAAM,eAAe,SAAY;AAAA,QACjC,cAAY,eAAe,SAAY;AAAA,QACvC,UAAU;AAAA,QAET,yBACC,oBAAC,YACC,8BAAC,sBAAmB,GACtB,IAEA,oBAAC,sBAAmB;AAAA;AAAA,IAExB;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM,eAAe,SAAY;AAAA,MACjC,cAAY,eAAe,SAAY;AAAA,MACvC,UAAU;AAAA,MACV,eAAa,iBAAiB;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,SAAS;AAAA,MACT,SAAS,CAAC,MAAM;AACd,2BAAmB,EAAE,OAAO,GAAG,QAAQ,WAAW,CAAC;AAAA,MACrD;AAAA,MAEA;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { Carousel } from '../carousel/Carousel.js';\nimport { StyledMobileGradient, StyledTabList, StyledTabWrapper, StyledSubTabsList } from './styles.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\n\nimport { TABS_DATA_TESTID, TAB_TYPES } from '../../constants/index.js';\n\nimport { TabBarItemRenderer } from './TabBarItemRenderer.js';\n\nexport const TabBar = (): JSX.Element => {\n const {\n tabsListRef,\n props,\n props: { type, fixedTabsHeaders, withCarousel, isDSMobile, tabsListAriaLabel },\n globalClickHandler,\n mobileGradients,\n updateMobileGradients,\n } = useContext(DSTabsContext);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n if (type === TAB_TYPES.SUBTABS && !isDSMobile) {\n return (\n <StyledSubTabsList\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n withCarousel={withCarousel}\n data-testid={TABS_DATA_TESTID.SUB_TAB_LIST}\n role={withCarousel ? undefined : 'tablist'}\n aria-label={withCarousel ? undefined : tabsListAriaLabel}\n innerRef={tabsListRef}\n >\n {withCarousel ? (\n <Carousel>\n <TabBarItemRenderer />\n </Carousel>\n ) : (\n <TabBarItemRenderer />\n )}\n </StyledSubTabsList>\n );\n }\n\n return (\n <StyledTabList\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n withCarousel={withCarousel}\n role={withCarousel ? undefined : 'tablist'}\n aria-label={withCarousel ? undefined : tabsListAriaLabel}\n innerRef={tabsListRef}\n data-testid={TABS_DATA_TESTID.TAB_LIST}\n isDSMobile={isDSMobile}\n fixedTabsHeaders={fixedTabsHeaders}\n mobileGradients={mobileGradients}\n onScroll={updateMobileGradients}\n tabType={type}\n onClick={(e) => {\n globalClickHandler({ event: e, target: 'tabsList' });\n }}\n >\n <StyledTabWrapper\n data-testid=\"tab-wrapper\"\n isDSMobile={isDSMobile}\n fixedTabsHeaders={fixedTabsHeaders}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {!isDSMobile && withCarousel ? (\n <Carousel>\n <TabBarItemRenderer />\n </Carousel>\n ) : (\n <TabBarItemRenderer />\n )}\n </StyledTabWrapper>\n {isDSMobile && !fixedTabsHeaders && (\n <StyledMobileGradient\n mobileGradients={mobileGradients}\n left={tabsListRef.current?.scrollLeft}\n width={tabsListRef.current?.scrollWidth}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n </StyledTabList>\n );\n};\n"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c,eACd,oBAAC,YACC,8BAAC,sBAAmB,GACtB,IAEA,oBAAC,sBAAmB;AAAA;AAAA,QAExB;AAAA,QACC,cAAc,CAAC,oBACd;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,MAAM,YAAY,SAAS;AAAA,YAC3B,OAAO,YAAY,SAAS;AAAA,YAC5B;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabBar/TabBarItemRenderer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { StyledTabButton, StyledSubTabButton } from './styles.js';\nimport { DSTabsContext, DSTabsCrossRefContext } from '../../DSTabsCTX.js';\nimport { useKeyboardNavigation } from '../../utils/hooks/useKeyboardNavigation.js';\nimport { centerTab } from '../../utils/helpers.js';\nimport type { DSTabT } from '
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { StyledTabButton, StyledSubTabButton } from './styles.js';\nimport { DSTabsContext, DSTabsCrossRefContext } from '../../DSTabsCTX.js';\nimport { useKeyboardNavigation } from '../../utils/hooks/useKeyboardNavigation.js';\nimport { centerTab } from '../../utils/helpers.js';\nimport type { DSTabT } from '../DSTab/index.js';\nimport { TABS_DATA_TESTID, TAB_TYPES } from '../../constants/index.js';\n\n/**\n * Maps ds-tabs TAB_TYPES to ds-tab-button variant strings.\n * NORMAL \u2192 'primary', NORMAL_SMALL \u2192 'primary-small', SUBTABS \u2192 'secondary'\n */\nconst TAB_TYPE_TO_VARIANT = {\n [TAB_TYPES.NORMAL]: 'primary',\n [TAB_TYPES.NORMAL_SMALL]: 'primary-small',\n [TAB_TYPES.SUBTABS]: 'secondary',\n} as const;\n\nexport const TabBarItemRenderer: React.ComponentType<Record<never, never>> = React.memo(() => {\n const {\n tabsRef,\n focusableTabsRef,\n tabsRefAsArray,\n carouselOnlyListRef,\n actualActiveTab,\n focusedTabId,\n props: { type, withCarousel, isDSMobile, showSeparator, children: tabs },\n globalClickHandler,\n } = useContext(DSTabsContext);\n\n const { lastTabInternalRef, firstSubtabInternalRef } = useContext(DSTabsCrossRefContext);\n const { handleOnKeyDown } = useKeyboardNavigation();\n\n const availableTabIndexes: number[] = [];\n const size = tabs.length || 0;\n\n return React.Children.map(tabs, (tab: React.ReactElement<DSTabT.Props>, index) => {\n const {\n tabId = '',\n title = '',\n style,\n required = false,\n disabled = false,\n applyAriaDisabled = false,\n RenderBadge,\n ref,\n onClick,\n onKeyDown,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n children: _panelContent,\n ...rest\n } = tab.props;\n const getOwnerProps = () => tab.props;\n const getOwnerPropsArguments = () => ({ tabId });\n\n if (!disabled) availableTabIndexes.push(index);\n\n const isActive = actualActiveTab === tabId;\n const variant = TAB_TYPE_TO_VARIANT[type] ?? 'primary';\n const isLastItem = index === size - 1;\n const ButtonComponent = type === TAB_TYPES.SUBTABS ? StyledSubTabButton : StyledTabButton;\n\n return (\n <ButtonComponent\n tabIndex={focusedTabId === tabId ? 0 : -1}\n {...rest}\n key={tabId}\n role=\"tab\"\n label={title}\n variant={variant}\n isSelected={isActive}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n required={required}\n innerRef={(tabButtonRef: HTMLButtonElement) => {\n if (tabButtonRef && tabsRefAsArray.current && focusableTabsRef.current && tabsRef.current) {\n tabsRefAsArray.current[index] = tabButtonRef;\n if (!disabled && !focusableTabsRef.current.includes(tabButtonRef))\n focusableTabsRef.current.push(tabButtonRef);\n tabsRef.current[index] = tabButtonRef;\n if (type === TAB_TYPES.SUBTABS && firstSubtabInternalRef && index === availableTabIndexes[0]) {\n firstSubtabInternalRef.current = tabButtonRef;\n }\n if (type !== TAB_TYPES.SUBTABS && index === availableTabIndexes[availableTabIndexes.length - 1]) {\n lastTabInternalRef.current = tabButtonRef;\n }\n if (ref) ref.current = tabButtonRef;\n }\n }}\n aria-controls={tabId}\n aria-selected={actualActiveTab === tabId && !applyAriaDisabled}\n data-required={required}\n data-tab-id={tabId}\n data-index={index}\n data-testid={type === TAB_TYPES.NORMAL ? TABS_DATA_TESTID.TAB_BUTTON : TABS_DATA_TESTID.SUBTAB_BUTTON}\n id={`${tabId}-label`}\n onClick={(e: React.MouseEvent) => {\n /** [PUI-15772] - Tabs Pre Refactor\n * Click handler for tab buttons. It:\n * 1. Prevents tab change if aria-disabled is true\n * 2. Updates active tab and indicator style if not disabled\n * 3. Calls the user's onClick callback if provided\n */\n if (applyAriaDisabled) return;\n if (!disabled) {\n globalClickHandler({ event: e, target: 'tabItem', tabId });\n }\n if (onClick && !disabled) onClick(tabId, e);\n }}\n onFocus={(e: React.FocusEvent) => {\n /** [PUI-15772] - Tabs Pre Refactor\n * Focus handler for carousel tabs. It:\n * 1. Centers the focused tab in the carousel viewport\n * 2. Only applies when withCarousel prop is true\n */\n if (withCarousel) centerTab({ e, listRef: carouselOnlyListRef });\n }}\n onKeyDown={(e: React.KeyboardEvent) => {\n /** [PUI-15772] - Tabs Pre Refactor\n * Keyboard navigation handler. It:\n * 1. Prevents Enter key propagation\n * 2. Handles keyboard navigation if not disabled\n * 3. Calls the user's onKeyDown callback if provided\n */\n if (e.key === 'Enter') e.stopPropagation();\n if (!disabled) handleOnKeyDown(e);\n if (onKeyDown && !disabled) onKeyDown(e);\n }}\n style={style}\n showSeparator={showSeparator && type !== TAB_TYPES.NORMAL && !isLastItem}\n isDSMobile={isDSMobile}\n tabType={type}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {RenderBadge ? <RenderBadge /> : null}\n </ButtonComponent>\n );\n });\n});\n"],
|
|
5
5
|
"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;AAAA,QACA,WAAW,CAAC,MAA2B;AAOrC,cAAI,EAAE,QAAQ,QAAS,GAAE,gBAAgB;AACzC,cAAI,CAAC,SAAU,iBAAgB,CAAC;AAChC,cAAI,aAAa,CAAC,SAAU,WAAU,CAAC;AAAA,QACzC;AAAA,QACA;AAAA,QACA,eAAe,iBAAiB,SAAS,UAAU,UAAU,CAAC;AAAA,QAC9D;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA;AAAA;AAAA,MAEC,cAAc,oBAAC,eAAY,IAAK;AAAA,IACnC;AAAA,EAEJ,CAAC;AACH,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,7 +2,10 @@ import * as React from "react";
|
|
|
2
2
|
import { styled } from "@elliemae/ds-system";
|
|
3
3
|
import { DSTabButton } from "@elliemae/ds-tab-button";
|
|
4
4
|
import { DSTabsName, TABS_SLOTS, TAB_TYPES } from "../../constants/index.js";
|
|
5
|
-
const StyledMobileGradient = styled
|
|
5
|
+
const StyledMobileGradient = styled("div", {
|
|
6
|
+
name: DSTabsName,
|
|
7
|
+
slot: TABS_SLOTS.MOBILE_GRADIENT
|
|
8
|
+
}).attrs(({ left = 0, width = 0 }) => ({
|
|
6
9
|
style: { left: left - 10, maxWidth: width - left }
|
|
7
10
|
}))`
|
|
8
11
|
position: fixed;
|
|
@@ -21,7 +24,10 @@ const StyledMobileGradient = styled.div.attrs(({ left = 0, width = 0 }) => ({
|
|
|
21
24
|
return "";
|
|
22
25
|
}};
|
|
23
26
|
`;
|
|
24
|
-
const StyledTabWrapper = styled
|
|
27
|
+
const StyledTabWrapper = styled("div", {
|
|
28
|
+
name: DSTabsName,
|
|
29
|
+
slot: TABS_SLOTS.TAB_WRAPPER
|
|
30
|
+
})`
|
|
25
31
|
display: flex;
|
|
26
32
|
flex: 1;
|
|
27
33
|
flex-wrap: nowrap;
|
|
@@ -84,22 +90,6 @@ const StyledTabList = styled("div", { name: DSTabsName, slot: TABS_SLOTS.TAB_LIS
|
|
|
84
90
|
overflow-x: hidden;
|
|
85
91
|
}`}` : ``}
|
|
86
92
|
`;
|
|
87
|
-
const StyledRequiredMark = styled.span`
|
|
88
|
-
color: ${({ theme }) => theme.colors.danger[900]};
|
|
89
|
-
font-size: 6px;
|
|
90
|
-
margin-left: 2px;
|
|
91
|
-
position: absolute;
|
|
92
|
-
top: 5px;
|
|
93
|
-
`;
|
|
94
|
-
const ScreenReaderOnly = styled.div`
|
|
95
|
-
clip: rect(0 0 0 0);
|
|
96
|
-
clip-path: inset(50%);
|
|
97
|
-
height: 1px;
|
|
98
|
-
overflow: hidden;
|
|
99
|
-
position: absolute;
|
|
100
|
-
white-space: nowrap;
|
|
101
|
-
width: 1px;
|
|
102
|
-
`;
|
|
103
93
|
const StyledTabButton = styled(DSTabButton, {
|
|
104
94
|
name: DSTabsName,
|
|
105
95
|
slot: TABS_SLOTS.TAB_BUTTON
|
|
@@ -133,9 +123,7 @@ const StyledSubTabButton = styled(DSTabButton, {
|
|
|
133
123
|
}` : ""}
|
|
134
124
|
`;
|
|
135
125
|
export {
|
|
136
|
-
ScreenReaderOnly,
|
|
137
126
|
StyledMobileGradient,
|
|
138
|
-
StyledRequiredMark,
|
|
139
127
|
StyledSubTabButton,
|
|
140
128
|
StyledSubTabsList,
|
|
141
129
|
StyledTabButton,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabBar/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport { styled } from '@elliemae/ds-system';\nimport { DSTabButton } from '@elliemae/ds-tab-button';\nimport type { DSTabsInternalsT } from '../../sharedTypes.js';\nimport { DSTabsName, TABS_SLOTS, TAB_TYPES } from '../../constants/index.js';\n\ninterface StyledSubTabsListPropsT {\n withCarousel: boolean;\n}\n\ninterface StyledTabListPropsT {\n withCarousel: boolean;\n isDSMobile: boolean;\n fixedTabsHeaders: boolean;\n mobileGradients: DSTabsInternalsT.MobileGradientsT;\n tabType: DSTabsInternalsT.TabTypesT;\n}\n\ninterface StyledMobileGradientPropsT {\n mobileGradients: DSTabsInternalsT.MobileGradientsT;\n left: number | undefined;\n width: number | undefined;\n}\n\ninterface StyledTabWrapperPropsT {\n isDSMobile: boolean;\n fixedTabsHeaders: boolean;\n}\n\nexport const StyledMobileGradient = styled
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAE5B,SAAS,YAAY,YAAY,iBAAiB;AAyB3C,MAAM,uBAAuB,OAAO,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport { styled } from '@elliemae/ds-system';\nimport { DSTabButton } from '@elliemae/ds-tab-button';\nimport type { DSTabsInternalsT } from '../../sharedTypes.js';\nimport { DSTabsName, TABS_SLOTS, TAB_TYPES } from '../../constants/index.js';\n\ninterface StyledSubTabsListPropsT {\n withCarousel: boolean;\n}\n\ninterface StyledTabListPropsT {\n withCarousel: boolean;\n isDSMobile: boolean;\n fixedTabsHeaders: boolean;\n mobileGradients: DSTabsInternalsT.MobileGradientsT;\n tabType: DSTabsInternalsT.TabTypesT;\n}\n\ninterface StyledMobileGradientPropsT {\n mobileGradients: DSTabsInternalsT.MobileGradientsT;\n left: number | undefined;\n width: number | undefined;\n}\n\ninterface StyledTabWrapperPropsT {\n isDSMobile: boolean;\n fixedTabsHeaders: boolean;\n}\n\nexport const StyledMobileGradient = styled('div', {\n name: DSTabsName,\n slot: TABS_SLOTS.MOBILE_GRADIENT,\n}).attrs(({ left = 0, width = 0 }: StyledMobileGradientPropsT) => ({\n style: { left: left - 10, maxWidth: width - left },\n}))<StyledMobileGradientPropsT>`\n position: fixed;\n z-index: 15;\n top: 0;\n width: calc(100% + 20px);\n height: 40px;\n pointer-events: none;\n\n ${({ mobileGradients: { left, right } }) => {\n if (right && left)\n return `background: linear-gradient(90deg, #FFFFFF 10px, #FFFFFF00 34px, #FFFFFF00 calc(100% - 44px), #FFFFFF calc(100% - 20px));`;\n if (right)\n return `background: linear-gradient(90deg, #FFFFFF00 0%, #FFFFFF00 calc(100% - 44px), #FFFFFF calc(100% - 20px));`;\n if (left) return `background: linear-gradient(90deg, #FFFFFF 10px, #FFFFFF00 34px, #FFFFFF00 100%);`;\n return '';\n }};\n`;\n\n/** CSS Setters */\n\nexport const StyledTabWrapper = styled('div', {\n name: DSTabsName,\n slot: TABS_SLOTS.TAB_WRAPPER,\n})<StyledTabWrapperPropsT>`\n display: flex;\n flex: 1;\n flex-wrap: nowrap;\n ${({ fixedTabsHeaders, isDSMobile }) => (!fixedTabsHeaders && isDSMobile ? '' : 'overflow-x: hidden;')}\n ${({ theme, isDSMobile }) => (isDSMobile ? `border-bottom: 1px solid ${theme.colors.neutral[200]};` : ``)}\n`;\n\nexport const StyledSubTabsList = styled('div', {\n name: DSTabsName,\n slot: TABS_SLOTS.SUB_TAB_LIST,\n})<StyledSubTabsListPropsT>`\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n flex: 1;\n width: 100%;\n ${({ withCarousel }) => (withCarousel ? 'max-width: 100%;' : '')}\n`;\n\nexport const StyledTabList = styled('div', { name: DSTabsName, slot: TABS_SLOTS.TAB_LIST })<StyledTabListPropsT>`\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n flex: 1;\n width: 100%;\n z-index: 0;\n ${({ withCarousel, isDSMobile }) => (withCarousel && !isDSMobile ? `max-width: 100%;` : '')}\n\n ${({ theme, isDSMobile, tabType }) =>\n tabType !== TAB_TYPES.NORMAL_SMALL && !isDSMobile\n ? `\n &:after {\n content: '';\n position: absolute;\n width: 100%;\n height: 1px;\n background:${theme.colors.neutral[400]};\n pointer-events: none;\n bottom: 1px;\n }\n `\n : ``}\n\n\n button {\n padding-bottom: 0;\n padding-top: 0;\n }\n\n ${({ theme, isDSMobile }) =>\n isDSMobile\n ? `\n \n background: ${theme.colors.neutral['000']};`\n : ``}\n\n ${({ isDSMobile, fixedTabsHeaders }) =>\n isDSMobile\n ? `\n ${\n !fixedTabsHeaders\n ? `\n z-index: 0;\n overflow-x: auto;\n overflow-y: hidden;\n &::-webkit-scrollbar {\n display: none;\n }`\n : `\n display: flex;\n button {\n flex: 1;\n overflow-x: hidden;\n }`\n }`\n : ``}\n`;\n\ninterface StyledTabButtonPropsT {\n showSeparator: boolean;\n isDSMobile: boolean;\n tabType: DSTabsInternalsT.TabTypesT;\n}\n\nexport const StyledTabButton = styled(DSTabButton, {\n name: DSTabsName,\n slot: TABS_SLOTS.TAB_BUTTON,\n})<StyledTabButtonPropsT>`\n ${({ showSeparator, theme, tabType }) =>\n showSeparator\n ? `\n &:before {\n content: \"\";\n position: absolute;\n width: 1px;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n height: ${tabType === TAB_TYPES.SUBTABS ? `10px` : `16px`};\n background: ${theme.colors.neutral[400]};\n }`\n : ''}\n`;\nexport const StyledSubTabButton = styled(DSTabButton, {\n name: DSTabsName,\n slot: TABS_SLOTS.SUBTAB_BUTTON,\n})<StyledTabButtonPropsT>`\n ${({ showSeparator, theme, tabType }) =>\n showSeparator\n ? `\n &:before {\n content: \"\";\n position: absolute;\n width: 1px;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n height: ${tabType === TAB_TYPES.SUBTABS ? `10px` : `16px`};\n background: ${theme.colors.neutral[400]};\n }`\n : ''}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAE5B,SAAS,YAAY,YAAY,iBAAiB;AAyB3C,MAAM,uBAAuB,OAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,WAAW;AACnB,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,EAAE,OAAmC;AA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AAA;AAAA,uBAEe,MAAM,OAAO,QAAQ,KAAK,CAAC,MAC1C,EAAE;AAAA;AAAA,IAEN,CAAC,EAAE,YAAY,iBAAiB,MAChC,aACI;AAAA,QAEA,CAAC,mBACG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOA;AAAA;AAAA;AAAA;AAAA;AAAA,UAMN,KACE,EAAE;AAAA;AASH,MAAM,kBAAkB,OAAO,aAAa;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,WAAW;AACnB,CAAC;AAAA,IACG,CAAC,EAAE,eAAe,OAAO,QAAQ,MACjC,gBACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAQM,YAAY,UAAU,UAAU,SAAS,MAAM;AAAA,kBAC3C,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,OAEnC,EAAE;AAAA;AAEH,MAAM,qBAAqB,OAAO,aAAa;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,WAAW;AACnB,CAAC;AAAA,IACG,CAAC,EAAE,eAAe,OAAO,QAAQ,MACjC,gBACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAQM,YAAY,UAAU,UAAU,SAAS,MAAM;AAAA,kBAC3C,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,OAEnC,EAAE;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useContext } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
omitLockAttributes,
|
|
6
|
+
useGetGlobalAttributes,
|
|
7
|
+
useGetXstyledProps,
|
|
8
|
+
useOwnerProps
|
|
9
|
+
} from "@elliemae/ds-props-helpers";
|
|
5
10
|
import { TabsPanels } from "../tabsPanel/TabsPanels.js";
|
|
6
11
|
import { TabBar } from "../tabBar/TabBar.js";
|
|
7
12
|
import { StyledTabBarContainer, StyledTabsContainer } from "./styles.js";
|
|
@@ -17,7 +22,7 @@ const TabsContent = () => {
|
|
|
17
22
|
return /* @__PURE__ */ jsxs(
|
|
18
23
|
StyledTabsContainer,
|
|
19
24
|
{
|
|
20
|
-
...globalProps,
|
|
25
|
+
...omitLockAttributes(globalProps),
|
|
21
26
|
...xstyledProps,
|
|
22
27
|
...containerProps,
|
|
23
28
|
innerRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabsContent/TabsContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport {\n omitLockAttributes,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { TabsPanels } from '../tabsPanel/TabsPanels.js';\nimport { TabBar } from '../tabBar/TabBar.js';\nimport { StyledTabBarContainer, StyledTabsContainer } from './styles.js';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\n\nexport const TabsContent = (): JSX.Element => {\n const {\n props,\n props: { containerProps, innerRef, tabBarExtraContent, TabBarExtraContent },\n } = useContext(DSTabsContext);\n\n const globalProps = useGetGlobalAttributes(props);\n const xstyledProps = useGetXstyledProps(props);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n return (\n <StyledTabsContainer\n {...omitLockAttributes(globalProps)}\n {...xstyledProps}\n {...containerProps}\n innerRef={innerRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledTabBarContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <TabBar />\n {TabBarExtraContent ? <TabBarExtraContent /> : null}\n {tabBarExtraContent || null}\n </StyledTabBarContainer>\n <TabsPanels />\n </StyledTabsContainer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC+BjB,SACE,KADF;AA/BN,SAAgB,kBAAkB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,uBAAuB,2BAA2B;AAC3D,SAAS,qBAAqB;AAEvB,MAAM,cAAc,MAAmB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,gBAAgB,UAAU,oBAAoB,mBAAmB;AAAA,EAC5E,IAAI,WAAW,aAAa;AAE5B,QAAM,cAAc,uBAAuB,KAAK;AAChD,QAAM,eAAe,mBAAmB,KAAK;AAC7C,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAc,KAAK;AAErE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG,mBAAmB,WAAW;AAAA,MACjC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,6BAAC,yBAAsB,eAA8B,wBACnD;AAAA,8BAAC,UAAO;AAAA,UACP,qBAAqB,oBAAC,sBAAmB,IAAK;AAAA,UAC9C,sBAAsB;AAAA,WACzB;AAAA,QACA,oBAAC,cAAW;AAAA;AAAA;AAAA,EACd;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ const StyledTabsContainer = styled("div", { name: DSTabsName, slot: TABS_SLOTS.T
|
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
`;
|
|
8
|
-
const StyledTabBarContainer = styled.
|
|
8
|
+
const StyledTabBarContainer = styled("div", { name: DSTabsName, slot: TABS_SLOTS.TAB_BAR_CONTAINER })`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex: 0 0 auto;
|
|
11
11
|
overflow-x: hidden;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/tabsContent/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSTabsName, TABS_SLOTS } from '../../constants/index.js';\n\nexport const StyledTabsContainer = styled('div', { name: DSTabsName, slot: TABS_SLOTS.TABS_CONTAINER })`\n display: flex;\n flex-direction: column;\n`;\nexport const StyledTabBarContainer = styled.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY,kBAAkB;AAEhC,MAAM,sBAAsB,OAAO,OAAO,EAAE,MAAM,YAAY,MAAM,WAAW,eAAe,CAAC;AAAA;AAAA;AAAA;AAI/F,MAAM,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSTabsName, TABS_SLOTS } from '../../constants/index.js';\n\nexport const StyledTabsContainer = styled('div', { name: DSTabsName, slot: TABS_SLOTS.TABS_CONTAINER })`\n display: flex;\n flex-direction: column;\n`;\nexport const StyledTabBarContainer = styled('div', { name: DSTabsName, slot: TABS_SLOTS.TAB_BAR_CONTAINER })`\n display: flex;\n flex: 0 0 auto;\n overflow-x: hidden;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY,kBAAkB;AAEhC,MAAM,sBAAsB,OAAO,OAAO,EAAE,MAAM,YAAY,MAAM,WAAW,eAAe,CAAC;AAAA;AAAA;AAAA;AAI/F,MAAM,wBAAwB,OAAO,OAAO,EAAE,MAAM,YAAY,MAAM,WAAW,kBAAkB,CAAC;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -48,17 +48,18 @@ const TabsPanels = () => {
|
|
|
48
48
|
(index, indexLatest) => {
|
|
49
49
|
if (!focusableTabsRef.current) return;
|
|
50
50
|
const offset = index - indexLatest;
|
|
51
|
+
const activatableTabs = focusableTabsRef.current.filter((el) => el.getAttribute("aria-disabled") !== "true");
|
|
51
52
|
if (focusableTabsRef.current) {
|
|
52
|
-
const currentIndexFocusable =
|
|
53
|
+
const currentIndexFocusable = activatableTabs.findIndex((el) => el.dataset.tabId === actualActiveTab);
|
|
53
54
|
const newFocusableIndex = currentIndexFocusable >= 0 ? currentIndexFocusable + offset : -1;
|
|
54
|
-
if (newFocusableIndex < 0 || newFocusableIndex >
|
|
55
|
+
if (newFocusableIndex < 0 || newFocusableIndex > activatableTabs.length || !activatableTabs[newFocusableIndex])
|
|
55
56
|
return;
|
|
56
57
|
globalClickHandler({
|
|
57
58
|
event: { type: "click" },
|
|
58
59
|
target: "swipeableViews",
|
|
59
|
-
tabId:
|
|
60
|
+
tabId: activatableTabs[newFocusableIndex].dataset.tabId
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
+
activatableTabs[newFocusableIndex].click();
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
[actualActiveTab, focusableTabsRef, globalClickHandler]
|
|
@@ -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 { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport type { DSSwipeCardT } from '@elliemae/ds-swipe-card/src/react-desc-prop-types.js';\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\nimport type { DSTabT } from '
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACkCnB;AAhCJ,SAAS,qBAAqB;AAE9B,OAAOA,UAAS,aAAa,YAAY,eAAe;AACxD,SAAS,qBAAqB;AAG9B,SAAS,mBAAmB,4BAA4B;AASxD,MAAM,aAAiF,CAAC,UAAU;AAChG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAGJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEO,MAAM,aAAa,MAAmB;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,qBAAqB,UAAU,MAAM,YAAY,gBAAgB,SAAS;AAAA,IACnF;AAAA,IACA;AAAA,EACF,IAAI,WAAW,aAAa;AAE5B,QAAM,EAAE,eAAe,wBAAwB,wBAAwB,gCAAgC,IACrG,cAAc,KAAK;AASrB,QAAM,sBAAsB;AAAA,IAC1B,CAAC,OAAe,gBAAwB;AACtC,UAAI,CAAC,iBAAiB,QAAS;AAE/B,YAAM,SAAS,QAAQ;
|
|
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 { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport type { DSSwipeCardT } from '@elliemae/ds-swipe-card/src/react-desc-prop-types.js';\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { DSTabsContext } from '../../DSTabsCTX.js';\nimport type { DSTabT } from '../DSTab/index.js';\nimport type { PanelDescriptor } from './styles.js';\nimport { StyledDSSwipeCard, StyledPanelContainer } from './styles.js';\n/**\n * Describes the data needed to render a single Tab panel slide.\n */\n\n/**\n * Responsible for rendering a single slide using the provided panel descriptor.\n * Receives a `dsIndex` prop from DSSwipeCard which indicates the slide position.\n */\nconst CardRender: React.ComponentType<DSSwipeCardT.CardRenderProps<PanelDescriptor>> = (props) => {\n const {\n content,\n tabPanelsProps,\n isDSMobile,\n hide,\n style,\n role,\n tabId,\n renderKey,\n getOwnerProps,\n getOwnerPropsArguments,\n ...rest\n } = props;\n\n // We pass through all attributes, including accessibility and dataset attributes.\n return (\n <StyledPanelContainer\n id={tabId}\n {...tabPanelsProps}\n {...rest}\n // Styled component specific props\n isDSMobile={isDSMobile}\n hide={hide}\n style={style}\n role={role}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {content}\n </StyledPanelContainer>\n );\n};\n\nexport const TabsPanels = (): JSX.Element => {\n const {\n actualActiveTab,\n focusableTabsRef,\n props,\n props: { onlyRenderActiveTab, children: tabs, isDSMobile, tabPanelsProps, animated },\n globalClickHandler,\n userDidChangeTabAtleastOnceRef,\n } = useContext(DSTabsContext);\n\n const { getOwnerProps: getTabPanelsOwnerProps, getOwnerPropsArguments: getTabPanelsOwnerPropsArguments } =\n useOwnerProps(props);\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 // a swipe only lands on tabs that can be activated: applyAriaDisabled tabs stay in focusableTabsRef (arrow\n // navigation keeps them) but are skipped here, the same way disabled tabs are\n const activatableTabs = focusableTabsRef.current.filter((el) => el.getAttribute('aria-disabled') !== 'true');\n\n if (focusableTabsRef.current) {\n const currentIndexFocusable = activatableTabs.findIndex((el) => el.dataset.tabId === actualActiveTab);\n\n const newFocusableIndex = currentIndexFocusable >= 0 ? currentIndexFocusable + offset : -1;\n\n if (newFocusableIndex < 0 || newFocusableIndex > activatableTabs.length || !activatableTabs[newFocusableIndex])\n return;\n globalClickHandler({\n event: { type: 'click' } as React.MouseEvent<HTMLDivElement>,\n target: 'swipeableViews',\n tabId: activatableTabs[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 activatableTabs[newFocusableIndex].click();\n }\n },\n [actualActiveTab, focusableTabsRef, globalClickHandler],\n );\n\n const panels: PanelDescriptor[] = useMemo(() => {\n // To preserve indices for swipe behavior, we return a fully-typed placeholder panel\n // instead of null when a panel should not be rendered. This keeps array length stable.\n const mapResult = React.Children.map(tabs, (tab: React.ReactElement<DSTabT.Props>, index: number) => {\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 const baseDescriptor: PanelDescriptor = {\n index,\n tabId: panelId,\n isActive: Boolean(isActive),\n isDSMobile: Boolean(isDSMobile),\n content: shouldRender && !disabled ? content : null,\n style: {\n ...(tabPanelsProps?.style || {}),\n ...(style || {}),\n } as React.CSSProperties,\n tabPanelsProps,\n 'aria-hidden': !(isActive && !applyAriaDisabled),\n 'data-panel-id': panelId,\n 'data-testid': 'ds-tabs-tab-panel',\n hide: !isActive,\n onClick: (event: React.MouseEvent<HTMLDivElement>) => globalClickHandler({ event, target: 'panel' }),\n role: 'tabpanel',\n getOwnerProps,\n getOwnerPropsArguments,\n };\n\n return baseDescriptor;\n });\n\n // Children.map can return null if there are no children; ensure an array is returned\n return mapResult || [];\n }, [tabs, actualActiveTab, onlyRenderActiveTab, tabPanelsProps, globalClickHandler, isDSMobile]);\n\n // Safely compute the active slide index. Default to 0 when none found.\n const idx = panels.findIndex((panel) => panel.isActive);\n const activeSlide = idx >= 0 ? idx : 0;\n const handleOnSlide = React.useCallback(\n (index: number) => {\n handleOnChangeIndex(index, activeSlide);\n },\n [handleOnChangeIndex, activeSlide],\n );\n\n return (\n <StyledDSSwipeCard\n activeSlide={activeSlide}\n onSwipe={handleOnSlide}\n enableTouch\n enableAnimation={userDidChangeTabAtleastOnceRef.current && animated}\n CardRender={CardRender}\n slidesProps={panels}\n getOwnerProps={getTabPanelsOwnerProps}\n getOwnerPropsArguments={getTabPanelsOwnerPropsArguments}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkCnB;AAhCJ,SAAS,qBAAqB;AAE9B,OAAOA,UAAS,aAAa,YAAY,eAAe;AACxD,SAAS,qBAAqB;AAG9B,SAAS,mBAAmB,4BAA4B;AASxD,MAAM,aAAiF,CAAC,UAAU;AAChG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAGJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEO,MAAM,aAAa,MAAmB;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,qBAAqB,UAAU,MAAM,YAAY,gBAAgB,SAAS;AAAA,IACnF;AAAA,IACA;AAAA,EACF,IAAI,WAAW,aAAa;AAE5B,QAAM,EAAE,eAAe,wBAAwB,wBAAwB,gCAAgC,IACrG,cAAc,KAAK;AASrB,QAAM,sBAAsB;AAAA,IAC1B,CAAC,OAAe,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AAE,YAAY,CAAC;AAAA,QAC9B,iBAAiB;AAAA,QACjB,eAAe;AAAA,QACf,MAAM,CAAC;AAAA,QACP,SAAS,CAAC,UAA4C,mBAAmB,EAAE,OAAO,QAAQ,QAAQ,CAAC;AAAA,QACnG,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAEA,aAAO;AAAA,IACT,CAAC;AAGD,WAAO,aAAa,CAAC;AAAA,EACvB,GAAG,CAAC,MAAM,iBAAiB,qBAAqB,gBAAgB,oBAAoB,UAAU,CAAC;AAG/F,QAAM,MAAM,OAAO,UAAU,CAAC,UAAU,MAAM,QAAQ;AACtD,QAAM,cAAc,OAAO,IAAI,MAAM;AACrC,QAAM,gBAAgBA,OAAM;AAAA,IAC1B,CAAC,UAAkB;AACjB,0BAAoB,OAAO,WAAW;AAAA,IACxC;AAAA,IACA,CAAC,qBAAqB,WAAW;AAAA,EACnC;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAS;AAAA,MACT,aAAW;AAAA,MACX,iBAAiB,+BAA+B,WAAW;AAAA,MAC3D;AAAA,MACA,aAAa;AAAA,MACb,eAAe;AAAA,MACf,wBAAwB;AAAA;AAAA,EAC1B;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -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 type { GlobalAttributesT, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { DSSwipeCard } from '@elliemae/ds-swipe-card';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTabsName, TABS_SLOTS } from '../../constants/index.js';\nimport type { DSTabT } from '
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { DSSwipeCard } from '@elliemae/ds-swipe-card';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTabsName, TABS_SLOTS } from '../../constants/index.js';\nimport type { DSTabT } from '../DSTab/index.js';\n\ninterface StyledPanelContainerPropsT {\n hide: boolean;\n isDSMobile: boolean;\n}\nexport interface PanelDescriptor extends Record<string, unknown>, ReturnType<typeof useOwnerProps<DSTabT.Props>> {\n index: number;\n tabId: string;\n isActive: boolean;\n isDSMobile: boolean;\n content: React.ReactNode;\n style: React.CSSProperties;\n tabPanelsProps?: GlobalAttributesT<HTMLDivElement>;\n 'aria-hidden': boolean;\n 'data-panel-id': string;\n 'data-testid': string;\n hide: boolean;\n onClick: (event: React.MouseEvent<HTMLDivElement>) => void;\n role: 'tabpanel';\n}\n\nexport const StyledPanelContainer = styled('div', {\n name: DSTabsName,\n slot: TABS_SLOTS.TAB_PANEL,\n})<StyledPanelContainerPropsT>`\n flex: 1 1 auto;\n min-height: 0;\n padding-top: 8px;\n ${({ isDSMobile }) => (isDSMobile ? `padding-top: 0;` : ``)}\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.colors.brand[700]};\n outline-offset: -2px;\n }\n`;\n\nexport const StyledDSSwipeCard = styled(DSSwipeCard<PanelDescriptor>, {\n name: DSTabsName,\n slot: TABS_SLOTS.TABS_SWIPE_CARD,\n})``;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,mBAAmB;AAC5B,SAAS,cAAc;AACvB,SAAS,YAAY,kBAAkB;AAuBhC,MAAM,uBAAuB,OAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,WAAW;AACnB,CAAC;AAAA;AAAA;AAAA;AAAA,IAIG,CAAC,EAAE,WAAW,MAAO,aAAa,oBAAoB,EAAG;AAAA;AAAA,yBAEpC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAKxD,MAAM,oBAAoB,OAAO,aAA8B;AAAA,EACpE,MAAM;AAAA,EACN,MAAM,WAAW;AACnB,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,28 +5,11 @@ import {
|
|
|
5
5
|
globalAttributesPropTypes,
|
|
6
6
|
xstyledPropTypes
|
|
7
7
|
} from "@elliemae/ds-props-helpers";
|
|
8
|
-
import {
|
|
8
|
+
import { DSTABS_SLOTS, DSTabsName, TAB_TYPES, TAB_TYPES_VALUES_AS_ARRAY } from "./constants/index.js";
|
|
9
9
|
const noop = () => {
|
|
10
10
|
};
|
|
11
|
-
const DSTabPropTypes = {
|
|
12
|
-
...globalAttributesPropTypes,
|
|
13
|
-
...xstyledPropTypes,
|
|
14
|
-
tabId: PropTypes.string.description("Unique Tab id.").defaultValue(""),
|
|
15
|
-
title: PropTypes.string.description("Tab title.").defaultValue(""),
|
|
16
|
-
required: PropTypes.bool.description("Show a required mark next to the title.").defaultValue(false),
|
|
17
|
-
disabled: PropTypes.bool.description("Disables Tab.").defaultValue(false),
|
|
18
|
-
applyAriaDisabled: PropTypes.bool.description(
|
|
19
|
-
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION."
|
|
20
|
-
).defaultValue(false),
|
|
21
|
-
style: PropTypes.object.description("Custom styles for the tab.").defaultValue({}),
|
|
22
|
-
RenderBadge: PropTypes.node.description("Additional content rendered inside the tab button (e.g. badges, icons).").defaultValue(void 0),
|
|
23
|
-
ref: PropTypes.shape({ current: PropTypes.any }).description("Ref to the tab element.").defaultValue(void 0),
|
|
24
|
-
onClick: PropTypes.func.description("Click handler for the tab.").defaultValue(void 0),
|
|
25
|
-
onKeyDown: PropTypes.func.description("Keydown handler for the tab.").defaultValue(void 0),
|
|
26
|
-
children: PropTypes.node.description("Content of the tab.").isRequired
|
|
27
|
-
};
|
|
28
11
|
const DSTabsPropTypes = {
|
|
29
|
-
...getPropsPerSlotPropTypes(DSTabsName,
|
|
12
|
+
...getPropsPerSlotPropTypes(DSTabsName, DSTABS_SLOTS),
|
|
30
13
|
...globalAttributesPropTypes,
|
|
31
14
|
...xstyledPropTypes,
|
|
32
15
|
animated: PropTypes.bool.description("Whether the Tab transition should animate or not.").defaultValue(true),
|
|
@@ -72,7 +55,6 @@ const DSTabsDefaultProps = {
|
|
|
72
55
|
swipeableViewsContainerProps: {}
|
|
73
56
|
};
|
|
74
57
|
export {
|
|
75
|
-
DSTabPropTypes,
|
|
76
58
|
DSTabsDefaultProps,
|
|
77
59
|
DSTabsPropTypes
|
|
78
60
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSTabsInternalsT } from './sharedTypes.js';\n\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSTabsInternalsT } from './sharedTypes.js';\nimport type { DSTabT } from './parts/DSTab/index.js';\n\nimport { DSTABS_SLOTS, DSTabsName, TAB_TYPES, TAB_TYPES_VALUES_AS_ARRAY } from './constants/index.js';\n\nconst noop = (): void => {};\n\nexport declare namespace DSTabsT {\n // the slots printed once per tab (tab button, subtab button and tab panel) are customized from DSTab, see DSTabT\n export type SlotFunctionArguments = {\n dsTabsRoot: () => object;\n dsTabsContainer: () => object;\n dsTabsTabList: () => object;\n dsTabsSubtabsList: () => object;\n dsTabsChevronRight: () => object;\n dsTabsChevronLeft: () => object;\n dsTabsTabsSwipeCard: () => object;\n dsTabsTabBarContainer: () => object;\n dsTabsTabWrapper: () => object;\n dsTabsMobileGradient: () => object;\n dsTabsCarouselWrapper: () => object;\n dsTabsCarouselList: () => object;\n };\n\n export interface DefaultProps {\n containerProps: Record<string, unknown>;\n animated: boolean;\n enableMouseEvents: boolean;\n allowTextSelection: boolean;\n onTabChange: (tabId: string, e?: React.MouseEvent) => void;\n type: DSTabsInternalsT.TabTypesT;\n children: React.ReactElement<DSTabT.Props>[] | readonly React.ReactElement<DSTabT.Props>[];\n onlyRenderActiveTab: boolean;\n fixedTabsHeaders: boolean;\n withCarousel: boolean;\n isDSMobile: boolean;\n showSelectionIndicator: boolean;\n showSeparator: boolean;\n tabPanelsProps: GlobalAttributesT<HTMLDivElement>;\n swipeableViewsContainerProps: object;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSTabsName,\n typeof DSTABS_SLOTS\n > {\n tabsListAriaLabel?: string;\n firstSubtabRef?: React.MutableRefObject<HTMLElement>;\n lastTabRef?: React.MutableRefObject<HTMLElement>;\n TabBarExtraContent?: React.ComponentType;\n tabBarExtraContent?: React.ReactNode;\n activeTab?: string;\n innerRef?: React.MutableRefObject<HTMLDivElement>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps {}\n}\n\nexport const DSTabsPropTypes: DSPropTypesSchema<DSTabsT.Props> = {\n ...getPropsPerSlotPropTypes(DSTabsName, DSTABS_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n animated: PropTypes.bool.description('Whether the Tab transition should animate or not.').defaultValue(true),\n enableMouseEvents: PropTypes.bool\n .description('Enables Tab transition with mouse drag events.')\n .defaultValue(false)\n .deprecated({ version: '3.55.x', message: 'This prop is no longer supported.' }),\n allowTextSelection: PropTypes.bool\n .description('Allows text selection when mouse drag events are active.')\n .defaultValue(false),\n onTabChange: PropTypes.func.description('Handler when a user clicks on a different Tab.').defaultValue('() => {}'),\n type: PropTypes.oneOf(TAB_TYPES_VALUES_AS_ARRAY).description('Tab type.').defaultValue(TAB_TYPES_VALUES_AS_ARRAY[0]),\n fixedTabsHeaders: PropTypes.bool.description('Fixes the tab headers.').defaultValue(false),\n isDSMobile: PropTypes.bool.description('Indicates if the component is in mobile mode.').defaultValue(false),\n showSelectionIndicator: PropTypes.bool\n .description('Shows the selection indicator for the active tab.')\n .defaultValue(true),\n showSeparator: PropTypes.bool.description('Shows a separator between tabs.').defaultValue(true),\n\n onlyRenderActiveTab: PropTypes.bool.description('Only renders the active Tab in the DOM.').defaultValue(false),\n withCarousel: PropTypes.bool.description('Activate carousel behavior.').defaultValue(false),\n activeTab: PropTypes.string\n .description('Passing a value makes DSTabs a controlled component.')\n .defaultValue('First DSTab children.'),\n children: PropTypes.node.description('Use DSTab component as children.').isRequired,\n tabsListAriaLabel: PropTypes.string\n .description(\n 'Aria label for the tablist. Omitted by default so the tablist is named by its role; set it only when a meaningful, non-redundant name is required (avoid values like \"Tab list\" that duplicate the role).',\n )\n .defaultValue(undefined),\n containerProps: PropTypes.object.description('Additional properties for the container.').defaultValue({}),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })])\n .description('Ref to the container.')\n .defaultValue(undefined),\n tabPanelsProps: PropTypes.shape(globalAttributesPropTypes)\n .description('Additional properties for the tab container.')\n .defaultValue({}),\n swipeableViewsContainerProps: PropTypes.object\n .description('Additional properties for the swipeable container.')\n .defaultValue(undefined)\n .deprecated({ version: '3.55.x', message: 'This prop is no longer supported.' }),\n firstSubtabRef: PropTypes.shape({ current: PropTypes.any })\n .description('Ref to the first subtab element.')\n .defaultValue(undefined),\n lastTabRef: PropTypes.shape({ current: PropTypes.any })\n .description('Ref to the last tab element.')\n .defaultValue(undefined),\n TabBarExtraContent: PropTypes.element.description('Additional content to display in the tab bar.'),\n tabBarExtraContent: PropTypes.node\n .description('Additional content to display in the tab bar.')\n .defaultValue(undefined),\n};\n\nexport const DSTabsDefaultProps: DSTabsT.DefaultProps = {\n containerProps: {},\n animated: true,\n enableMouseEvents: false,\n allowTextSelection: false,\n onTabChange: noop,\n type: TAB_TYPES.NORMAL,\n onlyRenderActiveTab: false,\n withCarousel: false,\n isDSMobile: false,\n showSelectionIndicator: true,\n children: [],\n fixedTabsHeaders: false,\n showSeparator: true,\n tabPanelsProps: {},\n swipeableViewsContainerProps: {},\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,SAAS,cAAc,YAAY,WAAW,iCAAiC;AAE/E,MAAM,OAAO,MAAY;AAAC;AAiEnB,MAAM,kBAAoD;AAAA,EAC/D,GAAG,yBAAyB,YAAY,YAAY;AAAA,EACpD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,KAAK,YAAY,mDAAmD,EAAE,aAAa,IAAI;AAAA,EAC3G,mBAAmB,UAAU,KAC1B,YAAY,gDAAgD,EAC5D,aAAa,KAAK,EAClB,WAAW,EAAE,SAAS,UAAU,SAAS,oCAAoC,CAAC;AAAA,EACjF,oBAAoB,UAAU,KAC3B,YAAY,0DAA0D,EACtE,aAAa,KAAK;AAAA,EACrB,aAAa,UAAU,KAAK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Y,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,EACnD,YAAY,8BAA8B,EAC1C,aAAa,MAAS;AAAA,EACzB,oBAAoB,UAAU,QAAQ,YAAY,+CAA+C;AAAA,EACjG,oBAAoB,UAAU,KAC3B,YAAY,+CAA+C,EAC3D,aAAa,MAAS;AAC3B;AAEO,MAAM,qBAA2C;AAAA,EACtD,gBAAgB,CAAC;AAAA,EACjB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,MAAM,UAAU;AAAA,EAChB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,wBAAwB;AAAA,EACxB,UAAU,CAAC;AAAA,EACX,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,gBAAgB,CAAC;AAAA,EACjB,8BAA8B,CAAC;AACjC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SlotPropsAsObj = {
|
|
3
|
+
dsTabsRoot: { "aria-label": "just a typescript test" },
|
|
4
|
+
dsTabsContainer: { "aria-label": "just a typescript test" },
|
|
5
|
+
dsTabsTabList: { "aria-label": "just a typescript test" },
|
|
6
|
+
dsTabsSubtabsList: { "aria-label": "just a typescript test" },
|
|
7
|
+
dsTabsChevronRight: { "aria-label": "just a typescript test" },
|
|
8
|
+
dsTabsChevronLeft: { "aria-label": "just a typescript test" },
|
|
9
|
+
dsTabsTabsSwipeCard: { "aria-label": "just a typescript test" },
|
|
10
|
+
dsTabsTabBarContainer: { "aria-label": "just a typescript test" },
|
|
11
|
+
dsTabsTabWrapper: { "aria-label": "just a typescript test" },
|
|
12
|
+
dsTabsMobileGradient: { "aria-label": "just a typescript test" },
|
|
13
|
+
dsTabsCarouselWrapper: { "aria-label": "just a typescript test" },
|
|
14
|
+
dsTabsCarouselList: { "aria-label": "just a typescript test" },
|
|
15
|
+
dsTabsTabButton: { "aria-label": "just a typescript test" },
|
|
16
|
+
dsTabsSubtabButton: { "aria-label": "just a typescript test" },
|
|
17
|
+
dsTabsTabPanel: { "aria-label": "just a typescript test" }
|
|
18
|
+
};
|
|
19
|
+
const SlotPropsAsFunctions = {
|
|
20
|
+
dsTabsRoot: () => ({ "aria-label": "just a typescript test" }),
|
|
21
|
+
dsTabsContainer: () => ({ "aria-label": "just a typescript test" }),
|
|
22
|
+
dsTabsTabList: () => ({ "aria-label": "just a typescript test" }),
|
|
23
|
+
dsTabsSubtabsList: () => ({ "aria-label": "just a typescript test" }),
|
|
24
|
+
dsTabsChevronRight: () => ({ "aria-label": "just a typescript test" }),
|
|
25
|
+
dsTabsChevronLeft: () => ({ "aria-label": "just a typescript test" }),
|
|
26
|
+
dsTabsTabsSwipeCard: () => ({ "aria-label": "just a typescript test" }),
|
|
27
|
+
dsTabsTabBarContainer: () => ({ "aria-label": "just a typescript test" }),
|
|
28
|
+
dsTabsTabWrapper: () => ({ "aria-label": "just a typescript test" }),
|
|
29
|
+
dsTabsMobileGradient: () => ({ "aria-label": "just a typescript test" }),
|
|
30
|
+
dsTabsCarouselWrapper: () => ({ "aria-label": "just a typescript test" }),
|
|
31
|
+
dsTabsCarouselList: () => ({ "aria-label": "just a typescript test" }),
|
|
32
|
+
// the per-tab slots receive the tab they are printed for
|
|
33
|
+
dsTabsTabButton: ({ tabId }) => ({ "aria-label": `just a typescript test ${tabId}` }),
|
|
34
|
+
dsTabsSubtabButton: ({ tabId }) => ({ "aria-label": `just a typescript test ${tabId}` }),
|
|
35
|
+
dsTabsTabPanel: ({ panelId }) => ({ "aria-label": `just a typescript test ${panelId}` })
|
|
36
|
+
};
|
|
37
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
38
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSTabsName, TABS_SLOTS } from '../constants/index.js';\nimport type { DSTabsT } from '../react-desc-prop-types.js';\nimport type { DSTabT } from '../parts/DSTab/index.js';\n\n// ds-tabs spreads its slots across two components under the single `DSTabs` component name:\n// DSTabs reads the slots of the tab bar and the container, and each DSTab reads the slots that are printed once\n// per tab (tab button, subtab button and tab panel) and tells the function form which tab it is.\n// The combined objects below intersect both and the exhaustiveness check covers all the slots at once.\n\nconst SlotPropsAsObj: Partial<DSTabsT.Props> & Partial<DSTabT.Props> = {\n dsTabsRoot: { 'aria-label': 'just a typescript test' },\n dsTabsContainer: { 'aria-label': 'just a typescript test' },\n dsTabsTabList: { 'aria-label': 'just a typescript test' },\n dsTabsSubtabsList: { 'aria-label': 'just a typescript test' },\n dsTabsChevronRight: { 'aria-label': 'just a typescript test' },\n dsTabsChevronLeft: { 'aria-label': 'just a typescript test' },\n dsTabsTabsSwipeCard: { 'aria-label': 'just a typescript test' },\n dsTabsTabBarContainer: { 'aria-label': 'just a typescript test' },\n dsTabsTabWrapper: { 'aria-label': 'just a typescript test' },\n dsTabsMobileGradient: { 'aria-label': 'just a typescript test' },\n dsTabsCarouselWrapper: { 'aria-label': 'just a typescript test' },\n dsTabsCarouselList: { 'aria-label': 'just a typescript test' },\n dsTabsTabButton: { 'aria-label': 'just a typescript test' },\n dsTabsSubtabButton: { 'aria-label': 'just a typescript test' },\n dsTabsTabPanel: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSTabsT.SlotFunctionArguments & DSTabT.SlotFunctionArguments = {\n dsTabsRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsTabList: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsSubtabsList: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsChevronRight: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsChevronLeft: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsTabsSwipeCard: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsTabBarContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsTabWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsMobileGradient: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsCarouselWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsTabsCarouselList: () => ({ 'aria-label': 'just a typescript test' }),\n // the per-tab slots receive the tab they are printed for\n dsTabsTabButton: ({ tabId }) => ({ 'aria-label': `just a typescript test ${tabId}` }),\n dsTabsSubtabButton: ({ tabId }) => ({ 'aria-label': `just a typescript test ${tabId}` }),\n dsTabsTabPanel: ({ panelId }) => ({ 'aria-label': `just a typescript test ${panelId}` }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot defined in TABS_SLOTS is\n// missing from the combined SlotFunctionArguments surface above.\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSTabsName, typeof TABS_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACYvB,MAAM,iBAAiE;AAAA,EACrE,YAAY,EAAE,cAAc,yBAAyB;AAAA,EACrD,iBAAiB,EAAE,cAAc,yBAAyB;AAAA,EAC1D,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,oBAAoB,EAAE,cAAc,yBAAyB;AAAA,EAC7D,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,qBAAqB,EAAE,cAAc,yBAAyB;AAAA,EAC9D,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EA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ly CAROUSEL_BUTTON_RIGHT: "chevron-right";
|
|
28
28
|
readonly CAROUSEL_BUTTON_LEFT: "chevron-left";
|
|
29
29
|
readonly TABS_SWIPE_CARD: "tabs-swipe-card";
|
|
30
|
+
readonly TAB_BAR_CONTAINER: "tab-bar-container";
|
|
31
|
+
readonly TAB_WRAPPER: "tab-wrapper";
|
|
32
|
+
readonly MOBILE_GRADIENT: "mobile-gradient";
|
|
33
|
+
readonly CAROUSEL_WRAPPER: "carousel-wrapper";
|
|
34
|
+
readonly CAROUSEL_LIST: "carousel-list";
|
|
35
|
+
};
|
|
36
|
+
export declare const DSTAB_SLOTS: {
|
|
37
|
+
readonly TAB_BUTTON: "tab-button";
|
|
38
|
+
readonly SUBTAB_BUTTON: "subtab-button";
|
|
39
|
+
readonly TAB_PANEL: "tab-panel";
|
|
40
|
+
};
|
|
41
|
+
export declare const DSTABS_SLOTS: {
|
|
42
|
+
ROOT: "root";
|
|
43
|
+
TABS_CONTAINER: "container";
|
|
44
|
+
SUB_TAB_LIST: "subtabs-list";
|
|
45
|
+
TAB_LIST: "tab-list";
|
|
46
|
+
CAROUSEL_BUTTON_RIGHT: "chevron-right";
|
|
47
|
+
CAROUSEL_BUTTON_LEFT: "chevron-left";
|
|
48
|
+
TABS_SWIPE_CARD: "tabs-swipe-card";
|
|
49
|
+
TAB_BAR_CONTAINER: "tab-bar-container";
|
|
50
|
+
TAB_WRAPPER: "tab-wrapper";
|
|
51
|
+
MOBILE_GRADIENT: "mobile-gradient";
|
|
52
|
+
CAROUSEL_WRAPPER: "carousel-wrapper";
|
|
53
|
+
CAROUSEL_LIST: "carousel-list";
|
|
30
54
|
};
|
|
31
55
|
export declare const TABS_DATA_TESTID: {
|
|
32
56
|
SUB_TAB_LIST: string;
|
|
@@ -37,10 +61,15 @@ export declare const TABS_DATA_TESTID: {
|
|
|
37
61
|
BUTTON_RIGHT: string;
|
|
38
62
|
BUTTON_LEFT: string;
|
|
39
63
|
};
|
|
40
|
-
ROOT: string;
|
|
41
|
-
TABS_CONTAINER: string;
|
|
42
64
|
TAB_BUTTON: string;
|
|
43
65
|
SUBTAB_BUTTON: string;
|
|
44
66
|
TAB_PANEL: string;
|
|
67
|
+
ROOT: string;
|
|
68
|
+
TABS_CONTAINER: string;
|
|
45
69
|
TABS_SWIPE_CARD: string;
|
|
70
|
+
TAB_BAR_CONTAINER: string;
|
|
71
|
+
TAB_WRAPPER: string;
|
|
72
|
+
MOBILE_GRADIENT: string;
|
|
73
|
+
CAROUSEL_WRAPPER: string;
|
|
74
|
+
CAROUSEL_LIST: string;
|
|
46
75
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { DSTabs, DSTabsWithSchema } from './DSTabs.js';
|
|
2
|
-
export type {
|
|
2
|
+
export type { DSTabsT } from './react-desc-prop-types.js';
|
|
3
|
+
export type { DSTabT } from './parts/DSTab/index.js';
|
|
3
4
|
export { TABS_SLOTS, TABS_DATA_TESTID, TABS_DATA_TESTID as DSTabsDatatestid, TAB_TYPES, TAB_TYPES as TabTypes, DSTabsName, } from './constants/index.js';
|
|
4
|
-
export { DSTab, DSTabWithSchema } from './
|
|
5
|
+
export { DSTab, DSTabWithSchema } from './parts/DSTab/index.js';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DSTabT } from './react-desc-prop-types.js';
|
|
2
2
|
declare const DSTab: {
|
|
3
3
|
(props: DSTabT.Props): import("react").ReactNode;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
declare const DSTabWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSTabT.Props>;
|
|
7
7
|
export { DSTab, DSTabWithSchema };
|
|
8
|
-
export default DSTab;
|