@forgedevstack/bear 1.0.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/components/ActivityItem/ActivityItem.cjs +1 -1
- package/dist/components/ActivityItem/ActivityItem.js +1 -0
- package/dist/components/Alert/Alert.const.cjs +1 -1
- package/dist/components/Alert/Alert.const.js +3 -2
- package/dist/components/AppBar/AppBar.cjs +1 -1
- package/dist/components/AppBar/AppBar.js +3 -2
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.js +15 -14
- package/dist/components/BearLogo/EmberLogo.cjs +1 -1
- package/dist/components/BearLogo/EmberLogo.js +3 -2
- package/dist/components/BottomNavigation/BottomNavigation.cjs +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.js +3 -2
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +56 -55
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.const.cjs +1 -0
- package/dist/components/Carousel/Carousel.const.d.ts +12 -0
- package/dist/components/Carousel/Carousel.const.js +9 -0
- package/dist/components/Carousel/Carousel.d.ts +14 -3
- package/dist/components/Carousel/Carousel.js +222 -75
- package/dist/components/Carousel/Carousel.types.d.ts +32 -2
- package/dist/components/Carousel/index.d.ts +1 -1
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.js +3 -2
- package/dist/components/CodeEditor/CodeEditor.cjs +5 -0
- package/dist/components/CodeEditor/CodeEditor.const.cjs +1 -0
- package/dist/components/CodeEditor/CodeEditor.const.d.ts +21 -0
- package/dist/components/CodeEditor/CodeEditor.const.js +119 -0
- package/dist/components/CodeEditor/CodeEditor.d.ts +22 -0
- package/dist/components/CodeEditor/CodeEditor.js +250 -0
- package/dist/components/CodeEditor/CodeEditor.types.d.ts +80 -0
- package/dist/components/CodeEditor/CodeEditor.utils.cjs +1 -0
- package/dist/components/CodeEditor/CodeEditor.utils.d.ts +6 -0
- package/dist/components/CodeEditor/CodeEditor.utils.js +75 -0
- package/dist/components/CodeEditor/index.d.ts +2 -0
- package/dist/components/Columns/Columns.cjs +1 -1
- package/dist/components/Columns/Columns.js +9 -8
- package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -0
- package/dist/components/CountdownTimer/CountdownTimer.const.cjs +1 -0
- package/dist/components/CountdownTimer/CountdownTimer.const.d.ts +27 -0
- package/dist/components/CountdownTimer/CountdownTimer.const.js +35 -0
- package/dist/components/CountdownTimer/CountdownTimer.d.ts +7 -0
- package/dist/components/CountdownTimer/CountdownTimer.js +115 -0
- package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +56 -0
- package/dist/components/CountdownTimer/index.d.ts +2 -0
- package/dist/components/Cropper/Cropper.cjs +1 -0
- package/dist/components/Cropper/Cropper.const.cjs +1 -0
- package/dist/components/Cropper/Cropper.const.d.ts +31 -0
- package/dist/components/Cropper/Cropper.const.js +33 -0
- package/dist/components/Cropper/Cropper.d.ts +21 -0
- package/dist/components/Cropper/Cropper.js +362 -0
- package/dist/components/Cropper/Cropper.types.d.ts +72 -0
- package/dist/components/Cropper/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.cjs +1 -1
- package/dist/components/DataTable/DataTable.js +5 -4
- package/dist/components/Divider/Divider.cjs +1 -1
- package/dist/components/Divider/Divider.js +15 -14
- package/dist/components/Dock/Dock.cjs +1 -0
- package/dist/components/Dock/Dock.const.cjs +1 -0
- package/dist/components/Dock/Dock.const.d.ts +25 -0
- package/dist/components/Dock/Dock.const.js +22 -0
- package/dist/components/Dock/Dock.d.ts +7 -0
- package/dist/components/Dock/Dock.js +144 -0
- package/dist/components/Dock/Dock.types.d.ts +42 -0
- package/dist/components/Dock/index.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.js +7 -6
- package/dist/components/FileTree/FileTree.cjs +1 -0
- package/dist/components/FileTree/FileTree.d.ts +3 -0
- package/dist/components/FileTree/FileTree.js +46 -0
- package/dist/components/FileTree/FileTree.types.d.ts +30 -0
- package/dist/components/FileTree/index.d.ts +2 -0
- package/dist/components/GradientText/GradientText.cjs +1 -0
- package/dist/components/GradientText/GradientText.const.cjs +1 -0
- package/dist/components/GradientText/GradientText.const.d.ts +15 -0
- package/dist/components/GradientText/GradientText.const.js +36 -0
- package/dist/components/GradientText/GradientText.d.ts +7 -0
- package/dist/components/GradientText/GradientText.js +52 -0
- package/dist/components/GradientText/GradientText.types.d.ts +27 -0
- package/dist/components/GradientText/index.d.ts +2 -0
- package/dist/components/Highlight/Highlight.cjs +1 -1
- package/dist/components/Highlight/Highlight.const.cjs +1 -0
- package/dist/components/Highlight/Highlight.const.d.ts +8 -0
- package/dist/components/Highlight/Highlight.const.js +15 -0
- package/dist/components/Highlight/Highlight.d.ts +4 -0
- package/dist/components/Highlight/Highlight.js +32 -24
- package/dist/components/Highlight/Highlight.types.d.ts +9 -1
- package/dist/components/Highlight/index.d.ts +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.js +17 -16
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.js +12 -11
- package/dist/components/Kbd/Kbd.cjs +1 -1
- package/dist/components/Kbd/Kbd.js +17 -16
- package/dist/components/Map/Map.cjs +1 -0
- package/dist/components/Map/Map.const.cjs +1 -0
- package/dist/components/Map/Map.const.d.ts +20 -0
- package/dist/components/Map/Map.const.js +26 -0
- package/dist/components/Map/Map.d.ts +20 -0
- package/dist/components/Map/Map.js +259 -0
- package/dist/components/Map/Map.types.d.ts +81 -0
- package/dist/components/Map/index.d.ts +2 -0
- package/dist/components/Marquee/Marquee.cjs +1 -0
- package/dist/components/Marquee/Marquee.const.cjs +1 -0
- package/dist/components/Marquee/Marquee.const.d.ts +11 -0
- package/dist/components/Marquee/Marquee.const.js +12 -0
- package/dist/components/Marquee/Marquee.d.ts +7 -0
- package/dist/components/Marquee/Marquee.js +106 -0
- package/dist/components/Marquee/Marquee.types.d.ts +32 -0
- package/dist/components/Marquee/index.d.ts +2 -0
- package/dist/components/Masonry/Masonry.cjs +1 -0
- package/dist/components/Masonry/Masonry.const.cjs +1 -0
- package/dist/components/Masonry/Masonry.const.d.ts +9 -0
- package/dist/components/Masonry/Masonry.const.js +9 -0
- package/dist/components/Masonry/Masonry.d.ts +7 -0
- package/dist/components/Masonry/Masonry.js +51 -0
- package/dist/components/Masonry/Masonry.types.d.ts +21 -0
- package/dist/components/Masonry/index.d.ts +2 -0
- package/dist/components/NavigableSelect/NavigableSelect.cjs +1 -0
- package/dist/components/NavigableSelect/NavigableSelect.const.cjs +1 -0
- package/dist/components/NavigableSelect/NavigableSelect.const.d.ts +23 -0
- package/dist/components/NavigableSelect/NavigableSelect.const.js +33 -0
- package/dist/components/NavigableSelect/NavigableSelect.d.ts +7 -0
- package/dist/components/NavigableSelect/NavigableSelect.js +361 -0
- package/dist/components/NavigableSelect/NavigableSelect.types.d.ts +56 -0
- package/dist/components/NavigableSelect/index.d.ts +2 -0
- package/dist/components/Progress/Progress.cjs +1 -1
- package/dist/components/Progress/Progress.js +3 -2
- package/dist/components/ResizablePanel/ResizablePanel.cjs +1 -0
- package/dist/components/ResizablePanel/ResizablePanel.const.cjs +1 -0
- package/dist/components/ResizablePanel/ResizablePanel.const.d.ts +11 -0
- package/dist/components/ResizablePanel/ResizablePanel.const.js +11 -0
- package/dist/components/ResizablePanel/ResizablePanel.d.ts +17 -0
- package/dist/components/ResizablePanel/ResizablePanel.js +70 -0
- package/dist/components/ResizablePanel/ResizablePanel.types.d.ts +21 -0
- package/dist/components/ResizablePanel/ResizablePanel.utils.cjs +1 -0
- package/dist/components/ResizablePanel/ResizablePanel.utils.d.ts +10 -0
- package/dist/components/ResizablePanel/ResizablePanel.utils.js +11 -0
- package/dist/components/ResizablePanel/index.d.ts +2 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.cjs +1 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.const.cjs +1 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.const.d.ts +2 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.const.js +5 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.d.ts +3 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.js +60 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.types.d.ts +15 -0
- package/dist/components/ResizableTextarea/index.d.ts +2 -0
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +3 -2
- package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +3 -2
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.js +13 -12
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.js +3 -2
- package/dist/components/Spotlight/Spotlight.cjs +1 -0
- package/dist/components/Spotlight/Spotlight.const.cjs +1 -0
- package/dist/components/Spotlight/Spotlight.const.d.ts +18 -0
- package/dist/components/Spotlight/Spotlight.const.js +9 -0
- package/dist/components/Spotlight/Spotlight.d.ts +7 -0
- package/dist/components/Spotlight/Spotlight.js +220 -0
- package/dist/components/Spotlight/Spotlight.types.d.ts +51 -0
- package/dist/components/Spotlight/index.d.ts +2 -0
- package/dist/components/StatCard/StatCard.cjs +1 -1
- package/dist/components/StatCard/StatCard.js +9 -8
- package/dist/components/Statistic/Statistic.cjs +1 -1
- package/dist/components/Statistic/Statistic.js +7 -6
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.js +11 -10
- package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.cjs +1 -1
- package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.js +16 -15
- package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
- package/dist/components/TimePicker/helpers/ClockFaceSvg.js +13 -12
- package/dist/components/Transition/Transition.cjs +1 -0
- package/dist/components/Transition/Transition.const.cjs +1 -0
- package/dist/components/Transition/Transition.const.d.ts +15 -0
- package/dist/components/Transition/Transition.const.js +73 -0
- package/dist/components/Transition/Transition.d.ts +37 -0
- package/dist/components/Transition/Transition.js +107 -0
- package/dist/components/Transition/Transition.types.d.ts +69 -0
- package/dist/components/Transition/index.d.ts +2 -0
- package/dist/components/Typewriter/Typewriter.cjs +1 -0
- package/dist/components/Typewriter/Typewriter.const.cjs +1 -0
- package/dist/components/Typewriter/Typewriter.const.d.ts +22 -0
- package/dist/components/Typewriter/Typewriter.const.js +11 -0
- package/dist/components/Typewriter/Typewriter.d.ts +7 -0
- package/dist/components/Typewriter/Typewriter.js +88 -0
- package/dist/components/Typewriter/Typewriter.types.d.ts +32 -0
- package/dist/components/Typewriter/index.d.ts +2 -0
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.const.cjs +1 -0
- package/dist/components/Typography/Typography.const.d.ts +22 -0
- package/dist/components/Typography/Typography.const.js +91 -0
- package/dist/components/Typography/Typography.js +75 -138
- package/dist/components/Typography/Typography.types.d.ts +17 -0
- package/dist/components/Watermark/Watermark.cjs +1 -0
- package/dist/components/Watermark/Watermark.const.cjs +1 -0
- package/dist/components/Watermark/Watermark.const.d.ts +30 -0
- package/dist/components/Watermark/Watermark.const.js +18 -0
- package/dist/components/Watermark/Watermark.d.ts +7 -0
- package/dist/components/Watermark/Watermark.js +96 -0
- package/dist/components/Watermark/Watermark.types.d.ts +35 -0
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +33 -1
- package/dist/components/index.js +270 -237
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.js +24 -19
- package/dist/hooks/useAnimate.cjs +1 -0
- package/dist/hooks/useAnimate.d.ts +61 -0
- package/dist/hooks/useAnimate.js +125 -0
- package/dist/hooks/useResponsive.cjs +1 -0
- package/dist/hooks/useResponsive.d.ts +35 -0
- package/dist/hooks/useResponsive.js +74 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +335 -295
- package/dist/styles.css +1 -1
- package/dist/utils/createSlots.cjs +1 -0
- package/dist/utils/createSlots.d.ts +70 -0
- package/dist/utils/createSlots.js +65 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Crop area coordinates
|
|
4
|
+
*/
|
|
5
|
+
export interface CropArea {
|
|
6
|
+
/** X position (px) */
|
|
7
|
+
x: number;
|
|
8
|
+
/** Y position (px) */
|
|
9
|
+
y: number;
|
|
10
|
+
/** Width (px) */
|
|
11
|
+
width: number;
|
|
12
|
+
/** Height (px) */
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Aspect ratio presets
|
|
17
|
+
*/
|
|
18
|
+
export type AspectRatioPreset = 'free' | '1:1' | '4:3' | '3:2' | '16:9' | '2:3' | '3:4' | '9:16';
|
|
19
|
+
/**
|
|
20
|
+
* Crop shape
|
|
21
|
+
*/
|
|
22
|
+
export type CropShape = 'rectangle' | 'circle';
|
|
23
|
+
export interface CropperProps {
|
|
24
|
+
/** Image source URL or data URL */
|
|
25
|
+
src: string;
|
|
26
|
+
/** Controlled crop area */
|
|
27
|
+
crop?: CropArea;
|
|
28
|
+
/** Called when crop area changes */
|
|
29
|
+
onCropChange?: (crop: CropArea) => void;
|
|
30
|
+
/** Called when crop is complete (on mouse up) */
|
|
31
|
+
onCropComplete?: (crop: CropArea, croppedImageUrl: string) => void;
|
|
32
|
+
/** Aspect ratio (number or preset) */
|
|
33
|
+
aspectRatio?: number | AspectRatioPreset;
|
|
34
|
+
/** Crop shape */
|
|
35
|
+
shape?: CropShape;
|
|
36
|
+
/** Zoom level (1 = original) */
|
|
37
|
+
zoom?: number;
|
|
38
|
+
/** Called when zoom changes */
|
|
39
|
+
onZoomChange?: (zoom: number) => void;
|
|
40
|
+
/** Min zoom level */
|
|
41
|
+
minZoom?: number;
|
|
42
|
+
/** Max zoom level */
|
|
43
|
+
maxZoom?: number;
|
|
44
|
+
/** Rotation angle in degrees */
|
|
45
|
+
rotation?: number;
|
|
46
|
+
/** Called when rotation changes */
|
|
47
|
+
onRotationChange?: (rotation: number) => void;
|
|
48
|
+
/** Show zoom slider */
|
|
49
|
+
showZoomSlider?: boolean;
|
|
50
|
+
/** Show rotation slider */
|
|
51
|
+
showRotationSlider?: boolean;
|
|
52
|
+
/** Show grid overlay */
|
|
53
|
+
showGrid?: boolean;
|
|
54
|
+
/** Grid opacity (0-1) */
|
|
55
|
+
gridOpacity?: number;
|
|
56
|
+
/** Overlay color (the dark area outside crop) */
|
|
57
|
+
overlayColor?: string;
|
|
58
|
+
/** Border color of crop area */
|
|
59
|
+
borderColor?: string;
|
|
60
|
+
/** Border width in px */
|
|
61
|
+
borderWidth?: number;
|
|
62
|
+
/** Width of the cropper */
|
|
63
|
+
width?: string | number;
|
|
64
|
+
/** Height of the cropper */
|
|
65
|
+
height?: string | number;
|
|
66
|
+
/** Custom class name */
|
|
67
|
+
className?: string;
|
|
68
|
+
/** Custom styles */
|
|
69
|
+
style?: CSSProperties;
|
|
70
|
+
/** Test ID */
|
|
71
|
+
testId?: string;
|
|
72
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../utils/cn.cjs")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../utils/cn.cjs");require("react");const S=({columns:t,data:i,rowKey:h,variant:l="simple",loading:o=!1,emptyContent:x="No data available",onRowClick:d,clickable:c=!1,sortColumn:y,sortDirection:p="asc",onSort:n,compact:g=!1,stickyHeader:j=!1,maxHeight:f,className:k,testId:N})=>{const v=e=>{const b=t.find(a=>a.key===e);b!=null&&b.sortable&&n&&n(e)},m=g?"bear-px-3 bear-py-2":"bear-px-4 bear-py-3",M=g?"bear-px-3 bear-py-2":"bear-px-4 bear-py-3";return r.jsx("div",{className:s.cn("bear-w-full bear-overflow-hidden bear-rounded-lg bear-border bear-border-gray-200 dark:bear-border-gray-700",k),"data-testid":N,children:r.jsx("div",{className:"bear-overflow-auto",style:{maxHeight:f},children:r.jsxs("table",{className:"bear-w-full bear-border-collapse bear-text-sm",children:[r.jsx("thead",{className:s.cn("bear-bg-gray-50 dark:bear-bg-gray-800",j&&"bear-sticky bear-top-0 bear-z-10"),children:r.jsx("tr",{children:t.map(e=>r.jsx("th",{className:s.cn(M,"bear-text-left bear-font-semibold bear-text-gray-700 dark:bear-text-gray-200","bear-border-b bear-border-gray-200 dark:bear-border-gray-700",e.align==="center"&&"bear-text-center",e.align==="right"&&"bear-text-right",e.sortable&&"bear-cursor-pointer hover:bear-bg-gray-100 dark:hover:bear-bg-gray-700",e.hideOnMobile&&"bear-hidden md:bear-table-cell"),style:{width:e.width},onClick:()=>e.sortable&&v(e.key),children:r.jsxs("div",{className:"bear-flex bear-items-center bear-gap-1",children:[e.header,e.sortable&&y===e.key&&r.jsx("svg",{className:s.cn("bear-w-4 bear-h-4 bear-transition-transform",p==="desc"&&"bear-rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})})]})},e.key))})}),r.jsx("tbody",{className:"bear-bg-white dark:bear-bg-gray-900",children:o?r.jsx("tr",{children:r.jsx("td",{colSpan:t.length,className:"bear-py-12 bear-text-center",children:r.jsx("div",{className:"bear-flex bear-justify-center",children:r.jsxs("svg",{className:"bear-animate-spin bear-w-6 bear-h-6 bear-text-amber-500",viewBox:"0 0 24 24",fill:"none",children:[r.jsx("circle",{className:"bear-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"bear-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})})}):i.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:t.length,className:"bear-py-12 bear-text-center bear-text-gray-500 dark:bear-text-gray-400",children:x})}):i.map((e,b)=>r.jsx("tr",{onClick:()=>(c||d)&&(d==null?void 0:d(e,b)),className:s.cn(l==="striped"&&b%2===1&&"bear-bg-gray-50 dark:bear-bg-gray-800/50",l==="bordered"&&"bear-border-b bear-border-gray-200 dark:bear-border-gray-700",(c||d)&&"bear-cursor-pointer hover:bear-bg-amber-50 dark:hover:bear-bg-amber-900/10",l!=="bordered"&&"bear-border-b bear-border-gray-100 dark:bear-border-gray-800"),children:t.map(a=>r.jsx("td",{className:s.cn(m,"bear-text-gray-900 dark:bear-text-white",a.align==="center"&&"bear-text-center",a.align==="right"&&"bear-text-right",a.hideOnMobile&&"bear-hidden md:bear-table-cell"),children:a.cell?a.cell(e,b):a.accessor?a.accessor(e):String(e[a.key]??"")},a.key))},h(e,b)))})]})})})},q=t=>t;exports.DataTable=S;exports.createColumns=q;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { cn as d } from "../../utils/cn.js";
|
|
3
|
-
|
|
3
|
+
import "react";
|
|
4
|
+
const L = ({
|
|
4
5
|
columns: t,
|
|
5
6
|
data: h,
|
|
6
7
|
rowKey: n,
|
|
@@ -113,8 +114,8 @@ const B = ({
|
|
|
113
114
|
)
|
|
114
115
|
}
|
|
115
116
|
);
|
|
116
|
-
},
|
|
117
|
+
}, O = (t) => t;
|
|
117
118
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
L as DataTable,
|
|
120
|
+
O as createColumns
|
|
120
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../../utils/cn.cjs")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../../utils/cn.cjs");require("react");const l={solid:"bear-border-solid",dashed:"bear-border-dashed",dotted:"bear-border-dotted"},u={left:"before:bear-w-4 after:bear-flex-1",center:"before:bear-flex-1 after:bear-flex-1",right:"before:bear-flex-1 after:bear-w-4"},c=({children:i,orientation:n="horizontal",variant:b="solid",color:d,textAlign:x="center",thickness:r=1,spacing:a=4,className:s,testId:f,style:m,...h})=>{const e=n==="horizontal";return i?o.jsxs("div",{className:t.cn("bear-flex bear-items-center bear-gap-4",e?"bear-w-full":"bear-flex-col bear-h-full",u[x],s),role:"separator",style:{marginTop:e?`${a*.25}rem`:0,marginBottom:e?`${a*.25}rem`:0,...m},"data-testid":f,children:[o.jsx("span",{className:t.cn("bear-flex-shrink-0",l[b]),style:{borderTopWidth:e?r:0,borderLeftWidth:e?0:r,borderColor:d||"#e5e7eb"}}),o.jsx("span",{className:"bear-text-sm bear-text-gray-500 bear-whitespace-nowrap bear-px-2",children:i}),o.jsx("span",{className:t.cn("bear-flex-shrink-0",l[b]),style:{borderTopWidth:e?r:0,borderLeftWidth:e?0:r,borderColor:d||"#e5e7eb"}})]}):o.jsx("hr",{className:t.cn("bear-border-0",e?"bear-w-full":"bear-h-full bear-w-px",l[b],s),style:{borderTopWidth:e?r:0,borderLeftWidth:e?0:r,borderColor:d||"#e5e7eb",marginTop:e?`${a*.25}rem`:0,marginBottom:e?`${a*.25}rem`:0,marginLeft:e?0:`${a*.25}rem`,marginRight:e?0:`${a*.25}rem`,...m},"data-testid":f,...h})};exports.Divider=c;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
3
4
|
const l = {
|
|
4
5
|
solid: "bear-border-solid",
|
|
5
6
|
dashed: "bear-border-dashed",
|
|
@@ -8,14 +9,14 @@ const l = {
|
|
|
8
9
|
left: "before:bear-w-4 after:bear-flex-1",
|
|
9
10
|
center: "before:bear-flex-1 after:bear-flex-1",
|
|
10
11
|
right: "before:bear-flex-1 after:bear-w-4"
|
|
11
|
-
},
|
|
12
|
+
}, N = ({
|
|
12
13
|
children: f,
|
|
13
14
|
orientation: x = "horizontal",
|
|
14
15
|
variant: b = "solid",
|
|
15
16
|
color: d,
|
|
16
17
|
textAlign: h = "center",
|
|
17
18
|
thickness: r = 1,
|
|
18
|
-
spacing:
|
|
19
|
+
spacing: o = 4,
|
|
19
20
|
className: m,
|
|
20
21
|
testId: i,
|
|
21
22
|
style: s,
|
|
@@ -33,13 +34,13 @@ const l = {
|
|
|
33
34
|
),
|
|
34
35
|
role: "separator",
|
|
35
36
|
style: {
|
|
36
|
-
marginTop: e ? `${
|
|
37
|
-
marginBottom: e ? `${
|
|
37
|
+
marginTop: e ? `${o * 0.25}rem` : 0,
|
|
38
|
+
marginBottom: e ? `${o * 0.25}rem` : 0,
|
|
38
39
|
...s
|
|
39
40
|
},
|
|
40
41
|
"data-testid": i,
|
|
41
42
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ a(
|
|
43
44
|
"span",
|
|
44
45
|
{
|
|
45
46
|
className: t(
|
|
@@ -53,8 +54,8 @@ const l = {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ a("span", { className: "bear-text-sm bear-text-gray-500 bear-whitespace-nowrap bear-px-2", children: f }),
|
|
58
|
+
/* @__PURE__ */ a(
|
|
58
59
|
"span",
|
|
59
60
|
{
|
|
60
61
|
className: t(
|
|
@@ -70,7 +71,7 @@ const l = {
|
|
|
70
71
|
)
|
|
71
72
|
]
|
|
72
73
|
}
|
|
73
|
-
) : /* @__PURE__ */
|
|
74
|
+
) : /* @__PURE__ */ a(
|
|
74
75
|
"hr",
|
|
75
76
|
{
|
|
76
77
|
className: t(
|
|
@@ -83,10 +84,10 @@ const l = {
|
|
|
83
84
|
borderTopWidth: e ? r : 0,
|
|
84
85
|
borderLeftWidth: e ? 0 : r,
|
|
85
86
|
borderColor: d || "#e5e7eb",
|
|
86
|
-
marginTop: e ? `${
|
|
87
|
-
marginBottom: e ? `${
|
|
88
|
-
marginLeft: e ? 0 : `${
|
|
89
|
-
marginRight: e ? 0 : `${
|
|
87
|
+
marginTop: e ? `${o * 0.25}rem` : 0,
|
|
88
|
+
marginBottom: e ? `${o * 0.25}rem` : 0,
|
|
89
|
+
marginLeft: e ? 0 : `${o * 0.25}rem`,
|
|
90
|
+
marginRight: e ? 0 : `${o * 0.25}rem`,
|
|
90
91
|
...s
|
|
91
92
|
},
|
|
92
93
|
"data-testid": i,
|
|
@@ -95,5 +96,5 @@ const l = {
|
|
|
95
96
|
);
|
|
96
97
|
};
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
+
N as Divider
|
|
99
100
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),s=require("react"),o=require("../../utils/cn.cjs"),r=require("./Dock.const.cjs"),S=(c,i,a,t,d)=>{if(i<0)return t;const l=Math.abs(c-i);if(l>a)return t;const u=1-l/(a+1);return t+(d-t)*u},O=c=>{const{items:i,position:a="bottom",iconSize:t=r.DEFAULT_ICON_SIZE,magnifiedSize:d=r.DEFAULT_MAGNIFIED_SIZE,magnification:l=!0,magnificationDistance:u=r.DEFAULT_MAGNIFICATION_DISTANCE,showLabels:p=!0,className:h,style:D,testId:I}=c,[f,x]=s.useState(-1),[k,_]=s.useState(""),m=s.useRef(null),y=a==="left"||a==="right",N=s.useCallback((e,n)=>{x(e),_(n.label)},[]),v=s.useCallback(()=>{x(-1),_("")},[]);return b.jsx("div",{ref:m,className:o.cn("Bear-Dock","bear-flex bear-items-end bear-gap-1","bear-rounded-2xl bear-px-2 bear-py-1.5","bear-bg-white/80 dark:bear-bg-gray-900/80","bear-backdrop-blur-xl","bear-border bear-border-gray-200/50 dark:bear-border-gray-700/50","bear-shadow-lg",r.DOCK_POSITION_CLASSES[a],y&&"bear-items-center",h),style:{padding:r.DOCK_PADDING,zIndex:r.DOCK_Z_INDEX,...D},"data-testid":I,role:"toolbar","aria-label":"Dock",onMouseLeave:v,children:i.map((e,n)=>{const g=l?S(n,f,u,t,d):t;return b.jsxs("div",{className:"Bear-Dock__item bear-relative bear-flex bear-flex-col bear-items-center",children:[p&&f===n&&k&&b.jsx("div",{className:o.cn("Bear-Dock__tooltip","bear-absolute bear-whitespace-nowrap","bear-px-2 bear-py-1 bear-rounded-lg","bear-bg-gray-900 dark:bear-bg-gray-100","bear-text-white dark:bear-text-gray-900","bear-text-xs bear-font-medium","bear-shadow-md bear-pointer-events-none",r.TOOLTIP_POSITION_CLASSES[a]),role:"tooltip",children:e.label}),b.jsx("button",{className:o.cn("Bear-Dock__button","bear-flex bear-items-center bear-justify-center bear-rounded-xl","bear-transition-all bear-origin-bottom","hover:bear-cursor-pointer",e.active&&"bear-ring-2 bear-ring-offset-1",e.disabled&&"bear-opacity-40 bear-cursor-not-allowed"),style:{width:g,height:g,transitionDuration:`${r.SPRING_DURATION}ms`,transitionTimingFunction:"cubic-bezier(0.25, 0.1, 0.25, 1)"},onClick:e.disabled?void 0:e.onClick,onMouseEnter:()=>N(n,e),disabled:e.disabled,"aria-label":e.label,children:b.jsx("span",{className:o.cn("Bear-Dock__icon","bear-flex bear-items-center bear-justify-center","bear-w-full bear-h-full bear-rounded-xl","bear-transition-transform",e.active?"bear-bg-[var(--bear-primary-500)] bear-text-white":"bear-bg-gray-100 dark:bear-bg-gray-800"),style:{fontSize:g*r.ICON_SCALE_RATIO},children:e.icon})}),e.badge!==void 0&&b.jsx("span",{className:o.cn("Bear-Dock__badge","bear-absolute bear--top-1 bear--right-1","bear-min-w-[18px] bear-h-[18px]","bear-flex bear-items-center bear-justify-center","bear-rounded-full bear-text-[10px] bear-font-bold","bear-text-white bear-leading-none bear-px-1","bear-bg-[var(--bear-danger-500,#ef4444)]"),children:e.badge}),e.active&&a==="bottom"&&b.jsx("div",{className:o.cn("Bear-Dock__dot","bear-w-1 bear-h-1 bear-rounded-full bear-mt-0.5","bear-bg-[var(--bear-primary-500)]"),"aria-hidden":"true"})]},e.id)})})};exports.Dock=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=48,t=72,r=2,I=8,a=150,b=.5,_={top:"bear-fixed bear-top-2 bear-left-1/2 bear--translate-x-1/2 bear-flex-row",bottom:"bear-fixed bear-bottom-2 bear-left-1/2 bear--translate-x-1/2 bear-flex-row",left:"bear-fixed bear-left-2 bear-top-1/2 bear--translate-y-1/2 bear-flex-col",right:"bear-fixed bear-right-2 bear-top-1/2 bear--translate-y-1/2 bear-flex-col"},o={bottom:"bear-bottom-full bear-mb-2",top:"bear-top-full bear-mt-2",left:"bear-left-full bear-ml-2",right:"bear-right-full bear-mr-2"},O=9998;exports.DEFAULT_ICON_SIZE=e;exports.DEFAULT_MAGNIFICATION_DISTANCE=r;exports.DEFAULT_MAGNIFIED_SIZE=t;exports.DOCK_PADDING=I;exports.DOCK_POSITION_CLASSES=_;exports.DOCK_Z_INDEX=O;exports.ICON_SCALE_RATIO=b;exports.SPRING_DURATION=a;exports.TOOLTIP_POSITION_CLASSES=o;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DockPosition } from './Dock.types';
|
|
2
|
+
/** Default icon size in pixels */
|
|
3
|
+
export declare const DEFAULT_ICON_SIZE = 48;
|
|
4
|
+
/** Default magnified size in pixels */
|
|
5
|
+
export declare const DEFAULT_MAGNIFIED_SIZE = 72;
|
|
6
|
+
/** Default magnification distance (neighbor count) */
|
|
7
|
+
export declare const DEFAULT_MAGNIFICATION_DISTANCE = 2;
|
|
8
|
+
/** Dock padding in pixels */
|
|
9
|
+
export declare const DOCK_PADDING = 8;
|
|
10
|
+
/** Animation spring duration in ms */
|
|
11
|
+
export declare const SPRING_DURATION = 150;
|
|
12
|
+
/** Badge min width in pixels */
|
|
13
|
+
export declare const BADGE_MIN_SIZE = 18;
|
|
14
|
+
/** Badge font size in pixels */
|
|
15
|
+
export declare const BADGE_FONT_SIZE = 10;
|
|
16
|
+
/** Active dot size in pixels */
|
|
17
|
+
export declare const ACTIVE_DOT_SIZE = 4;
|
|
18
|
+
/** Icon scale ratio (icon content vs container) */
|
|
19
|
+
export declare const ICON_SCALE_RATIO = 0.5;
|
|
20
|
+
/** Position classes */
|
|
21
|
+
export declare const DOCK_POSITION_CLASSES: Record<DockPosition, string>;
|
|
22
|
+
/** Tooltip position classes */
|
|
23
|
+
export declare const TOOLTIP_POSITION_CLASSES: Record<DockPosition, string>;
|
|
24
|
+
/** Z-index for dock */
|
|
25
|
+
export declare const DOCK_Z_INDEX = 9998;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const e = 48, t = 72, r = 2, a = 8, b = 150, o = 0.5, l = {
|
|
2
|
+
top: "bear-fixed bear-top-2 bear-left-1/2 bear--translate-x-1/2 bear-flex-row",
|
|
3
|
+
bottom: "bear-fixed bear-bottom-2 bear-left-1/2 bear--translate-x-1/2 bear-flex-row",
|
|
4
|
+
left: "bear-fixed bear-left-2 bear-top-1/2 bear--translate-y-1/2 bear-flex-col",
|
|
5
|
+
right: "bear-fixed bear-right-2 bear-top-1/2 bear--translate-y-1/2 bear-flex-col"
|
|
6
|
+
}, I = {
|
|
7
|
+
bottom: "bear-bottom-full bear-mb-2",
|
|
8
|
+
top: "bear-top-full bear-mt-2",
|
|
9
|
+
left: "bear-left-full bear-ml-2",
|
|
10
|
+
right: "bear-right-full bear-mr-2"
|
|
11
|
+
}, f = 9998;
|
|
12
|
+
export {
|
|
13
|
+
e as DEFAULT_ICON_SIZE,
|
|
14
|
+
r as DEFAULT_MAGNIFICATION_DISTANCE,
|
|
15
|
+
t as DEFAULT_MAGNIFIED_SIZE,
|
|
16
|
+
a as DOCK_PADDING,
|
|
17
|
+
l as DOCK_POSITION_CLASSES,
|
|
18
|
+
f as DOCK_Z_INDEX,
|
|
19
|
+
o as ICON_SCALE_RATIO,
|
|
20
|
+
b as SPRING_DURATION,
|
|
21
|
+
I as TOOLTIP_POSITION_CLASSES
|
|
22
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsx as t, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useRef as w, useCallback as m } from "react";
|
|
3
|
+
import { cn as b } from "../../utils/cn.js";
|
|
4
|
+
import { DEFAULT_ICON_SIZE as O, DEFAULT_MAGNIFIED_SIZE as A, DEFAULT_MAGNIFICATION_DISTANCE as C, DOCK_Z_INDEX as E, DOCK_PADDING as T, TOOLTIP_POSITION_CLASSES as L, SPRING_DURATION as B, ICON_SCALE_RATIO as M, DOCK_POSITION_CLASSES as F } from "./Dock.const.js";
|
|
5
|
+
const j = (l, n, r, a, s) => {
|
|
6
|
+
if (n < 0) return a;
|
|
7
|
+
const i = Math.abs(l - n);
|
|
8
|
+
if (i > r) return a;
|
|
9
|
+
const c = 1 - i / (r + 1);
|
|
10
|
+
return a + (s - a) * c;
|
|
11
|
+
}, z = (l) => {
|
|
12
|
+
const {
|
|
13
|
+
items: n,
|
|
14
|
+
position: r = "bottom",
|
|
15
|
+
iconSize: a = O,
|
|
16
|
+
magnifiedSize: s = A,
|
|
17
|
+
magnification: i = !0,
|
|
18
|
+
magnificationDistance: c = C,
|
|
19
|
+
showLabels: _ = !0,
|
|
20
|
+
className: h,
|
|
21
|
+
style: x,
|
|
22
|
+
testId: D
|
|
23
|
+
} = l, [u, g] = p(-1), [I, f] = p(""), y = w(null), N = r === "left" || r === "right", k = m((e, o) => {
|
|
24
|
+
g(e), f(o.label);
|
|
25
|
+
}, []), v = m(() => {
|
|
26
|
+
g(-1), f("");
|
|
27
|
+
}, []);
|
|
28
|
+
return /* @__PURE__ */ t(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
ref: y,
|
|
32
|
+
className: b(
|
|
33
|
+
"Bear-Dock",
|
|
34
|
+
"bear-flex bear-items-end bear-gap-1",
|
|
35
|
+
"bear-rounded-2xl bear-px-2 bear-py-1.5",
|
|
36
|
+
"bear-bg-white/80 dark:bear-bg-gray-900/80",
|
|
37
|
+
"bear-backdrop-blur-xl",
|
|
38
|
+
"bear-border bear-border-gray-200/50 dark:bear-border-gray-700/50",
|
|
39
|
+
"bear-shadow-lg",
|
|
40
|
+
F[r],
|
|
41
|
+
N && "bear-items-center",
|
|
42
|
+
h
|
|
43
|
+
),
|
|
44
|
+
style: {
|
|
45
|
+
padding: T,
|
|
46
|
+
zIndex: E,
|
|
47
|
+
...x
|
|
48
|
+
},
|
|
49
|
+
"data-testid": D,
|
|
50
|
+
role: "toolbar",
|
|
51
|
+
"aria-label": "Dock",
|
|
52
|
+
onMouseLeave: v,
|
|
53
|
+
children: n.map((e, o) => {
|
|
54
|
+
const d = i ? j(o, u, c, a, s) : a;
|
|
55
|
+
return /* @__PURE__ */ S(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: "Bear-Dock__item bear-relative bear-flex bear-flex-col bear-items-center",
|
|
59
|
+
children: [
|
|
60
|
+
_ && u === o && I && /* @__PURE__ */ t(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: b(
|
|
64
|
+
"Bear-Dock__tooltip",
|
|
65
|
+
"bear-absolute bear-whitespace-nowrap",
|
|
66
|
+
"bear-px-2 bear-py-1 bear-rounded-lg",
|
|
67
|
+
"bear-bg-gray-900 dark:bear-bg-gray-100",
|
|
68
|
+
"bear-text-white dark:bear-text-gray-900",
|
|
69
|
+
"bear-text-xs bear-font-medium",
|
|
70
|
+
"bear-shadow-md bear-pointer-events-none",
|
|
71
|
+
L[r]
|
|
72
|
+
),
|
|
73
|
+
role: "tooltip",
|
|
74
|
+
children: e.label
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ t(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
className: b(
|
|
81
|
+
"Bear-Dock__button",
|
|
82
|
+
"bear-flex bear-items-center bear-justify-center bear-rounded-xl",
|
|
83
|
+
"bear-transition-all bear-origin-bottom",
|
|
84
|
+
"hover:bear-cursor-pointer",
|
|
85
|
+
e.active && "bear-ring-2 bear-ring-offset-1",
|
|
86
|
+
e.disabled && "bear-opacity-40 bear-cursor-not-allowed"
|
|
87
|
+
),
|
|
88
|
+
style: {
|
|
89
|
+
width: d,
|
|
90
|
+
height: d,
|
|
91
|
+
transitionDuration: `${B}ms`,
|
|
92
|
+
transitionTimingFunction: "cubic-bezier(0.25, 0.1, 0.25, 1)"
|
|
93
|
+
},
|
|
94
|
+
onClick: e.disabled ? void 0 : e.onClick,
|
|
95
|
+
onMouseEnter: () => k(o, e),
|
|
96
|
+
disabled: e.disabled,
|
|
97
|
+
"aria-label": e.label,
|
|
98
|
+
children: /* @__PURE__ */ t(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
className: b(
|
|
102
|
+
"Bear-Dock__icon",
|
|
103
|
+
"bear-flex bear-items-center bear-justify-center",
|
|
104
|
+
"bear-w-full bear-h-full bear-rounded-xl",
|
|
105
|
+
"bear-transition-transform",
|
|
106
|
+
e.active ? "bear-bg-[var(--bear-primary-500)] bear-text-white" : "bear-bg-gray-100 dark:bear-bg-gray-800"
|
|
107
|
+
),
|
|
108
|
+
style: { fontSize: d * M },
|
|
109
|
+
children: e.icon
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
e.badge !== void 0 && /* @__PURE__ */ t("span", { className: b(
|
|
115
|
+
"Bear-Dock__badge",
|
|
116
|
+
"bear-absolute bear--top-1 bear--right-1",
|
|
117
|
+
"bear-min-w-[18px] bear-h-[18px]",
|
|
118
|
+
"bear-flex bear-items-center bear-justify-center",
|
|
119
|
+
"bear-rounded-full bear-text-[10px] bear-font-bold",
|
|
120
|
+
"bear-text-white bear-leading-none bear-px-1",
|
|
121
|
+
"bear-bg-[var(--bear-danger-500,#ef4444)]"
|
|
122
|
+
), children: e.badge }),
|
|
123
|
+
e.active && r === "bottom" && /* @__PURE__ */ t(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
className: b(
|
|
127
|
+
"Bear-Dock__dot",
|
|
128
|
+
"bear-w-1 bear-h-1 bear-rounded-full bear-mt-0.5",
|
|
129
|
+
"bear-bg-[var(--bear-primary-500)]"
|
|
130
|
+
),
|
|
131
|
+
"aria-hidden": "true"
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
e.id
|
|
137
|
+
);
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
export {
|
|
143
|
+
z as Dock
|
|
144
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type DockPosition = 'bottom' | 'top' | 'left' | 'right';
|
|
3
|
+
export interface DockItem {
|
|
4
|
+
/** Unique ID */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Icon content */
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
/** Tooltip label */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Click handler */
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
/** Whether item is active */
|
|
13
|
+
active?: boolean;
|
|
14
|
+
/** Badge content */
|
|
15
|
+
badge?: string | number;
|
|
16
|
+
/** Whether item is disabled */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Href for link items */
|
|
19
|
+
href?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DockProps {
|
|
22
|
+
/** Dock items */
|
|
23
|
+
items: DockItem[];
|
|
24
|
+
/** Position on screen */
|
|
25
|
+
position?: DockPosition;
|
|
26
|
+
/** Base icon size in pixels */
|
|
27
|
+
iconSize?: number;
|
|
28
|
+
/** Maximum magnified size in pixels */
|
|
29
|
+
magnifiedSize?: number;
|
|
30
|
+
/** Enable magnification on hover */
|
|
31
|
+
magnification?: boolean;
|
|
32
|
+
/** Distance for magnification effect (how many neighbors) */
|
|
33
|
+
magnificationDistance?: number;
|
|
34
|
+
/** Whether to show labels on hover */
|
|
35
|
+
showLabels?: boolean;
|
|
36
|
+
/** Custom class name */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Custom style */
|
|
39
|
+
style?: React.CSSProperties;
|
|
40
|
+
/** Test ID */
|
|
41
|
+
testId?: string;
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs");require("react");const x=({className:b})=>e.jsx("svg",{className:b,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})}),o=({icon:b,title:c,description:s,action:l,secondaryAction:n,className:i,size:a="md",variant:d="default"})=>{const r={sm:{icon:"bear-w-12 bear-h-12",title:"bear-text-lg",desc:"bear-text-sm",padding:"bear-py-6 bear-px-4"},md:{icon:"bear-w-16 bear-h-16",title:"bear-text-xl",desc:"bear-text-base",padding:"bear-py-10 bear-px-6"},lg:{icon:"bear-w-20 bear-h-20",title:"bear-text-2xl",desc:"bear-text-lg",padding:"bear-py-14 bear-px-8"}};return e.jsxs("div",{className:t.cn("bear-flex bear-flex-col bear-items-center bear-text-center",r[a].padding,d==="card"&&"bear-bg-zinc-800/50 bear-rounded-xl bear-border bear-border-zinc-700",i),children:[e.jsx("div",{className:t.cn("bear-text-zinc-600 bear-mb-4",r[a].icon),children:b||e.jsx(x,{className:"bear-w-full bear-h-full"})}),e.jsx("h3",{className:t.cn("bear-font-semibold bear-text-white bear-mb-2",r[a].title),children:c}),s&&e.jsx("p",{className:t.cn("bear-text-zinc-400 bear-max-w-md bear-mb-6",r[a].desc),children:s}),(l||n)&&e.jsxs("div",{className:"bear-flex bear-items-center bear-gap-3",children:[l,n]})]})};exports.EmptyState=o;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
|
-
|
|
3
|
+
import "react";
|
|
4
|
+
const m = ({ className: b }) => /* @__PURE__ */ e("svg", { className: b, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }), f = ({
|
|
4
5
|
icon: b,
|
|
5
|
-
title:
|
|
6
|
+
title: i,
|
|
6
7
|
description: l,
|
|
7
8
|
action: d,
|
|
8
9
|
secondaryAction: n,
|
|
9
|
-
className:
|
|
10
|
+
className: s,
|
|
10
11
|
size: a = "md",
|
|
11
12
|
variant: o = "default"
|
|
12
13
|
}) => {
|
|
@@ -19,10 +20,10 @@ const m = ({ className: b }) => /* @__PURE__ */ e("svg", { className: b, fill: "
|
|
|
19
20
|
"bear-flex bear-flex-col bear-items-center bear-text-center",
|
|
20
21
|
r[a].padding,
|
|
21
22
|
o === "card" && "bear-bg-zinc-800/50 bear-rounded-xl bear-border bear-border-zinc-700",
|
|
22
|
-
|
|
23
|
+
s
|
|
23
24
|
), children: [
|
|
24
25
|
/* @__PURE__ */ e("div", { className: t("bear-text-zinc-600 bear-mb-4", r[a].icon), children: b || /* @__PURE__ */ e(m, { className: "bear-w-full bear-h-full" }) }),
|
|
25
|
-
/* @__PURE__ */ e("h3", { className: t("bear-font-semibold bear-text-white bear-mb-2", r[a].title), children:
|
|
26
|
+
/* @__PURE__ */ e("h3", { className: t("bear-font-semibold bear-text-white bear-mb-2", r[a].title), children: i }),
|
|
26
27
|
l && /* @__PURE__ */ e("p", { className: t("bear-text-zinc-400 bear-max-w-md bear-mb-6", r[a].desc), children: l }),
|
|
27
28
|
(d || n) && /* @__PURE__ */ c("div", { className: "bear-flex bear-items-center bear-gap-3", children: [
|
|
28
29
|
d,
|
|
@@ -31,5 +32,5 @@ const m = ({ className: b }) => /* @__PURE__ */ e("svg", { className: b, fill: "
|
|
|
31
32
|
] });
|
|
32
33
|
};
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
f as EmptyState
|
|
35
36
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),x=require("react"),b=require("../TreeView/TreeView.cjs"),T=require("../Icon/index.cjs"),j=()=>t.jsx(T.BearIcons.ArticleIcon,{size:"xs",className:"bear-text-gray-400"});function l(e,a=0){var r;const s=e.children&&e.children.length>0,i=e.type==="folder"||s;return{id:e.id,label:e.label,disabled:e.disabled,data:e.data,icon:e.icon??(i?void 0:t.jsx(j,{})),children:(r=e.children)==null?void 0:r.map(c=>l(c,a+1))}}const m=({items:e,selectedId:a,defaultExpandedIds:s=[],onSelect:i,onExpand:r,size:c="md",showLines:d=!1,className:n,testId:o})=>{const u=x.useMemo(()=>e.map(l),[e]);return t.jsx("div",{"data-testid":o,children:t.jsx(b.TreeView,{data:u,selectedId:a,defaultExpandedIds:s,onSelect:i?h=>i(h.data):void 0,onExpand:r,size:c,showLines:d,className:n})})};exports.FileTree=m;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as h } from "react";
|
|
3
|
+
import { TreeView as p } from "../TreeView/TreeView.js";
|
|
4
|
+
import { BearIcons as b } from "../Icon/index.js";
|
|
5
|
+
const u = () => /* @__PURE__ */ t(b.ArticleIcon, { size: "xs", className: "bear-text-gray-400" });
|
|
6
|
+
function c(e, a = 0) {
|
|
7
|
+
var i;
|
|
8
|
+
const l = e.children && e.children.length > 0, r = e.type === "folder" || l;
|
|
9
|
+
return {
|
|
10
|
+
id: e.id,
|
|
11
|
+
label: e.label,
|
|
12
|
+
disabled: e.disabled,
|
|
13
|
+
data: e.data,
|
|
14
|
+
icon: e.icon ?? (r ? void 0 : /* @__PURE__ */ t(u, {})),
|
|
15
|
+
children: (i = e.children) == null ? void 0 : i.map((o) => c(o, a + 1))
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const I = ({
|
|
19
|
+
items: e,
|
|
20
|
+
selectedId: a,
|
|
21
|
+
defaultExpandedIds: l = [],
|
|
22
|
+
onSelect: r,
|
|
23
|
+
onExpand: i,
|
|
24
|
+
size: o = "md",
|
|
25
|
+
showLines: d = !1,
|
|
26
|
+
className: s,
|
|
27
|
+
testId: n
|
|
28
|
+
}) => {
|
|
29
|
+
const m = h(() => e.map(c), [e]);
|
|
30
|
+
return /* @__PURE__ */ t("div", { "data-testid": n, children: /* @__PURE__ */ t(
|
|
31
|
+
p,
|
|
32
|
+
{
|
|
33
|
+
data: m,
|
|
34
|
+
selectedId: a,
|
|
35
|
+
defaultExpandedIds: l,
|
|
36
|
+
onSelect: r ? (f) => r(f.data) : void 0,
|
|
37
|
+
onExpand: i,
|
|
38
|
+
size: o,
|
|
39
|
+
showLines: d,
|
|
40
|
+
className: s
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
I as FileTree
|
|
46
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FileTreeNode {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
type: 'file' | 'folder';
|
|
6
|
+
children?: FileTreeNode[];
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
data?: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface FileTreeProps {
|
|
12
|
+
/** Tree data (files and folders) */
|
|
13
|
+
items: FileTreeNode[];
|
|
14
|
+
/** Selected node id */
|
|
15
|
+
selectedId?: string;
|
|
16
|
+
/** Initially expanded folder ids */
|
|
17
|
+
defaultExpandedIds?: string[];
|
|
18
|
+
/** Called when a node is selected */
|
|
19
|
+
onSelect?: (node: FileTreeNode) => void;
|
|
20
|
+
/** Called when a folder is expanded/collapsed */
|
|
21
|
+
onExpand?: (nodeId: string, expanded: boolean) => void;
|
|
22
|
+
/** Size variant */
|
|
23
|
+
size?: 'sm' | 'md' | 'lg';
|
|
24
|
+
/** Show connecting lines */
|
|
25
|
+
showLines?: boolean;
|
|
26
|
+
/** Class name */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Test ID */
|
|
29
|
+
testId?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),e=require("./GradientText.const.cjs"),I=c=>{const{children:d,preset:i="primary",colors:t,direction:a="to-r",animate:r=!1,animationSpeed:l=e.DEFAULT_ANIMATION_SPEED,as:T="span",weight:u="bold",className:E,style:g,testId:m}=c,n=s.useMemo(()=>t&&t.length>0?t:e.GRADIENT_PRESETS[i]??e.GRADIENT_PRESETS.primary,[t,i]),A=s.useMemo(()=>{const o=e.DIRECTION_MAP[a]??"to right";if(!r)return`linear-gradient(${o}, ${n.join(", ")})`;const S=Array.from({length:e.COLOR_REPEAT_COUNT},()=>n).flat();return`linear-gradient(${o}, ${S.join(", ")})`},[n,a,r]);return _.jsx(T,{className:b.cn("Bear-GradientText","bear-inline-block",r&&"Bear-GradientText--animated",E),style:{background:A,backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",fontWeight:e.WEIGHT_MAP[u]??e.DEFAULT_WEIGHT,...r&&{backgroundSize:e.ANIMATED_BG_SIZE,animation:`bear-gradient-shift ${l}s ease infinite`},...g},"data-testid":m,children:d})};exports.GradientText=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={primary:["var(--bear-primary-400, #f472b6)","var(--bear-primary-600, #db2777)"],sunset:["#f97316","#ef4444","#ec4899"],ocean:["#06b6d4","#3b82f6","#8b5cf6"],forest:["#22c55e","#10b981","#14b8a6"],fire:["#fbbf24","#f97316","#ef4444"],purple:["#a855f7","#7c3aed","#6366f1"],neon:["#22d3ee","#a78bfa","#f472b6"],candy:["#f472b6","#fb923c","#fbbf24"],aurora:["#34d399","#22d3ee","#818cf8","#c084fc"],midnight:["#6366f1","#8b5cf6","#a78bfa"]},o={"to-r":"to right","to-l":"to left","to-t":"to top","to-b":"to bottom","to-tr":"to top right","to-tl":"to top left","to-br":"to bottom right","to-bl":"to bottom left"},b=3,e="200% 200%",f={normal:400,medium:500,semibold:600,bold:700,extrabold:800},E=700,r=3;exports.ANIMATED_BG_SIZE=e;exports.COLOR_REPEAT_COUNT=r;exports.DEFAULT_ANIMATION_SPEED=b;exports.DEFAULT_WEIGHT=E;exports.DIRECTION_MAP=o;exports.GRADIENT_PRESETS=t;exports.WEIGHT_MAP=f;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GradientPreset, GradientDirection } from './GradientText.types';
|
|
2
|
+
/** Gradient presets — primary uses CSS variables for theme integration */
|
|
3
|
+
export declare const GRADIENT_PRESETS: Record<GradientPreset, string[]>;
|
|
4
|
+
/** Direction to CSS gradient mapping */
|
|
5
|
+
export declare const DIRECTION_MAP: Record<GradientDirection, string>;
|
|
6
|
+
/** Default animation speed in seconds */
|
|
7
|
+
export declare const DEFAULT_ANIMATION_SPEED = 3;
|
|
8
|
+
/** Animated background size */
|
|
9
|
+
export declare const ANIMATED_BG_SIZE = "200% 200%";
|
|
10
|
+
/** Font weight map */
|
|
11
|
+
export declare const WEIGHT_MAP: Record<string, number>;
|
|
12
|
+
/** Default font weight */
|
|
13
|
+
export declare const DEFAULT_WEIGHT = 700;
|
|
14
|
+
/** Number of color repetitions for seamless animation */
|
|
15
|
+
export declare const COLOR_REPEAT_COUNT = 3;
|