@flikk/ui 1.0.0-beta.10 → 1.0.0-beta.11
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/ai/ApprovalCard/ApprovalCard.js +1 -0
- package/dist/components/ai/PromptInput/PromptInput.js +125 -7
- package/dist/components/ai/PromptInput/VoiceRecorder.js +77 -0
- package/dist/components/core/Accordion/Accordion.animations.d.ts +6 -1
- package/dist/components/core/Accordion/Accordion.animations.js +15 -1
- package/dist/components/core/Accordion/Accordion.theme.js +3 -3
- package/dist/components/core/Accordion/Accordion.types.d.ts +25 -0
- package/dist/components/core/Accordion/AccordionContent.js +1 -1
- package/dist/components/core/Accordion/AccordionTrigger.js +11 -6
- package/dist/components/core/Badge/Badge.theme.js +2 -2
- package/dist/components/core/Button/Button.js +21 -18
- package/dist/components/core/Button/Button.ripple.d.ts +5 -1
- package/dist/components/core/Button/Button.ripple.js +27 -17
- package/dist/components/core/Button/Button.theme.d.ts +1 -2
- package/dist/components/core/Button/Button.theme.js +6 -6
- package/dist/components/core/Button/index.d.ts +2 -0
- package/dist/components/core/Card/Card.theme.js +6 -6
- package/dist/components/core/Card/Card.types.d.ts +4 -9
- package/dist/components/core/Card/CardSubtitle.d.ts +1 -1
- package/dist/components/core/Card/CardTitle.d.ts +1 -1
- package/dist/components/core/Drawer/Drawer.js +1 -1
- package/dist/components/core/Drawer/Drawer.theme.d.ts +2 -0
- package/dist/components/core/Drawer/Drawer.theme.js +13 -11
- package/dist/components/core/Drawer/Drawer.types.d.ts +5 -5
- package/dist/components/core/Drawer/DrawerContent.js +1 -1
- package/dist/components/core/Drawer/DrawerHeader.js +1 -0
- package/dist/components/core/Drawer/DrawerTitle.js +1 -1
- package/dist/components/core/Drawer/index.d.ts +1 -1
- package/dist/components/core/Modal/ModalHeader.js +1 -0
- package/dist/components/core/index.js +1 -0
- package/dist/components/data-display/GanttChart/GanttToolbar.js +1 -0
- package/dist/components/data-display/Table/TableColumnManager.js +1 -0
- package/dist/components/data-display/Table/TableSelectionHeader.js +1 -1
- package/dist/components/forms/FileUpload/FileUpload.js +78 -0
- package/dist/components/forms/TimePicker/TimePickerContent.js +78 -1
- package/dist/components/forms/index.js +78 -0
- package/dist/components/layout/FormLayout/FormLayoutBody.js +79 -1
- package/dist/index.js +198 -191
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/global.scss +1 -1
- package/dist/components/core/Button/Button.animations.d.ts +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState, useRef, useCallback } from 'react';
|
|
1
|
+
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Custom hook for managing ripple effects on button clicks
|
|
@@ -21,6 +21,13 @@ function useRipple(config = {}) {
|
|
|
21
21
|
const { scale = 10, duration = 600, effect = 'default' } = config;
|
|
22
22
|
const [ripples, setRipples] = useState([]);
|
|
23
23
|
const buttonRef = useRef(null);
|
|
24
|
+
const timeoutsRef = useRef([]);
|
|
25
|
+
// Cleanup all pending timeouts on unmount
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
return () => {
|
|
28
|
+
timeoutsRef.current.forEach(clearTimeout);
|
|
29
|
+
};
|
|
30
|
+
}, []);
|
|
24
31
|
const createRipple = useCallback((event) => {
|
|
25
32
|
const button = buttonRef.current;
|
|
26
33
|
if (!button)
|
|
@@ -44,12 +51,14 @@ function useRipple(config = {}) {
|
|
|
44
51
|
maxDuration = 800; // Longest layer duration
|
|
45
52
|
break;
|
|
46
53
|
case 'particle':
|
|
47
|
-
// Multiple small ripples at random offsets
|
|
54
|
+
// Multiple small ripples at random offsets (random values stored for stable renders)
|
|
48
55
|
newRipples = Array.from({ length: 6 }, (_, i) => ({
|
|
49
56
|
id: baseId + i,
|
|
50
57
|
x: x + (Math.random() - 0.5) * 20,
|
|
51
58
|
y: y + (Math.random() - 0.5) * 20,
|
|
52
59
|
layer: i + 1,
|
|
60
|
+
randomScale: Math.random(),
|
|
61
|
+
randomDuration: Math.random(),
|
|
53
62
|
}));
|
|
54
63
|
maxDuration = 700;
|
|
55
64
|
break;
|
|
@@ -75,12 +84,11 @@ function useRipple(config = {}) {
|
|
|
75
84
|
newRipples = [{ id: baseId, x, y, layer: 1 }];
|
|
76
85
|
maxDuration = 800;
|
|
77
86
|
// Spawn echo ripples with delays
|
|
78
|
-
setTimeout(() => {
|
|
87
|
+
timeoutsRef.current.push(setTimeout(() => {
|
|
79
88
|
setRipples((prev) => [...prev, { id: baseId + 10, x, y, layer: 2 }]);
|
|
80
|
-
}, 100)
|
|
81
|
-
setTimeout(() => {
|
|
89
|
+
}, 100), setTimeout(() => {
|
|
82
90
|
setRipples((prev) => [...prev, { id: baseId + 20, x, y, layer: 3 }]);
|
|
83
|
-
}, 200);
|
|
91
|
+
}, 200));
|
|
84
92
|
break;
|
|
85
93
|
case 'default':
|
|
86
94
|
default:
|
|
@@ -91,9 +99,9 @@ function useRipple(config = {}) {
|
|
|
91
99
|
}
|
|
92
100
|
setRipples((prev) => [...prev, ...newRipples]);
|
|
93
101
|
// Auto-remove all ripples after longest animation completes
|
|
94
|
-
setTimeout(() => {
|
|
102
|
+
timeoutsRef.current.push(setTimeout(() => {
|
|
95
103
|
setRipples((prev) => prev.filter((r) => r.id < baseId || r.id > baseId + 30));
|
|
96
|
-
}, maxDuration);
|
|
104
|
+
}, maxDuration));
|
|
97
105
|
}, [duration, effect]);
|
|
98
106
|
return {
|
|
99
107
|
ripples,
|
|
@@ -124,8 +132,6 @@ function getRippleColorClass(variant, color) {
|
|
|
124
132
|
return "bg-[var(--color-danger)]/20";
|
|
125
133
|
case "neutral":
|
|
126
134
|
return "bg-[var(--color-neutral-500)]/20";
|
|
127
|
-
case "muted":
|
|
128
|
-
return "bg-[var(--color-text-muted)]/20";
|
|
129
135
|
default:
|
|
130
136
|
return "bg-[var(--color-primary)]/20";
|
|
131
137
|
}
|
|
@@ -133,7 +139,9 @@ function getRippleColorClass(variant, color) {
|
|
|
133
139
|
/**
|
|
134
140
|
* Get animation properties for specific ripple effect and layer
|
|
135
141
|
*/
|
|
136
|
-
function getRippleAnimation(effect,
|
|
142
|
+
function getRippleAnimation(effect, ripple, baseScale) {
|
|
143
|
+
var _a, _b, _c;
|
|
144
|
+
const layer = (_a = ripple.layer) !== null && _a !== void 0 ? _a : 1;
|
|
137
145
|
switch (effect) {
|
|
138
146
|
case 'aurora':
|
|
139
147
|
// Triple layer with different speeds and opacities
|
|
@@ -158,15 +166,17 @@ function getRippleAnimation(effect, layer, baseScale) {
|
|
|
158
166
|
transition: { duration: 0.8, ease: "easeOut" },
|
|
159
167
|
};
|
|
160
168
|
}
|
|
161
|
-
case 'particle':
|
|
162
|
-
//
|
|
163
|
-
const
|
|
164
|
-
const
|
|
169
|
+
case 'particle': {
|
|
170
|
+
// Use pre-computed random values from ripple creation for stable renders
|
|
171
|
+
const particleScale = baseScale * (0.7 + ((_b = ripple.randomScale) !== null && _b !== void 0 ? _b : 0.5) * 0.6);
|
|
172
|
+
const particleDelay = layer * 0.025;
|
|
173
|
+
const particleDuration = 0.5 + ((_c = ripple.randomDuration) !== null && _c !== void 0 ? _c : 0.5) * 0.2;
|
|
165
174
|
return {
|
|
166
175
|
initial: { scale: 0, opacity: 0.6 },
|
|
167
|
-
animate: { scale:
|
|
168
|
-
transition: { duration:
|
|
176
|
+
animate: { scale: particleScale, opacity: 0 },
|
|
177
|
+
transition: { duration: particleDuration, ease: "easeOut", delay: particleDelay },
|
|
169
178
|
};
|
|
179
|
+
}
|
|
170
180
|
case 'glass':
|
|
171
181
|
if (layer === 1) {
|
|
172
182
|
// Outer expanding ring
|
|
@@ -3,7 +3,7 @@ import { ButtonColor, ButtonVariant, ButtonSize, ButtonState } from "./Button.ty
|
|
|
3
3
|
* Theme structure for the Button component using variant-first organization
|
|
4
4
|
* This structure enables reliable dark: variants and className overrides
|
|
5
5
|
*/
|
|
6
|
-
interface ButtonTheme {
|
|
6
|
+
export interface ButtonTheme {
|
|
7
7
|
baseStyle: string;
|
|
8
8
|
variantStyles: Record<ButtonVariant, string>;
|
|
9
9
|
variantColors: {
|
|
@@ -24,4 +24,3 @@ interface ButtonTheme {
|
|
|
24
24
|
* Default theme for the Button component
|
|
25
25
|
*/
|
|
26
26
|
export declare const buttonTheme: ButtonTheme;
|
|
27
|
-
export {};
|
|
@@ -124,19 +124,19 @@ const buttonTheme = {
|
|
|
124
124
|
// Size variants
|
|
125
125
|
sizes: {
|
|
126
126
|
sm: {
|
|
127
|
-
default: "min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-
|
|
127
|
+
default: "min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-base",
|
|
128
128
|
iconOnly: "size-[var(--button-icon-size-sm)] p-[var(--button-icon-p-sm)]",
|
|
129
|
-
link: "p-0 text-
|
|
129
|
+
link: "p-0 text-base h-fit",
|
|
130
130
|
},
|
|
131
131
|
md: {
|
|
132
|
-
default: "min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-
|
|
132
|
+
default: "min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-base",
|
|
133
133
|
iconOnly: "size-[var(--button-icon-size-md)] p-[var(--button-icon-p-md)]",
|
|
134
|
-
link: "p-0 text-
|
|
134
|
+
link: "p-0 text-base h-fit",
|
|
135
135
|
},
|
|
136
136
|
lg: {
|
|
137
|
-
default: "min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-
|
|
137
|
+
default: "min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-lg",
|
|
138
138
|
iconOnly: "size-[var(--button-icon-size-lg)] p-[var(--button-icon-p-lg)]",
|
|
139
|
-
link: "p-0 text-
|
|
139
|
+
link: "p-0 text-lg h-fit",
|
|
140
140
|
},
|
|
141
141
|
},
|
|
142
142
|
// State styles
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const cardTheme = {
|
|
2
|
-
baseStyle: "rounded-[var(--card-radius)] overflow-hidden bg-white border border-[var(--color-border)] shadow-xs dark:bg-[var(--color-background-secondary)]
|
|
3
|
-
headerStyle: "flex flex-col space-y-1.5 p-
|
|
4
|
-
titleStyle: "text-
|
|
5
|
-
subtitleStyle: "text-sm
|
|
6
|
-
contentStyle: "p-
|
|
7
|
-
footerStyle: "flex items-center p-
|
|
2
|
+
baseStyle: "rounded-[var(--card-radius)] overflow-hidden bg-white border border-[var(--color-border)] shadow-xs dark:bg-[var(--color-background-secondary)]",
|
|
3
|
+
headerStyle: "flex flex-col space-y-1.5 p-6",
|
|
4
|
+
titleStyle: "text-lg font-semibold leading-none text-[var(--color-text-primary)]",
|
|
5
|
+
subtitleStyle: "text-sm text-[var(--color-text-muted)]",
|
|
6
|
+
contentStyle: "p-6 pt-0",
|
|
7
|
+
footerStyle: "flex items-center p-6 pt-0",
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { cardTheme };
|
|
@@ -39,28 +39,23 @@ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
39
39
|
}
|
|
40
40
|
export interface CardComponent extends ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>> {
|
|
41
41
|
Header: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>>;
|
|
42
|
-
Title: ForwardRefExoticComponent<CardTitleProps & RefAttributes<
|
|
43
|
-
Subtitle: ForwardRefExoticComponent<CardSubtitleProps & RefAttributes<
|
|
42
|
+
Title: ForwardRefExoticComponent<CardTitleProps & RefAttributes<HTMLDivElement>>;
|
|
43
|
+
Subtitle: ForwardRefExoticComponent<CardSubtitleProps & RefAttributes<HTMLDivElement>>;
|
|
44
44
|
Content: ForwardRefExoticComponent<CardContentProps & RefAttributes<HTMLDivElement>>;
|
|
45
45
|
Footer: ForwardRefExoticComponent<CardFooterProps & RefAttributes<HTMLDivElement>>;
|
|
46
46
|
}
|
|
47
47
|
export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
48
|
-
children: ReactNode;
|
|
49
48
|
className?: string;
|
|
50
49
|
}
|
|
51
50
|
export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
52
|
-
children: ReactNode;
|
|
53
51
|
className?: string;
|
|
54
52
|
}
|
|
55
53
|
export interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
56
|
-
children: ReactNode;
|
|
57
54
|
className?: string;
|
|
58
55
|
}
|
|
59
|
-
export interface CardTitleProps extends HTMLAttributes<
|
|
60
|
-
children: ReactNode;
|
|
56
|
+
export interface CardTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
61
57
|
className?: string;
|
|
62
58
|
}
|
|
63
|
-
export interface CardSubtitleProps extends HTMLAttributes<
|
|
64
|
-
children: ReactNode;
|
|
59
|
+
export interface CardSubtitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
65
60
|
className?: string;
|
|
66
61
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardSubtitleProps } from './Card.types';
|
|
3
|
-
export declare const CardSubtitle: React.ForwardRefExoticComponent<CardSubtitleProps & React.RefAttributes<
|
|
3
|
+
export declare const CardSubtitle: React.ForwardRefExoticComponent<CardSubtitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardTitleProps } from './Card.types';
|
|
3
|
-
export declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<
|
|
3
|
+
export declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -64,7 +64,7 @@ const DrawerRoot = ({ isOpen, onClose, title, subtitle, icon, position = "right"
|
|
|
64
64
|
return (jsx(Overlay, { isOpen: isOpen, onClose: onClose, closeOnOverlayClick: closeOnOverlayClick, closeOnEsc: closeOnEsc, position: "none", role: "dialog", ariaModal: true, ariaLabelledBy: titleId, ariaDescribedBy: subtitleId, contentClassName: cn(theme.container, positionVariant, size !== "full" && sizeVariant, className), animations: {
|
|
65
65
|
overlay: drawerOverlayAnimations,
|
|
66
66
|
content: getDrawerContentAnimations(position),
|
|
67
|
-
}, ...props, children: jsx(DrawerContext.Provider, { value: contextValue, children: jsxs("div", { className: theme.
|
|
67
|
+
}, ...props, children: jsx(DrawerContext.Provider, { value: contextValue, children: jsxs("div", { className: theme.inner, children: [shouldAutoRenderHeader && (jsxs(DrawerHeader, { icon: icon, children: [title && jsx(DrawerTitle, { children: title }), subtitle && jsx(DrawerSubtitle, { children: subtitle })] })), children] }) }) }));
|
|
68
68
|
};
|
|
69
69
|
DrawerRoot.displayName = "Drawer";
|
|
70
70
|
// Attach compound subcomponents
|
|
@@ -20,11 +20,13 @@ export declare const drawerPositionVariantsFullWidth: {
|
|
|
20
20
|
};
|
|
21
21
|
export declare const drawerSizeVariants: {
|
|
22
22
|
horizontal: {
|
|
23
|
+
sm: string;
|
|
23
24
|
md: string;
|
|
24
25
|
lg: string;
|
|
25
26
|
full: string;
|
|
26
27
|
};
|
|
27
28
|
vertical: {
|
|
29
|
+
sm: string;
|
|
28
30
|
md: string;
|
|
29
31
|
lg: string;
|
|
30
32
|
full: string;
|
|
@@ -5,39 +5,41 @@ const drawerTheme = {
|
|
|
5
5
|
"border border-[var(--color-border)] ring-4 ring-white/10 " +
|
|
6
6
|
"flex flex-col overflow-hidden rounded-[var(--drawer-radius)] " +
|
|
7
7
|
"dark:bg-[var(--color-background-secondary)] dark:ring-white/5",
|
|
8
|
-
|
|
8
|
+
inner: "h-full flex flex-col",
|
|
9
9
|
header: "flex items-start justify-between p-4 border-b border-[var(--color-border)] shrink-0 text-[var(--color-text-primary)] gap-4",
|
|
10
10
|
headerContent: "flex items-start gap-3 flex-1 min-w-0",
|
|
11
11
|
title: "text-lg font-semibold leading-6 text-[var(--color-text-primary)]",
|
|
12
12
|
subtitle: "text-base text-[var(--color-text-secondary)] mt-0.5",
|
|
13
|
-
|
|
13
|
+
content: "flex-1 overflow-y-auto p-4",
|
|
14
14
|
footer: "flex items-center justify-end gap-3 p-4 border-t border-[var(--color-border)] shrink-0 " +
|
|
15
|
-
"dark:border-[var(--color-
|
|
15
|
+
"dark:border-[var(--color-border)]",
|
|
16
16
|
};
|
|
17
17
|
// Position variants with margin support
|
|
18
18
|
const drawerPositionVariantsWithMargin = {
|
|
19
|
-
left: "left-
|
|
20
|
-
right: "right-
|
|
21
|
-
top: "top-
|
|
22
|
-
bottom: "bottom-
|
|
19
|
+
left: "left-0 top-0 h-full", // 100vh - 1.5rem top - 1.5rem bottom
|
|
20
|
+
right: "right-0 top-0 h-full",
|
|
21
|
+
top: "top-0 left-0 w-full",
|
|
22
|
+
bottom: "bottom-0 left-0 w-full",
|
|
23
23
|
};
|
|
24
24
|
// Position variants for full-width/height drawers with consistent margins
|
|
25
25
|
const drawerPositionVariantsFullWidth = {
|
|
26
|
-
left: "left-
|
|
27
|
-
right: "right-
|
|
28
|
-
top: "top-
|
|
29
|
-
bottom: "bottom-
|
|
26
|
+
left: "left-0 top-0 right-0 bottom-0", // Consistent margins on all sides
|
|
27
|
+
right: "right-0 top-0 left-0 bottom-0",
|
|
28
|
+
top: "top-0 left-0 right-0 bottom-0",
|
|
29
|
+
bottom: "bottom-0 left-0 right-0 top-0",
|
|
30
30
|
};
|
|
31
31
|
// Size variants based on position
|
|
32
32
|
const drawerSizeVariants = {
|
|
33
33
|
// Horizontal drawers (left/right)
|
|
34
34
|
horizontal: {
|
|
35
|
+
sm: "w-[min(320px,90vw)]", // 320px on large screens, max 90% on small
|
|
35
36
|
md: "w-[min(420px,90vw)]", // 420px on large screens, max 90% on small
|
|
36
37
|
lg: "w-[min(560px,85vw)]", // 560px on large screens, max 85% on small
|
|
37
38
|
full: "w-full", // Full width - positioning handles margins
|
|
38
39
|
},
|
|
39
40
|
// Vertical drawers (top/bottom)
|
|
40
41
|
vertical: {
|
|
42
|
+
sm: "h-[min(240px,90vh)]", // 240px on large screens, max 90% on small
|
|
41
43
|
md: "h-[min(320px,90vh)]", // 320px on large screens, max 90% on small
|
|
42
44
|
lg: "h-[min(448px,85vh)]", // 448px on large screens, max 85% on small
|
|
43
45
|
full: "h-full", // Full height - positioning handles margins
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export type DrawerPosition = "left" | "right" | "top" | "bottom";
|
|
3
|
-
export type DrawerSize = "md" | "lg" | "full";
|
|
3
|
+
export type DrawerSize = "sm" | "md" | "lg" | "full";
|
|
4
4
|
export interface DrawerTheme {
|
|
5
5
|
overlay: string;
|
|
6
6
|
container: string;
|
|
7
|
-
|
|
7
|
+
inner: string;
|
|
8
8
|
header: string;
|
|
9
9
|
headerContent: string;
|
|
10
10
|
title: string;
|
|
11
11
|
subtitle: string;
|
|
12
|
-
|
|
12
|
+
content: string;
|
|
13
13
|
footer: string;
|
|
14
14
|
}
|
|
15
15
|
export interface DrawerThemeOverrides {
|
|
16
16
|
overlay?: string;
|
|
17
17
|
container?: string;
|
|
18
|
-
|
|
18
|
+
inner?: string;
|
|
19
19
|
header?: string;
|
|
20
20
|
headerContent?: string;
|
|
21
21
|
title?: string;
|
|
22
22
|
subtitle?: string;
|
|
23
|
-
|
|
23
|
+
content?: string;
|
|
24
24
|
footer?: string;
|
|
25
25
|
}
|
|
26
26
|
export interface DrawerContextValue {
|
|
@@ -4,7 +4,7 @@ import { useDrawerContext } from './Drawer.js';
|
|
|
4
4
|
|
|
5
5
|
const DrawerContent = ({ children, className, ...props }) => {
|
|
6
6
|
const { theme } = useDrawerContext();
|
|
7
|
-
return (jsx("div", { className: cn(theme.
|
|
7
|
+
return (jsx("div", { className: cn(theme.content, className), ...props, children: children }));
|
|
8
8
|
};
|
|
9
9
|
DrawerContent.displayName = "Drawer.Content";
|
|
10
10
|
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { cn } from '../../../utils/cn.js';
|
|
3
3
|
import { useDrawerContext } from './Drawer.js';
|
|
4
4
|
import { Button } from '../Button/Button.js';
|
|
5
|
+
import 'react';
|
|
5
6
|
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
6
7
|
|
|
7
8
|
const DrawerHeader = ({ children, icon, showCloseButton, className, ...props }) => {
|
|
@@ -4,7 +4,7 @@ import { useDrawerContext } from './Drawer.js';
|
|
|
4
4
|
|
|
5
5
|
const DrawerTitle = ({ children, className, ...props }) => {
|
|
6
6
|
const { theme, titleId } = useDrawerContext();
|
|
7
|
-
return (jsx("
|
|
7
|
+
return (jsx("h2", { id: titleId, className: cn(theme.title, className), ...props, children: children }));
|
|
8
8
|
};
|
|
9
9
|
DrawerTitle.displayName = "Drawer.Title";
|
|
10
10
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Drawer } from "./Drawer";
|
|
2
|
-
export type { DrawerProps, DrawerPosition, DrawerSize, DrawerThemeOverrides, DrawerHeaderProps, DrawerTitleProps, DrawerSubtitleProps, } from "./Drawer.types";
|
|
2
|
+
export type { DrawerProps, DrawerPosition, DrawerSize, DrawerThemeOverrides, DrawerHeaderProps, DrawerTitleProps, DrawerSubtitleProps, DrawerContentProps, DrawerFooterProps, } from "./Drawer.types";
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { cn } from '../../../utils/cn.js';
|
|
3
3
|
import { useModalContext } from './Modal.js';
|
|
4
4
|
import { Button } from '../Button/Button.js';
|
|
5
|
+
import 'react';
|
|
5
6
|
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
6
7
|
|
|
7
8
|
const ModalHeader = ({ children, icon, showCloseButton, className, ...props }) => {
|
|
@@ -7,6 +7,7 @@ export { Badge } from './Badge/Badge.js';
|
|
|
7
7
|
export { Breadcrumbs } from './Breadcrumbs/Breadcrumbs.js';
|
|
8
8
|
export { breadcrumbsTheme, breadcrumbsVariants, defaultSeparator } from './Breadcrumbs/Breadcrumbs.theme.js';
|
|
9
9
|
export { Button } from './Button/Button.js';
|
|
10
|
+
export { getRippleAnimation, getRippleColorClass, useRipple } from './Button/Button.ripple.js';
|
|
10
11
|
export { ButtonGroup } from './ButtonGroup/ButtonGroup.js';
|
|
11
12
|
export { ButtonGroupSeparator } from './ButtonGroup/ButtonGroupSeparator.js';
|
|
12
13
|
export { ButtonGroupText } from './ButtonGroup/ButtonGroupText.js';
|
|
@@ -4,6 +4,7 @@ import { cn } from '../../../utils/cn.js';
|
|
|
4
4
|
import { useGanttContext } from './GanttChart.js';
|
|
5
5
|
import { Segmented } from '../../core/Segmented/Segmented.js';
|
|
6
6
|
import { Button } from '../../core/Button/Button.js';
|
|
7
|
+
import 'react';
|
|
7
8
|
import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
|
|
8
9
|
|
|
9
10
|
const ZOOM_OPTIONS = [
|
|
@@ -3,6 +3,7 @@ import { Popover } from '../../core/Popover/Popover.js';
|
|
|
3
3
|
import '../../core/Popover/PopoverContext.js';
|
|
4
4
|
import { Cog6ToothIcon } from '@heroicons/react/24/outline';
|
|
5
5
|
import { Button } from '../../core/Button/Button.js';
|
|
6
|
+
import 'react';
|
|
6
7
|
import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
|
|
7
8
|
import { Sortable, SortableItem } from '../../core/Sortable/Sortable.js';
|
|
8
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
3
3
|
import { Button } from '../../core/Button/Button.js';
|
|
4
|
-
import { cn } from '../../../utils/cn.js';
|
|
5
4
|
import 'react';
|
|
5
|
+
import { cn } from '../../../utils/cn.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Selection header that appears when rows are selected
|
|
@@ -3,7 +3,85 @@ import React__default, { useMemo, useRef, useState, useCallback } from 'react';
|
|
|
3
3
|
import { fileUploadTheme } from './FileUpload.theme.js';
|
|
4
4
|
import { cn } from '../../../utils/cn.js';
|
|
5
5
|
import { CloudArrowUpIcon, DocumentIcon, XMarkIcon } from '@heroicons/react/24/outline';
|
|
6
|
+
import '../../core/Accordion/Accordion.js';
|
|
7
|
+
import '../../core/AlertDialog/AlertDialog.js';
|
|
8
|
+
import '../../core/AspectRatio/AspectRatio.js';
|
|
9
|
+
import '../../core/Avatar/Avatar.js';
|
|
10
|
+
import '../../core/AvatarGroup/AvatarGroup.js';
|
|
11
|
+
import '../../core/Badge/Badge.js';
|
|
12
|
+
import '../../core/Breadcrumbs/Breadcrumbs.js';
|
|
13
|
+
import '../../core/Breadcrumbs/Breadcrumbs.theme.js';
|
|
6
14
|
import { Button } from '../../core/Button/Button.js';
|
|
15
|
+
import '../../core/ButtonGroup/ButtonGroup.js';
|
|
16
|
+
import '../../core/ButtonGroup/ButtonGroupSeparator.js';
|
|
17
|
+
import '../../core/ButtonGroup/ButtonGroupText.js';
|
|
18
|
+
import '../../core/Calendar/Calendar.js';
|
|
19
|
+
import '../../core/Calendar/CalendarMini/CalendarMini.js';
|
|
20
|
+
import '../../core/Card/Card.js';
|
|
21
|
+
import '../../core/CardStack/CardStack.js';
|
|
22
|
+
import '../../core/Carousel/Carousel.js';
|
|
23
|
+
import '../../core/CommandPalette/CommandPalette.js';
|
|
24
|
+
import '../../core/Separator/Separator.js';
|
|
25
|
+
import '../../core/Drawer/Drawer.js';
|
|
26
|
+
import '../../core/Dropdown/Dropdown.js';
|
|
27
|
+
import '../../core/Dropdown/DropdownTrigger.js';
|
|
28
|
+
import '../../core/Dropdown/DropdownMenu.js';
|
|
29
|
+
import '../../core/Dropdown/DropdownItem.js';
|
|
30
|
+
import '../../core/Dropdown/DropdownSection.js';
|
|
31
|
+
import '../../core/Dropdown/DropdownSeparator.js';
|
|
32
|
+
import '../../core/Dropdown/Dropdown.theme.js';
|
|
33
|
+
import '../../core/Kbd/Kbd.js';
|
|
34
|
+
import '../../core/MenuItem/MenuItem.js';
|
|
35
|
+
import '../../core/Link/Link.js';
|
|
36
|
+
import '../../core/Loader/Loader.js';
|
|
37
|
+
import '../../core/Modal/Modal.js';
|
|
38
|
+
import '../../core/ModalStack/ModalStack.js';
|
|
39
|
+
import '../../core/PageHeading/PageHeading.js';
|
|
40
|
+
import '../../core/Pagination/Pagination.js';
|
|
41
|
+
import '../../core/Popover/Popover.js';
|
|
42
|
+
import '../../core/Popover/PopoverContext.js';
|
|
43
|
+
import '../../core/Progress/Progress.js';
|
|
44
|
+
import '../../core/Rating/Rating.js';
|
|
45
|
+
import '../../core/ScrollArea/ScrollArea.js';
|
|
46
|
+
import '../../core/ScrollArea/smooth/SmoothScrollEngine.js';
|
|
47
|
+
import '../../core/Segmented/Segmented.js';
|
|
48
|
+
import '../../core/Skeleton/Skeleton.js';
|
|
49
|
+
import '../../core/SlidingNumber/SlidingNumber.js';
|
|
50
|
+
import '../../core/Tabs/Tabs.js';
|
|
51
|
+
import '../../core/Tabs/TabsList.js';
|
|
52
|
+
import '../../core/Tabs/TabsTrigger.js';
|
|
53
|
+
import '../../core/Tabs/TabsContent.js';
|
|
54
|
+
import '../../core/Tabs/TabsContext.js';
|
|
55
|
+
import '../../core/Tooltip/Tooltip.js';
|
|
56
|
+
import '../../core/Tooltip/Tooltip.animations.js';
|
|
57
|
+
import '../../core/Tree/Tree.js';
|
|
58
|
+
import '../../core/Tag/Tag.js';
|
|
59
|
+
import '../../core/Alert/Alert.js';
|
|
60
|
+
import '../../core/Toast/Toast.js';
|
|
61
|
+
import '../../core/Toast/ToastProvider.js';
|
|
62
|
+
import '@heroicons/react/24/solid';
|
|
63
|
+
import '../../core/Spinner/Spinner.js';
|
|
64
|
+
import '../../core/Message/Message.js';
|
|
65
|
+
import '../../core/Message/TypeWriter.js';
|
|
66
|
+
import '../../core/Empty/Empty.js';
|
|
67
|
+
import '../../core/Masonry/Masonry.js';
|
|
68
|
+
import '../../core/DragDrop/DragDrop.js';
|
|
69
|
+
import '../../core/Sortable/Sortable.js';
|
|
70
|
+
import '../../core/NavItem/NavItem.js';
|
|
71
|
+
import '../../core/Sidebar/Sidebar.js';
|
|
72
|
+
import '../../core/Sidebar/SidebarHeader.js';
|
|
73
|
+
import '../../core/Sidebar/SidebarContent.js';
|
|
74
|
+
import '../../core/Sidebar/SidebarFooter.js';
|
|
75
|
+
import '../../core/Sidebar/SidebarNav.js';
|
|
76
|
+
import '../../core/Sidebar/SidebarNavGroup.js';
|
|
77
|
+
import 'motion/react';
|
|
78
|
+
import '../../core/Sidebar/SidebarToggle.js';
|
|
79
|
+
import '../../core/Sidebar/SidebarContext.js';
|
|
80
|
+
import '../../core/OfflineIndicator/OfflineIndicator.js';
|
|
81
|
+
import '../../core/ContextMenu/ContextMenu.js';
|
|
82
|
+
import '../../core/ContextMenu/ContextMenu.theme.js';
|
|
83
|
+
import '../../core/Pill/Pill.js';
|
|
84
|
+
import '../../core/SocialIcon/SocialIcon.js';
|
|
7
85
|
|
|
8
86
|
/**
|
|
9
87
|
* FileUpload component - Drag-and-drop file uploader with previews
|
|
@@ -6,8 +6,85 @@ import { cn } from '../../../utils/cn.js';
|
|
|
6
6
|
import { TimePickerContext } from './TimePicker.js';
|
|
7
7
|
import { useSelectPortal } from '../../../hooks/useSelectPortal.js';
|
|
8
8
|
import { createDropdownAnimations } from '../Select/Select.animations.js';
|
|
9
|
-
import
|
|
9
|
+
import '../../core/Accordion/Accordion.js';
|
|
10
|
+
import '../../core/AlertDialog/AlertDialog.js';
|
|
11
|
+
import '../../core/AspectRatio/AspectRatio.js';
|
|
12
|
+
import '../../core/Avatar/Avatar.js';
|
|
13
|
+
import '../../core/AvatarGroup/AvatarGroup.js';
|
|
14
|
+
import '../../core/Badge/Badge.js';
|
|
15
|
+
import '../../core/Breadcrumbs/Breadcrumbs.js';
|
|
16
|
+
import '../../core/Breadcrumbs/Breadcrumbs.theme.js';
|
|
10
17
|
import { Button } from '../../core/Button/Button.js';
|
|
18
|
+
import '../../core/ButtonGroup/ButtonGroup.js';
|
|
19
|
+
import '../../core/ButtonGroup/ButtonGroupSeparator.js';
|
|
20
|
+
import '../../core/ButtonGroup/ButtonGroupText.js';
|
|
21
|
+
import '../../core/Calendar/Calendar.js';
|
|
22
|
+
import '../../core/Calendar/CalendarMini/CalendarMini.js';
|
|
23
|
+
import '../../core/Card/Card.js';
|
|
24
|
+
import '../../core/CardStack/CardStack.js';
|
|
25
|
+
import '../../core/Carousel/Carousel.js';
|
|
26
|
+
import '../../core/CommandPalette/CommandPalette.js';
|
|
27
|
+
import '../../core/Separator/Separator.js';
|
|
28
|
+
import '../../core/Drawer/Drawer.js';
|
|
29
|
+
import '../../core/Dropdown/Dropdown.js';
|
|
30
|
+
import '../../core/Dropdown/DropdownTrigger.js';
|
|
31
|
+
import '../../core/Dropdown/DropdownMenu.js';
|
|
32
|
+
import '../../core/Dropdown/DropdownItem.js';
|
|
33
|
+
import '../../core/Dropdown/DropdownSection.js';
|
|
34
|
+
import '../../core/Dropdown/DropdownSeparator.js';
|
|
35
|
+
import '../../core/Dropdown/Dropdown.theme.js';
|
|
36
|
+
import '../../core/Kbd/Kbd.js';
|
|
37
|
+
import '../../core/MenuItem/MenuItem.js';
|
|
38
|
+
import '../../core/Link/Link.js';
|
|
39
|
+
import '../../core/Loader/Loader.js';
|
|
40
|
+
import '../../core/Modal/Modal.js';
|
|
41
|
+
import '../../core/ModalStack/ModalStack.js';
|
|
42
|
+
import '../../core/PageHeading/PageHeading.js';
|
|
43
|
+
import '../../core/Pagination/Pagination.js';
|
|
44
|
+
import '../../core/Popover/Popover.js';
|
|
45
|
+
import '../../core/Popover/PopoverContext.js';
|
|
46
|
+
import '../../core/Progress/Progress.js';
|
|
47
|
+
import '../../core/Rating/Rating.js';
|
|
48
|
+
import '../../core/ScrollArea/ScrollArea.js';
|
|
49
|
+
import '../../core/ScrollArea/smooth/SmoothScrollEngine.js';
|
|
50
|
+
import '../../core/Segmented/Segmented.js';
|
|
51
|
+
import '../../core/Skeleton/Skeleton.js';
|
|
52
|
+
import '../../core/SlidingNumber/SlidingNumber.js';
|
|
53
|
+
import '../../core/Tabs/Tabs.js';
|
|
54
|
+
import '../../core/Tabs/TabsList.js';
|
|
55
|
+
import '../../core/Tabs/TabsTrigger.js';
|
|
56
|
+
import '../../core/Tabs/TabsContent.js';
|
|
57
|
+
import '../../core/Tabs/TabsContext.js';
|
|
58
|
+
import '../../core/Tooltip/Tooltip.js';
|
|
59
|
+
import '../../core/Tooltip/Tooltip.animations.js';
|
|
60
|
+
import '../../core/Tree/Tree.js';
|
|
61
|
+
import '../../core/Tag/Tag.js';
|
|
62
|
+
import '../../core/Alert/Alert.js';
|
|
63
|
+
import '../../core/Toast/Toast.js';
|
|
64
|
+
import '../../core/Toast/ToastProvider.js';
|
|
65
|
+
import '@heroicons/react/24/solid';
|
|
66
|
+
import '../../core/Spinner/Spinner.js';
|
|
67
|
+
import '../../core/Message/Message.js';
|
|
68
|
+
import '../../core/Message/TypeWriter.js';
|
|
69
|
+
import '../../core/Empty/Empty.js';
|
|
70
|
+
import '../../core/Masonry/Masonry.js';
|
|
71
|
+
import '../../core/DragDrop/DragDrop.js';
|
|
72
|
+
import '../../core/Sortable/Sortable.js';
|
|
73
|
+
import '../../core/NavItem/NavItem.js';
|
|
74
|
+
import '../../core/Sidebar/Sidebar.js';
|
|
75
|
+
import '../../core/Sidebar/SidebarHeader.js';
|
|
76
|
+
import '../../core/Sidebar/SidebarContent.js';
|
|
77
|
+
import '../../core/Sidebar/SidebarFooter.js';
|
|
78
|
+
import '../../core/Sidebar/SidebarNav.js';
|
|
79
|
+
import '../../core/Sidebar/SidebarNavGroup.js';
|
|
80
|
+
import '../../core/Sidebar/SidebarToggle.js';
|
|
81
|
+
import '../../core/Sidebar/SidebarContext.js';
|
|
82
|
+
import '../../core/OfflineIndicator/OfflineIndicator.js';
|
|
83
|
+
import '../../core/ContextMenu/ContextMenu.js';
|
|
84
|
+
import '../../core/ContextMenu/ContextMenu.theme.js';
|
|
85
|
+
import '../../core/Pill/Pill.js';
|
|
86
|
+
import '../../core/SocialIcon/SocialIcon.js';
|
|
87
|
+
import { useIsClient } from '../../../hooks/useIsClient.js';
|
|
11
88
|
|
|
12
89
|
/**
|
|
13
90
|
* Hook to detect dark mode state from document
|