@elliemae/ds-tabs 3.80.0-next.8 → 3.80.0-next.80
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 +12 -12
- package/dist/cjs/exported-related/DSTab.js.map +0 -7
- package/dist/esm/exported-related/DSTab.js.map +0 -7
|
@@ -67,7 +67,7 @@ const useTabs = (props) => {
|
|
|
67
67
|
}, [actualActiveTab]);
|
|
68
68
|
(0, import_react.useEffect)(() => {
|
|
69
69
|
if (activeTab === void 0) {
|
|
70
|
-
const firstAvailableTab = focusableTabsRef.current.find((el) => el.ariaDisabled !== "true");
|
|
70
|
+
const firstAvailableTab = focusableTabsRef.current.find((el) => el.ariaDisabled !== "true" && !el.disabled);
|
|
71
71
|
setInternalActiveTab(firstAvailableTab?.dataset.tabId || "");
|
|
72
72
|
}
|
|
73
73
|
}, [activeTab]);
|
|
@@ -110,8 +110,8 @@ const useTabs = (props) => {
|
|
|
110
110
|
}
|
|
111
111
|
if (data.target === "tabsList") {
|
|
112
112
|
const target = data.event.target;
|
|
113
|
-
const { dataset, ariaDisabled } = target;
|
|
114
|
-
if (dataset.tabId && ariaDisabled !== "true") {
|
|
113
|
+
const { dataset, ariaDisabled, disabled } = target;
|
|
114
|
+
if (dataset.tabId && ariaDisabled !== "true" && !disabled) {
|
|
115
115
|
if (isDSMobile && !fixedTabsHeaders && data.event) {
|
|
116
116
|
(0, import_helpers.centerTab)({ e: data.event, listRef: tabsListRef });
|
|
117
117
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useTabs.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React, { useRef, useState, useMemo, useEffect } from 'react';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { DSTabsDefaultProps } from '../react-desc-prop-types.js';\nimport type { DSTabsT
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA4D;AAC5D,8BAA6C;AAC7C,mCAAmC;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport React, { useRef, useState, useMemo, useEffect } from 'react';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { DSTabsDefaultProps } from '../react-desc-prop-types.js';\nimport type { DSTabsT } from '../react-desc-prop-types.js';\nimport type { DSTabT } from '../parts/DSTab/index.js';\nimport type { DSTabsInternalsT } from '../sharedTypes.js';\nimport { centerTab, shouldHaveLeftGradient, shouldHaveRightGradient } from '../utils/helpers.js';\n\nexport const useTabs = (props: DSTabsT.Props): DSTabsInternalsT.DSTabsUseTabsContextT => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSTabsT.InternalProps>(props, DSTabsDefaultProps);\n\n const { activeTab, children, onTabChange, isDSMobile, fixedTabsHeaders } = propsWithDefaults;\n\n const tabsRef = useRef<Record<number, HTMLButtonElement>>({});\n const tabsRefAsArray = useRef<HTMLButtonElement[]>([]);\n const focusableTabsRef = useRef<HTMLButtonElement[]>([]);\n const carouselOnlyListRef = useRef<HTMLDivElement | null>(null);\n const tabsListRef = useRef<HTMLDivElement | null>(null);\n const actualActiveTabRef = useRef<HTMLButtonElement | null>(null);\n\n // we can't activate disabled tabs, we search for the first activable tab\n const firstActivableTabId = useMemo(() => {\n const childrenArray = React.Children.toArray(children) as React.ReactElement<DSTabT.Props>[];\n const firstActivableTab = childrenArray.filter((tab) => tab.props.disabled !== true)[0];\n\n if (!firstActivableTab) return '';\n return firstActivableTab.props.tabId ?? '';\n }, [children]);\n\n const [internalActiveTab, setInternalActiveTab] = useState<string>(firstActivableTabId);\n const [focusedTabId, setFocusedTabId] = useState<string>(firstActivableTabId);\n\n useEffect(() => {\n if (activeTab !== undefined) {\n setFocusedTabId(activeTab);\n }\n }, [activeTab]);\n\n const actualActiveTab = useMemo(() => {\n if (activeTab !== undefined) return activeTab;\n return internalActiveTab;\n }, [activeTab, internalActiveTab]);\n\n useEffect(() => {\n actualActiveTabRef.current = focusableTabsRef.current.find((el) => el.dataset.tabId === actualActiveTab) ?? null;\n }, [actualActiveTab]);\n\n useEffect(() => {\n if (activeTab === undefined) {\n const firstAvailableTab = focusableTabsRef.current.find((el) => el.ariaDisabled !== 'true' && !el.disabled);\n setInternalActiveTab(firstAvailableTab?.dataset.tabId || '');\n }\n }, [activeTab]);\n\n const [mobileGradients, setMobileGradients] = useState<DSTabsInternalsT.MobileGradientsT>({\n left: false,\n right: false,\n });\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 = React.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 React.useLayoutEffect(() => {\n if (isDSMobile && !fixedTabsHeaders) {\n updateMobileGradients();\n }\n }, [updateMobileGradients, isDSMobile, fixedTabsHeaders, actualActiveTab]);\n\n // due to a bunch of reasons and the component being biting more than it can chew\n // optimizing renders to make the swipe-card work \"as expected\"(not animating on first render)\n // simply isn't feasible at this time.\n // how do we fix this anyway?\n // we track the first time a tab change triggered by the user happens\n // after the first user interaction we enable animations,\n // after that we give the animation handling control back to the swipe-card.\n const userDidChangeTabAtleastOnceRef = useRef(false);\n\n const handleOnTabChange = React.useCallback(\n (tabId: string, e?: React.MouseEvent) => {\n setInternalActiveTab(tabId);\n onTabChange(tabId, e);\n userDidChangeTabAtleastOnceRef.current = true;\n if (isDSMobile && !fixedTabsHeaders && e) {\n centerTab({ e, listRef: tabsListRef });\n }\n },\n [fixedTabsHeaders, isDSMobile, onTabChange, setInternalActiveTab, tabsListRef],\n );\n\n const globalClickHandler = React.useCallback(\n (data: DSTabsInternalsT.GlobalClickHandlerT): void => {\n if (data.target === 'panel') {\n // we need to allow the text selection in the panel\n // this enters on conflict with the SwipeableViews component\n if (propsWithDefaults.allowTextSelection) {\n data.event.stopPropagation();\n }\n }\n\n if (data.target === 'tabsList') {\n const target = data.event.target as HTMLButtonElement;\n const { dataset, ariaDisabled, disabled } = target;\n if (dataset.tabId && ariaDisabled !== 'true' && !disabled) {\n // handleOnTabChange(dataset.tabId, data.event);\n if (isDSMobile && !fixedTabsHeaders && data.event) {\n centerTab({ e: data.event, listRef: tabsListRef });\n }\n }\n }\n if (data.target === 'swipeableViews') {\n handleOnTabChange(data.tabId!);\n }\n if (data.target === 'tabItem' && data.tabId && !(data.event.currentTarget as HTMLButtonElement).disabled) {\n handleOnTabChange(data.tabId, data.event);\n }\n },\n [propsWithDefaults.allowTextSelection, handleOnTabChange, tabsListRef, fixedTabsHeaders, isDSMobile],\n );\n const ctx = useMemo(\n () => ({\n props: propsWithDefaults,\n tabsRef,\n focusableTabsRef,\n tabsListRef,\n tabsRefAsArray,\n setInternalActiveTab,\n actualActiveTab,\n actualActiveTabRef,\n carouselOnlyListRef,\n globalClickHandler,\n mobileGradients,\n updateMobileGradients,\n handleOnTabChange,\n userDidChangeTabAtleastOnceRef,\n firstActivableTabId,\n focusedTabId,\n setFocusedTabId,\n }),\n [\n propsWithDefaults,\n actualActiveTab,\n globalClickHandler,\n mobileGradients,\n updateMobileGradients,\n handleOnTabChange,\n userDidChangeTabAtleastOnceRef,\n firstActivableTabId,\n focusedTabId,\n ],\n );\n\n return ctx;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -29,6 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var constants_exports = {};
|
|
30
30
|
__export(constants_exports, {
|
|
31
31
|
DEFAULT_INDICATOR_STYLES: () => DEFAULT_INDICATOR_STYLES,
|
|
32
|
+
DSTABS_SLOTS: () => DSTABS_SLOTS,
|
|
33
|
+
DSTAB_SLOTS: () => DSTAB_SLOTS,
|
|
32
34
|
DSTabsName: () => DSTabsName,
|
|
33
35
|
GRADIENT_OFFSETS_ACCORDING_TYPE: () => GRADIENT_OFFSETS_ACCORDING_TYPE,
|
|
34
36
|
MOBILE_GRADIENT_WIDTH: () => MOBILE_GRADIENT_WIDTH,
|
|
@@ -68,8 +70,16 @@ const TABS_SLOTS = {
|
|
|
68
70
|
TAB_LIST: "tab-list",
|
|
69
71
|
CAROUSEL_BUTTON_RIGHT: "chevron-right",
|
|
70
72
|
CAROUSEL_BUTTON_LEFT: "chevron-left",
|
|
71
|
-
TABS_SWIPE_CARD: "tabs-swipe-card"
|
|
73
|
+
TABS_SWIPE_CARD: "tabs-swipe-card",
|
|
74
|
+
TAB_BAR_CONTAINER: "tab-bar-container",
|
|
75
|
+
TAB_WRAPPER: "tab-wrapper",
|
|
76
|
+
MOBILE_GRADIENT: "mobile-gradient",
|
|
77
|
+
CAROUSEL_WRAPPER: "carousel-wrapper",
|
|
78
|
+
CAROUSEL_LIST: "carousel-list"
|
|
72
79
|
};
|
|
80
|
+
const { TAB_BUTTON, SUBTAB_BUTTON, TAB_PANEL, ...DSTABS_LEVEL_SLOTS } = TABS_SLOTS;
|
|
81
|
+
const DSTAB_SLOTS = { TAB_BUTTON, SUBTAB_BUTTON, TAB_PANEL };
|
|
82
|
+
const DSTABS_SLOTS = DSTABS_LEVEL_SLOTS;
|
|
73
83
|
const TABS_DATA_TESTID = {
|
|
74
84
|
...(0, import_ds_system.slotObjectToDataTestIds)(DSTabsName, TABS_SLOTS),
|
|
75
85
|
SUB_TAB_LIST: "subtabs-list",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSTabsName = 'DSTabs';\n\nexport const TAB_TYPES = {\n NORMAL: 'normal' as const,\n NORMAL_SMALL: 'normal_small' as const,\n SUBTABS: 'subtabs' as const,\n};\n\nexport const TAB_TYPES_VALUES_AS_ARRAY = Object.values(TAB_TYPES);\n\nexport const MOBILE_GRADIENT_WIDTH = 24;\n\nexport const DEFAULT_INDICATOR_STYLES = {\n left: 0,\n width: 0,\n};\n\nexport const GRADIENT_OFFSETS_ACCORDING_TYPE = {\n NORMAL_SMALL: 14,\n NORMAL: 16,\n SUBTABS: 16,\n FIXED_TABS_HEADERS: 0,\n};\n\nexport const TABS_SLOTS = {\n ROOT: 'root',\n TABS_CONTAINER: 'container',\n TAB_BUTTON: 'tab-button',\n SUBTAB_BUTTON: 'subtab-button',\n TAB_PANEL: 'tab-panel',\n SUB_TAB_LIST: 'subtabs-list',\n TAB_LIST: 'tab-list',\n CAROUSEL_BUTTON_RIGHT: 'chevron-right',\n CAROUSEL_BUTTON_LEFT: 'chevron-left',\n TABS_SWIPE_CARD: 'tabs-swipe-card',\n} as const;\n\nexport const TABS_DATA_TESTID = {\n ...(slotObjectToDataTestIds(DSTabsName, TABS_SLOTS) as Record<keyof typeof TABS_SLOTS, string>),\n SUB_TAB_LIST: 'subtabs-list',\n TAB_LIST: 'tab-list',\n CAROUSEL_BUTTON_RIGHT: 'chevron-right',\n CAROUSEL_BUTTON_LEFT: 'chevron-left',\n CAROUSEL: {\n BUTTON_RIGHT: 'chevron-right',\n BUTTON_LEFT: 'chevron-left',\n },\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,aAAa;AAEnB,MAAM,YAAY;AAAA,EACvB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,SAAS;AACX;AAEO,MAAM,4BAA4B,OAAO,OAAO,SAAS;AAEzD,MAAM,wBAAwB;AAE9B,MAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,OAAO;AACT;AAEO,MAAM,kCAAkC;AAAA,EAC7C,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,oBAAoB;AACtB;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,WAAW;AAAA,EACX,cAAc;AAAA,EACd,UAAU;AAAA,EACV,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSTabsName = 'DSTabs';\n\nexport const TAB_TYPES = {\n NORMAL: 'normal' as const,\n NORMAL_SMALL: 'normal_small' as const,\n SUBTABS: 'subtabs' as const,\n};\n\nexport const TAB_TYPES_VALUES_AS_ARRAY = Object.values(TAB_TYPES);\n\nexport const MOBILE_GRADIENT_WIDTH = 24;\n\nexport const DEFAULT_INDICATOR_STYLES = {\n left: 0,\n width: 0,\n};\n\nexport const GRADIENT_OFFSETS_ACCORDING_TYPE = {\n NORMAL_SMALL: 14,\n NORMAL: 16,\n SUBTABS: 16,\n FIXED_TABS_HEADERS: 0,\n};\n\nexport const TABS_SLOTS = {\n ROOT: 'root',\n TABS_CONTAINER: 'container',\n TAB_BUTTON: 'tab-button',\n SUBTAB_BUTTON: 'subtab-button',\n TAB_PANEL: 'tab-panel',\n SUB_TAB_LIST: 'subtabs-list',\n TAB_LIST: 'tab-list',\n CAROUSEL_BUTTON_RIGHT: 'chevron-right',\n CAROUSEL_BUTTON_LEFT: 'chevron-left',\n TABS_SWIPE_CARD: 'tabs-swipe-card',\n TAB_BAR_CONTAINER: 'tab-bar-container',\n TAB_WRAPPER: 'tab-wrapper',\n MOBILE_GRADIENT: 'mobile-gradient',\n CAROUSEL_WRAPPER: 'carousel-wrapper',\n CAROUSEL_LIST: 'carousel-list',\n} as const;\n\n// the slots below are printed once per tab and their props are read from each DSTab (not from DSTabs):\n// `dsTabsTabButton`, `dsTabsSubtabButton` and `dsTabsTabPanel` only take effect when passed to a DSTab\nconst { TAB_BUTTON, SUBTAB_BUTTON, TAB_PANEL, ...DSTABS_LEVEL_SLOTS } = TABS_SLOTS;\nexport const DSTAB_SLOTS = { TAB_BUTTON, SUBTAB_BUTTON, TAB_PANEL } as const;\nexport const DSTABS_SLOTS = DSTABS_LEVEL_SLOTS;\n\nexport const TABS_DATA_TESTID = {\n ...(slotObjectToDataTestIds(DSTabsName, TABS_SLOTS) as Record<keyof typeof TABS_SLOTS, string>),\n SUB_TAB_LIST: 'subtabs-list',\n TAB_LIST: 'tab-list',\n CAROUSEL_BUTTON_RIGHT: 'chevron-right',\n CAROUSEL_BUTTON_LEFT: 'chevron-left',\n CAROUSEL: {\n BUTTON_RIGHT: 'chevron-right',\n BUTTON_LEFT: 'chevron-left',\n },\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,aAAa;AAEnB,MAAM,YAAY;AAAA,EACvB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,SAAS;AACX;AAEO,MAAM,4BAA4B,OAAO,OAAO,SAAS;AAEzD,MAAM,wBAAwB;AAE9B,MAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,OAAO;AACT;AAEO,MAAM,kCAAkC;AAAA,EAC7C,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,oBAAoB;AACtB;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,WAAW;AAAA,EACX,cAAc;AAAA,EACd,UAAU;AAAA,EACV,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,eAAe;AACjB;AAIA,MAAM,EAAE,YAAY,eAAe,WAAW,GAAG,mBAAmB,IAAI;AACjE,MAAM,cAAc,EAAE,YAAY,eAAe,UAAU;AAC3D,MAAM,eAAe;AAErB,MAAM,mBAAmB;AAAA,EAC9B,OAAI,0CAAwB,YAAY,UAAU;AAAA,EAClD,cAAc;AAAA,EACd,UAAU;AAAA,EACV,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,UAAU;AAAA,IACR,cAAc;AAAA,IACd,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -43,5 +43,5 @@ module.exports = __toCommonJS(index_exports);
|
|
|
43
43
|
var React = __toESM(require("react"));
|
|
44
44
|
var import_DSTabs = require("./DSTabs.js");
|
|
45
45
|
var import_constants = require("./constants/index.js");
|
|
46
|
-
var import_DSTab = require("./
|
|
46
|
+
var import_DSTab = require("./parts/DSTab/index.js");
|
|
47
47
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { DSTabs, DSTabsWithSchema } from './DSTabs.js';\nexport type {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAyC;
|
|
4
|
+
"sourcesContent": ["export { DSTabs, DSTabsWithSchema } from './DSTabs.js';\nexport type { DSTabsT } from './react-desc-prop-types.js';\nexport type { DSTabT } from './parts/DSTab/index.js';\nexport {\n TABS_SLOTS,\n TABS_DATA_TESTID,\n TABS_DATA_TESTID as DSTabsDatatestid,\n TAB_TYPES,\n TAB_TYPES as TabTypes,\n DSTabsName,\n} from './constants/index.js';\nexport { DSTab, DSTabWithSchema } from './parts/DSTab/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAyC;AAGzC,uBAOO;AACP,mBAAuC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -29,16 +29,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var DSTab_exports = {};
|
|
30
30
|
__export(DSTab_exports, {
|
|
31
31
|
DSTab: () => DSTab,
|
|
32
|
-
DSTabWithSchema: () => DSTabWithSchema
|
|
33
|
-
default: () => DSTab_default
|
|
32
|
+
DSTabWithSchema: () => DSTabWithSchema
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(DSTab_exports);
|
|
36
35
|
var React = __toESM(require("react"));
|
|
37
36
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
-
var import_react_desc_prop_types = require("
|
|
37
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
39
38
|
const DSTab = (props) => props.children;
|
|
40
39
|
DSTab.displayName = "DSTab";
|
|
41
40
|
const DSTabWithSchema = (0, import_ds_props_helpers.describe)(DSTab);
|
|
42
41
|
DSTabWithSchema.propTypes = import_react_desc_prop_types.DSTabPropTypes;
|
|
43
|
-
var DSTab_default = DSTab;
|
|
44
42
|
//# sourceMappingURL=DSTab.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSTab/DSTab.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { DSTabPropTypes, type DSTabT } from './react-desc-prop-types.js';\n\n// DSTab is a config-only component: it is never rendered by itself, DSTabs reads its props (and its slots props\n// through getOwnerProps) from the element and renders the tab button and the tab panel on its own\nconst DSTab = (props: DSTabT.Props) => props.children;\n\nDSTab.displayName = 'DSTab';\nconst DSTabWithSchema = describe(DSTab);\nDSTabWithSchema.propTypes = DSTabPropTypes as unknown as ValidationMap<DSTabT.Props>;\n\nexport { DSTab, DSTabWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA6C;AAC7C,mCAA4C;AAI5C,MAAM,QAAQ,CAAC,UAAwB,MAAM;AAE7C,MAAM,cAAc;AACpB,MAAM,sBAAkB,kCAAS,KAAK;AACtC,gBAAgB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 DSTab_exports = {};
|
|
30
|
+
__export(DSTab_exports, {
|
|
31
|
+
DSTab: () => import_DSTab.DSTab,
|
|
32
|
+
DSTabWithSchema: () => import_DSTab.DSTabWithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSTab_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_DSTab = require("./DSTab.js");
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSTab/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { DSTab, DSTabWithSchema } from './DSTab.js';\nexport type { DSTabT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAuC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSTabPropTypes: () => DSTabPropTypes
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
|
+
var import_constants = require("../../constants/index.js");
|
|
37
|
+
const DSTabPropTypes = {
|
|
38
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSTabsName, import_constants.DSTAB_SLOTS),
|
|
39
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
40
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
41
|
+
tabId: import_ds_props_helpers.PropTypes.string.description("Unique Tab id.").defaultValue(""),
|
|
42
|
+
title: import_ds_props_helpers.PropTypes.string.description("Tab title.").defaultValue(""),
|
|
43
|
+
required: import_ds_props_helpers.PropTypes.bool.description("Show a required mark next to the title.").defaultValue(false),
|
|
44
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Disables Tab.").defaultValue(false),
|
|
45
|
+
applyAriaDisabled: import_ds_props_helpers.PropTypes.bool.description(
|
|
46
|
+
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. IGNORES EVERY ACTION (click, Enter, Space) AND THE CONSUMER HANDLERS FOR THEM."
|
|
47
|
+
).defaultValue(false),
|
|
48
|
+
style: import_ds_props_helpers.PropTypes.object.description("Custom styles for the tab.").defaultValue({}),
|
|
49
|
+
RenderBadge: import_ds_props_helpers.PropTypes.node.description("Additional content rendered inside the tab button (e.g. badges, icons).").defaultValue(void 0),
|
|
50
|
+
ref: import_ds_props_helpers.PropTypes.shape({ current: import_ds_props_helpers.PropTypes.any }).description("Ref to the tab element.").defaultValue(void 0),
|
|
51
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("Click handler for the tab.").defaultValue(void 0),
|
|
52
|
+
onKeyDown: import_ds_props_helpers.PropTypes.func.description("Keydown handler for the tab.").defaultValue(void 0),
|
|
53
|
+
children: import_ds_props_helpers.PropTypes.node.description("Content of the tab.").isRequired
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSTab/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { DSPropTypesSchema } 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 { DSTAB_SLOTS, DSTabsName } from '../../constants/index.js';\n\nexport declare namespace DSTabT {\n export interface TabSlotArguments {\n tabId: string;\n }\n\n export interface TabPanelSlotArguments {\n panelId: string;\n }\n\n // the slots printed once per tab are customized from each DSTab, the function form receives which tab it is\n export type SlotFunctionArguments = {\n dsTabsTabButton: (args: TabSlotArguments) => object;\n dsTabsSubtabButton: (args: TabSlotArguments) => object;\n dsTabsTabPanel: (args: TabPanelSlotArguments) => object;\n };\n\n export interface DefaultProps {\n tabId: string;\n applyAriaDisabled: boolean;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSTabsName,\n typeof DSTAB_SLOTS\n > {\n style?: Record<string, unknown>;\n title?: string;\n required?: boolean;\n disabled?: boolean;\n RenderBadge?: React.ComponentType;\n ref?: React.MutableRefObject<HTMLButtonElement>;\n onClick?: (tabId: string | number, e: React.MouseEvent) => null | void;\n onKeyDown?: (e: React.KeyboardEvent) => null | void;\n }\n\n export interface RequiredProps {\n children: TypescriptHelpersT.ReactChildrenComplete;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n}\n\nexport const DSTabPropTypes: DSPropTypesSchema<DSTabT.Props> = {\n ...getPropsPerSlotPropTypes(DSTabsName, DSTAB_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n tabId: PropTypes.string.description('Unique Tab id.').defaultValue(''),\n title: PropTypes.string.description('Tab title.').defaultValue(''),\n required: PropTypes.bool.description('Show a required mark next to the title.').defaultValue(false),\n disabled: PropTypes.bool.description('Disables Tab.').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. IGNORES EVERY ACTION (click, Enter, Space) AND THE CONSUMER HANDLERS FOR THEM.',\n )\n .defaultValue(false),\n style: PropTypes.object.description('Custom styles for the tab.').defaultValue({}),\n RenderBadge: PropTypes.node\n .description('Additional content rendered inside the tab button (e.g. badges, icons).')\n .defaultValue(undefined),\n ref: PropTypes.shape({ current: PropTypes.any }).description('Ref to the tab element.').defaultValue(undefined),\n onClick: PropTypes.func.description('Click handler for the tab.').defaultValue(undefined),\n onKeyDown: PropTypes.func.description('Keydown handler for the tab.').defaultValue(undefined),\n children: PropTypes.node.description('Content of the tab.').isRequired,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAKO;AAEP,uBAAwC;AA4CjC,MAAM,iBAAkD;AAAA,EAC7D,OAAG,kDAAyB,6BAAY,4BAAW;AAAA,EACnD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,gBAAgB,EAAE,aAAa,EAAE;AAAA,EACrE,OAAO,kCAAU,OAAO,YAAY,YAAY,EAAE,aAAa,EAAE;AAAA,EACjE,UAAU,kCAAU,KAAK,YAAY,yCAAyC,EAAE,aAAa,KAAK;AAAA,EAClG,UAAU,kCAAU,KAAK,YAAY,eAAe,EAAE,aAAa,KAAK;AAAA,EACxE,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,OAAO,kCAAU,OAAO,YAAY,4BAA4B,EAAE,aAAa,CAAC,CAAC;AAAA,EACjF,aAAa,kCAAU,KACpB,YAAY,yEAAyE,EACrF,aAAa,MAAS;AAAA,EACzB,KAAK,kCAAU,MAAM,EAAE,SAAS,kCAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB,EAAE,aAAa,MAAS;AAAA,EAC9G,SAAS,kCAAU,KAAK,YAAY,4BAA4B,EAAE,aAAa,MAAS;AAAA,EACxF,WAAW,kCAAU,KAAK,YAAY,8BAA8B,EAAE,aAAa,MAAS;AAAA,EAC5F,UAAU,kCAAU,KAAK,YAAY,qBAAqB,EAAE;AAC9D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -30,7 +30,6 @@ var styles_exports = {};
|
|
|
30
30
|
__export(styles_exports, {
|
|
31
31
|
StyledCarouselBtnLeft: () => StyledCarouselBtnLeft,
|
|
32
32
|
StyledCarouselBtnRight: () => StyledCarouselBtnRight,
|
|
33
|
-
StyledCarouselButtonWrapper: () => StyledCarouselButtonWrapper,
|
|
34
33
|
StyledCarouselWrapper: () => StyledCarouselWrapper,
|
|
35
34
|
StyledChildrenWrap: () => StyledChildrenWrap
|
|
36
35
|
});
|
|
@@ -66,12 +65,12 @@ const StyledCarouselBtnRight = (0, import_ds_system.styled)(import_ds_button_v2.
|
|
|
66
65
|
})`
|
|
67
66
|
${baseCarouselButtonStyles}
|
|
68
67
|
`;
|
|
69
|
-
const StyledCarouselWrapper = import_ds_system.styled.
|
|
68
|
+
const StyledCarouselWrapper = (0, import_ds_system.styled)("span", { name: import_constants.DSTabsName, slot: import_constants.TABS_SLOTS.CAROUSEL_WRAPPER })`
|
|
70
69
|
position: relative;
|
|
71
70
|
width: 100%;
|
|
72
71
|
display: flex;
|
|
73
72
|
`;
|
|
74
|
-
const StyledChildrenWrap = import_ds_system.styled.
|
|
73
|
+
const StyledChildrenWrap = (0, import_ds_system.styled)("div", { name: import_constants.DSTabsName, slot: import_constants.TABS_SLOTS.CAROUSEL_LIST })`
|
|
75
74
|
display: flex;
|
|
76
75
|
flex-wrap: nowrap;
|
|
77
76
|
flex: 1;
|
|
@@ -83,17 +82,4 @@ const StyledChildrenWrap = import_ds_system.styled.div`
|
|
|
83
82
|
outline-offset: -2px;
|
|
84
83
|
}
|
|
85
84
|
`;
|
|
86
|
-
const StyledCarouselButtonWrapper = import_ds_system.styled.div`
|
|
87
|
-
max-width: 16px;
|
|
88
|
-
position: absolute;
|
|
89
|
-
z-index: 200;
|
|
90
|
-
${({ right }) => right ? "right: 0;" : `left: 0;`}
|
|
91
|
-
width: 16px;
|
|
92
|
-
height: ${({ tabType }) => tabType === import_constants.TAB_TYPES.NORMAL ? "32px" : "22px"};
|
|
93
|
-
padding-top: ${({ tabType }) => tabType === import_constants.TAB_TYPES.NORMAL ? "5px" : "0px"};
|
|
94
|
-
background: white;
|
|
95
|
-
${({ theme, tabType }) => tabType === import_constants.TAB_TYPES.NORMAL ? `
|
|
96
|
-
background: linear-gradient(to bottom, white 0px, white 30px, ${theme.colors.neutral[400]} 30px, ${theme.colors.neutral[400]} 31px, white 31px , white 32px );
|
|
97
|
-
` : ``};
|
|
98
|
-
`;
|
|
99
85
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/carousel/styles.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { css, styled } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import { css, styled } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\n\nimport { DSTabsName, TABS_SLOTS } from '../../constants/index.js';\n\nconst baseCarouselButtonStyles = css`\n margin: 0;\n min-width: ${({ theme }) => theme.space.xs};\n width: ${({ theme }) => theme.space.xs};\n\n &:hover:not(:disabled) {\n background-color: transparent;\n }\n background-color: transparent;\n border-radius: 0px;\n\n & .em-ds-icon svg {\n fill: ${({ theme }) => theme.colors.brand[600]};\n }\n`;\n\nexport const StyledCarouselBtnLeft = styled(DSButtonV2, {\n name: DSTabsName,\n slot: TABS_SLOTS.CAROUSEL_BUTTON_LEFT,\n})`\n ${baseCarouselButtonStyles}\n`;\n\nexport const StyledCarouselBtnRight = styled(DSButtonV2, {\n name: DSTabsName,\n slot: TABS_SLOTS.CAROUSEL_BUTTON_RIGHT,\n})`\n ${baseCarouselButtonStyles}\n`;\n\nexport const StyledCarouselWrapper = styled('span', { name: DSTabsName, slot: TABS_SLOTS.CAROUSEL_WRAPPER })`\n position: relative;\n width: 100%;\n display: flex;\n`;\n\nexport const StyledChildrenWrap = styled('div', { name: DSTabsName, slot: TABS_SLOTS.CAROUSEL_LIST })`\n display: flex;\n flex-wrap: nowrap;\n flex: 1;\n overflow-x: auto;\n scrollbar-gutter: stable;\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.colors.brand[700]};\n outline-offset: -2px;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA4B;AAC5B,0BAA2B;AAE3B,uBAAuC;AAEvC,MAAM,2BAA2B;AAAA;AAAA,eAElB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,EAAE;AAAA,WACjC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAS5B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAI3C,MAAM,4BAAwB,yBAAO,gCAAY;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,4BAAW;AACnB,CAAC;AAAA,IACG,wBAAwB;AAAA;AAGrB,MAAM,6BAAyB,yBAAO,gCAAY;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,4BAAW;AACnB,CAAC;AAAA,IACG,wBAAwB;AAAA;AAGrB,MAAM,4BAAwB,yBAAO,QAAQ,EAAE,MAAM,6BAAY,MAAM,4BAAW,iBAAiB,CAAC;AAAA;AAAA;AAAA;AAAA;AAMpG,MAAM,yBAAqB,yBAAO,OAAO,EAAE,MAAM,6BAAY,MAAM,4BAAW,cAAc,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAQ3E,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -84,7 +84,17 @@ const TabBar = () => {
|
|
|
84
84
|
globalClickHandler({ event: e, target: "tabsList" });
|
|
85
85
|
},
|
|
86
86
|
children: [
|
|
87
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
import_styles.StyledTabWrapper,
|
|
89
|
+
{
|
|
90
|
+
"data-testid": "tab-wrapper",
|
|
91
|
+
isDSMobile,
|
|
92
|
+
fixedTabsHeaders,
|
|
93
|
+
getOwnerProps,
|
|
94
|
+
getOwnerPropsArguments,
|
|
95
|
+
children: !isDSMobile && withCarousel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Carousel.Carousel, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TabBarItemRenderer.TabBarItemRenderer, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TabBarItemRenderer.TabBarItemRenderer, {})
|
|
96
|
+
}
|
|
97
|
+
),
|
|
88
98
|
isDSMobile && !fixedTabsHeaders && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
99
|
import_styles.StyledMobileGradient,
|
|
90
100
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/tabBar/TabBar.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* 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;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmCX;AAlCZ,mBAAkC;AAClC,8BAA8B;AAC9B,sBAAyB;AACzB,oBAAyF;AACzF,uBAA8B;AAE9B,uBAA4C;AAE5C,gCAAmC;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,QAAI,yBAAW,8BAAa;AAC5B,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,KAAK;AAErE,MAAI,SAAS,2BAAU,WAAW,CAAC,YAAY;AAC7C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa,kCAAiB;AAAA,QAC9B,MAAM,eAAe,SAAY;AAAA,QACjC,cAAY,eAAe,SAAY;AAAA,QACvC,UAAU;AAAA,QAET,yBACC,4CAAC,4BACC,sDAAC,gDAAmB,GACtB,IAEA,4CAAC,gDAAmB;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,kCAAiB;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": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmCX;AAlCZ,mBAAkC;AAClC,8BAA8B;AAC9B,sBAAyB;AACzB,oBAAyF;AACzF,uBAA8B;AAE9B,uBAA4C;AAE5C,gCAAmC;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,QAAI,yBAAW,8BAAa;AAC5B,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,KAAK;AAErE,MAAI,SAAS,2BAAU,WAAW,CAAC,YAAY;AAC7C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa,kCAAiB;AAAA,QAC9B,MAAM,eAAe,SAAY;AAAA,QACjC,cAAY,eAAe,SAAY;AAAA,QACvC,UAAU;AAAA,QAET,yBACC,4CAAC,4BACC,sDAAC,gDAAmB,GACtB,IAEA,4CAAC,gDAAmB;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,kCAAiB;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;AAAA,UAAC;AAAA;AAAA,YACC,eAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YAEC,WAAC,cAAc,eACd,4CAAC,4BACC,sDAAC,gDAAmB,GACtB,IAEA,4CAAC,gDAAmB;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": ["../../../../src/parts/tabBar/TabBarItemRenderer.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* 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": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": ["import_react", "React"]
|
|
7
7
|
}
|
|
@@ -28,9 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var styles_exports = {};
|
|
30
30
|
__export(styles_exports, {
|
|
31
|
-
ScreenReaderOnly: () => ScreenReaderOnly,
|
|
32
31
|
StyledMobileGradient: () => StyledMobileGradient,
|
|
33
|
-
StyledRequiredMark: () => StyledRequiredMark,
|
|
34
32
|
StyledSubTabButton: () => StyledSubTabButton,
|
|
35
33
|
StyledSubTabsList: () => StyledSubTabsList,
|
|
36
34
|
StyledTabButton: () => StyledTabButton,
|
|
@@ -42,7 +40,10 @@ var React = __toESM(require("react"));
|
|
|
42
40
|
var import_ds_system = require("@elliemae/ds-system");
|
|
43
41
|
var import_ds_tab_button = require("@elliemae/ds-tab-button");
|
|
44
42
|
var import_constants = require("../../constants/index.js");
|
|
45
|
-
const StyledMobileGradient = import_ds_system.styled
|
|
43
|
+
const StyledMobileGradient = (0, import_ds_system.styled)("div", {
|
|
44
|
+
name: import_constants.DSTabsName,
|
|
45
|
+
slot: import_constants.TABS_SLOTS.MOBILE_GRADIENT
|
|
46
|
+
}).attrs(({ left = 0, width = 0 }) => ({
|
|
46
47
|
style: { left: left - 10, maxWidth: width - left }
|
|
47
48
|
}))`
|
|
48
49
|
position: fixed;
|
|
@@ -61,7 +62,10 @@ const StyledMobileGradient = import_ds_system.styled.div.attrs(({ left = 0, widt
|
|
|
61
62
|
return "";
|
|
62
63
|
}};
|
|
63
64
|
`;
|
|
64
|
-
const StyledTabWrapper = import_ds_system.styled
|
|
65
|
+
const StyledTabWrapper = (0, import_ds_system.styled)("div", {
|
|
66
|
+
name: import_constants.DSTabsName,
|
|
67
|
+
slot: import_constants.TABS_SLOTS.TAB_WRAPPER
|
|
68
|
+
})`
|
|
65
69
|
display: flex;
|
|
66
70
|
flex: 1;
|
|
67
71
|
flex-wrap: nowrap;
|
|
@@ -124,22 +128,6 @@ const StyledTabList = (0, import_ds_system.styled)("div", { name: import_constan
|
|
|
124
128
|
overflow-x: hidden;
|
|
125
129
|
}`}` : ``}
|
|
126
130
|
`;
|
|
127
|
-
const StyledRequiredMark = import_ds_system.styled.span`
|
|
128
|
-
color: ${({ theme }) => theme.colors.danger[900]};
|
|
129
|
-
font-size: 6px;
|
|
130
|
-
margin-left: 2px;
|
|
131
|
-
position: absolute;
|
|
132
|
-
top: 5px;
|
|
133
|
-
`;
|
|
134
|
-
const ScreenReaderOnly = import_ds_system.styled.div`
|
|
135
|
-
clip: rect(0 0 0 0);
|
|
136
|
-
clip-path: inset(50%);
|
|
137
|
-
height: 1px;
|
|
138
|
-
overflow: hidden;
|
|
139
|
-
position: absolute;
|
|
140
|
-
white-space: nowrap;
|
|
141
|
-
width: 1px;
|
|
142
|
-
`;
|
|
143
131
|
const StyledTabButton = (0, import_ds_system.styled)(import_ds_tab_button.DSTabButton, {
|
|
144
132
|
name: import_constants.DSTabsName,
|
|
145
133
|
slot: import_constants.TABS_SLOTS.TAB_BUTTON
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/tabBar/styles.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -50,7 +50,7 @@ const TabsContent = () => {
|
|
|
50
50
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
51
51
|
import_styles.StyledTabsContainer,
|
|
52
52
|
{
|
|
53
|
-
...globalProps,
|
|
53
|
+
...(0, import_ds_props_helpers.omitLockAttributes)(globalProps),
|
|
54
54
|
...xstyledProps,
|
|
55
55
|
...containerProps,
|
|
56
56
|
innerRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/tabsContent/TabsContent.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useContext } from 'react';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BjB;AA/BN,mBAAkC;AAClC,8BAKO;AACP,wBAA2B;AAC3B,oBAAuB;AACvB,oBAA2D;AAC3D,uBAA8B;AAEvB,MAAM,cAAc,MAAmB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,gBAAgB,UAAU,oBAAoB,mBAAmB;AAAA,EAC5E,QAAI,yBAAW,8BAAa;AAE5B,QAAM,kBAAc,gDAAuB,KAAK;AAChD,QAAM,mBAAe,4CAAmB,KAAK;AAC7C,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,KAAK;AAErE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,OAAG,4CAAmB,WAAW;AAAA,MACjC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,qDAAC,uCAAsB,eAA8B,wBACnD;AAAA,sDAAC,wBAAO;AAAA,UACP,qBAAqB,4CAAC,sBAAmB,IAAK;AAAA,UAC9C,sBAAsB;AAAA,WACzB;AAAA,QACA,4CAAC,gCAAW;AAAA;AAAA;AAAA,EACd;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -39,7 +39,7 @@ const StyledTabsContainer = (0, import_ds_system.styled)("div", { name: import_c
|
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
`;
|
|
42
|
-
const StyledTabBarContainer = import_ds_system.styled.
|
|
42
|
+
const StyledTabBarContainer = (0, import_ds_system.styled)("div", { name: import_constants.DSTabsName, slot: import_constants.TABS_SLOTS.TAB_BAR_CONTAINER })`
|
|
43
43
|
display: flex;
|
|
44
44
|
flex: 0 0 auto;
|
|
45
45
|
overflow-x: hidden;
|