@wonderflow/react-components 7.0.0 → 8.2.0
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/autocomplete/autocomplete-option.d.ts +0 -10
- package/dist/components/autocomplete/autocomplete-option.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete-option.js +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +5 -3
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.js +10 -11
- package/dist/components/container/container.d.ts +1 -1
- package/dist/components/container/container.d.ts.map +1 -1
- package/dist/components/container/container.module.css +1 -1
- package/dist/components/disclosure/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure/disclosure.js +2 -2
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +2 -2
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/menu/menu-item/menu-item.d.ts +5 -1
- package/dist/components/menu/menu-item/menu-item.d.ts.map +1 -1
- package/dist/components/menu/menu-item/menu-item.js +3 -3
- package/dist/components/menu/menu.d.ts +4 -0
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +5 -2
- package/dist/components/menu/menu.module.css +1 -1
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +2 -2
- package/dist/components/overlay-container/overlay-container.d.ts.map +1 -1
- package/dist/components/overlay-container/overlay-container.js +2 -2
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/slider/slider.module.css +1 -1
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +6 -6
- package/dist/components/tab/tab.d.ts +27 -26
- package/dist/components/tab/tab.d.ts.map +1 -1
- package/dist/components/tab/tab.js +15 -32
- package/dist/components/tab/tab.module.css +1 -1
- package/dist/components/tab/tabs-panel.d.ts +10 -0
- package/dist/components/tab/tabs-panel.d.ts.map +1 -0
- package/dist/components/tab/tabs-panel.js +5 -0
- package/dist/components/table/table-controls/toggle-columns.d.ts.map +1 -1
- package/dist/components/table/table-controls/toggle-columns.js +2 -2
- package/dist/components/table/table.d.ts +41 -51
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +64 -64
- package/dist/components/table/types.d.ts +2 -2
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/components/textfield/base-field/base-field.module.css +1 -1
- package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/toggle-button/toggle-button.js +4 -4
- package/package.json +15 -14
- package/dist/components/tab/primitive-tab.d.ts +0 -12
- package/dist/components/tab/primitive-tab.d.ts.map +0 -1
- package/dist/components/tab/primitive-tab.js +0 -51
- package/dist/components/tab/tab-item.d.ts +0 -23
- package/dist/components/tab/tab-item.d.ts.map +0 -1
- package/dist/components/tab/tab-item.js +0 -24
- package/dist/components/tab/tab-list.d.ts +0 -8
- package/dist/components/tab/tab-list.d.ts.map +0 -1
- package/dist/components/tab/tab-list.js +0 -11
- package/dist/components/tab/tab-panel.d.ts +0 -35
- package/dist/components/tab/tab-panel.d.ts.map +0 -1
- package/dist/components/tab/tab-panel.js +0 -16
- package/dist/components/tab/use-constant.d.ts +0 -2
- package/dist/components/tab/use-constant.d.ts.map +0 -1
- package/dist/components/tab/use-constant.js +0 -8
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useRef, forwardRef } from 'react';
|
|
3
|
-
import { useRovingTabIndex, useFocusEffect } from 'react-roving-tabindex';
|
|
4
|
-
import { domMax, LazyMotion, m } from 'framer-motion';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { Stack, Icon } from '../..';
|
|
7
|
-
import { useTabState } from './primitive-tab';
|
|
8
|
-
import styles from './tab.module.css';
|
|
9
|
-
/**
|
|
10
|
-
* Tab.Item
|
|
11
|
-
* Component
|
|
12
|
-
*/
|
|
13
|
-
export const TabItem = forwardRef(({ children, className, icon, id, ...otherProps }, forwardedRef) => {
|
|
14
|
-
const { onClick, isActive } = useTabState(children);
|
|
15
|
-
const internalRef = useRef(forwardedRef);
|
|
16
|
-
const [, focused, handleKeyDown, handleClick] = useRovingTabIndex(internalRef, false);
|
|
17
|
-
useFocusEffect(focused, internalRef);
|
|
18
|
-
const fireClick = useCallback(() => {
|
|
19
|
-
onClick();
|
|
20
|
-
handleClick();
|
|
21
|
-
}, [handleClick, onClick]);
|
|
22
|
-
return (_jsx(LazyMotion, { features: domMax, strict: true, children: _jsxs(Stack, { as: "button", direction: "row", vAlign: "center", hAlign: "start", fill: false, columnGap: 8, role: "tab", ref: internalRef, className: clsx(styles.TabItem, className), "aria-selected": isActive, onClick: fireClick, onKeyDown: handleKeyDown, onFocus: fireClick, type: "button", tabIndex: isActive ? 0 : -1, id: id, ...otherProps, children: [icon && _jsx(Icon, { source: icon, dimension: 16 }), children, isActive && (_jsx(m.span, { transition: { type: 'spring', duration: 0.4, bounce: 0 }, className: styles.Highlight, layoutId: id }))] }) }));
|
|
23
|
-
});
|
|
24
|
-
TabItem.displayName = 'Tab.Item';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare type TabListProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
/**
|
|
4
|
-
* Tab.List
|
|
5
|
-
* Component
|
|
6
|
-
*/
|
|
7
|
-
export declare const TabList: import("react").ForwardRefExoticComponent<TabListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
//# sourceMappingURL=tab-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab-list.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tab-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAE,MAAM,OAAO,CAAA;AAKlD,oBAAY,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AAEzD;;;GAGG;AACH,eAAO,MAAM,OAAO,yGAgBlB,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { RovingTabIndexProvider } from 'react-roving-tabindex';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import styles from './tab.module.css';
|
|
6
|
-
/**
|
|
7
|
-
* Tab.List
|
|
8
|
-
* Component
|
|
9
|
-
*/
|
|
10
|
-
export const TabList = forwardRef(({ children, className, ...otherProps }, forwardedRef) => (_jsx("div", { ref: forwardedRef, role: "tablist", tabIndex: -1, className: clsx(styles.TabList, className), ...otherProps, children: _jsx(RovingTabIndexProvider, { children: children }) })));
|
|
11
|
-
TabList.displayName = 'Tab.List';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { IconNames } from '@wonderflow/icons';
|
|
3
|
-
/**
|
|
4
|
-
* Tab.Panel
|
|
5
|
-
* Public api
|
|
6
|
-
*/
|
|
7
|
-
export declare type TabPanelProps = PropsWithChildren<PropsWithClass> & {
|
|
8
|
-
/**
|
|
9
|
-
* Set the tab panel name and accessible label
|
|
10
|
-
*/
|
|
11
|
-
label: ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Add an additional icon to the tab panel label, enforcing
|
|
14
|
-
* the meaning of the name and context.
|
|
15
|
-
*/
|
|
16
|
-
icon?: IconNames;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Tab.Panel
|
|
20
|
-
* Component
|
|
21
|
-
*/
|
|
22
|
-
export declare const TabPanel: import("react").ForwardRefExoticComponent<PropsWithClass & {
|
|
23
|
-
children?: ReactNode;
|
|
24
|
-
} & {
|
|
25
|
-
/**
|
|
26
|
-
* Set the tab panel name and accessible label
|
|
27
|
-
*/
|
|
28
|
-
label: ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Add an additional icon to the tab panel label, enforcing
|
|
31
|
-
* the meaning of the name and context.
|
|
32
|
-
*/
|
|
33
|
-
icon?: IconNames | undefined;
|
|
34
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
|
-
//# sourceMappingURL=tab-panel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab-panel.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tab-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,SAAS,EACV,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAK7C;;;GAGG;AACH,oBAAY,aAAa,GAAG,iBAAiB,CAAC,cAAc,CAAC,GAAG;IAC9D;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;IAfnB;;OAEG;WACI,SAAS;IAChB;;;OAGG;;kDA0BH,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { usePanelState } from './primitive-tab';
|
|
5
|
-
import styles from './tab.module.css';
|
|
6
|
-
/**
|
|
7
|
-
* Tab.Panel
|
|
8
|
-
* Component
|
|
9
|
-
*/
|
|
10
|
-
export const TabPanel = forwardRef(({ children, className, ...otherProps }, forwardedRef) => {
|
|
11
|
-
const isActive = usePanelState(children);
|
|
12
|
-
return isActive
|
|
13
|
-
? (_jsx("div", { ref: forwardedRef, tabIndex: 0, className: clsx(styles.TabPanel, className), ...otherProps, children: children }))
|
|
14
|
-
: null;
|
|
15
|
-
});
|
|
16
|
-
TabPanel.displayName = 'Tab.Panel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-constant.d.ts","sourceRoot":"","sources":["../../../src/components/tab/use-constant.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,EAAG,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQtD"}
|