@autoguru/overdrive 4.43.0-next.6 → 4.43.0-next.8
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/components/Box/Box.stories.d.ts.map +1 -1
- package/dist/components/Box/Box.test.js +2 -1
- package/dist/components/Box/default.d.ts +2 -0
- package/dist/components/Box/default.d.ts.map +1 -0
- package/dist/components/Box/default.js +3 -0
- package/dist/components/Box/index.d.ts +1 -1
- package/dist/components/Box/index.d.ts.map +1 -1
- package/dist/components/Box/index.js +1 -1
- package/dist/components/Columns/Column.d.ts +1 -1
- package/dist/components/Columns/Column.d.ts.map +1 -1
- package/dist/components/Columns/Column.js +3 -1
- package/dist/components/DropDown/DropDown.stories.d.ts +1 -1
- package/dist/components/DropDown/DropDown.stories.d.ts.map +1 -1
- package/dist/components/Flyout/Flyout.d.ts +3 -2
- package/dist/components/Flyout/Flyout.d.ts.map +1 -1
- package/dist/components/Flyout/Flyout.stories.d.ts +2 -1
- package/dist/components/Flyout/Flyout.stories.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.d.ts +7 -8
- package/dist/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.js +38 -28
- package/dist/components/TextLink/default.d.ts +2 -0
- package/dist/components/TextLink/default.d.ts.map +1 -0
- package/dist/components/TextLink/default.js +3 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAgB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC;AAKlC,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAKF,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAgB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC;AAKlC,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAKF,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC"}
|
|
@@ -72,8 +72,9 @@ describe('Box', async () => {
|
|
|
72
72
|
await it('renders with odComponent and testId props', async () => {
|
|
73
73
|
await DataAttributes.run();
|
|
74
74
|
const boxElement = screen.getByText('The most basic box (or is it?)');
|
|
75
|
+
expect(boxElement).toHaveAttribute('id', 'so-basic');
|
|
75
76
|
expect(boxElement).toHaveAttribute('data-od-component', 'box-basic');
|
|
76
|
-
expect(boxElement).toHaveAttribute('data-test-id', '
|
|
77
|
+
expect(boxElement).toHaveAttribute('data-test-id', 'basically-perfect');
|
|
77
78
|
expect(boxElement).toHaveAttribute('data-custom-attribute', 'somewhat less basic');
|
|
78
79
|
});
|
|
79
80
|
await it('applies basic style props (padding)', () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
@@ -5,7 +5,7 @@ export interface ColumnProps extends styles.ColumnRecipeVariants {
|
|
|
5
5
|
width?: styles.SprinklesColumnWidthResponsive['flexBasis'];
|
|
6
6
|
}
|
|
7
7
|
export declare const Column: {
|
|
8
|
-
<E extends ElementType>({ children, grow, noShrink, order, ref, width, ...boxProps }: UseBoxProps<E> & ColumnProps): React.JSX.Element;
|
|
8
|
+
<E extends ElementType>({ alignSelf, children, grow, noShrink, order, ref, width, ...boxProps }: UseBoxProps<E> & ColumnProps): React.JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=Column.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Column.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAgB,KAAK,WAAW,EAAc,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEvD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAGvC,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,oBAAoB;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC,8BAA8B,CAAC,WAAW,CAAC,CAAC;CAC3D;AAQD,eAAO,MAAM,MAAM;KAAI,CAAC,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Column.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAgB,KAAK,WAAW,EAAc,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEvD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAGvC,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,oBAAoB;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC,8BAA8B,CAAC,WAAW,CAAC,CAAC;CAC3D;AAQD,eAAO,MAAM,MAAM;KAAI,CAAC,SAAS,WAAW,2EASzC,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW;;CA4C9B,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
const _excluded = ["children", "grow", "noShrink", "order", "ref", "width"];
|
|
5
|
+
const _excluded = ["alignSelf", "children", "grow", "noShrink", "order", "ref", "width"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { invariant } from '@autoguru/utilities';
|
|
@@ -13,6 +13,7 @@ import { ColumnContext } from "./Columns.js";
|
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export const Column = _ref => {
|
|
15
15
|
let {
|
|
16
|
+
alignSelf,
|
|
16
17
|
children,
|
|
17
18
|
grow = false,
|
|
18
19
|
noShrink = false,
|
|
@@ -44,6 +45,7 @@ export const Column = _ref => {
|
|
|
44
45
|
children: children
|
|
45
46
|
}));
|
|
46
47
|
return _jsx(Box, {
|
|
48
|
+
alignSelf: alignSelf,
|
|
47
49
|
as: isList ? 'li' : 'div',
|
|
48
50
|
order: order,
|
|
49
51
|
flexGrow: grow ? 1 : 0,
|
|
@@ -13,7 +13,7 @@ declare const meta: {
|
|
|
13
13
|
icon?: import("@autoguru/icons").IconType | undefined;
|
|
14
14
|
isOpen?: boolean | undefined;
|
|
15
15
|
onClick?: ComponentProps<typeof Button>["onClick"];
|
|
16
|
-
alignment
|
|
16
|
+
alignment?: import("..").EPositionerAlignment | undefined;
|
|
17
17
|
}>) => React.JSX.Element)[];
|
|
18
18
|
args: {
|
|
19
19
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDown.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/DropDown/DropDown.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAMnC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqCF,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE;;;;;;;CAoBjB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DropDown.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/DropDown/DropDown.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAMnC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqCF,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE;;;;;;;CAoBjB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAc7B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import { Positioner } from '../Positioner';
|
|
3
|
-
export declare const Flyout:
|
|
4
|
+
export declare const Flyout: ({ children, triggerRef, isOpen, alignment, triggerOffset, ...rest }: ComponentProps<typeof Positioner>) => React.JSX.Element;
|
|
4
5
|
export default Flyout;
|
|
5
6
|
//# sourceMappingURL=Flyout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flyout.d.ts","sourceRoot":"","sources":["../../../lib/components/Flyout/Flyout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Flyout.d.ts","sourceRoot":"","sources":["../../../lib/components/Flyout/Flyout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAM,MAAM,GAAI,qEAOpB,cAAc,CAAC,OAAO,UAAU,CAAC,sBAmBnC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
3
4
|
import { EAlignment } from '../Positioner/alignment';
|
|
4
5
|
import { Flyout } from '.';
|
|
5
6
|
declare const meta: {
|
|
6
7
|
title: string;
|
|
7
|
-
component:
|
|
8
|
+
component: ({ children, triggerRef, isOpen, alignment, triggerOffset, ...rest }: ComponentProps<typeof import("..").Positioner>) => React.JSX.Element;
|
|
8
9
|
argTypes: {
|
|
9
10
|
alignment: {
|
|
10
11
|
options: EAlignment[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flyout.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Flyout/Flyout.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Flyout.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Flyout/Flyout.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAU,MAAM,OAAO,CAAC;AAI/C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAE3B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;CAoBqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAqCrC,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAOpB,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
id?: string;
|
|
6
|
-
is?: ElementType | ReactElement;
|
|
1
|
+
import React, { type ElementType } from 'react';
|
|
2
|
+
import { type UseBoxProps } from '../Box';
|
|
3
|
+
export interface TabProps {
|
|
7
4
|
indication?: number;
|
|
8
5
|
}
|
|
9
|
-
export declare const Tab:
|
|
10
|
-
|
|
6
|
+
export declare const Tab: {
|
|
7
|
+
<E extends ElementType>({ as, children, id: incomingId, indication, ...tabProps }: UseBoxProps<E> & TabProps): React.JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
11
10
|
//# sourceMappingURL=Tab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tab.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAgB,KAAK,WAAW,EAAc,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAQlD,MAAM,WAAW,QAAQ;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,GAAG;KAAI,CAAC,SAAS,WAAW,6DAMtC,WAAW,CAAC,CAAC,CAAC,GAAG,QAAQ;;CAqE3B,CAAC"}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["as", "children", "id", "indication"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
8
|
import { invariant } from '@autoguru/utilities';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { cloneElement, createElement, forwardRef, isValidElement, useContext } from 'react';
|
|
7
|
-
import { boxStyles } from "../Box/index.js";
|
|
9
|
+
import React, { cloneElement, useContext } from 'react';
|
|
10
|
+
import { useBox } from "../Box/index.js";
|
|
8
11
|
import { Inline } from "../Inline/index.js";
|
|
9
12
|
import { Text, useTextStyles } from "../Text/index.js";
|
|
10
13
|
import * as styles from "./Tab.css.js";
|
|
11
14
|
import { TabListContext } from "./TabList.js";
|
|
12
15
|
import { TabsContext } from "./Tabs.js";
|
|
13
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
export const Tab =
|
|
17
|
+
export const Tab = _ref => {
|
|
15
18
|
let {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
as = 'button',
|
|
20
|
+
children,
|
|
21
|
+
id: incomingId,
|
|
22
|
+
indication
|
|
23
|
+
} = _ref,
|
|
24
|
+
tabProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
25
|
const tabsContext = useContext(TabsContext);
|
|
22
26
|
const tabListContext = useContext(TabListContext);
|
|
23
27
|
!(tabsContext !== null && tabListContext !== null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'This tab pane isnt nested beneath <Tabs /> or <TabPanes />>') : invariant(false) : void 0;
|
|
@@ -26,13 +30,14 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
26
30
|
} = tabsContext;
|
|
27
31
|
const isActive = tabsContext.activeIndex === tabListContext;
|
|
28
32
|
const controlsId = typeof incomingId === 'string' ? incomingId : `${tabsContext.id}-${tabListContext}-tab`;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
const {
|
|
34
|
+
Component,
|
|
35
|
+
componentProps,
|
|
36
|
+
reactElement
|
|
37
|
+
} = useBox(_objectSpread(_objectSpread({}, tabProps), {}, {
|
|
38
|
+
as: typeof as === 'string' ? as : 'button',
|
|
39
|
+
backgroundColour: 'transparent',
|
|
40
|
+
className: [useTextStyles({
|
|
36
41
|
noWrap: true,
|
|
37
42
|
size: '3',
|
|
38
43
|
fontWeight: 'bold',
|
|
@@ -40,17 +45,18 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
40
45
|
}), styles.styledTab({
|
|
41
46
|
appearance,
|
|
42
47
|
active: isActive
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'data-controls': controlsId,
|
|
47
|
-
tabIndex: isActive ? undefined : -1,
|
|
48
|
+
})],
|
|
49
|
+
display: 'inline-flex',
|
|
50
|
+
justifyContent: 'center',
|
|
48
51
|
onClick: () => {
|
|
49
52
|
var _tabsContext$onChange;
|
|
50
53
|
return (_tabsContext$onChange = tabsContext.onChange) === null || _tabsContext$onChange === void 0 ? void 0 : _tabsContext$onChange.call(tabsContext, tabListContext);
|
|
51
54
|
},
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
role: 'tab',
|
|
56
|
+
tabIndex: isActive ? undefined : -1,
|
|
57
|
+
'aria-selected': isActive ? 'true' : 'false',
|
|
58
|
+
'data-controls': controlsId
|
|
59
|
+
}));
|
|
54
60
|
const child = _jsxs(Inline, {
|
|
55
61
|
noWrap: true,
|
|
56
62
|
space: "2",
|
|
@@ -73,7 +79,11 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
73
79
|
children: indication
|
|
74
80
|
})]
|
|
75
81
|
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
if (reactElement) {
|
|
83
|
+
return cloneElement(reactElement, componentProps, child);
|
|
84
|
+
}
|
|
85
|
+
return _jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
86
|
+
children: child
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
89
|
+
Tab.displayName = 'Tab';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,IAAI,CAAC"}
|
package/package.json
CHANGED