flikkui 0.1.0-beta.4 → 0.1.0-beta.5
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/AreaChart/AreaChart.js +434 -0
- package/dist/components/charts/AreaChart/AreaChart.types.js +7 -0
- package/dist/components/charts/BarChart/BarChart.js +402 -0
- package/dist/components/charts/BarChart/BarChart.types.js +7 -0
- package/dist/components/charts/ChartContainer.js +38 -0
- package/dist/components/charts/Heatmap/Heatmap.js +153 -0
- package/dist/components/charts/Heatmap/HeatmapCell.js +100 -0
- package/dist/components/charts/Heatmap/HeatmapLegend.js +20 -0
- package/dist/components/charts/Heatmap/utils/heatmapUtils.js +174 -0
- package/dist/components/charts/LineChart/LineChart.js +396 -0
- package/dist/components/charts/LineChart/LineChart.types.js +7 -0
- package/dist/components/charts/hooks/useChartAccessibility.js +127 -0
- package/dist/components/charts/hooks/useChartTheme.js +86 -0
- package/dist/components/charts/hooks/useChartValidation.js +59 -0
- package/dist/components/charts/hooks/useTooltipPosition.js +292 -0
- package/dist/components/charts/shared/ChartAxis/XAxis.js +30 -0
- package/dist/components/charts/shared/ChartAxis/YAxis.js +97 -0
- package/dist/components/charts/shared/ChartCrosshair/ChartCrosshair.js +35 -0
- package/dist/components/charts/shared/ChartCrosshair/ChartCrosshair.theme.js +11 -0
- package/dist/components/charts/shared/ChartErrorBoundary/ChartErrorBoundary.js +66 -0
- package/dist/components/charts/shared/ChartGrid/HorizontalGrid.js +22 -0
- package/dist/components/charts/shared/ChartLegend/ChartLegend.js +30 -0
- package/dist/components/charts/shared/ChartLegend/ChartLegendContent.js +22 -0
- package/dist/components/charts/shared/ChartMarker/ChartMarker.js +25 -0
- package/dist/components/charts/shared/ChartMarker/ChartMarker.theme.js +9 -0
- package/dist/components/charts/shared/ChartText/ChartText.js +33 -0
- package/dist/components/charts/shared/ChartText/ChartText.theme.js +9 -0
- package/dist/components/charts/shared/ChartTooltip/ChartTooltip.js +62 -0
- package/dist/components/charts/theme/chart.theme.js +73 -0
- package/dist/components/charts/types/chart.types.js +29 -0
- package/dist/components/charts/utils/chart-validation.js +292 -0
- package/dist/components/charts/utils/color-utils.js +175 -0
- package/dist/components/core/Accordion/Accordion.animations.js +45 -0
- package/dist/components/core/Accordion/Accordion.js +52 -0
- package/dist/components/core/Accordion/Accordion.theme.js +8 -0
- package/dist/components/core/Accordion/AccordionContent.js +25 -0
- package/dist/components/core/Accordion/AccordionItem.js +56 -0
- package/dist/components/core/Accordion/AccordionTrigger.js +32 -0
- package/dist/components/core/Accordion/index.js +5 -0
- package/dist/components/core/Avatar/Avatar.js +94 -0
- package/dist/components/core/Avatar/Avatar.theme.js +25 -0
- package/dist/components/core/AvatarGroup/AvatarGroup.animations.js +79 -0
- package/dist/components/core/AvatarGroup/AvatarGroup.js +67 -0
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +23 -0
- package/dist/components/core/Badge/Badge.animations.js +109 -0
- package/dist/components/core/Badge/Badge.js +101 -0
- package/dist/components/core/Badge/Badge.theme.js +41 -0
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +8 -8
- package/dist/components/core/Button/Button.theme.js +5 -5
- package/dist/components/core/Card/Card.js +46 -0
- package/dist/components/core/Card/Card.theme.js +5 -0
- package/dist/components/core/Divider/Divider.js +21 -0
- package/dist/components/core/Divider/Divider.theme.js +19 -0
- package/dist/components/core/Pagination/Pagination.js +113 -0
- package/dist/components/core/Pagination/Pagination.theme.js +27 -0
- package/dist/components/core/Segmented/Segmented.js +69 -0
- package/dist/components/core/Segmented/Segmented.theme.js +40 -0
- package/dist/components/core/Segmented/SegmentedContext.js +8 -0
- package/dist/components/core/Segmented/SegmentedItem.js +30 -0
- package/dist/components/core/Stepper/Stepper.js +57 -0
- package/dist/components/core/Stepper/Stepper.theme.js +9 -0
- package/dist/components/core/Stepper/components/ConnectorLine.js +42 -0
- package/dist/components/core/Stepper/components/IconCircle.js +44 -0
- package/dist/components/core/Stepper/components/ProgressIndicator.js +12 -0
- package/dist/components/core/Stepper/components/StepContent.js +36 -0
- package/dist/components/core/Stepper/components/StepperItem.js +22 -0
- package/dist/components/core/Tabs/Tabs.theme.js +2 -2
- package/dist/components/core/Tooltip/Tooltip.animations.js +46 -0
- package/dist/components/core/Tooltip/Tooltip.js +85 -0
- package/dist/components/core/Tooltip/Tooltip.theme.js +11 -0
- package/dist/components/core/Tooltip/useTooltipPositioning.js +59 -0
- package/dist/components/core/Tree/Tree.animations.js +38 -0
- package/dist/components/core/Tree/Tree.js +177 -0
- package/dist/components/core/Tree/Tree.theme.js +11 -0
- package/dist/components/data-display/Table/Table.js +177 -0
- package/dist/components/data-display/Table/Table.theme.js +28 -0
- package/dist/components/data-display/Table/Table.utils.js +28 -0
- package/dist/components/data-display/Table/components/DeclarativeComponents.js +123 -0
- package/dist/components/data-display/Table/components/TableActions/TableActions.js +56 -0
- package/dist/components/data-display/Table/components/TableActions/TableActionsMenu.js +29 -0
- package/dist/components/data-display/Table/components/TableColumnManager/TableColumnManager.js +85 -0
- package/dist/components/data-display/Table/components/TableColumnManager/TableColumnManager.theme.js +21 -0
- package/dist/components/data-display/Table/components/TablePagination/TablePagination.js +51 -0
- package/dist/components/data-display/Table/components/TableSelectionHeader/TableSelectionHeader.js +29 -0
- package/dist/components/data-display/Table/components/core/TableBody.js +32 -0
- package/dist/components/data-display/Table/components/core/TableCell.js +47 -0
- package/dist/components/data-display/Table/components/core/TableHeader.js +77 -0
- package/dist/components/data-display/Table/components/core/TableRow.js +46 -0
- package/dist/components/data-display/Table/index.js +20 -0
- package/dist/components/feedback/Alert/Alert.js +36 -0
- package/dist/components/feedback/Alert/Alert.theme.js +17 -0
- package/dist/components/feedback/ChatMessage/ChatMessage.js +26 -0
- package/dist/components/feedback/ChatMessage/ChatMessage.theme.js +16 -0
- package/dist/components/feedback/Empty/Empty.js +26 -0
- package/dist/components/feedback/Empty/Empty.theme.js +13 -0
- package/dist/components/feedback/Notification/Notification.js +41 -0
- package/dist/components/feedback/Notification/Notification.theme.js +49 -0
- package/dist/components/feedback/Spinner/Spinner.theme.js +3 -3
- package/dist/components/feedback/Toast/Toast.animations.js +58 -0
- package/dist/components/feedback/Toast/Toast.js +67 -0
- package/dist/components/feedback/Toast/Toast.theme.js +18 -0
- package/dist/components/feedback/Toast/ToastProvider.js +73 -0
- package/dist/components/feedback/Toast/useToast.js +91 -0
- package/dist/components/forms/Checkbox/Checkbox.theme.js +1 -1
- package/dist/components/forms/FormLabel/FormLabel.theme.js +2 -2
- package/dist/components/forms/Input/Input.theme.js +4 -4
- package/dist/components/forms/Radio/Radio.theme.js +2 -2
- package/dist/components/forms/Select/Select.js +1 -1
- package/dist/components/forms/Select/Select.theme.js +5 -5
- package/dist/components/forms/Switch/Switch.theme.js +1 -1
- package/dist/components/forms/TimePicker/TimePicker.theme.js +19 -19
- package/dist/components/forms/forms.theme.js +8 -8
- package/dist/components/navigation/NavItem/NavItem.js +93 -0
- package/dist/components/navigation/NavItem/NavItem.theme.js +27 -0
- package/dist/components/navigation/Sidebar/Sidebar.js +28 -0
- package/dist/components/navigation/Sidebar/Sidebar.theme.js +16 -0
- package/dist/components/navigation/Sidebar/SidebarContent.js +12 -0
- package/dist/components/navigation/Sidebar/SidebarContext.js +38 -0
- package/dist/components/navigation/Sidebar/SidebarFooter.js +11 -0
- package/dist/components/navigation/Sidebar/SidebarHeader.js +22 -0
- package/dist/components/navigation/Sidebar/SidebarNav.js +11 -0
- package/dist/components/navigation/Sidebar/SidebarNavGroup.js +19 -0
- package/dist/components/navigation/Sidebar/SidebarToggle.js +26 -0
- package/dist/icons/core/TickIcon.js +3 -1
- package/dist/index.d.ts +29 -4
- package/dist/index.js +64 -4
- package/dist/node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js +26 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChevronDoubleLeftIcon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChevronDoubleRightIcon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChevronLeftIcon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/Cog6ToothIcon.js +32 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentIcon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/EllipsisVerticalIcon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/PlusIcon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/solid/esm/ArrowPathIcon.js +26 -0
- package/dist/node_modules/@heroicons/react/24/solid/esm/BellIcon.js +26 -0
- package/dist/node_modules/@heroicons/react/24/solid/esm/CheckCircleIcon.js +26 -0
- package/dist/node_modules/@heroicons/react/24/solid/esm/ExclamationTriangleIcon.js +26 -0
- package/dist/node_modules/@heroicons/react/24/solid/esm/InformationCircleIcon.js +26 -0
- package/dist/node_modules/@heroicons/react/24/solid/esm/XCircleIcon.js +26 -0
- package/dist/node_modules/@heroicons/react/24/solid/esm/XMarkIcon.js +26 -0
- package/dist/node_modules/tslib/tslib.es6.js +15 -1
- package/dist/utils/dateUtils.js +32 -0
- package/dist/utils/debounce.js +21 -0
- package/package.json +1 -1
- package/dist/styles.css +0 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { navItemTheme } from './NavItem.theme.js';
|
|
5
|
+
import { useSidebarContext } from '../Sidebar/SidebarContext.js';
|
|
6
|
+
import Tooltip from '../../core/Tooltip/Tooltip.js';
|
|
7
|
+
import '../../core/Tooltip/Tooltip.animations.js';
|
|
8
|
+
import { Badge } from '../../core/Badge/Badge.js';
|
|
9
|
+
import ForwardRef from '../../../node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js';
|
|
10
|
+
|
|
11
|
+
var NavItem = React__default.forwardRef(function (_a, ref) {
|
|
12
|
+
var _b, _c;
|
|
13
|
+
var children = _a.children, icon = _a.icon, badge = _a.badge, href = _a.href, onClick = _a.onClick, _d = _a.active, active = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.hasSubmenu, hasSubmenu = _f === void 0 ? false : _f, _g = _a.expanded, expanded = _g === void 0 ? false : _g, onToggleExpanded = _a.onToggleExpanded, _h = _a.level, level = _h === void 0 ? 0 : _h, _j = _a.showTooltipWhenCollapsed, showTooltipWhenCollapsed = _j === void 0 ? true : _j, className = _a.className, _k = _a.theme, customTheme = _k === void 0 ? {} : _k, props = __rest(_a, ["children", "icon", "badge", "href", "onClick", "active", "disabled", "hasSubmenu", "expanded", "onToggleExpanded", "level", "showTooltipWhenCollapsed", "className", "theme"]);
|
|
14
|
+
var sidebarContext = useSidebarContext();
|
|
15
|
+
var collapsed = (sidebarContext === null || sidebarContext === void 0 ? void 0 : sidebarContext.collapsed) || false;
|
|
16
|
+
var isInSidebar = sidebarContext;
|
|
17
|
+
var theme = __assign(__assign(__assign({}, navItemTheme), customTheme), { states: __assign(__assign({}, navItemTheme.states), customTheme.states), iconStates: __assign(__assign({}, navItemTheme.iconStates), customTheme.iconStates), levels: __assign(__assign({}, navItemTheme.levels), customTheme.levels), collapsed: __assign(__assign({}, navItemTheme.collapsed), customTheme.collapsed) });
|
|
18
|
+
// Handle click events
|
|
19
|
+
var handleClick = function (e) {
|
|
20
|
+
if (disabled) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (hasSubmenu && onToggleExpanded) {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
onToggleExpanded();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (onClick) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
onClick();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
// If href is provided, let the default navigation happen
|
|
35
|
+
};
|
|
36
|
+
// Determine active state
|
|
37
|
+
var isActive = active;
|
|
38
|
+
// Get state classes
|
|
39
|
+
var getStateClasses = function () {
|
|
40
|
+
if (disabled)
|
|
41
|
+
return theme.states.disabled;
|
|
42
|
+
if (isActive)
|
|
43
|
+
return theme.states.active;
|
|
44
|
+
return theme.states.default;
|
|
45
|
+
};
|
|
46
|
+
// Build container classes
|
|
47
|
+
var containerClasses = cn(theme.baseStyle, getStateClasses(), theme.levels[level], isInSidebar && collapsed && ((_b = theme.collapsed) === null || _b === void 0 ? void 0 : _b.container), className);
|
|
48
|
+
// Get icon state classes
|
|
49
|
+
var getIconStateClasses = function () {
|
|
50
|
+
var _a, _b, _c;
|
|
51
|
+
if (disabled)
|
|
52
|
+
return (_a = theme.iconStates) === null || _a === void 0 ? void 0 : _a.disabled;
|
|
53
|
+
if (isActive)
|
|
54
|
+
return (_b = theme.iconStates) === null || _b === void 0 ? void 0 : _b.active;
|
|
55
|
+
return (_c = theme.iconStates) === null || _c === void 0 ? void 0 : _c.default;
|
|
56
|
+
};
|
|
57
|
+
// Build icon classes
|
|
58
|
+
var iconClasses = cn(isInSidebar && collapsed ? (_c = theme.collapsed) === null || _c === void 0 ? void 0 : _c.icon : theme.icon, getIconStateClasses());
|
|
59
|
+
// Build text classes
|
|
60
|
+
var textClasses = cn(theme.text);
|
|
61
|
+
// Content component
|
|
62
|
+
var content = (React__default.createElement("div", __assign({ ref: ref, className: containerClasses, role: href ? "link" : "button", tabIndex: disabled ? -1 : 0, "aria-disabled": disabled, "aria-expanded": hasSubmenu ? expanded : undefined, "data-active": isActive, "data-disabled": disabled, "data-level": level, onClick: handleClick, onKeyDown: function (e) {
|
|
63
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
handleClick(e);
|
|
66
|
+
}
|
|
67
|
+
} }, props),
|
|
68
|
+
icon && (React__default.createElement("span", { className: cn("flex-shrink-0", !collapsed && "mr-3"), "aria-hidden": "true" }, React__default.cloneElement(icon, {
|
|
69
|
+
className: iconClasses
|
|
70
|
+
}))),
|
|
71
|
+
(!isInSidebar || !collapsed) && (React__default.createElement("span", { className: textClasses }, children)),
|
|
72
|
+
badge && (!isInSidebar || !collapsed) && (React__default.createElement(Badge, { variant: "secondary", size: "sm" }, badge)),
|
|
73
|
+
hasSubmenu && (!isInSidebar || !collapsed) && (React__default.createElement("span", { className: "ml-auto flex-shrink-0" },
|
|
74
|
+
React__default.createElement(ForwardRef, { className: cn("size-4 transition-transform duration-300", expanded && "rotate-180") }))),
|
|
75
|
+
isInSidebar && collapsed && (React__default.createElement("span", { className: "sr-only" }, children))));
|
|
76
|
+
// Wrap with link if href is provided
|
|
77
|
+
if (href && !disabled) {
|
|
78
|
+
var LinkContent = (React__default.createElement("a", { href: href, className: "block" }, content));
|
|
79
|
+
// Show tooltip in collapsed sidebar mode
|
|
80
|
+
if (isInSidebar && collapsed && showTooltipWhenCollapsed) {
|
|
81
|
+
return (React__default.createElement(Tooltip, { content: children, placement: "right" }, LinkContent));
|
|
82
|
+
}
|
|
83
|
+
return LinkContent;
|
|
84
|
+
}
|
|
85
|
+
// Show tooltip in collapsed sidebar mode
|
|
86
|
+
if (isInSidebar && collapsed && showTooltipWhenCollapsed) {
|
|
87
|
+
return (React__default.createElement(Tooltip, { content: children, placement: "right" }, content));
|
|
88
|
+
}
|
|
89
|
+
return content;
|
|
90
|
+
});
|
|
91
|
+
NavItem.displayName = "NavItem";
|
|
92
|
+
|
|
93
|
+
export { NavItem };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var navItemTheme = {
|
|
2
|
+
baseStyle: 'relative flex items-center cursor-pointer select-none transition-all duration-300 w-full rounded-lg px-3 py-2 text-base font-medium group',
|
|
3
|
+
icon: 'size-5 text-text-placeholder',
|
|
4
|
+
text: 'flex-1 min-w-0 truncate',
|
|
5
|
+
states: {
|
|
6
|
+
default: 'text-text-primary/80 hover:bg-gray-100 hover:text-text-primary',
|
|
7
|
+
active: 'bg-[var(--color-primary-50)] text-[var(--color-primary)] font-semibold',
|
|
8
|
+
disabled: 'text-text-placeholder cursor-not-allowed hover:bg-transparent hover:text-text-placeholder',
|
|
9
|
+
hover: 'hover:bg-gray-50',
|
|
10
|
+
},
|
|
11
|
+
iconStates: {
|
|
12
|
+
default: 'text-text-placeholder group-hover:text-text-primary',
|
|
13
|
+
active: 'text-[var(--color-primary)]',
|
|
14
|
+
disabled: 'text-text-placeholder/50',
|
|
15
|
+
},
|
|
16
|
+
levels: {
|
|
17
|
+
0: '',
|
|
18
|
+
1: 'ml-4',
|
|
19
|
+
2: 'ml-8',
|
|
20
|
+
},
|
|
21
|
+
collapsed: {
|
|
22
|
+
container: 'justify-center px-2',
|
|
23
|
+
icon: 'size-5',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { navItemTheme };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { sidebarTheme } from './Sidebar.theme.js';
|
|
5
|
+
import { useSidebarContext, SidebarProvider } from './SidebarContext.js';
|
|
6
|
+
|
|
7
|
+
var SidebarContainer = React__default.forwardRef(function (_a, ref) {
|
|
8
|
+
var _b, _c, _d;
|
|
9
|
+
var _e = _a.side, side = _e === void 0 ? 'left' : _e, _f = _a.variant, variant = _f === void 0 ? 'sidebar' : _f, width = _a.width, children = _a.children, className = _a.className, _g = _a.theme, customTheme = _g === void 0 ? {} : _g, props = __rest(_a, ["side", "variant", "width", "children", "className", "theme"]);
|
|
10
|
+
var context = useSidebarContext();
|
|
11
|
+
var collapsed = (_b = context === null || context === void 0 ? void 0 : context.collapsed) !== null && _b !== void 0 ? _b : false;
|
|
12
|
+
var theme = __assign(__assign(__assign({}, sidebarTheme), customTheme), { variants: __assign(__assign({}, sidebarTheme.variants), customTheme.variants), sides: __assign(__assign({}, sidebarTheme.sides), customTheme.sides) });
|
|
13
|
+
var sidebarClasses = cn(theme.baseStyle, theme.variants[variant], theme.sides[side], className);
|
|
14
|
+
var widthValue = collapsed
|
|
15
|
+
? ((width === null || width === void 0 ? void 0 : width.collapsed) || ((_c = context === null || context === void 0 ? void 0 : context.width) === null || _c === void 0 ? void 0 : _c.collapsed) || 80)
|
|
16
|
+
: ((width === null || width === void 0 ? void 0 : width.expanded) || ((_d = context === null || context === void 0 ? void 0 : context.width) === null || _d === void 0 ? void 0 : _d.expanded) || 280);
|
|
17
|
+
return (React__default.createElement("div", __assign({ ref: ref, className: sidebarClasses, "data-side": side, "data-variant": variant, "data-collapsed": collapsed, style: {
|
|
18
|
+
width: "".concat(widthValue, "px"),
|
|
19
|
+
} }, props), children));
|
|
20
|
+
});
|
|
21
|
+
var Sidebar = React__default.forwardRef(function (_a, ref) {
|
|
22
|
+
var _b = _a.side, side = _b === void 0 ? 'left' : _b, _c = _a.variant, variant = _c === void 0 ? 'sidebar' : _c, _d = _a.defaultCollapsed, defaultCollapsed = _d === void 0 ? false : _d, controlledCollapsed = _a.collapsed, onCollapsedChange = _a.onCollapsedChange, width = _a.width, children = _a.children, className = _a.className, _e = _a.theme, customTheme = _e === void 0 ? {} : _e, props = __rest(_a, ["side", "variant", "defaultCollapsed", "collapsed", "onCollapsedChange", "width", "children", "className", "theme"]);
|
|
23
|
+
return (React__default.createElement(SidebarProvider, { defaultCollapsed: defaultCollapsed, collapsed: controlledCollapsed, onCollapsedChange: onCollapsedChange, width: width, side: side, variant: variant },
|
|
24
|
+
React__default.createElement(SidebarContainer, __assign({ ref: ref, className: className, theme: customTheme, side: side, variant: variant, width: width }, props), children)));
|
|
25
|
+
});
|
|
26
|
+
Sidebar.displayName = 'Sidebar';
|
|
27
|
+
|
|
28
|
+
export { Sidebar };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var sidebarTheme = {
|
|
2
|
+
baseStyle: 'flex flex-col h-full bg-white border-r border-gray-200 overflow-hidden transition-all duration-300 ease-in-out',
|
|
3
|
+
variants: {
|
|
4
|
+
sidebar: 'relative',
|
|
5
|
+
floating: 'rounded-lg shadow-lg border border-gray-200',
|
|
6
|
+
inset: 'rounded-lg bg-gray-50 border border-gray-200',
|
|
7
|
+
},
|
|
8
|
+
sides: {
|
|
9
|
+
left: 'border-r',
|
|
10
|
+
right: 'border-l',
|
|
11
|
+
},
|
|
12
|
+
collapsed: 'w-20',
|
|
13
|
+
expanded: 'w-[280px]', // Using arbitrary value since 280px is not a standard Tailwind width
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { sidebarTheme };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
|
|
5
|
+
var SidebarContent = React__default.forwardRef(function (_a, ref) {
|
|
6
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
7
|
+
return (React__default.createElement("div", __assign({ ref: ref, className: cn('flex-1 flex flex-col min-h-0 overflow-hidden', className) }, props),
|
|
8
|
+
React__default.createElement("div", { className: "flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent" }, children)));
|
|
9
|
+
});
|
|
10
|
+
SidebarContent.displayName = 'SidebarContent';
|
|
11
|
+
|
|
12
|
+
export { SidebarContent };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React__default, { createContext, useContext, useState, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
var SidebarContext = createContext(null);
|
|
4
|
+
var useSidebarContext = function () {
|
|
5
|
+
var context = useContext(SidebarContext);
|
|
6
|
+
// Return null if not in sidebar context (allows NavItem to work elsewhere)
|
|
7
|
+
return context;
|
|
8
|
+
};
|
|
9
|
+
var SidebarProvider = function (_a) {
|
|
10
|
+
var children = _a.children, _b = _a.defaultCollapsed, defaultCollapsed = _b === void 0 ? false : _b, controlledCollapsed = _a.collapsed, onCollapsedChange = _a.onCollapsedChange, _c = _a.width, width = _c === void 0 ? {} : _c, _d = _a.side, side = _d === void 0 ? 'left' : _d, _e = _a.variant, variant = _e === void 0 ? 'sidebar' : _e;
|
|
11
|
+
var _f = useState(defaultCollapsed), internalCollapsed = _f[0], setInternalCollapsed = _f[1];
|
|
12
|
+
// Determine if component is controlled
|
|
13
|
+
var isControlled = controlledCollapsed !== undefined;
|
|
14
|
+
var collapsed = isControlled ? controlledCollapsed : internalCollapsed;
|
|
15
|
+
var setCollapsed = useCallback(function (newCollapsed) {
|
|
16
|
+
if (!isControlled) {
|
|
17
|
+
setInternalCollapsed(newCollapsed);
|
|
18
|
+
}
|
|
19
|
+
onCollapsedChange === null || onCollapsedChange === void 0 ? void 0 : onCollapsedChange(newCollapsed);
|
|
20
|
+
}, [isControlled, onCollapsedChange]);
|
|
21
|
+
var toggleCollapsed = useCallback(function () {
|
|
22
|
+
setCollapsed(!collapsed);
|
|
23
|
+
}, [collapsed, setCollapsed]);
|
|
24
|
+
var contextValue = {
|
|
25
|
+
collapsed: collapsed,
|
|
26
|
+
setCollapsed: setCollapsed,
|
|
27
|
+
toggleCollapsed: toggleCollapsed,
|
|
28
|
+
width: {
|
|
29
|
+
expanded: width.expanded || 280,
|
|
30
|
+
collapsed: width.collapsed || 80,
|
|
31
|
+
},
|
|
32
|
+
side: side,
|
|
33
|
+
variant: variant,
|
|
34
|
+
};
|
|
35
|
+
return (React__default.createElement(SidebarContext.Provider, { value: contextValue }, children));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { SidebarProvider, useSidebarContext };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
|
|
5
|
+
var SidebarFooter = React__default.forwardRef(function (_a, ref) {
|
|
6
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
7
|
+
return (React__default.createElement("div", __assign({ ref: ref, className: cn('flex-shrink-0 border-t border-gray-200 bg-white p-4', className) }, props), children));
|
|
8
|
+
});
|
|
9
|
+
SidebarFooter.displayName = 'SidebarFooter';
|
|
10
|
+
|
|
11
|
+
export { SidebarFooter };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { useSidebarContext } from './SidebarContext.js';
|
|
5
|
+
import { SidebarToggle } from './SidebarToggle.js';
|
|
6
|
+
|
|
7
|
+
var SidebarHeader = React__default.forwardRef(function (_a, ref) {
|
|
8
|
+
var logo = _a.logo, _b = _a.showToggle, showToggle = _b === void 0 ? true : _b, customToggle = _a.customToggle, children = _a.children, className = _a.className, props = __rest(_a, ["logo", "showToggle", "customToggle", "children", "className"]);
|
|
9
|
+
var sidebarContext = useSidebarContext();
|
|
10
|
+
var collapsed = (sidebarContext === null || sidebarContext === void 0 ? void 0 : sidebarContext.collapsed) || false;
|
|
11
|
+
// If children are provided, use them instead of default layout
|
|
12
|
+
if (children) {
|
|
13
|
+
return (React__default.createElement("div", __assign({ ref: ref, className: cn('flex-shrink-0 border-b border-gray-200 bg-white', className) }, props), children));
|
|
14
|
+
}
|
|
15
|
+
return (React__default.createElement("div", __assign({ ref: ref, className: cn('flex items-center justify-between flex-shrink-0 p-4 border-b border-gray-200 bg-white', className) }, props),
|
|
16
|
+
logo && (React__default.createElement("div", { className: cn('flex items-center min-w-0', collapsed && 'justify-center w-full') }, logo)),
|
|
17
|
+
showToggle && !collapsed && (React__default.createElement("div", { className: "flex-shrink-0 ml-4" }, customToggle || React__default.createElement(SidebarToggle, null))),
|
|
18
|
+
showToggle && collapsed && (React__default.createElement("div", { className: "absolute top-4 right-2" }, customToggle || React__default.createElement(SidebarToggle, null)))));
|
|
19
|
+
});
|
|
20
|
+
SidebarHeader.displayName = 'SidebarHeader';
|
|
21
|
+
|
|
22
|
+
export { SidebarHeader };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
|
|
5
|
+
var SidebarNav = React__default.forwardRef(function (_a, ref) {
|
|
6
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
7
|
+
return (React__default.createElement("nav", __assign({ ref: ref, className: cn('flex-1 space-y-1 p-4', className), role: "navigation" }, props), children));
|
|
8
|
+
});
|
|
9
|
+
SidebarNav.displayName = 'SidebarNav';
|
|
10
|
+
|
|
11
|
+
export { SidebarNav };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { useSidebarContext } from './SidebarContext.js';
|
|
5
|
+
|
|
6
|
+
var SidebarNavGroup = React__default.forwardRef(function (_a, ref) {
|
|
7
|
+
var title = _a.title, _b = _a.showTitleWhenCollapsed, showTitleWhenCollapsed = _b === void 0 ? false : _b, children = _a.children, className = _a.className, props = __rest(_a, ["title", "showTitleWhenCollapsed", "children", "className"]);
|
|
8
|
+
var sidebarContext = useSidebarContext();
|
|
9
|
+
var collapsed = (sidebarContext === null || sidebarContext === void 0 ? void 0 : sidebarContext.collapsed) || false;
|
|
10
|
+
var showTitle = title && (!collapsed || showTitleWhenCollapsed);
|
|
11
|
+
return (React__default.createElement("div", __assign({ ref: ref, className: cn('space-y-1', className) }, props),
|
|
12
|
+
showTitle && (React__default.createElement("div", { className: "px-3 py-2" },
|
|
13
|
+
React__default.createElement("h3", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, title))),
|
|
14
|
+
React__default.createElement("div", { className: "space-y-1" }, children),
|
|
15
|
+
React__default.createElement("div", { className: "pt-4" })));
|
|
16
|
+
});
|
|
17
|
+
SidebarNavGroup.displayName = 'SidebarNavGroup';
|
|
18
|
+
|
|
19
|
+
export { SidebarNavGroup };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { useSidebarContext } from './SidebarContext.js';
|
|
5
|
+
|
|
6
|
+
var SidebarToggle = React__default.forwardRef(function (_a, ref) {
|
|
7
|
+
var expandIcon = _a.expandIcon, collapseIcon = _a.collapseIcon, className = _a.className, onClick = _a.onClick, props = __rest(_a, ["expandIcon", "collapseIcon", "className", "onClick"]);
|
|
8
|
+
var sidebarContext = useSidebarContext();
|
|
9
|
+
if (!sidebarContext) {
|
|
10
|
+
console.warn('SidebarToggle must be used within a Sidebar component');
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
var collapsed = sidebarContext.collapsed, toggleCollapsed = sidebarContext.toggleCollapsed;
|
|
14
|
+
var handleClick = function (e) {
|
|
15
|
+
toggleCollapsed();
|
|
16
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
17
|
+
};
|
|
18
|
+
var defaultIcon = (React__default.createElement("svg", { className: "size-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
19
|
+
React__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" })));
|
|
20
|
+
return (React__default.createElement("button", __assign({ ref: ref, type: "button", className: cn('inline-flex items-center justify-center rounded-md p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 transition-colors', className), onClick: handleClick, "aria-label": collapsed ? 'Expand sidebar' : 'Collapse sidebar', title: collapsed ? 'Expand sidebar' : 'Collapse sidebar' }, props), collapsed
|
|
21
|
+
? (expandIcon || defaultIcon)
|
|
22
|
+
: (collapseIcon || defaultIcon)));
|
|
23
|
+
});
|
|
24
|
+
SidebarToggle.displayName = 'SidebarToggle';
|
|
25
|
+
|
|
26
|
+
export { SidebarToggle };
|
|
@@ -4,4 +4,6 @@ import { createIcon } from '../Icon.js';
|
|
|
4
4
|
|
|
5
5
|
var TickSvg = function (props) { return (React__default.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round" }, props),
|
|
6
6
|
React__default.createElement("path", { d: "M19 6L9 18L4.5 13.5" }))); };
|
|
7
|
-
createIcon(TickSvg, 'TickIcon');
|
|
7
|
+
var TickIcon = createIcon(TickSvg, 'TickIcon');
|
|
8
|
+
|
|
9
|
+
export { TickIcon };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,47 @@
|
|
|
1
1
|
export { default as Button } from './components/core/Button/Button';
|
|
2
2
|
export type { ButtonProps, ButtonVariant, ButtonSize, ButtonThemeOverrides } from './types/button.types';
|
|
3
|
+
export { Badge } from './components/core/Badge';
|
|
4
|
+
export type { BadgeProps, BadgeVariant, BadgeSize, BadgeThemeOverrides } from './components/core/Badge';
|
|
5
|
+
export { Avatar } from './components/core/Avatar';
|
|
6
|
+
export type { AvatarProps, AvatarSize, AvatarStatus } from './components/core/Avatar';
|
|
7
|
+
export { AvatarGroup } from './components/core/AvatarGroup';
|
|
8
|
+
export type { AvatarGroupProps, AvatarGroupSpacing, AvatarGroupDirection } from './components/core/AvatarGroup';
|
|
9
|
+
export { default as Accordion } from './components/core/Accordion';
|
|
10
|
+
export type { AccordionProps, AccordionItemProps, AccordionTriggerProps, AccordionContentProps, AccordionContextValue, AccordionItemContextValue, AccordionThemeOverrides } from './components/core/Accordion';
|
|
11
|
+
export { Segmented } from './components/core/Segmented';
|
|
12
|
+
export type { SegmentedProps, SegmentedItemProps, SegmentedSize } from './components/core/Segmented';
|
|
13
|
+
export { default as Stepper } from './components/core/Stepper';
|
|
14
|
+
export type { StepperProps, StepData } from './components/core/Stepper';
|
|
15
|
+
export { Tooltip } from './components/core/Tooltip';
|
|
16
|
+
export type { TooltipProps, TooltipPlacement, TooltipThemeOverrides } from './components/core/Tooltip';
|
|
17
|
+
export { Tree } from './components/core/Tree';
|
|
18
|
+
export type { TreeProps, TreeNodeType, TreeTheme, TreeThemeOverrides, TreeComponent } from './components/core/Tree';
|
|
19
|
+
export { Pagination } from './components/core/Pagination';
|
|
20
|
+
export type { PaginationProps, PaginationSize } from './components/core/Pagination';
|
|
21
|
+
export { Divider } from './components/core/Divider';
|
|
22
|
+
export type { DividerProps, DividerTheme, DividerThemeOverrides } from './components/core/Divider';
|
|
23
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './components/core/Card';
|
|
24
|
+
export type { CardProps, CardHeaderProps, CardTitleProps, CardDescriptionProps, CardContentProps, CardFooterProps, CardTheme, CardThemeOverrides } from './components/core/Card';
|
|
3
25
|
export { Modal } from './components/core/Modal';
|
|
4
26
|
export type { ModalProps, ModalSize, ModalThemeOverrides } from './components/core/Modal/Modal.types';
|
|
5
27
|
export { Drawer } from './components/core/Drawer';
|
|
6
28
|
export type { DrawerProps, DrawerPosition, DrawerSize, DrawerThemeOverrides } from './components/core/Drawer/Drawer.types';
|
|
7
29
|
export { default as Popover } from './components/core/Popover';
|
|
8
30
|
export type { PopoverProps, PopoverContentProps, PopoverTriggerProps, PopoverPlacement, PopoverTriggerType, PopoverThemeOverrides } from './components/core/Popover';
|
|
9
|
-
export { default as Tabs } from './components/core/Tabs';
|
|
10
|
-
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsSize, TabsOrientation,
|
|
31
|
+
export { default as Tabs, TabsList, TabsTrigger, TabsContent, TabsContext, useTabsContext } from './components/core/Tabs';
|
|
32
|
+
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsSize, TabsOrientation, TabsContextValue } from './components/core/Tabs';
|
|
11
33
|
export { default as Breadcrumbs } from './components/core/Breadcrumbs';
|
|
12
34
|
export type { BreadcrumbsProps, BreadcrumbItem, BreadcrumbsVariant, BreadcrumbsThemeOverrides } from './components/core/Breadcrumbs';
|
|
13
35
|
export { default as Carousel } from './components/core/Carousel';
|
|
14
36
|
export type { CarouselProps, CarouselSlideProps, CarouselControlsProps, CarouselControlButtonProps, SlideData, CarouselThemeOverrides } from './components/core/Carousel';
|
|
15
37
|
export { ProgressiveBlur } from './components/core/ProgressiveBlur';
|
|
16
38
|
export type { ProgressiveBlurProps, ProgressiveBlurPosition, ProgressiveBlurThemeOverrides, } from './components/core/ProgressiveBlur';
|
|
17
|
-
export
|
|
18
|
-
export
|
|
39
|
+
export * from './components/feedback';
|
|
40
|
+
export * from './components/charts';
|
|
41
|
+
export * from './components/navigation';
|
|
19
42
|
export { default as Masonry, masonryTheme, getMasonryTheme } from './components/data-display/Masonry';
|
|
20
43
|
export type { MasonryProps, MasonryThemeOverrides, MasonryTheme } from './components/data-display/Masonry';
|
|
44
|
+
export { Table, TableActions, TableActionsMenu, TablePagination } from './components/data-display/Table';
|
|
45
|
+
export type { TableProps, Column, SortConfig, FilterConfig, TableThemeOverrides, TableVariant, TableAlignment, SelectionType, TableHeaderProps, TableBodyProps, TableRowProps, TableCellProps, TableHeaderCellProps, BulkAction, ActionItem, ActionVariant, ActionPriority, TableActionsProps, TableActionsMenuProps, TablePaginationProps } from './components/data-display/Table';
|
|
21
46
|
export * from './components/layout';
|
|
22
47
|
export * from './components/forms';
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,77 @@
|
|
|
1
1
|
export { default as Button } from './components/core/Button/Button.js';
|
|
2
|
+
export { Badge } from './components/core/Badge/Badge.js';
|
|
3
|
+
export { Avatar } from './components/core/Avatar/Avatar.js';
|
|
4
|
+
export { AvatarGroup } from './components/core/AvatarGroup/AvatarGroup.js';
|
|
5
|
+
export { default as Accordion } from './components/core/Accordion/Accordion.js';
|
|
6
|
+
export { Segmented } from './components/core/Segmented/Segmented.js';
|
|
7
|
+
export { default as Stepper } from './components/core/Stepper/Stepper.js';
|
|
8
|
+
export { default as Tooltip } from './components/core/Tooltip/Tooltip.js';
|
|
9
|
+
import './components/core/Tooltip/Tooltip.animations.js';
|
|
10
|
+
export { Tree } from './components/core/Tree/Tree.js';
|
|
11
|
+
export { default as Pagination } from './components/core/Pagination/Pagination.js';
|
|
12
|
+
export { Divider } from './components/core/Divider/Divider.js';
|
|
13
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/core/Card/Card.js';
|
|
2
14
|
export { default as Modal } from './components/core/Modal/Modal.js';
|
|
3
15
|
export { default as Drawer } from './components/core/Drawer/Drawer.js';
|
|
4
16
|
export { default as Popover } from './components/core/Popover/Popover.js';
|
|
5
17
|
import './components/core/Popover/PopoverContext.js';
|
|
6
18
|
export { Tabs } from './components/core/Tabs/Tabs.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
19
|
+
export { TabsContext, useTabsContext } from './components/core/Tabs/TabsContext.js';
|
|
20
|
+
export { TabsList } from './components/core/Tabs/TabsList.js';
|
|
21
|
+
export { TabsTrigger } from './components/core/Tabs/TabsTrigger.js';
|
|
22
|
+
export { TabsContent } from './components/core/Tabs/TabsContent.js';
|
|
11
23
|
export { default as Breadcrumbs } from './components/core/Breadcrumbs/Breadcrumbs.js';
|
|
12
24
|
import './components/core/Breadcrumbs/Breadcrumbs.theme.js';
|
|
13
25
|
export { default as Carousel } from './components/core/Carousel/Carousel.js';
|
|
14
26
|
export { default as ProgressiveBlur } from './components/core/ProgressiveBlur/ProgressiveBlur.js';
|
|
27
|
+
export { Alert } from './components/feedback/Alert/Alert.js';
|
|
28
|
+
export { Toast } from './components/feedback/Toast/Toast.js';
|
|
29
|
+
export { ToastProvider, useToastContext } from './components/feedback/Toast/ToastProvider.js';
|
|
30
|
+
export { useToast } from './components/feedback/Toast/useToast.js';
|
|
31
|
+
export { Notification } from './components/feedback/Notification/Notification.js';
|
|
15
32
|
export { default as Spinner } from './components/feedback/Spinner/Spinner.js';
|
|
33
|
+
export { ChatMessage } from './components/feedback/ChatMessage/ChatMessage.js';
|
|
34
|
+
export { default as Empty } from './components/feedback/Empty/Empty.js';
|
|
35
|
+
export { ChartContainer } from './components/charts/ChartContainer.js';
|
|
36
|
+
export { BarChart } from './components/charts/BarChart/BarChart.js';
|
|
37
|
+
export { LineChart } from './components/charts/LineChart/LineChart.js';
|
|
38
|
+
export { AreaChart } from './components/charts/AreaChart/AreaChart.js';
|
|
39
|
+
export { Heatmap } from './components/charts/Heatmap/Heatmap.js';
|
|
40
|
+
import './node_modules/tslib/tslib.es6.js';
|
|
41
|
+
import 'react';
|
|
42
|
+
export { calculateIntensity, createGridMatrix, formatAxisLabel, generateSampleData, getDefaultTooltipContent, processHeatmapData } from './components/charts/Heatmap/utils/heatmapUtils.js';
|
|
43
|
+
export { ChartTooltip } from './components/charts/shared/ChartTooltip/ChartTooltip.js';
|
|
44
|
+
export { ChartLegend } from './components/charts/shared/ChartLegend/ChartLegend.js';
|
|
45
|
+
export { ChartLegendContent } from './components/charts/shared/ChartLegend/ChartLegendContent.js';
|
|
46
|
+
export { XAxis } from './components/charts/shared/ChartAxis/XAxis.js';
|
|
47
|
+
export { YAxis } from './components/charts/shared/ChartAxis/YAxis.js';
|
|
48
|
+
export { ChartText } from './components/charts/shared/ChartText/ChartText.js';
|
|
49
|
+
export { ChartMarker } from './components/charts/shared/ChartMarker/ChartMarker.js';
|
|
50
|
+
export { ChartCrosshair } from './components/charts/shared/ChartCrosshair/ChartCrosshair.js';
|
|
51
|
+
export { HorizontalGrid } from './components/charts/shared/ChartGrid/HorizontalGrid.js';
|
|
52
|
+
export { useChartTheme } from './components/charts/hooks/useChartTheme.js';
|
|
53
|
+
export { useTooltipPosition } from './components/charts/hooks/useTooltipPosition.js';
|
|
54
|
+
export { useChartAccessibility } from './components/charts/hooks/useChartAccessibility.js';
|
|
55
|
+
export { useChartValidation } from './components/charts/hooks/useChartValidation.js';
|
|
56
|
+
export { DEFAULT_CHART_COLORS, EXTENDED_CHART_COLORS, MINIMAL_CHART_COLORS, colorClassToVariable, combineClasses, createColorClass, extractFillClass, extractStrokeClass, generateColorPalette, generateSeriesColors, getContrastColor } from './components/charts/utils/color-utils.js';
|
|
57
|
+
export { chartTheme } from './components/charts/theme/chart.theme.js';
|
|
58
|
+
export { SafeMath, calculateSafeScaleRange, sanitizeChartData, validateChart, validateChartConfig, validateChartData } from './components/charts/utils/chart-validation.js';
|
|
59
|
+
export { BAR_CHART_DEFAULTS } from './components/charts/BarChart/BarChart.types.js';
|
|
60
|
+
export { LINE_CHART_DEFAULTS } from './components/charts/LineChart/LineChart.types.js';
|
|
61
|
+
export { AREA_CHART_DEFAULTS } from './components/charts/AreaChart/AreaChart.types.js';
|
|
62
|
+
export { ChartErrorBoundary } from './components/charts/shared/ChartErrorBoundary/ChartErrorBoundary.js';
|
|
63
|
+
export { NavItem } from './components/navigation/NavItem/NavItem.js';
|
|
64
|
+
export { Sidebar } from './components/navigation/Sidebar/Sidebar.js';
|
|
65
|
+
export { SidebarHeader } from './components/navigation/Sidebar/SidebarHeader.js';
|
|
66
|
+
export { SidebarContent } from './components/navigation/Sidebar/SidebarContent.js';
|
|
67
|
+
export { SidebarFooter } from './components/navigation/Sidebar/SidebarFooter.js';
|
|
68
|
+
export { SidebarNav } from './components/navigation/Sidebar/SidebarNav.js';
|
|
69
|
+
export { SidebarNavGroup } from './components/navigation/Sidebar/SidebarNavGroup.js';
|
|
70
|
+
export { SidebarToggle } from './components/navigation/Sidebar/SidebarToggle.js';
|
|
71
|
+
export { useSidebarContext } from './components/navigation/Sidebar/SidebarContext.js';
|
|
16
72
|
export { default as Masonry } from './components/data-display/Masonry/Masonry.js';
|
|
17
73
|
export { getMasonryTheme, masonryTheme } from './components/data-display/Masonry/Masonry.theme.js';
|
|
74
|
+
export { Table } from './components/data-display/Table/index.js';
|
|
18
75
|
export { Draggable, Droppable } from './components/layout/DragDrop/DragDrop.js';
|
|
19
76
|
export { Sortable, SortableItem } from './components/layout/Sortable/Sortable.js';
|
|
20
77
|
export { Input } from './components/forms/Input/Input.js';
|
|
@@ -40,3 +97,6 @@ export { default as timePickerTheme } from './components/forms/TimePicker/TimePi
|
|
|
40
97
|
export { timePickerAnimations } from './components/forms/TimePicker/TimePicker.animations.js';
|
|
41
98
|
export { Signature } from './components/forms/Signature/Signature.js';
|
|
42
99
|
export { formsBaseTheme } from './components/forms/forms.theme.js';
|
|
100
|
+
export { TableActions } from './components/data-display/Table/components/TableActions/TableActions.js';
|
|
101
|
+
export { TableActionsMenu } from './components/data-display/Table/components/TableActions/TableActionsMenu.js';
|
|
102
|
+
export { TablePagination } from './components/data-display/Table/components/TablePagination/TablePagination.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function ChevronDownIcon({
|
|
4
|
+
title,
|
|
5
|
+
titleId,
|
|
6
|
+
...props
|
|
7
|
+
}, svgRef) {
|
|
8
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
"data-slot": "icon",
|
|
14
|
+
ref: svgRef,
|
|
15
|
+
"aria-labelledby": titleId
|
|
16
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
17
|
+
id: titleId
|
|
18
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
21
|
+
clipRule: "evenodd"
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
const ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronDownIcon);
|
|
25
|
+
|
|
26
|
+
export { ForwardRef as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function ChevronDoubleLeftIcon({
|
|
4
|
+
title,
|
|
5
|
+
titleId,
|
|
6
|
+
...props
|
|
7
|
+
}, svgRef) {
|
|
8
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
fill: "none",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
strokeWidth: 1.5,
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
"data-slot": "icon",
|
|
16
|
+
ref: svgRef,
|
|
17
|
+
"aria-labelledby": titleId
|
|
18
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
19
|
+
id: titleId
|
|
20
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round",
|
|
23
|
+
d: "m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
const ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronDoubleLeftIcon);
|
|
27
|
+
|
|
28
|
+
export { ForwardRef as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function ChevronDoubleRightIcon({
|
|
4
|
+
title,
|
|
5
|
+
titleId,
|
|
6
|
+
...props
|
|
7
|
+
}, svgRef) {
|
|
8
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
fill: "none",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
strokeWidth: 1.5,
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
"data-slot": "icon",
|
|
16
|
+
ref: svgRef,
|
|
17
|
+
"aria-labelledby": titleId
|
|
18
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
19
|
+
id: titleId
|
|
20
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round",
|
|
23
|
+
d: "m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
const ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronDoubleRightIcon);
|
|
27
|
+
|
|
28
|
+
export { ForwardRef as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function ChevronLeftIcon({
|
|
4
|
+
title,
|
|
5
|
+
titleId,
|
|
6
|
+
...props
|
|
7
|
+
}, svgRef) {
|
|
8
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
fill: "none",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
strokeWidth: 1.5,
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
"data-slot": "icon",
|
|
16
|
+
ref: svgRef,
|
|
17
|
+
"aria-labelledby": titleId
|
|
18
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
19
|
+
id: titleId
|
|
20
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round",
|
|
23
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
const ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronLeftIcon);
|
|
27
|
+
|
|
28
|
+
export { ForwardRef as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function Cog6ToothIcon({
|
|
4
|
+
title,
|
|
5
|
+
titleId,
|
|
6
|
+
...props
|
|
7
|
+
}, svgRef) {
|
|
8
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
fill: "none",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
strokeWidth: 1.5,
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
"data-slot": "icon",
|
|
16
|
+
ref: svgRef,
|
|
17
|
+
"aria-labelledby": titleId
|
|
18
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
19
|
+
id: titleId
|
|
20
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round",
|
|
23
|
+
d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"
|
|
24
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25
|
+
strokeLinecap: "round",
|
|
26
|
+
strokeLinejoin: "round",
|
|
27
|
+
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
const ForwardRef = /*#__PURE__*/ React.forwardRef(Cog6ToothIcon);
|
|
31
|
+
|
|
32
|
+
export { ForwardRef as default };
|