flikkui 0.1.0-beta.2 → 0.1.0-beta.3
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/charts/index.d.ts +2 -0
- package/dist/components/charts/shared/ChartLegend/ChartLegend.d.ts +7 -0
- package/dist/components/charts/shared/ChartLegend/ChartLegendContent.d.ts +7 -0
- package/dist/components/charts/shared/ChartLegend/index.d.ts +2 -0
- package/dist/components/core/AvatarGroup/AvatarGroup.animations.d.ts +1 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -0
- package/dist/components/core/Breadcrumbs/Breadcrumbs.js +8 -7
- package/dist/components/core/Button/Button.animations.d.ts +0 -12
- package/dist/components/core/Button/Button.animations.js +4 -19
- package/dist/components/core/Button/Button.js +40 -37
- package/dist/components/core/Button/Button.theme.d.ts +0 -4
- package/dist/components/core/Button/Button.theme.js +14 -9
- package/dist/components/core/Button/Button.types.d.ts +1 -1
- package/dist/components/core/Divider/Divider.types.d.ts +8 -2
- package/dist/components/core/Drawer/Drawer.types.d.ts +1 -1
- package/dist/components/core/Modal/Modal.types.d.ts +1 -1
- package/dist/components/core/Pagination/Pagination.types.d.ts +25 -13
- package/dist/components/core/Popover/Popover.animations.d.ts +34 -3
- package/dist/components/core/Popover/Popover.animations.js +19 -0
- package/dist/components/core/Popover/Popover.theme.js +2 -2
- package/dist/components/core/Popover/PopoverContent.js +5 -14
- package/dist/components/core/Segmented/Segmented.types.d.ts +17 -0
- package/dist/components/core/Tabs/Tabs.js +2 -8
- package/dist/components/core/Tabs/Tabs.theme.d.ts +8 -45
- package/dist/components/core/Tabs/Tabs.theme.js +14 -64
- package/dist/components/core/Tabs/Tabs.types.d.ts +4 -36
- package/dist/components/core/Tabs/TabsContent.js +3 -8
- package/dist/components/core/Tabs/TabsList.js +3 -10
- package/dist/components/core/Tabs/TabsTrigger.js +3 -15
- package/dist/components/core/Tabs/index.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.animations.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.theme.d.ts +0 -1
- package/dist/components/core/Tooltip/Tooltip.types.d.ts +15 -15
- package/dist/components/core/Tooltip/useTooltipPositioning.d.ts +12 -0
- package/dist/components/core/Tree/Tree.types.d.ts +8 -45
- package/dist/components/core/Tree/index.d.ts +1 -3
- package/dist/components/data-display/Table/Table.animations.d.ts +21 -0
- package/dist/components/data-display/Table/Table.types.d.ts +56 -13
- package/dist/components/data-display/Table/components/TableActionsMenu.d.ts +1 -1
- package/dist/components/data-display/Table/components/TableColumnManager/TableColumnManager.theme.d.ts +16 -0
- package/dist/components/data-display/Table/components/TablePagination/TablePagination.d.ts +17 -0
- package/dist/components/data-display/Table/components/TablePagination/TablePagination.types.d.ts +21 -0
- package/dist/components/data-display/Table/components/TablePagination/index.d.ts +2 -0
- package/dist/components/data-display/Table/index.d.ts +6 -3
- package/dist/components/feedback/Alert/Alert.types.d.ts +4 -0
- package/dist/components/feedback/ChatMessage/ChatMessage.types.d.ts +20 -14
- package/dist/components/feedback/Empty/Empty.theme.d.ts +4 -14
- package/dist/components/feedback/Empty/Empty.types.d.ts +8 -20
- package/dist/components/feedback/Empty/index.d.ts +2 -2
- package/dist/components/feedback/Notification/Notification.theme.d.ts +16 -1
- package/dist/components/feedback/Notification/Notification.types.d.ts +18 -40
- package/dist/components/feedback/Notification/index.d.ts +2 -2
- package/dist/components/feedback/Toast/Toast.animations.d.ts +31 -0
- package/dist/components/feedback/Toast/Toast.types.d.ts +1 -1
- package/dist/components/feedback/index.d.ts +3 -3
- package/dist/components/forms/Checkbox/Checkbox.js +10 -16
- package/dist/components/forms/Checkbox/Checkbox.theme.js +8 -6
- package/dist/components/forms/Checkbox/Checkbox.types.d.ts +13 -30
- package/dist/components/forms/FormLabel/FormLabel.d.ts +1 -2
- package/dist/components/forms/FormLabel/FormLabel.js +7 -14
- package/dist/components/forms/FormLabel/FormLabel.theme.d.ts +3 -4
- package/dist/components/forms/FormLabel/FormLabel.theme.js +6 -6
- package/dist/components/forms/FormLabel/FormLabel.types.d.ts +10 -18
- package/dist/components/forms/FormLabel/index.d.ts +3 -3
- package/dist/components/forms/Input/Input.d.ts +0 -1
- package/dist/components/forms/Input/Input.js +51 -85
- package/dist/components/forms/Input/Input.theme.d.ts +4 -4
- package/dist/components/forms/Input/Input.theme.js +26 -26
- package/dist/components/forms/Input/Input.types.d.ts +41 -64
- package/dist/components/forms/Input/index.d.ts +1 -1
- package/dist/components/forms/InputAddress/InputAddress.theme.d.ts +2 -2
- package/dist/components/forms/InputAddress/InputAddress.types.d.ts +3 -3
- package/dist/components/forms/InputCreditCard/InputCreditCard.theme.d.ts +3 -3
- package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +4 -4
- package/dist/components/forms/Radio/Radio.js +12 -18
- package/dist/components/forms/Radio/Radio.theme.d.ts +2 -18
- package/dist/components/forms/Radio/Radio.theme.js +10 -19
- package/dist/components/forms/Radio/Radio.types.d.ts +16 -32
- package/dist/components/forms/Select/Select.js +1 -9
- package/dist/components/forms/Signature/Signature.js +5 -4
- package/dist/components/forms/Signature/Signature.theme.js +1 -3
- package/dist/components/forms/Signature/Signature.types.d.ts +0 -4
- package/dist/components/layout/DragDrop/DragDrop.js +62 -0
- package/dist/components/layout/DragDrop/DragDrop.theme.js +8 -0
- package/dist/components/layout/Sortable/Sortable.animations.js +81 -0
- package/dist/components/layout/Sortable/Sortable.js +165 -0
- package/dist/components/layout/Sortable/Sortable.theme.js +7 -0
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/Bars3Icon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/LockClosedIcon.js +28 -0
- package/dist/styles.css +1 -1
- package/dist/utils/debounce.d.ts +9 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -1
- package/dist/components/core/Popover/test-popover.d.ts +0 -3
- package/dist/components/core/Tabs/test-tabs.d.ts +0 -3
- package/dist/components/core/Tree/TreeIcon.d.ts +0 -3
- package/dist/components/core/Tree/TreeNode.d.ts +0 -6
- package/dist/components/forms/Input/Input.AdvancedStories.d.ts +0 -13
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.js +0 -80
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.js +0 -41
|
@@ -1,52 +1,15 @@
|
|
|
1
|
-
import { TabsSize
|
|
1
|
+
import { TabsSize } from './Tabs.types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Clean theme structure for Tabs components
|
|
4
4
|
*/
|
|
5
|
-
interface TabsTheme {
|
|
5
|
+
export interface TabsTheme {
|
|
6
6
|
baseStyle: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
listStyle: string;
|
|
8
|
+
triggerStyle: string;
|
|
9
|
+
triggerSizes: Record<TabsSize, string>;
|
|
10
|
+
contentStyle: string;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
interface TabsListTheme {
|
|
14
|
-
baseStyle: string;
|
|
15
|
-
orientations: Record<TabsOrientation, string>;
|
|
16
|
-
sizes: Record<TabsSize, string>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Internal theme structure for the TabsTrigger component
|
|
20
|
-
*/
|
|
21
|
-
interface TabsTriggerTheme {
|
|
22
|
-
baseStyle: string;
|
|
23
|
-
orientations: Record<TabsOrientation, string>;
|
|
24
|
-
sizes: Record<TabsSize, string>;
|
|
25
|
-
selectedStyle: string;
|
|
26
|
-
unselectedStyle: string;
|
|
27
|
-
disabledStyle: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Internal theme structure for the TabsContent component
|
|
31
|
-
*/
|
|
32
|
-
interface TabsContentTheme {
|
|
33
|
-
baseStyle: string;
|
|
34
|
-
orientations: Record<TabsOrientation, string>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Default theme for the Tabs component
|
|
13
|
+
* Default theme for Tabs components - simplified and organized
|
|
38
14
|
*/
|
|
39
15
|
export declare const tabsTheme: TabsTheme;
|
|
40
|
-
/**
|
|
41
|
-
* Default theme for the TabsList component
|
|
42
|
-
*/
|
|
43
|
-
export declare const tabsListTheme: TabsListTheme;
|
|
44
|
-
/**
|
|
45
|
-
* Default theme for the TabsTrigger component
|
|
46
|
-
*/
|
|
47
|
-
export declare const tabsTriggerTheme: TabsTriggerTheme;
|
|
48
|
-
/**
|
|
49
|
-
* Default theme for the TabsContent component
|
|
50
|
-
*/
|
|
51
|
-
export declare const tabsContentTheme: TabsContentTheme;
|
|
52
|
-
export {};
|
|
@@ -1,70 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Default theme for
|
|
2
|
+
* Default theme for Tabs components - simplified and organized
|
|
3
3
|
*/
|
|
4
4
|
var tabsTheme = {
|
|
5
|
-
//
|
|
6
|
-
baseStyle: "flex",
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Default theme for the TabsList component
|
|
17
|
-
*/
|
|
18
|
-
var tabsListTheme = {
|
|
19
|
-
// Base styles for the tabs list
|
|
20
|
-
baseStyle: "relative inline-flex items-center justify-center",
|
|
21
|
-
// Orientation variants
|
|
22
|
-
orientations: {
|
|
23
|
-
horizontal: "flex-row border-b border-neutral-200",
|
|
24
|
-
vertical: "flex-col border-r border-neutral-200 justify-start items-end",
|
|
25
|
-
},
|
|
26
|
-
// Size variants using CSS variables
|
|
27
|
-
sizes: {
|
|
28
|
-
sm: "gap-1",
|
|
29
|
-
md: "gap-2",
|
|
30
|
-
lg: "gap-3",
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Default theme for the TabsTrigger component
|
|
35
|
-
*/
|
|
36
|
-
var tabsTriggerTheme = {
|
|
37
|
-
// Base styles for the tab trigger
|
|
38
|
-
baseStyle: "relative inline-flex items-center justify-center whitespace-nowrap font-semibold transition-all duration-200 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
39
|
-
// Orientation variants
|
|
40
|
-
orientations: {
|
|
41
|
-
horizontal: "border-b-2 border-transparent hover:border-neutral-300 data-[state=active]:border-primary-600 data-[state=active]:text-primary-600",
|
|
42
|
-
vertical: "border-r-2 border-transparent hover:border-neutral-300 data-[state=active]:border-primary-600 data-[state=active]:text-primary-600",
|
|
43
|
-
},
|
|
44
|
-
// Size variants
|
|
45
|
-
sizes: {
|
|
46
|
-
sm: "px-2 py-1.5 text-sm",
|
|
47
|
-
md: "px-2 py-2 text-sm",
|
|
48
|
-
lg: "px-2 py-3 text-base",
|
|
49
|
-
},
|
|
50
|
-
// Selected state
|
|
51
|
-
selectedStyle: "text-primary-600",
|
|
52
|
-
// Unselected state
|
|
53
|
-
unselectedStyle: "text-neutral-500 hover:text-neutral-900",
|
|
54
|
-
// Disabled state
|
|
55
|
-
disabledStyle: "opacity-50 cursor-not-allowed pointer-events-none",
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Default theme for the TabsContent component
|
|
59
|
-
*/
|
|
60
|
-
var tabsContentTheme = {
|
|
61
|
-
// Base styles for the tab content
|
|
62
|
-
baseStyle: "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2",
|
|
63
|
-
// Orientation variants
|
|
64
|
-
orientations: {
|
|
65
|
-
horizontal: "mt-4",
|
|
66
|
-
vertical: "ml-4",
|
|
5
|
+
// Container styles
|
|
6
|
+
baseStyle: "flex flex-col",
|
|
7
|
+
// TabsList styles
|
|
8
|
+
listStyle: "relative inline-flex items-center flex-row border-b border-border gap-2",
|
|
9
|
+
// TabsTrigger base styles with data-attribute state handling
|
|
10
|
+
triggerStyle: "relative inline-flex items-center justify-center whitespace-nowrap font-medium transition-all duration-300 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-base focus-visible:ring-offset-2 border-b-2 border-transparent hover:border-neutral-300 disabled:cursor-not-allowed disabled:opacity-50 text-text-muted hover:text-text-primary data-[state=active]:border-primary-base data-[state=active]:text-primary-base",
|
|
11
|
+
// TabsTrigger size variants
|
|
12
|
+
triggerSizes: {
|
|
13
|
+
sm: "px-2 py-1.5 text-sm gap-1",
|
|
14
|
+
md: "px-2 py-2 text-sm gap-2",
|
|
67
15
|
},
|
|
16
|
+
// TabsContent styles
|
|
17
|
+
contentStyle: "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-base focus-visible:ring-offset-2",
|
|
68
18
|
};
|
|
69
19
|
|
|
70
|
-
export {
|
|
20
|
+
export { tabsTheme };
|
|
@@ -2,36 +2,12 @@ import React from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* Size options for the Tabs component
|
|
4
4
|
*/
|
|
5
|
-
export type TabsSize = "sm" | "md"
|
|
5
|
+
export type TabsSize = "sm" | "md";
|
|
6
6
|
/**
|
|
7
7
|
* Orientation options for the Tabs component
|
|
8
|
+
* Note: Only horizontal orientation is supported
|
|
8
9
|
*/
|
|
9
|
-
export type TabsOrientation = "horizontal"
|
|
10
|
-
/**
|
|
11
|
-
* Theme overrides for Tabs components
|
|
12
|
-
*/
|
|
13
|
-
export interface TabsThemeOverrides {
|
|
14
|
-
baseStyle?: string;
|
|
15
|
-
orientations?: Partial<Record<TabsOrientation, string>>;
|
|
16
|
-
disabledStyle?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface TabsListThemeOverrides {
|
|
19
|
-
baseStyle?: string;
|
|
20
|
-
orientations?: Partial<Record<TabsOrientation, string>>;
|
|
21
|
-
sizes?: Partial<Record<TabsSize, string>>;
|
|
22
|
-
}
|
|
23
|
-
export interface TabsTriggerThemeOverrides {
|
|
24
|
-
baseStyle?: string;
|
|
25
|
-
orientations?: Partial<Record<TabsOrientation, string>>;
|
|
26
|
-
sizes?: Partial<Record<TabsSize, string>>;
|
|
27
|
-
selectedStyle?: string;
|
|
28
|
-
unselectedStyle?: string;
|
|
29
|
-
disabledStyle?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface TabsContentThemeOverrides {
|
|
32
|
-
baseStyle?: string;
|
|
33
|
-
orientations?: Partial<Record<TabsOrientation, string>>;
|
|
34
|
-
}
|
|
10
|
+
export type TabsOrientation = "horizontal";
|
|
35
11
|
/**
|
|
36
12
|
* Tabs component props
|
|
37
13
|
*/
|
|
@@ -42,7 +18,7 @@ export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
42
18
|
defaultValue?: string;
|
|
43
19
|
/** Function called when selection changes */
|
|
44
20
|
onValueChange?: (value: string) => void;
|
|
45
|
-
/** Orientation of the tabs */
|
|
21
|
+
/** Orientation of the tabs (always horizontal) */
|
|
46
22
|
orientation?: TabsOrientation;
|
|
47
23
|
/** Size of the tabs */
|
|
48
24
|
size?: TabsSize;
|
|
@@ -50,8 +26,6 @@ export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
50
26
|
disabled?: boolean;
|
|
51
27
|
/** Children components (TabsList, TabsContent) */
|
|
52
28
|
children?: React.ReactNode;
|
|
53
|
-
/** Theme overrides */
|
|
54
|
-
theme?: TabsThemeOverrides;
|
|
55
29
|
}
|
|
56
30
|
/**
|
|
57
31
|
* TabsList component props
|
|
@@ -59,8 +33,6 @@ export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
59
33
|
export interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
60
34
|
/** Children TabsTrigger components */
|
|
61
35
|
children?: React.ReactNode;
|
|
62
|
-
/** Theme overrides */
|
|
63
|
-
theme?: TabsListThemeOverrides;
|
|
64
36
|
}
|
|
65
37
|
/**
|
|
66
38
|
* TabsTrigger component props
|
|
@@ -72,8 +44,6 @@ export interface TabsTriggerProps extends React.HTMLAttributes<HTMLButtonElement
|
|
|
72
44
|
disabled?: boolean;
|
|
73
45
|
/** Children content */
|
|
74
46
|
children?: React.ReactNode;
|
|
75
|
-
/** Theme overrides */
|
|
76
|
-
theme?: TabsTriggerThemeOverrides;
|
|
77
47
|
}
|
|
78
48
|
/**
|
|
79
49
|
* TabsContent component props
|
|
@@ -85,8 +55,6 @@ export interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
85
55
|
forceMount?: boolean;
|
|
86
56
|
/** Children content */
|
|
87
57
|
children?: React.ReactNode;
|
|
88
|
-
/** Theme overrides */
|
|
89
|
-
theme?: TabsContentThemeOverrides;
|
|
90
58
|
}
|
|
91
59
|
/**
|
|
92
60
|
* Context value for Tabs compound components
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { cn } from '../../../utils/cn.js';
|
|
4
|
-
import {
|
|
4
|
+
import { tabsTheme } from './Tabs.theme.js';
|
|
5
5
|
import { useTabsContext } from './TabsContext.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* TabsContent component displays content panels for tabs
|
|
9
9
|
*/
|
|
10
10
|
var TabsContent = React__default.forwardRef(function (_a, ref) {
|
|
11
|
-
var value = _a.value, _b = _a.forceMount, forceMount = _b === void 0 ? false : _b, children = _a.children, className = _a.className,
|
|
11
|
+
var value = _a.value, _b = _a.forceMount, forceMount = _b === void 0 ? false : _b, children = _a.children, className = _a.className, props = __rest(_a, ["value", "forceMount", "children", "className"]);
|
|
12
12
|
var _c = useTabsContext(), selectedValue = _c.value, orientation = _c.orientation;
|
|
13
13
|
var isSelected = value === selectedValue;
|
|
14
14
|
var shouldRender = forceMount || isSelected;
|
|
15
|
-
// Merge theme overrides
|
|
16
|
-
var mergedTheme = {
|
|
17
|
-
baseStyle: (theme === null || theme === void 0 ? void 0 : theme.baseStyle) || tabsContentTheme.baseStyle,
|
|
18
|
-
orientations: __assign(__assign({}, tabsContentTheme.orientations), theme === null || theme === void 0 ? void 0 : theme.orientations),
|
|
19
|
-
};
|
|
20
15
|
if (!shouldRender) {
|
|
21
16
|
return null;
|
|
22
17
|
}
|
|
23
|
-
return (React__default.createElement("div", __assign({ ref: ref, role: "tabpanel", "aria-labelledby": "".concat(value, "-tab"), id: "".concat(value, "-content"), tabIndex: 0, hidden: !isSelected && !forceMount, className: cn(
|
|
18
|
+
return (React__default.createElement("div", __assign({ ref: ref, role: "tabpanel", "aria-labelledby": "".concat(value, "-tab"), id: "".concat(value, "-content"), tabIndex: 0, hidden: !isSelected && !forceMount, className: cn(tabsTheme.contentStyle, !isSelected && forceMount && "hidden", // Hide when not selected but force mounted
|
|
24
19
|
className // User overrides take precedence
|
|
25
20
|
), "data-state": isSelected ? "active" : "inactive", "data-orientation": orientation }, props), children));
|
|
26
21
|
});
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { cn } from '../../../utils/cn.js';
|
|
4
|
-
import {
|
|
4
|
+
import { tabsTheme } from './Tabs.theme.js';
|
|
5
5
|
import { useTabsContext } from './TabsContext.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* TabsList component displays the tab headers container
|
|
9
9
|
*/
|
|
10
10
|
var TabsList = React__default.forwardRef(function (_a, ref) {
|
|
11
|
-
var children = _a.children, className = _a.className,
|
|
11
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
12
12
|
var _b = useTabsContext(), orientation = _b.orientation, size = _b.size;
|
|
13
|
-
|
|
14
|
-
var mergedTheme = {
|
|
15
|
-
baseStyle: (theme === null || theme === void 0 ? void 0 : theme.baseStyle) || tabsListTheme.baseStyle,
|
|
16
|
-
orientations: __assign(__assign({}, tabsListTheme.orientations), theme === null || theme === void 0 ? void 0 : theme.orientations),
|
|
17
|
-
sizes: __assign(__assign({}, tabsListTheme.sizes), theme === null || theme === void 0 ? void 0 : theme.sizes),
|
|
18
|
-
};
|
|
19
|
-
return (React__default.createElement("div", __assign({ ref: ref, role: "tablist", "aria-orientation": orientation, className: cn(mergedTheme.baseStyle, mergedTheme.orientations[orientation], mergedTheme.sizes[size], className // User overrides take precedence
|
|
20
|
-
), "data-orientation": orientation, "data-size": size }, props), children));
|
|
13
|
+
return (React__default.createElement("div", __assign({ ref: ref, role: "tablist", "aria-orientation": orientation, className: cn(tabsTheme.listStyle, className), "data-orientation": orientation, "data-size": size }, props), children));
|
|
21
14
|
});
|
|
22
15
|
TabsList.displayName = "TabsList";
|
|
23
16
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { cn } from '../../../utils/cn.js';
|
|
4
|
-
import {
|
|
4
|
+
import { tabsTheme } from './Tabs.theme.js';
|
|
5
5
|
import { useTabsContext } from './TabsContext.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* TabsTrigger component displays individual tab headers
|
|
9
9
|
*/
|
|
10
10
|
var TabsTrigger = React__default.forwardRef(function (_a, ref) {
|
|
11
|
-
var value = _a.value, _b = _a.disabled, disabled = _b === void 0 ? false : _b, children = _a.children, className = _a.className,
|
|
11
|
+
var value = _a.value, _b = _a.disabled, disabled = _b === void 0 ? false : _b, children = _a.children, className = _a.className, onClick = _a.onClick, onKeyDown = _a.onKeyDown, props = __rest(_a, ["value", "disabled", "children", "className", "onClick", "onKeyDown"]);
|
|
12
12
|
var _c = useTabsContext(), selectedValue = _c.value, onValueChange = _c.onValueChange, orientation = _c.orientation, size = _c.size, contextDisabled = _c.disabled;
|
|
13
13
|
var isSelected = value === selectedValue;
|
|
14
14
|
var isDisabled = disabled || contextDisabled;
|
|
@@ -65,19 +65,7 @@ var TabsTrigger = React__default.forwardRef(function (_a, ref) {
|
|
|
65
65
|
}
|
|
66
66
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
67
67
|
};
|
|
68
|
-
|
|
69
|
-
var mergedTheme = {
|
|
70
|
-
baseStyle: (theme === null || theme === void 0 ? void 0 : theme.baseStyle) || tabsTriggerTheme.baseStyle,
|
|
71
|
-
orientations: __assign(__assign({}, tabsTriggerTheme.orientations), theme === null || theme === void 0 ? void 0 : theme.orientations),
|
|
72
|
-
sizes: __assign(__assign({}, tabsTriggerTheme.sizes), theme === null || theme === void 0 ? void 0 : theme.sizes),
|
|
73
|
-
selectedStyle: (theme === null || theme === void 0 ? void 0 : theme.selectedStyle) || tabsTriggerTheme.selectedStyle,
|
|
74
|
-
unselectedStyle: (theme === null || theme === void 0 ? void 0 : theme.unselectedStyle) || tabsTriggerTheme.unselectedStyle,
|
|
75
|
-
disabledStyle: (theme === null || theme === void 0 ? void 0 : theme.disabledStyle) || tabsTriggerTheme.disabledStyle,
|
|
76
|
-
};
|
|
77
|
-
return (React__default.createElement("button", __assign({ ref: ref, type: "button", role: "tab", "aria-selected": isSelected, "aria-controls": "".concat(value, "-content"), id: "".concat(value, "-tab"), tabIndex: isSelected ? 0 : -1, disabled: isDisabled, className: cn(mergedTheme.baseStyle, mergedTheme.orientations[orientation], mergedTheme.sizes[size], isSelected
|
|
78
|
-
? mergedTheme.selectedStyle
|
|
79
|
-
: mergedTheme.unselectedStyle, isDisabled && mergedTheme.disabledStyle, className // User overrides take precedence
|
|
80
|
-
), onClick: handleClick, onKeyDown: handleKeyDown, "data-value": value, "data-state": isSelected ? "active" : "inactive", "data-disabled": isDisabled, "data-orientation": orientation }, props), children));
|
|
68
|
+
return (React__default.createElement("button", __assign({ ref: ref, type: "button", role: "tab", "aria-selected": isSelected, "aria-controls": "".concat(value, "-content"), id: "".concat(value, "-tab"), tabIndex: isSelected ? 0 : -1, disabled: isDisabled, className: cn(tabsTheme.triggerStyle, tabsTheme.triggerSizes[size], className), onClick: handleClick, onKeyDown: handleKeyDown, "data-value": value, "data-state": isSelected ? "active" : "inactive", "data-disabled": isDisabled, "data-orientation": orientation }, props), children));
|
|
81
69
|
});
|
|
82
70
|
TabsTrigger.displayName = "TabsTrigger";
|
|
83
71
|
|
|
@@ -5,5 +5,5 @@ export { TabsList } from './TabsList';
|
|
|
5
5
|
export { TabsTrigger } from './TabsTrigger';
|
|
6
6
|
export { TabsContent } from './TabsContent';
|
|
7
7
|
export { TabsContext, useTabsContext };
|
|
8
|
-
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsSize, TabsOrientation, TabsContextValue
|
|
8
|
+
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsSize, TabsOrientation, TabsContextValue } from './Tabs.types';
|
|
9
9
|
export default Tabs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Variants } from 'motion/react';
|
|
2
2
|
import { TooltipPlacement } from './Tooltip.types';
|
|
3
3
|
/**
|
|
4
|
-
* Base animation variants for the tooltip
|
|
4
|
+
* Base animation variants for the tooltip - optimized for smooth positioning
|
|
5
5
|
*/
|
|
6
6
|
export declare const baseTooltipVariants: Variants;
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TooltipProps } from "./Tooltip.types";
|
|
3
3
|
declare const Tooltip: {
|
|
4
|
-
({ content, children, placement, delay, disabled, className, maxWidth, minWidth,
|
|
4
|
+
({ content, children, placement, delay, disabled, className, maxWidth, minWidth, showOnFocus, wrapText, id, theme: themeOverrides, "aria-label": ariaLabel, role, }: TooltipProps): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default Tooltip;
|
|
@@ -5,10 +5,6 @@ export interface TooltipThemeOverrides {
|
|
|
5
5
|
* Base style for the tooltip container
|
|
6
6
|
*/
|
|
7
7
|
baseStyle?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Style for the tooltip arrow
|
|
10
|
-
*/
|
|
11
|
-
arrow?: string;
|
|
12
8
|
/**
|
|
13
9
|
* Placement styles
|
|
14
10
|
*/
|
|
@@ -47,21 +43,16 @@ export interface TooltipProps {
|
|
|
47
43
|
className?: string;
|
|
48
44
|
/**
|
|
49
45
|
* Max width for the tooltip content
|
|
50
|
-
* @default "
|
|
46
|
+
* @default "360px"
|
|
51
47
|
*/
|
|
52
48
|
maxWidth?: string;
|
|
53
49
|
/**
|
|
54
50
|
* Min width for the tooltip content
|
|
55
|
-
* @default "
|
|
56
|
-
*/
|
|
57
|
-
minWidth?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Whether to show an arrow pointing to the trigger element
|
|
60
|
-
* @default true
|
|
51
|
+
* @default "fit-content"
|
|
61
52
|
*/
|
|
62
|
-
|
|
53
|
+
minWidth?: string | 'fit-content';
|
|
63
54
|
/**
|
|
64
|
-
* Whether the tooltip should be shown on focus
|
|
55
|
+
* Whether the tooltip should be shown on focus (improves keyboard accessibility)
|
|
65
56
|
* @default true
|
|
66
57
|
*/
|
|
67
58
|
showOnFocus?: boolean;
|
|
@@ -71,11 +62,20 @@ export interface TooltipProps {
|
|
|
71
62
|
*/
|
|
72
63
|
wrapText?: boolean;
|
|
73
64
|
/**
|
|
74
|
-
* ID to be applied to the tooltip element
|
|
65
|
+
* ID to be applied to the tooltip element (important for ARIA)
|
|
75
66
|
*/
|
|
76
67
|
id?: string;
|
|
77
68
|
/**
|
|
78
|
-
* Theme overrides
|
|
69
|
+
* Theme overrides following shadcn patterns
|
|
79
70
|
*/
|
|
80
71
|
theme?: TooltipThemeOverrides;
|
|
72
|
+
/**
|
|
73
|
+
* Custom ARIA label for the tooltip (enhances screen reader support)
|
|
74
|
+
*/
|
|
75
|
+
'aria-label'?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Role override for specific accessibility contexts
|
|
78
|
+
* @default "tooltip"
|
|
79
|
+
*/
|
|
80
|
+
role?: 'tooltip' | 'dialog' | 'region';
|
|
81
81
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Placement = 'top' | 'right' | 'bottom' | 'left';
|
|
2
|
+
interface UseTooltipPositioningProps {
|
|
3
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
4
|
+
triggerRef: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
placement: Placement;
|
|
6
|
+
isVisible: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const useTooltipPositioning: ({ tooltipRef, triggerRef, placement, isVisible, }: UseTooltipPositioningProps) => {
|
|
9
|
+
positionTooltip: () => void;
|
|
10
|
+
debouncedPositioning: () => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -24,6 +24,7 @@ export interface TreeTheme {
|
|
|
24
24
|
iconStyle: string;
|
|
25
25
|
expandIconStyle: string;
|
|
26
26
|
indentSize: string;
|
|
27
|
+
checkboxStyle: string;
|
|
27
28
|
}
|
|
28
29
|
export interface TreeThemeOverrides {
|
|
29
30
|
baseStyle?: string;
|
|
@@ -32,8 +33,9 @@ export interface TreeThemeOverrides {
|
|
|
32
33
|
iconStyle?: string;
|
|
33
34
|
expandIconStyle?: string;
|
|
34
35
|
indentSize?: string;
|
|
36
|
+
checkboxStyle?: string;
|
|
35
37
|
}
|
|
36
|
-
export interface TreeProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
export interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
37
39
|
/** Tree data structure */
|
|
38
40
|
data: TreeNode[];
|
|
39
41
|
/** Whether nodes can be selected */
|
|
@@ -46,12 +48,11 @@ export interface TreeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
46
48
|
defaultExpandedKeys?: string[];
|
|
47
49
|
/** Keys of nodes that are selected by default */
|
|
48
50
|
defaultSelectedKeys?: string[];
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onSelect?: (selectedKeys: string[], node: TreeNode) => void;
|
|
51
|
+
/** Enable hierarchical selection behavior
|
|
52
|
+
* @default automatically enabled when checkable=true, false otherwise */
|
|
53
|
+
hierarchicalSelection?: boolean;
|
|
54
|
+
/** Callback when selection changes */
|
|
55
|
+
onSelectionChange?: (selectedKeys: string[], node: TreeNode, indeterminateKeys?: string[]) => void;
|
|
55
56
|
/** Callback when a node is expanded/collapsed */
|
|
56
57
|
onExpand?: (expandedKeys: string[], node: TreeNode, expanded: boolean) => void;
|
|
57
58
|
/** Custom class name */
|
|
@@ -59,43 +60,5 @@ export interface TreeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
59
60
|
/** Theme overrides */
|
|
60
61
|
theme?: TreeThemeOverrides;
|
|
61
62
|
}
|
|
62
|
-
export interface TreeNodeProps extends HTMLAttributes<HTMLDivElement> {
|
|
63
|
-
/** Node data */
|
|
64
|
-
node: TreeNode;
|
|
65
|
-
/** Current nesting level */
|
|
66
|
-
level?: number;
|
|
67
|
-
/** Whether the node is expanded */
|
|
68
|
-
expanded?: boolean;
|
|
69
|
-
/** Whether the node is selected */
|
|
70
|
-
selected?: boolean;
|
|
71
|
-
/** Whether selection is enabled */
|
|
72
|
-
selectable?: boolean;
|
|
73
|
-
/** Whether checkboxes are shown */
|
|
74
|
-
checkable?: boolean;
|
|
75
|
-
/** Whether expand/collapse is enabled */
|
|
76
|
-
expandable?: boolean;
|
|
77
|
-
/** Click handler for the node */
|
|
78
|
-
onClick?: (node: TreeNode) => void;
|
|
79
|
-
/** Toggle expand/collapse handler */
|
|
80
|
-
onToggleExpand?: (node: TreeNode) => void;
|
|
81
|
-
/** Custom class name */
|
|
82
|
-
className?: string;
|
|
83
|
-
/** Theme overrides */
|
|
84
|
-
theme?: TreeThemeOverrides;
|
|
85
|
-
}
|
|
86
|
-
export interface TreeIconProps extends HTMLAttributes<HTMLSpanElement> {
|
|
87
|
-
/** Whether the node is expanded */
|
|
88
|
-
expanded?: boolean;
|
|
89
|
-
/** Whether the node has children */
|
|
90
|
-
hasChildren?: boolean;
|
|
91
|
-
/** Custom icon */
|
|
92
|
-
icon?: ReactNode;
|
|
93
|
-
/** Click handler */
|
|
94
|
-
onClick?: () => void;
|
|
95
|
-
/** Custom class name */
|
|
96
|
-
className?: string;
|
|
97
|
-
}
|
|
98
63
|
export interface TreeComponent extends ForwardRefExoticComponent<TreeProps & RefAttributes<HTMLDivElement>> {
|
|
99
|
-
Node: ForwardRefExoticComponent<TreeNodeProps & RefAttributes<HTMLDivElement>>;
|
|
100
|
-
Icon: ForwardRefExoticComponent<TreeIconProps & RefAttributes<HTMLSpanElement>>;
|
|
101
64
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { Tree } from './Tree';
|
|
2
|
-
export { TreeNode } from './
|
|
3
|
-
export { TreeIcon } from './TreeIcon';
|
|
4
|
-
export type { TreeProps, TreeNodeProps, TreeIconProps, TreeNode as TreeNodeType, TreeTheme, TreeThemeOverrides, TreeComponent, } from './Tree.types';
|
|
2
|
+
export type { TreeProps, TreeNode as TreeNodeType, TreeTheme, TreeThemeOverrides, TreeComponent, } from './Tree.types';
|
|
5
3
|
export { treeTheme } from './Tree.theme';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Variants } from "motion/react";
|
|
2
|
+
/**
|
|
3
|
+
* Get table row animation variants for row transitions (selection, expansion, etc.)
|
|
4
|
+
*/
|
|
5
|
+
export declare const getTableRowVariants: (shouldReduceMotion: boolean | null) => Variants | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Get table expanded row animation variants for row expansion
|
|
8
|
+
*/
|
|
9
|
+
export declare const getTableExpandedRowVariants: (shouldReduceMotion: boolean | null) => Variants | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Get table column manager slide animation variants
|
|
12
|
+
*/
|
|
13
|
+
export declare const getTableColumnManagerVariants: (shouldReduceMotion: boolean | null) => Variants | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Get table loading state animation variants
|
|
16
|
+
*/
|
|
17
|
+
export declare const getTableLoadingVariants: (shouldReduceMotion: boolean | null) => Variants | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Get table sort indicator animation variants
|
|
20
|
+
*/
|
|
21
|
+
export declare const getTableSortVariants: (shouldReduceMotion: boolean | null) => Variants | undefined;
|