@flikk/ui 1.0.0-beta.25 → 1.0.0-beta.26
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/CodeBlock/CodeBlock.theme.js +2 -2
- package/dist/components/ai/PromptInput/PromptInput.js +1 -0
- package/dist/components/ai/PromptInput/VoiceRecorder.js +1 -0
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +1 -1
- package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
- package/dist/components/charts/BarChart/BarChart.js +2 -2
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/components/charts/shared/BarRenderer/BarRenderer.js +2 -2
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +1 -1
- package/dist/components/core/Button/Button.js +1 -1
- package/dist/components/core/Button/Button.theme.js +4 -4
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.theme.js +1 -1
- package/dist/components/core/ContextMenu/ContextMenu.theme.js +1 -1
- package/dist/components/core/Drawer/Drawer.theme.js +2 -2
- package/dist/components/core/Dropdown/Dropdown.theme.js +2 -2
- package/dist/components/core/Empty/Empty.js +1 -1
- package/dist/components/core/ImagePlaceholder/ImagePlaceholder.d.ts +14 -0
- package/dist/components/core/ImagePlaceholder/ImagePlaceholder.js +28 -0
- package/dist/components/core/ImagePlaceholder/ImagePlaceholder.theme.d.ts +6 -0
- package/dist/components/core/ImagePlaceholder/ImagePlaceholder.theme.js +8 -0
- package/dist/components/core/ImagePlaceholder/ImagePlaceholder.types.d.ts +32 -0
- package/dist/components/core/ImagePlaceholder/index.d.ts +2 -0
- package/dist/components/core/Message/Message.theme.js +1 -1
- package/dist/components/core/Modal/Modal.theme.js +1 -1
- package/dist/components/core/NavItem/NavItem.d.ts +1 -1
- package/dist/components/core/NavItem/NavItem.js +171 -68
- package/dist/components/core/NavItem/NavItem.theme.js +20 -12
- package/dist/components/core/NavItem/NavItem.types.d.ts +17 -39
- package/dist/components/core/Pagination/Pagination.theme.js +3 -3
- package/dist/components/core/Popover/Popover.theme.js +1 -1
- package/dist/components/core/Progress/Progress.theme.js +1 -1
- package/dist/components/core/ScrollArea/ScrollArea.js +2 -2
- package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
- package/dist/components/core/Segmented/Segmented.js +8 -6
- package/dist/components/core/Segmented/Segmented.theme.js +3 -3
- package/dist/components/core/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/core/Sidebar/Sidebar.js +42 -13
- package/dist/components/core/Sidebar/Sidebar.theme.js +5 -7
- package/dist/components/core/Sidebar/Sidebar.types.d.ts +33 -4
- package/dist/components/core/Sidebar/SidebarContent.js +6 -6
- package/dist/components/core/Sidebar/SidebarContext.d.ts +17 -16
- package/dist/components/core/Sidebar/SidebarContext.js +42 -19
- package/dist/components/core/Sidebar/SidebarFooter.js +4 -6
- package/dist/components/core/Sidebar/SidebarHeader.js +4 -9
- package/dist/components/core/Sidebar/SidebarLogo.js +3 -7
- package/dist/components/core/Sidebar/SidebarNav.js +4 -3
- package/dist/components/core/Sidebar/SidebarNavGroup.js +4 -7
- package/dist/components/core/Sidebar/SidebarToggle.js +6 -1
- package/dist/components/core/Sidebar/SidebarUserProfile.js +33 -17
- package/dist/components/core/Sidebar/index.d.ts +2 -3
- package/dist/components/core/Skeleton/Skeleton.theme.js +1 -1
- package/dist/components/core/Spinner/Spinner.theme.js +1 -1
- package/dist/components/core/Tabs/Tabs.js +6 -1
- package/dist/components/core/Tabs/Tabs.types.d.ts +2 -0
- package/dist/components/core/Tabs/TabsBody.js +5 -3
- package/dist/components/core/Tag/Tag.theme.js +1 -1
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +1 -1
- package/dist/components/data-display/KPI/KPI.js +13 -3
- package/dist/components/data-display/KPI/KPI.theme.js +3 -3
- package/dist/components/data-display/Metric/Metric.theme.js +3 -3
- package/dist/components/data-display/Table/Table.js +4 -3
- package/dist/components/data-display/Table/Table.theme.js +11 -1
- package/dist/components/data-display/Table/Table.types.d.ts +15 -0
- package/dist/components/data-display/Table/TableColumnManager.js +1 -1
- package/dist/components/data-display/Table/index.d.ts +2 -2
- package/dist/components/effects/Aurora/Aurora.js +79 -40
- package/dist/components/effects/InteractiveCharacters/InteractiveCharacters.js +3 -3
- package/dist/components/effects/InteractiveCharacters/characters/BlobCharacter.js +13 -4
- package/dist/components/effects/InteractiveCharacters/characters/SmallCharacter.js +13 -4
- package/dist/components/effects/InteractiveCharacters/characters/TallCharacter.js +14 -4
- package/dist/components/effects/MorphingText/MorphingText.js +40 -7
- package/dist/components/effects/StripePattern/StripePattern.d.ts +18 -0
- package/dist/components/effects/StripePattern/StripePattern.js +54 -0
- package/dist/components/effects/StripePattern/StripePattern.types.d.ts +53 -0
- package/dist/components/effects/StripePattern/index.d.ts +2 -0
- package/dist/components/effects/index.d.ts +2 -0
- package/dist/components/effects/index.js +1 -0
- package/dist/components/forms/Checkbox/Checkbox.theme.js +1 -1
- package/dist/components/forms/CronInput/CronInput.theme.js +16 -16
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +1 -1
- package/dist/components/forms/FileUpload/FileUpload.js +1 -1
- package/dist/components/forms/FileUpload/FileUploadProgress.js +27 -20
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +2 -2
- package/dist/components/forms/Input/Input.theme.js +9 -11
- package/dist/components/forms/Mention/Mention.theme.js +3 -3
- package/dist/components/forms/Radio/Radio.theme.js +1 -1
- package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +18 -0
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +1231 -236
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +53 -1
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +99 -25
- package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +42 -3
- package/dist/components/forms/RichTextEditor/index.d.ts +2 -2
- package/dist/components/forms/Select/Select.js +1 -1
- package/dist/components/forms/Slider/Slider.theme.js +1 -1
- package/dist/components/forms/Switch/Switch.theme.js +1 -1
- package/dist/components/forms/TimePicker/TimePicker.theme.js +2 -2
- package/dist/components/forms/TimePicker/TimePickerContent.js +1 -0
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +1 -1
- package/dist/components/forms/forms.theme.js +12 -12
- package/dist/components/forms/index.js +1 -0
- package/dist/components/layout/FormLayout/FormLayout.js +6 -4
- package/dist/components/layout/FormLayout/FormLayout.types.d.ts +3 -3
- package/dist/components/layout/FormLayout/FormLayoutSection.js +6 -1
- package/dist/components/layout/PageLayout/PageLayout.d.ts +2 -2
- package/dist/components/layout/PageLayout/PageLayout.js +23 -5
- package/dist/components/layout/PageLayout/PageLayout.theme.d.ts +2 -1
- package/dist/components/layout/PageLayout/PageLayout.theme.js +35 -6
- package/dist/components/layout/PageLayout/PageLayout.types.d.ts +45 -0
- package/dist/components/layout/PageLayout/PageLayoutContent.js +6 -4
- package/dist/components/layout/PageLayout/PageLayoutHeader.js +3 -3
- package/dist/components/layout/PageLayout/PageLayoutSidebar.js +5 -3
- package/dist/components/layout/PageLayout/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/styles/theme.css +127 -92
- package/dist/components/core/Sidebar/SidebarSubmenu.d.ts +0 -7
- package/dist/components/core/Sidebar/SidebarSubmenu.js +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const codeBlockTheme = {
|
|
2
|
-
baseStyle: "relative rounded-[var(--codeblock-radius)] border border-[var(--color-border)] overflow-hidden bg-[var(--color-
|
|
2
|
+
baseStyle: "relative rounded-[var(--codeblock-radius)] border border-[var(--color-border)] overflow-hidden bg-[var(--color-surface-sunken)]",
|
|
3
3
|
header: "flex items-center justify-between px-3 py-1.5 bg-[var(--color-background-secondary)] border-b border-[var(--color-border)]",
|
|
4
4
|
headerLeft: "flex items-center gap-2 min-w-0 flex-1 ",
|
|
5
5
|
headerRight: "flex items-center gap-2 flex-shrink-0",
|
|
@@ -10,7 +10,7 @@ const codeBlockTheme = {
|
|
|
10
10
|
highlightedLine: " -mx-4 px-4 bg-[var(--color-primary-50)] border-l-2 border-l-[var(--color-primary)] dark:bg-[var(--color-neutral-400)]/5 dark:border-l-[var(--color-neutral-200)]",
|
|
11
11
|
diffAddition: "-mx-4 px-4 bg-[var(--color-success-50)] border-l-4 border-l-[var(--color-success)] dark:bg-[var(--color-success-600)]/20 dark:border-l-[var(--color-success-700)]",
|
|
12
12
|
diffDeletion: "-mx-4 px-4 bg-[var(--color-danger-50)] border-l-4 border-l-[var(--color-danger)] dark:bg-[var(--color-danger-600)]/20 dark:border-l-[var(--color-danger-700)]",
|
|
13
|
-
copyButton: "p-1.5 rounded-[calc(var(--radius-base)*0.75)] text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-
|
|
13
|
+
copyButton: "p-1.5 rounded-[calc(var(--radius-base)*0.75)] text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]",
|
|
14
14
|
copySuccess: "text-[var(--color-success)]",
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -106,6 +106,7 @@ import '../../core/ContextMenu/ContextMenu.js';
|
|
|
106
106
|
import '../../core/ContextMenu/ContextMenu.theme.js';
|
|
107
107
|
import '../../core/Pill/Pill.js';
|
|
108
108
|
import '../../core/Icon/Icon.js';
|
|
109
|
+
import '../../core/ImagePlaceholder/ImagePlaceholder.js';
|
|
109
110
|
import '../../forms/TimePicker/WheelColumn.js';
|
|
110
111
|
import '../../forms/TimePicker/TimePicker.theme.js';
|
|
111
112
|
import '../../forms/Slider/Slider.js';
|
|
@@ -88,6 +88,7 @@ import '../../core/ContextMenu/ContextMenu.js';
|
|
|
88
88
|
import '../../core/ContextMenu/ContextMenu.theme.js';
|
|
89
89
|
import '../../core/Pill/Pill.js';
|
|
90
90
|
import '../../core/Icon/Icon.js';
|
|
91
|
+
import '../../core/ImagePlaceholder/ImagePlaceholder.js';
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
94
|
* Format seconds into MM:SS display
|
|
@@ -73,7 +73,7 @@ const MarkdownRenderer = ({ content, options = {}, isStreaming = false, animated
|
|
|
73
73
|
return (jsxs(AnimatedBlock, { animate: shouldAnimate, children: [jsx(SkipWords, { children: children }), jsx(Prism, { style: syntaxTheme === 'dark' ? oneDark : oneLight, language: language, PreTag: "div", className: "rounded-lg my-3", ...props, children: String(children).replace(/\n$/, '') })] }));
|
|
74
74
|
}
|
|
75
75
|
// Inline code — skip word animation for code tokens
|
|
76
|
-
return (jsxs(Fragment, { children: [jsx(SkipWords, { children: children }), jsx("code", { className: "bg-(--color-
|
|
76
|
+
return (jsxs(Fragment, { children: [jsx(SkipWords, { children: children }), jsx("code", { className: "bg-(--color-surface-sunken) text-(--color-primary) px-1.5 py-0.5 rounded text-base font-mono", ...props, children: children })] }));
|
|
77
77
|
},
|
|
78
78
|
// Paragraphs — word-level animation
|
|
79
79
|
p({ children }) {
|
|
@@ -4,7 +4,7 @@ const tokenCounterTheme = {
|
|
|
4
4
|
countStyle: "font-medium text-[var(--color-text-primary)]",
|
|
5
5
|
labelStyle: "text-[var(--color-text-muted)]",
|
|
6
6
|
costStyle: "text-[var(--color-text-muted)] font-mono",
|
|
7
|
-
progressStyle: "h-1 bg-[var(--color-
|
|
7
|
+
progressStyle: "h-1 bg-[var(--color-surface-sunken)] rounded-full overflow-hidden",
|
|
8
8
|
progressBarStyle: "h-full bg-[var(--color-primary)] transition-all duration-200",
|
|
9
9
|
sizes: {
|
|
10
10
|
sm: {
|
|
@@ -353,9 +353,9 @@ className, title, description, enableKeyboardNavigation = BAR_CHART_DEFAULTS.ena
|
|
|
353
353
|
originY: isNegative ? 0 : 1,
|
|
354
354
|
transformOrigin: isNegative ? "top" : "bottom",
|
|
355
355
|
fill: isNull
|
|
356
|
-
? "var(--color-
|
|
356
|
+
? "var(--color-surface-sunken)"
|
|
357
357
|
: shouldReduceOpacity
|
|
358
|
-
? "var(--color-
|
|
358
|
+
? "var(--color-surface-sunken)"
|
|
359
359
|
: fillColor,
|
|
360
360
|
opacity: !isNull && shouldReduceOpacity ? 0.9 : 1,
|
|
361
361
|
stroke: isFocused ? "var(--color-primary)" : "none",
|
|
@@ -234,7 +234,7 @@ className, title, description, enableKeyboardNavigation = STACKED_BAR_CHART_DEFA
|
|
|
234
234
|
originY: 1,
|
|
235
235
|
transformOrigin: "bottom",
|
|
236
236
|
fill: shouldReduceOpacity
|
|
237
|
-
? "var(--color-
|
|
237
|
+
? "var(--color-surface-sunken)"
|
|
238
238
|
: fillColor,
|
|
239
239
|
opacity: shouldReduceOpacity ? 0.9 : 1,
|
|
240
240
|
stroke: isFocused ? "var(--color-primary)" : "none",
|
|
@@ -148,9 +148,9 @@ const BarRenderer = ({ data, config, scales, dimensions, margin, stacked = false
|
|
|
148
148
|
originY: isNegative ? 0 : 1,
|
|
149
149
|
transformOrigin: isNegative ? "top" : "bottom",
|
|
150
150
|
fill: isNull
|
|
151
|
-
? "var(--color-
|
|
151
|
+
? "var(--color-surface-sunken)"
|
|
152
152
|
: shouldReduceOpacity
|
|
153
|
-
? "var(--color-
|
|
153
|
+
? "var(--color-surface-sunken)"
|
|
154
154
|
: fillColor,
|
|
155
155
|
opacity: !isNull && shouldReduceOpacity ? 0.9 : 1,
|
|
156
156
|
stroke: isFocused ? "var(--color-primary)" : "none",
|
|
@@ -10,7 +10,7 @@ const breadcrumbsTheme = {
|
|
|
10
10
|
link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-150 font-medium",
|
|
11
11
|
current: "text-[var(--color-text-primary)] font-medium",
|
|
12
12
|
separator: "text-[var(--color-text-muted)] select-none",
|
|
13
|
-
ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-150 cursor-pointer p-1 rounded hover:bg-[var(--color-
|
|
13
|
+
ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-150 cursor-pointer p-1 rounded hover:bg-[var(--color-surface-hover)]",
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* Variant styles for different breadcrumb appearances
|
|
@@ -107,7 +107,7 @@ const Button = React__default.forwardRef(({ children, className = "", iconOnly =
|
|
|
107
107
|
return (jsxs(motion.button, { type: "button", ...restProps, ...animationProps, ref: mergedRef, className: cn(buttonTheme.baseStyle, colorClasses, variantClasses, sizeClasses, blockStyle, stateClasses, darkMode && "dark", className), disabled: isDisabled, "data-state": state, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": size, "data-icon-only": iconOnly ? "true" : "false", "data-block": block ? "true" : "false", "aria-disabled": isDisabled || undefined, "aria-invalid": isError || undefined, "aria-label": ariaLabel, onClick: handleClick, children: [showReflection &&
|
|
108
108
|
resolvedVariant !== "link" &&
|
|
109
109
|
resolvedVariant !== "ghost" &&
|
|
110
|
-
resolvedVariant !== "outline" && (jsx("div", { className: "absolute top-0.25 right-0.25 left-0.25 h-3 border-t-[0.5px] border-white/40 rounded-t-[calc(var(--button-radius)-1.25px)] opacity-60" })), isLoading && (jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx(Spinner, { size: "sm", color: color, className: spinnerClassName }) })), jsx("span", { className: cn("inline-flex items-center gap-2 whitespace-nowrap", isLoading && "opacity-0"), children: children }), enableRipple &&
|
|
110
|
+
resolvedVariant !== "outline" && (jsx("div", { className: "absolute top-0.25 right-0.25 left-0.25 h-3 border-t-[0.5px] border-white/40 rounded-t-[calc(var(--button-radius)-1.25px)] opacity-60 blur-[0.75px]" })), isLoading && (jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx(Spinner, { size: "sm", color: color, className: spinnerClassName }) })), jsx("span", { className: cn("inline-flex items-center gap-2 whitespace-nowrap", isLoading && "opacity-0"), children: children }), enableRipple &&
|
|
111
111
|
ripples.map((ripple) => {
|
|
112
112
|
const animation = getRippleAnimation(effect, ripple, rippleScale);
|
|
113
113
|
return (jsx(motion.span, { initial: animation.initial, animate: animation.animate, transition: animation.transition, className: cn("absolute rounded-full size-5 pointer-events-none ", animation.className, rippleClassName ||
|
|
@@ -152,19 +152,19 @@ const buttonTheme = {
|
|
|
152
152
|
// Size variants
|
|
153
153
|
sizes: {
|
|
154
154
|
sm: {
|
|
155
|
-
default: "font-
|
|
155
|
+
default: "font-medium min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-sm",
|
|
156
156
|
iconOnly: "size-[var(--button-icon-size-sm)] p-[var(--button-icon-p-sm)]",
|
|
157
157
|
link: "font-semibold p-0 text-sm h-fit",
|
|
158
158
|
},
|
|
159
159
|
md: {
|
|
160
|
-
default: "font-
|
|
160
|
+
default: "font-medium min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-sm",
|
|
161
161
|
iconOnly: "size-[var(--button-icon-size-md)] p-[var(--button-icon-p-md)]",
|
|
162
162
|
link: "font-semibold p-0 text-sm h-fit",
|
|
163
163
|
},
|
|
164
164
|
lg: {
|
|
165
|
-
default: "font-
|
|
165
|
+
default: "font-medium min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-base",
|
|
166
166
|
iconOnly: "size-[var(--button-icon-size-lg)] p-[var(--button-icon-p-lg)]",
|
|
167
|
-
link: "font-
|
|
167
|
+
link: "font-medium p-0 text-base h-fit",
|
|
168
168
|
},
|
|
169
169
|
},
|
|
170
170
|
// State styles
|
|
@@ -3,7 +3,7 @@ const calendarMiniTheme = {
|
|
|
3
3
|
monthRowStyle: "flex flex-1 gap-4 overflow-x-auto scrollbar-hide scroll-smooth snap-x snap-mandatory px-4 ml-3",
|
|
4
4
|
monthItemStyle: "font-semibold text-[var(--color-text-secondary)] cursor-pointer transition-colors hover:text-[var(--color-text-primary)] flex-shrink-0 snap-center data-[state=active]:text-[var(--color-text-primary)] data-[state=active]:opacity-100",
|
|
5
5
|
dateRowStyle: "relative overflow-hidden px-4 py-0.5",
|
|
6
|
-
dateItemStyle: "px-0 py-1.5 min-w-[50px] flex flex-col items-center rounded-[var(--form-radius)] cursor-pointer transition-all text-[var(--color-text-primary)] hover:bg-[var(--color-
|
|
6
|
+
dateItemStyle: "px-0 py-1.5 min-w-[50px] flex flex-col items-center rounded-[var(--form-radius)] cursor-pointer transition-all text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] flex-shrink-0 snap-center ring-1 ring-transparent data-[state=selected]:bg-[var(--color-background-secondary)] data-[state=selected]:ring-[var(--color-border)] data-[state=selected]:hover:bg-[var(--color-background-secondary)] data-[state=selected]:z-2 data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-[var(--color-background-secondary)]",
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { calendarMiniTheme };
|
|
@@ -11,7 +11,7 @@ const contextMenuTheme = {
|
|
|
11
11
|
itemCheckedStyle: "absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-primary)] " +
|
|
12
12
|
"dark:text-[var(--color-neutral-200)]",
|
|
13
13
|
// Submenu trigger - based on Dropdown item style with chevron space
|
|
14
|
-
subTriggerStyle: `${dropdownTheme.itemBaseStyle} pr-8 data-[state=open]:bg-[var(--color-
|
|
14
|
+
subTriggerStyle: `${dropdownTheme.itemBaseStyle} pr-8 data-[state=open]:bg-[var(--color-surface-hover)] ` +
|
|
15
15
|
"dark:data-[state=open]:bg-[var(--color-neutral-700)]",
|
|
16
16
|
// Submenu content - matches main dropdown menu style
|
|
17
17
|
subContentStyle: "min-w-[180px] max-h-[400px] overflow-y-auto rounded-[var(--dropdown-radius)] border border-[var(--color-border)] " +
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const drawerTheme = {
|
|
2
2
|
// Note: overlay styling is now handled by the shared Overlay component
|
|
3
3
|
overlay: "",
|
|
4
|
-
container: "fixed bg-
|
|
4
|
+
container: "fixed bg-[var(--color-surface-raised)] shadow-2xl shadow-black/30 " +
|
|
5
5
|
"border border-[var(--color-border)] ring-4 ring-white/10 " +
|
|
6
6
|
"flex flex-col overflow-hidden rounded-[var(--drawer-radius)] " +
|
|
7
|
-
"dark:bg-[var(--color-
|
|
7
|
+
"dark:bg-[var(--color-surface-raised)] 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",
|
|
@@ -2,8 +2,8 @@ import { menuItemTheme } from '../MenuItem/MenuItem.theme.js';
|
|
|
2
2
|
|
|
3
3
|
const dropdownTheme = {
|
|
4
4
|
// Menu container - similar to Popover but with menu-specific styling
|
|
5
|
-
menuStyle: "min-w-[200px] max-h-[400px] overflow-y-auto rounded-[var(--dropdown-radius)] border border-[var(--color-border)] bg-
|
|
6
|
-
"dark:bg-[var(--color-
|
|
5
|
+
menuStyle: "min-w-[200px] max-h-[400px] overflow-y-auto rounded-[var(--dropdown-radius)] border border-[var(--color-border)] bg-[var(--color-surface-overlay)] shadow-real-xl focus:outline-none flex disabled:cursor-not-allowed " +
|
|
6
|
+
"dark:bg-[var(--color-surface-overlay)]",
|
|
7
7
|
// Delegate item styles to shared MenuItem theme
|
|
8
8
|
itemBaseStyle: menuItemTheme.baseStyle,
|
|
9
9
|
itemDangerStyle: menuItemTheme.dangerStyle,
|
|
@@ -11,7 +11,7 @@ const Empty = React__default.forwardRef(({ title, subtitle, image, imageAlt, ico
|
|
|
11
11
|
if (children) {
|
|
12
12
|
return (jsx("div", { ref: ref, className: cn(emptyTheme.baseStyle, className), role: "region", "aria-label": "Empty state", ...props, children: children }));
|
|
13
13
|
}
|
|
14
|
-
return (jsxs("div", { ref: ref, className: cn(emptyTheme.baseStyle, className), role: "region", "aria-label": "Empty state", ...props, children: [image ? (jsx("div", { className: "flex-shrink-0 mb-6", children: jsx("img", { src: image, alt: imageAlt || "Empty state illustration", className: cn("mx-auto object-cover", imageDimensions), loading: "lazy" }) })) : icon ? (jsx("div", { className: cn("flex-shrink-0 mx-auto text-[var(--color-text-muted)] mb-6", iconDimensions), "aria-hidden": "true", children: icon })) : null, jsxs("div", { className: "flex flex-col items-center justify-center gap-1", children: [title && jsx("div", { className: emptyTheme.titleStyle, children: title }), subtitle && (jsx("div", { className: emptyTheme.subtitleStyle, children: subtitle }))] }), action && (jsx("div", { className: "flex flex-col sm:flex-row gap-2 justify-center items-center mt-3", children: action }))] }));
|
|
14
|
+
return (jsxs("div", { ref: ref, className: cn(emptyTheme.baseStyle, className), role: "region", "aria-label": "Empty state", ...props, children: [image ? (jsx("div", { className: "flex-shrink-0 mb-6", children: jsx("img", { src: image, alt: imageAlt || "Empty state illustration", className: cn("mx-auto object-cover", imageDimensions), loading: "lazy" }) })) : icon ? (jsx("div", { className: cn("flex-shrink-0 mx-auto flex items-center justify-center text-[var(--color-text-muted)] mb-6", iconDimensions), "aria-hidden": "true", children: icon })) : null, jsxs("div", { className: "flex flex-col items-center justify-center gap-1", children: [title && jsx("div", { className: emptyTheme.titleStyle, children: title }), subtitle && (jsx("div", { className: emptyTheme.subtitleStyle, children: subtitle }))] }), action && (jsx("div", { className: "flex flex-col sm:flex-row gap-2 justify-center items-center mt-3", children: action }))] }));
|
|
15
15
|
});
|
|
16
16
|
// Set display name for dev tools and Storybook
|
|
17
17
|
Empty.displayName = "Empty";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ImagePlaceholderProps } from "./ImagePlaceholder.types";
|
|
3
|
+
/**
|
|
4
|
+
* ImagePlaceholder renders a striped placeholder surface used when a
|
|
5
|
+
* header / banner / cover image has not yet been uploaded.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <ImagePlaceholder ratio={16 / 9}>
|
|
10
|
+
* <Button>Upload cover</Button>
|
|
11
|
+
* </ImagePlaceholder>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const ImagePlaceholder: React.ForwardRefExoticComponent<ImagePlaceholderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { AspectRatio } from '../AspectRatio/AspectRatio.js';
|
|
5
|
+
import { StripePattern } from '../../effects/StripePattern/StripePattern.js';
|
|
6
|
+
import { imagePlaceholderTheme } from './ImagePlaceholder.theme.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ImagePlaceholder renders a striped placeholder surface used when a
|
|
10
|
+
* header / banner / cover image has not yet been uploaded.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <ImagePlaceholder ratio={16 / 9}>
|
|
15
|
+
* <Button>Upload cover</Button>
|
|
16
|
+
* </ImagePlaceholder>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
const ImagePlaceholder = React__default.forwardRef(({ ratio = 16 / 9, bordered = true, rounded = true, pattern, children, className, ...rest }, ref) => {
|
|
20
|
+
const surface = (jsxs("div", { ref: ref, className: cn(imagePlaceholderTheme.surfaceStyle, rounded && imagePlaceholderTheme.roundedStyle, bordered && imagePlaceholderTheme.borderedStyle, className), ...rest, children: [jsx(StripePattern, { ...pattern }), children !== undefined && (jsx("div", { className: imagePlaceholderTheme.contentStyle, children: children }))] }));
|
|
21
|
+
if (ratio === undefined) {
|
|
22
|
+
return surface;
|
|
23
|
+
}
|
|
24
|
+
return jsx(AspectRatio, { ratio: ratio, children: surface });
|
|
25
|
+
});
|
|
26
|
+
ImagePlaceholder.displayName = "ImagePlaceholder";
|
|
27
|
+
|
|
28
|
+
export { ImagePlaceholder };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const imagePlaceholderTheme = {
|
|
2
|
+
surfaceStyle: "relative w-full h-full overflow-hidden bg-[var(--color-background-secondary)]",
|
|
3
|
+
borderedStyle: "border border-dashed border-[var(--color-border)]",
|
|
4
|
+
roundedStyle: "rounded-[var(--card-rounded)]",
|
|
5
|
+
contentStyle: "absolute inset-0 z-10 flex items-center justify-center text-[var(--color-text-muted)]",
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { imagePlaceholderTheme };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StripePatternProps } from "../../effects/StripePattern";
|
|
3
|
+
export interface ImagePlaceholderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
4
|
+
/**
|
|
5
|
+
* Aspect ratio (width / height) for the placeholder surface.
|
|
6
|
+
* Pass `undefined` to skip the AspectRatio wrapper and let the parent
|
|
7
|
+
* control the height (e.g. when used inside a fixed-height container).
|
|
8
|
+
* @default 16/9
|
|
9
|
+
*/
|
|
10
|
+
ratio?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Show the dashed outer border.
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
bordered?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Apply rounded corners.
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
rounded?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Override props passed to the inner StripePattern (color, spacing, angle, etc.).
|
|
23
|
+
*/
|
|
24
|
+
pattern?: Partial<StripePatternProps>;
|
|
25
|
+
/**
|
|
26
|
+
* Optional content rendered above the striped surface (e.g. an icon,
|
|
27
|
+
* caption, or upload button).
|
|
28
|
+
*/
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
/** className override on the outer surface (shadcn pattern). */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
@@ -54,7 +54,7 @@ const messageTheme = {
|
|
|
54
54
|
linkStyle: "flex flex-col rounded-lg border border-[var(--color-border)] overflow-hidden text-xs max-w-xs",
|
|
55
55
|
// Reactions styles
|
|
56
56
|
reactionsContainerStyle: "flex flex-wrap items-center gap-1.5 mt-1.5",
|
|
57
|
-
reactionPillStyle: "inline-flex items-center gap-1 rounded-full border border-[var(--color-border)] bg-[var(--color-background-secondary)] px-2 py-0.5 text-xs cursor-pointer transition-colors hover:bg-[var(--color-
|
|
57
|
+
reactionPillStyle: "inline-flex items-center gap-1 rounded-full border border-[var(--color-border)] bg-[var(--color-background-secondary)] px-2 py-0.5 text-xs cursor-pointer transition-colors hover:bg-[var(--color-surface-hover)]",
|
|
58
58
|
reactionPillActiveStyle: "border-[var(--color-primary-200)] bg-[var(--color-primary-50)] text-[var(--color-primary)]",
|
|
59
59
|
// Reply/quote styles
|
|
60
60
|
replyStyle: "border-l-2 border-[var(--color-border)] pl-2.5 mb-2 text-xs text-[var(--color-text-muted)]",
|
|
@@ -3,7 +3,7 @@ const modalTheme = {
|
|
|
3
3
|
overlay: "",
|
|
4
4
|
container: "relative w-full max-h-[calc(100vh-2rem)] rounded-[var(--modal-radius)] shadow-2xl shadow-black/30 flex flex-col my-4 min-h-0 overflow-hidden",
|
|
5
5
|
containerVariants: {
|
|
6
|
-
default: "bg-
|
|
6
|
+
default: "bg-[var(--color-surface-raised)] ring-4 !ring-white/10 dark:bg-[var(--color-surface-raised)] border border-[var(--color-border)]",
|
|
7
7
|
translucent: "bg-gradient-to-b from-[var(--color-background)]/90 to-[var(--color-background)]/70 backdrop-blur-xl ring-4 ring-white/20 border-t border-[var(--color-border)]",
|
|
8
8
|
},
|
|
9
9
|
header: "flex items-start justify-between p-6 pb-0 shrink-0 border-b border-transparent gap-6 relative",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NavItemProps } from "./NavItem.types";
|
|
3
|
-
export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & React.RefAttributes<
|
|
3
|
+
export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & React.RefAttributes<HTMLElement>>;
|