@olympusoss/canvas 2.20.2 → 3.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 +69 -35
- package/package.json +45 -177
- package/src/cn.ts +3 -0
- package/src/index.ts +12 -603
- package/src/theme.ts +62 -0
- package/src/tokens.ts +11 -0
- package/styles/base.css +17 -0
- package/styles/canvas.css +77 -52
- package/styles/components/alert.css +66 -0
- package/styles/components/app-shell.css +46 -0
- package/styles/components/avatar.css +22 -0
- package/styles/components/badge.css +83 -0
- package/styles/components/breadcrumb.css +35 -0
- package/styles/components/button-group.css +23 -0
- package/styles/components/button.css +107 -0
- package/styles/components/calendar.css +73 -0
- package/styles/components/card.css +58 -0
- package/styles/components/checkbox.css +55 -0
- package/styles/components/code-block.css +18 -0
- package/styles/components/combobox.css +75 -0
- package/styles/components/command.css +94 -0
- package/styles/components/data-table.css +142 -0
- package/styles/components/dialog.css +72 -0
- package/styles/components/dropdown.css +54 -0
- package/styles/components/empty-state.css +17 -0
- package/styles/components/field.css +27 -0
- package/styles/components/filter-panel.css +58 -0
- package/styles/components/form.css +27 -0
- package/styles/components/icon.css +8 -0
- package/styles/components/input-group.css +45 -0
- package/styles/components/input.css +56 -0
- package/styles/components/kbd.css +15 -0
- package/styles/components/page-header.css +52 -0
- package/styles/components/pagination.css +48 -0
- package/styles/components/popover.css +14 -0
- package/styles/components/radio.css +28 -0
- package/styles/components/row-menu.css +69 -0
- package/styles/components/section-card.css +49 -0
- package/styles/components/select.css +57 -0
- package/styles/components/separator.css +32 -0
- package/styles/components/sheet.css +70 -0
- package/styles/components/sidebar.css +146 -0
- package/styles/components/skeleton.css +32 -0
- package/styles/components/spinner.css +26 -0
- package/styles/components/stat-card.css +71 -0
- package/styles/components/stepper.css +63 -0
- package/styles/components/switch.css +45 -0
- package/styles/components/tabs.css +40 -0
- package/styles/components/textarea.css +31 -0
- package/styles/components/toast.css +95 -0
- package/styles/components/tooltip.css +53 -0
- package/styles/components/topbar.css +24 -0
- package/styles/components/typography.css +105 -0
- package/styles/patterns/backdrops.css +35 -0
- package/styles/patterns/density.css +66 -0
- package/styles/patterns/focus.css +22 -0
- package/styles/patterns/glass.css +85 -0
- package/styles/patterns/high-contrast.css +70 -0
- package/styles/patterns/reduced-motion.css +12 -0
- package/styles/patterns/scrollbar.css +10 -0
- package/styles/reset.css +89 -0
- package/styles/tokens/colors.css +106 -0
- package/styles/tokens/motion.css +33 -0
- package/styles/tokens/radius.css +10 -0
- package/styles/tokens/shadows.css +35 -0
- package/styles/tokens/spacing.css +19 -0
- package/styles/tokens/typography.css +6 -0
- package/styles/tokens/z-index.css +12 -0
- package/styles/utilities/display.css +66 -0
- package/styles/utilities/flexbox.css +240 -0
- package/styles/utilities/gap.css +288 -0
- package/styles/utilities/grid.css +138 -0
- package/styles/utilities/position.css +78 -0
- package/styles/utilities/sizing.css +138 -0
- package/tsconfig.json +20 -21
- package/src/components/atoms/README.md +0 -11
- package/src/components/atoms/aspect-ratio.tsx +0 -32
- package/src/components/atoms/avatar.tsx +0 -98
- package/src/components/atoms/badge.tsx +0 -44
- package/src/components/atoms/brand-mark.tsx +0 -74
- package/src/components/atoms/button.tsx +0 -105
- package/src/components/atoms/checkbox.tsx +0 -63
- package/src/components/atoms/flex-box.tsx +0 -105
- package/src/components/atoms/icon.tsx +0 -34
- package/src/components/atoms/input.tsx +0 -92
- package/src/components/atoms/label.tsx +0 -41
- package/src/components/atoms/logo.tsx +0 -89
- package/src/components/atoms/progress.tsx +0 -55
- package/src/components/atoms/radio-group.tsx +0 -122
- package/src/components/atoms/scroll-area.tsx +0 -106
- package/src/components/atoms/section.tsx +0 -48
- package/src/components/atoms/separator.tsx +0 -45
- package/src/components/atoms/skeleton.tsx +0 -17
- package/src/components/atoms/slider.tsx +0 -93
- package/src/components/atoms/spinner.tsx +0 -47
- package/src/components/atoms/switch.tsx +0 -60
- package/src/components/atoms/textarea.tsx +0 -78
- package/src/components/atoms/toggle.tsx +0 -80
- package/src/components/charts/activity-heatmap.tsx +0 -186
- package/src/components/charts/axes.tsx +0 -21
- package/src/components/charts/chart-container.tsx +0 -254
- package/src/components/charts/chart-legend.tsx +0 -67
- package/src/components/charts/chart-tooltip.tsx +0 -161
- package/src/components/charts/chart-types.tsx +0 -49
- package/src/components/charts/containers.tsx +0 -11
- package/src/components/charts/data.tsx +0 -16
- package/src/components/charts/details.tsx +0 -25
- package/src/components/charts/dot-pulse.tsx +0 -61
- package/src/components/charts/gauge.tsx +0 -106
- package/src/components/charts/grids.tsx +0 -8
- package/src/components/charts/index.ts +0 -62
- package/src/components/charts/labeled-bar-list.tsx +0 -85
- package/src/components/charts/metric-breakdown.tsx +0 -316
- package/src/components/charts/references.tsx +0 -8
- package/src/components/charts/service-health-list.tsx +0 -85
- package/src/components/charts/sparkline-area.tsx +0 -80
- package/src/components/charts/sparkline.tsx +0 -52
- package/src/components/charts/stacked-bar.tsx +0 -104
- package/src/components/charts/text.tsx +0 -10
- package/src/components/charts/world-heat-map-inner.tsx +0 -317
- package/src/components/charts/world-heat-map.tsx +0 -184
- package/src/components/molecules/README.md +0 -12
- package/src/components/molecules/action-bar.tsx +0 -73
- package/src/components/molecules/activity-item.tsx +0 -74
- package/src/components/molecules/alert.tsx +0 -86
- package/src/components/molecules/animated-background.tsx +0 -92
- package/src/components/molecules/auth-shell.tsx +0 -95
- package/src/components/molecules/brand-lockup.tsx +0 -48
- package/src/components/molecules/breadcrumb.tsx +0 -157
- package/src/components/molecules/button-group.tsx +0 -104
- package/src/components/molecules/calendar.tsx +0 -217
- package/src/components/molecules/card.tsx +0 -102
- package/src/components/molecules/client-brand.tsx +0 -95
- package/src/components/molecules/code-block.tsx +0 -86
- package/src/components/molecules/countdown-button.tsx +0 -92
- package/src/components/molecules/empty-state.tsx +0 -56
- package/src/components/molecules/error-state.tsx +0 -42
- package/src/components/molecules/field-display.tsx +0 -35
- package/src/components/molecules/input-otp.tsx +0 -74
- package/src/components/molecules/launcher-card.tsx +0 -152
- package/src/components/molecules/loading-state.tsx +0 -36
- package/src/components/molecules/notification-item.tsx +0 -67
- package/src/components/molecules/notification-list.tsx +0 -45
- package/src/components/molecules/number-badge.tsx +0 -53
- package/src/components/molecules/or-separator.tsx +0 -38
- package/src/components/molecules/page-header.tsx +0 -88
- package/src/components/molecules/page-tabs.tsx +0 -94
- package/src/components/molecules/pagination.tsx +0 -150
- package/src/components/molecules/password-input.tsx +0 -83
- package/src/components/molecules/password-strength-meter.tsx +0 -104
- package/src/components/molecules/phone-input.tsx +0 -200
- package/src/components/molecules/search-bar.tsx +0 -64
- package/src/components/molecules/secret-field.tsx +0 -158
- package/src/components/molecules/section-card.tsx +0 -91
- package/src/components/molecules/social-buttons.tsx +0 -165
- package/src/components/molecules/stat-card.tsx +0 -100
- package/src/components/molecules/status-badge.tsx +0 -42
- package/src/components/molecules/stepper.tsx +0 -96
- package/src/components/molecules/table.tsx +0 -157
- package/src/components/molecules/terminal.tsx +0 -74
- package/src/components/molecules/toggle-group.tsx +0 -145
- package/src/components/molecules/tooltip.tsx +0 -155
- package/src/components/molecules/user-avatar-chip.tsx +0 -71
- package/src/components/organisms/README.md +0 -14
- package/src/components/organisms/accordion.tsx +0 -154
- package/src/components/organisms/alert-dialog.tsx +0 -277
- package/src/components/organisms/carousel.tsx +0 -244
- package/src/components/organisms/collapsible.tsx +0 -69
- package/src/components/organisms/command.tsx +0 -144
- package/src/components/organisms/context-menu.tsx +0 -339
- package/src/components/organisms/dashboard-grid.tsx +0 -369
- package/src/components/organisms/data-table.tsx +0 -330
- package/src/components/organisms/dialog.tsx +0 -312
- package/src/components/organisms/drawer.tsx +0 -123
- package/src/components/organisms/dropdown-menu.tsx +0 -440
- package/src/components/organisms/editors/code-editor.tsx +0 -144
- package/src/components/organisms/editors/index.ts +0 -4
- package/src/components/organisms/editors/markdown-editor.tsx +0 -153
- package/src/components/organisms/editors/markdown-renderer.ts +0 -27
- package/src/components/organisms/editors/prose-canvas-classes.ts +0 -45
- package/src/components/organisms/editors/rich-text-editor.tsx +0 -126
- package/src/components/organisms/editors/toolbar/md-toolbar.tsx +0 -129
- package/src/components/organisms/editors/toolbar/rte-toolbar.tsx +0 -211
- package/src/components/organisms/editors/toolbar/toolbar-shell.tsx +0 -45
- package/src/components/organisms/editors/use-codemirror-theme.ts +0 -61
- package/src/components/organisms/error-boundary.tsx +0 -61
- package/src/components/organisms/form.tsx +0 -174
- package/src/components/organisms/hover-card.tsx +0 -115
- package/src/components/organisms/menubar.tsx +0 -498
- package/src/components/organisms/navbar.tsx +0 -104
- package/src/components/organisms/navigation-menu.tsx +0 -235
- package/src/components/organisms/popover.tsx +0 -149
- package/src/components/organisms/resizable.tsx +0 -58
- package/src/components/organisms/schema-form.tsx +0 -232
- package/src/components/organisms/select.tsx +0 -309
- package/src/components/organisms/sheet.tsx +0 -265
- package/src/components/organisms/sidebar.tsx +0 -1040
- package/src/components/organisms/sonner.tsx +0 -96
- package/src/components/organisms/tabs.tsx +0 -133
- package/src/components/organisms/theme-provider.tsx +0 -101
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/lib/portal-container.tsx +0 -35
- package/src/lib/utils.ts +0 -6
- package/src/native.ts +0 -23
- package/src/tokens/colors.ts +0 -91
- package/src/tokens/index.ts +0 -3
- package/src/tokens/spacing.ts +0 -55
- package/src/tokens/typography.ts +0 -27
- package/styles/dashboard-grid.css +0 -47
- package/styles/fonts/Roboto-VariableFont_wdth_wght.ttf +0 -0
- package/styles/glass.css +0 -175
- package/styles/leaflet.css +0 -13
- package/styles/tokens.css +0 -317
- package/tailwind.config.ts +0 -70
package/src/index.ts
CHANGED
|
@@ -1,604 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
export { cn } from "./cn.js";
|
|
2
|
+
export { token, hsl } from "./tokens.js";
|
|
3
|
+
export {
|
|
4
|
+
getTheme,
|
|
5
|
+
setTheme,
|
|
6
|
+
toggleTheme,
|
|
7
|
+
getSurface,
|
|
8
|
+
setSurface,
|
|
9
|
+
getDensity,
|
|
10
|
+
setDensity,
|
|
11
|
+
} from "./theme.js";
|
|
2
12
|
|
|
3
|
-
|
|
4
|
-
ATOMS — single primitive wrappers, no composition.
|
|
5
|
-
Can import only: tokens/, lib/utils.
|
|
6
|
-
──────────────────────────────────────────────────────────────── */
|
|
7
|
-
export { AspectRatio } from "./components/atoms/aspect-ratio";
|
|
8
|
-
export { Avatar, AvatarFallback, AvatarImage } from "./components/atoms/avatar";
|
|
9
|
-
export { Badge, badgeVariants } from "./components/atoms/badge";
|
|
10
|
-
export { BrandMark, type BrandMarkProps } from "./components/atoms/brand-mark";
|
|
11
|
-
export { Button, type ButtonProps, buttonVariants } from "./components/atoms/button";
|
|
12
|
-
export { Checkbox } from "./components/atoms/checkbox";
|
|
13
|
-
export { FlexBox, type FlexBoxProps } from "./components/atoms/flex-box";
|
|
14
|
-
export {
|
|
15
|
-
Icon,
|
|
16
|
-
type IconName,
|
|
17
|
-
type IconProps,
|
|
18
|
-
iconNames,
|
|
19
|
-
} from "./components/atoms/icon";
|
|
20
|
-
export { Input } from "./components/atoms/input";
|
|
21
|
-
export { Label } from "./components/atoms/label";
|
|
22
|
-
export { Logo, type LogoProps } from "./components/atoms/logo";
|
|
23
|
-
export { Progress } from "./components/atoms/progress";
|
|
24
|
-
export { RadioGroup, RadioGroupItem } from "./components/atoms/radio-group";
|
|
25
|
-
export { ScrollArea, ScrollBar } from "./components/atoms/scroll-area";
|
|
26
|
-
export { Section, type SectionProps } from "./components/atoms/section";
|
|
27
|
-
export { Separator } from "./components/atoms/separator";
|
|
28
|
-
export { Skeleton } from "./components/atoms/skeleton";
|
|
29
|
-
export { Slider } from "./components/atoms/slider";
|
|
30
|
-
export { Spinner, type SpinnerProps } from "./components/atoms/spinner";
|
|
31
|
-
export { Switch } from "./components/atoms/switch";
|
|
32
|
-
export { Textarea } from "./components/atoms/textarea";
|
|
33
|
-
export { Toggle, toggleVariants } from "./components/atoms/toggle";
|
|
34
|
-
/* ────────────────────────────────────────────────────────────────
|
|
35
|
-
CHARTS — theme-aware Recharts wrappers + auto-palette container,
|
|
36
|
-
plus hand-rolled data-viz primitives (Gauge, StackedBar,
|
|
37
|
-
LabeledBarList, ServiceHealthList, ActivityHeatmap) built on
|
|
38
|
-
canvas tokens.
|
|
39
|
-
──────────────────────────────────────────────────────────────── */
|
|
40
|
-
export {
|
|
41
|
-
ActivityHeatmap,
|
|
42
|
-
type ActivityHeatmapProps,
|
|
43
|
-
} from "./components/charts/activity-heatmap";
|
|
44
|
-
export {
|
|
45
|
-
CartesianAxis,
|
|
46
|
-
PolarAngleAxis,
|
|
47
|
-
PolarRadiusAxis,
|
|
48
|
-
XAxis,
|
|
49
|
-
YAxis,
|
|
50
|
-
ZAxis,
|
|
51
|
-
} from "./components/charts/axes";
|
|
52
|
-
export {
|
|
53
|
-
type ChartConfig,
|
|
54
|
-
ChartContainer,
|
|
55
|
-
ChartStyle,
|
|
56
|
-
useChart,
|
|
57
|
-
} from "./components/charts/chart-container";
|
|
58
|
-
export { ChartLegend, ChartLegendContent } from "./components/charts/chart-legend";
|
|
59
|
-
export { ChartTooltip, ChartTooltipContent } from "./components/charts/chart-tooltip";
|
|
60
|
-
export {
|
|
61
|
-
AreaChart,
|
|
62
|
-
BarChart,
|
|
63
|
-
ComposedChart,
|
|
64
|
-
FunnelChart,
|
|
65
|
-
LineChart,
|
|
66
|
-
PieChart,
|
|
67
|
-
RadarChart,
|
|
68
|
-
RadialBarChart,
|
|
69
|
-
Sankey,
|
|
70
|
-
ScatterChart,
|
|
71
|
-
SunburstChart,
|
|
72
|
-
Treemap,
|
|
73
|
-
} from "./components/charts/chart-types";
|
|
74
|
-
export { Brush, Layer, ResponsiveContainer, Surface } from "./components/charts/containers";
|
|
75
|
-
export {
|
|
76
|
-
Area,
|
|
77
|
-
Bar,
|
|
78
|
-
Funnel,
|
|
79
|
-
Line,
|
|
80
|
-
Pie,
|
|
81
|
-
Radar,
|
|
82
|
-
RadialBar,
|
|
83
|
-
Scatter,
|
|
84
|
-
} from "./components/charts/data";
|
|
85
|
-
export {
|
|
86
|
-
ChartCell,
|
|
87
|
-
ChartCustomized,
|
|
88
|
-
Cross,
|
|
89
|
-
Curve,
|
|
90
|
-
Dot,
|
|
91
|
-
ErrorBar,
|
|
92
|
-
Polygon,
|
|
93
|
-
Rectangle,
|
|
94
|
-
Sector,
|
|
95
|
-
Trapezoid,
|
|
96
|
-
} from "./components/charts/details";
|
|
97
|
-
export {
|
|
98
|
-
DotPulse,
|
|
99
|
-
type DotPulseProps,
|
|
100
|
-
} from "./components/charts/dot-pulse";
|
|
101
|
-
export { Gauge, type GaugeProps } from "./components/charts/gauge";
|
|
102
|
-
export { CartesianGrid, PolarGrid } from "./components/charts/grids";
|
|
103
|
-
export {
|
|
104
|
-
LabeledBarList,
|
|
105
|
-
type LabeledBarListItem,
|
|
106
|
-
type LabeledBarListProps,
|
|
107
|
-
} from "./components/charts/labeled-bar-list";
|
|
108
|
-
export {
|
|
109
|
-
MetricBreakdown,
|
|
110
|
-
type MetricBreakdownChip,
|
|
111
|
-
type MetricBreakdownProps,
|
|
112
|
-
type MetricBreakdownRow,
|
|
113
|
-
type MetricBreakdownTone,
|
|
114
|
-
} from "./components/charts/metric-breakdown";
|
|
115
|
-
export {
|
|
116
|
-
ReferenceArea,
|
|
117
|
-
ReferenceDot,
|
|
118
|
-
ReferenceLine,
|
|
119
|
-
} from "./components/charts/references";
|
|
120
|
-
export {
|
|
121
|
-
type ServiceHealthItem,
|
|
122
|
-
ServiceHealthList,
|
|
123
|
-
type ServiceHealthListProps,
|
|
124
|
-
type ServiceHealthStatus,
|
|
125
|
-
} from "./components/charts/service-health-list";
|
|
126
|
-
export {
|
|
127
|
-
Sparkline,
|
|
128
|
-
type SparklineProps,
|
|
129
|
-
} from "./components/charts/sparkline";
|
|
130
|
-
export {
|
|
131
|
-
SparklineArea,
|
|
132
|
-
type SparklineAreaProps,
|
|
133
|
-
} from "./components/charts/sparkline-area";
|
|
134
|
-
export {
|
|
135
|
-
StackedBar,
|
|
136
|
-
type StackedBarProps,
|
|
137
|
-
type StackedBarSegment,
|
|
138
|
-
} from "./components/charts/stacked-bar";
|
|
139
|
-
export { ChartLabel, LabelList, Text } from "./components/charts/text";
|
|
140
|
-
export {
|
|
141
|
-
WorldHeatMap,
|
|
142
|
-
type WorldHeatMapPoint,
|
|
143
|
-
type WorldHeatMapProps,
|
|
144
|
-
} from "./components/charts/world-heat-map";
|
|
145
|
-
/* ────────────────────────────────────────────────────────────────
|
|
146
|
-
MOLECULES — small compositions of atoms.
|
|
147
|
-
Can import: tokens/, lib/utils, atoms/.
|
|
148
|
-
──────────────────────────────────────────────────────────────── */
|
|
149
|
-
export {
|
|
150
|
-
ActionBar,
|
|
151
|
-
type ActionBarAction,
|
|
152
|
-
type ActionBarProps,
|
|
153
|
-
type ActionBarSecondary,
|
|
154
|
-
} from "./components/molecules/action-bar";
|
|
155
|
-
export {
|
|
156
|
-
ActivityFeed,
|
|
157
|
-
type ActivityFeedProps,
|
|
158
|
-
ActivityItem,
|
|
159
|
-
type ActivityItemProps,
|
|
160
|
-
} from "./components/molecules/activity-item";
|
|
161
|
-
export { Alert, AlertDescription, AlertTitle } from "./components/molecules/alert";
|
|
162
|
-
export {
|
|
163
|
-
AnimatedBackground,
|
|
164
|
-
type AnimatedBackgroundOrb,
|
|
165
|
-
type AnimatedBackgroundProps,
|
|
166
|
-
} from "./components/molecules/animated-background";
|
|
167
|
-
export {
|
|
168
|
-
AuthShell,
|
|
169
|
-
type AuthShellProps,
|
|
170
|
-
} from "./components/molecules/auth-shell";
|
|
171
|
-
export {
|
|
172
|
-
BrandLockup,
|
|
173
|
-
type BrandLockupProps,
|
|
174
|
-
} from "./components/molecules/brand-lockup";
|
|
175
|
-
export {
|
|
176
|
-
Breadcrumb,
|
|
177
|
-
BreadcrumbEllipsis,
|
|
178
|
-
BreadcrumbItem,
|
|
179
|
-
BreadcrumbLink,
|
|
180
|
-
BreadcrumbList,
|
|
181
|
-
BreadcrumbPage,
|
|
182
|
-
BreadcrumbSeparator,
|
|
183
|
-
} from "./components/molecules/breadcrumb";
|
|
184
|
-
export {
|
|
185
|
-
ButtonGroup,
|
|
186
|
-
ButtonGroupSeparator,
|
|
187
|
-
ButtonGroupText,
|
|
188
|
-
buttonGroupVariants,
|
|
189
|
-
} from "./components/molecules/button-group";
|
|
190
|
-
export { Calendar, CalendarDayButton } from "./components/molecules/calendar";
|
|
191
|
-
export {
|
|
192
|
-
Card,
|
|
193
|
-
CardContent,
|
|
194
|
-
CardDescription,
|
|
195
|
-
CardFooter,
|
|
196
|
-
CardHeader,
|
|
197
|
-
CardTitle,
|
|
198
|
-
} from "./components/molecules/card";
|
|
199
|
-
export {
|
|
200
|
-
ClientBrand,
|
|
201
|
-
type ClientBrandProps,
|
|
202
|
-
} from "./components/molecules/client-brand";
|
|
203
|
-
export { CodeBlock, type CodeBlockProps } from "./components/molecules/code-block";
|
|
204
|
-
export {
|
|
205
|
-
CountdownButton,
|
|
206
|
-
type CountdownButtonProps,
|
|
207
|
-
} from "./components/molecules/countdown-button";
|
|
208
|
-
export { EmptyState, type EmptyStateProps } from "./components/molecules/empty-state";
|
|
209
|
-
export { ErrorState, type ErrorStateProps } from "./components/molecules/error-state";
|
|
210
|
-
export {
|
|
211
|
-
FieldDisplay,
|
|
212
|
-
type FieldDisplayProps,
|
|
213
|
-
} from "./components/molecules/field-display";
|
|
214
|
-
export {
|
|
215
|
-
InputOTP,
|
|
216
|
-
InputOTPGroup,
|
|
217
|
-
InputOTPSeparator,
|
|
218
|
-
InputOTPSlot,
|
|
219
|
-
} from "./components/molecules/input-otp";
|
|
220
|
-
export {
|
|
221
|
-
LauncherCard,
|
|
222
|
-
type LauncherCardProps,
|
|
223
|
-
type LauncherCardTone,
|
|
224
|
-
} from "./components/molecules/launcher-card";
|
|
225
|
-
export {
|
|
226
|
-
LoadingState,
|
|
227
|
-
type LoadingStateProps,
|
|
228
|
-
} from "./components/molecules/loading-state";
|
|
229
|
-
export {
|
|
230
|
-
NotificationItem,
|
|
231
|
-
type NotificationItemProps,
|
|
232
|
-
} from "./components/molecules/notification-item";
|
|
233
|
-
export {
|
|
234
|
-
NotificationList,
|
|
235
|
-
type NotificationListProps,
|
|
236
|
-
} from "./components/molecules/notification-list";
|
|
237
|
-
export {
|
|
238
|
-
NumberBadge,
|
|
239
|
-
type NumberBadgeProps,
|
|
240
|
-
} from "./components/molecules/number-badge";
|
|
241
|
-
export {
|
|
242
|
-
OrSeparator,
|
|
243
|
-
type OrSeparatorProps,
|
|
244
|
-
} from "./components/molecules/or-separator";
|
|
245
|
-
export {
|
|
246
|
-
PageHeader,
|
|
247
|
-
type PageHeaderBreadcrumb,
|
|
248
|
-
type PageHeaderProps,
|
|
249
|
-
} from "./components/molecules/page-header";
|
|
250
|
-
export {
|
|
251
|
-
PageTabs,
|
|
252
|
-
type PageTabsItem,
|
|
253
|
-
type PageTabsProps,
|
|
254
|
-
} from "./components/molecules/page-tabs";
|
|
255
|
-
export {
|
|
256
|
-
Pagination,
|
|
257
|
-
PaginationContent,
|
|
258
|
-
PaginationEllipsis,
|
|
259
|
-
PaginationItem,
|
|
260
|
-
PaginationLink,
|
|
261
|
-
PaginationNext,
|
|
262
|
-
PaginationPrevious,
|
|
263
|
-
} from "./components/molecules/pagination";
|
|
264
|
-
export {
|
|
265
|
-
PasswordInput,
|
|
266
|
-
type PasswordInputProps,
|
|
267
|
-
} from "./components/molecules/password-input";
|
|
268
|
-
export {
|
|
269
|
-
type PasswordStrength,
|
|
270
|
-
type PasswordStrengthLevel,
|
|
271
|
-
PasswordStrengthMeter,
|
|
272
|
-
type PasswordStrengthMeterProps,
|
|
273
|
-
scorePassword,
|
|
274
|
-
} from "./components/molecules/password-strength-meter";
|
|
275
|
-
export {
|
|
276
|
-
PhoneInput,
|
|
277
|
-
type PhoneInputProps,
|
|
278
|
-
} from "./components/molecules/phone-input";
|
|
279
|
-
export { SearchBar, type SearchBarProps } from "./components/molecules/search-bar";
|
|
280
|
-
export {
|
|
281
|
-
SecretField,
|
|
282
|
-
type SecretFieldProps,
|
|
283
|
-
type SecretFieldStatus,
|
|
284
|
-
} from "./components/molecules/secret-field";
|
|
285
|
-
export {
|
|
286
|
-
SectionCard,
|
|
287
|
-
type SectionCardProps,
|
|
288
|
-
} from "./components/molecules/section-card";
|
|
289
|
-
export {
|
|
290
|
-
SocialButton,
|
|
291
|
-
type SocialButtonProps,
|
|
292
|
-
SocialButtons,
|
|
293
|
-
type SocialButtonsProps,
|
|
294
|
-
type SocialProvider,
|
|
295
|
-
} from "./components/molecules/social-buttons";
|
|
296
|
-
export { StatCard, type StatCardProps } from "./components/molecules/stat-card";
|
|
297
|
-
export {
|
|
298
|
-
StatusBadge,
|
|
299
|
-
type StatusBadgeProps,
|
|
300
|
-
statusBadgeVariants,
|
|
301
|
-
} from "./components/molecules/status-badge";
|
|
302
|
-
export {
|
|
303
|
-
Stepper,
|
|
304
|
-
type StepperProps,
|
|
305
|
-
type StepperStep,
|
|
306
|
-
type StepStatus,
|
|
307
|
-
} from "./components/molecules/stepper";
|
|
308
|
-
export {
|
|
309
|
-
Table,
|
|
310
|
-
TableBody,
|
|
311
|
-
TableCaption,
|
|
312
|
-
TableCell,
|
|
313
|
-
TableFooter,
|
|
314
|
-
TableHead,
|
|
315
|
-
TableHeader,
|
|
316
|
-
TableRow,
|
|
317
|
-
} from "./components/molecules/table";
|
|
318
|
-
export { Terminal, type TerminalProps } from "./components/molecules/terminal";
|
|
319
|
-
export { ToggleGroup, ToggleGroupItem } from "./components/molecules/toggle-group";
|
|
320
|
-
export {
|
|
321
|
-
Tooltip,
|
|
322
|
-
TooltipContent,
|
|
323
|
-
TooltipProvider,
|
|
324
|
-
TooltipTrigger,
|
|
325
|
-
} from "./components/molecules/tooltip";
|
|
326
|
-
export {
|
|
327
|
-
UserAvatarChip,
|
|
328
|
-
type UserAvatarChipProps,
|
|
329
|
-
} from "./components/molecules/user-avatar-chip";
|
|
330
|
-
/* ────────────────────────────────────────────────────────────────
|
|
331
|
-
ORGANISMS — stateful surfaces, compositions of atoms + molecules.
|
|
332
|
-
Can import: tokens/, lib/utils, atoms/, molecules/.
|
|
333
|
-
──────────────────────────────────────────────────────────────── */
|
|
334
|
-
export {
|
|
335
|
-
Accordion,
|
|
336
|
-
AccordionContent,
|
|
337
|
-
AccordionItem,
|
|
338
|
-
AccordionTrigger,
|
|
339
|
-
} from "./components/organisms/accordion";
|
|
340
|
-
export {
|
|
341
|
-
AlertDialog,
|
|
342
|
-
AlertDialogAction,
|
|
343
|
-
AlertDialogCancel,
|
|
344
|
-
AlertDialogContent,
|
|
345
|
-
AlertDialogDescription,
|
|
346
|
-
AlertDialogFooter,
|
|
347
|
-
AlertDialogHeader,
|
|
348
|
-
AlertDialogOverlay,
|
|
349
|
-
AlertDialogPortal,
|
|
350
|
-
AlertDialogTitle,
|
|
351
|
-
AlertDialogTrigger,
|
|
352
|
-
} from "./components/organisms/alert-dialog";
|
|
353
|
-
export {
|
|
354
|
-
Carousel,
|
|
355
|
-
type CarouselApi,
|
|
356
|
-
CarouselContent,
|
|
357
|
-
CarouselItem,
|
|
358
|
-
CarouselNext,
|
|
359
|
-
CarouselPrevious,
|
|
360
|
-
} from "./components/organisms/carousel";
|
|
361
|
-
export {
|
|
362
|
-
Collapsible,
|
|
363
|
-
CollapsibleContent,
|
|
364
|
-
CollapsibleTrigger,
|
|
365
|
-
} from "./components/organisms/collapsible";
|
|
366
|
-
export {
|
|
367
|
-
Command,
|
|
368
|
-
CommandDialog,
|
|
369
|
-
CommandEmpty,
|
|
370
|
-
CommandGroup,
|
|
371
|
-
CommandInput,
|
|
372
|
-
CommandItem,
|
|
373
|
-
CommandList,
|
|
374
|
-
CommandSeparator,
|
|
375
|
-
CommandShortcut,
|
|
376
|
-
} from "./components/organisms/command";
|
|
377
|
-
export {
|
|
378
|
-
ContextMenu,
|
|
379
|
-
ContextMenuCheckboxItem,
|
|
380
|
-
ContextMenuContent,
|
|
381
|
-
ContextMenuGroup,
|
|
382
|
-
ContextMenuItem,
|
|
383
|
-
ContextMenuLabel,
|
|
384
|
-
ContextMenuPortal,
|
|
385
|
-
ContextMenuRadioGroup,
|
|
386
|
-
ContextMenuRadioItem,
|
|
387
|
-
ContextMenuSeparator,
|
|
388
|
-
ContextMenuShortcut,
|
|
389
|
-
ContextMenuSub,
|
|
390
|
-
ContextMenuSubContent,
|
|
391
|
-
ContextMenuSubTrigger,
|
|
392
|
-
ContextMenuTrigger,
|
|
393
|
-
} from "./components/organisms/context-menu";
|
|
394
|
-
export {
|
|
395
|
-
DashboardGrid,
|
|
396
|
-
type DashboardGridBreakpoint,
|
|
397
|
-
type DashboardGridProps,
|
|
398
|
-
type DashboardItem,
|
|
399
|
-
} from "./components/organisms/dashboard-grid";
|
|
400
|
-
export {
|
|
401
|
-
DataTable,
|
|
402
|
-
type DataTableColumn,
|
|
403
|
-
type DataTableProps,
|
|
404
|
-
} from "./components/organisms/data-table";
|
|
405
|
-
export {
|
|
406
|
-
Dialog,
|
|
407
|
-
DialogClose,
|
|
408
|
-
DialogContent,
|
|
409
|
-
DialogDescription,
|
|
410
|
-
DialogFooter,
|
|
411
|
-
DialogHeader,
|
|
412
|
-
DialogOverlay,
|
|
413
|
-
DialogPortal,
|
|
414
|
-
DialogTitle,
|
|
415
|
-
DialogTrigger,
|
|
416
|
-
} from "./components/organisms/dialog";
|
|
417
|
-
export {
|
|
418
|
-
Drawer,
|
|
419
|
-
DrawerClose,
|
|
420
|
-
DrawerContent,
|
|
421
|
-
DrawerDescription,
|
|
422
|
-
DrawerFooter,
|
|
423
|
-
DrawerHandle,
|
|
424
|
-
DrawerHeader,
|
|
425
|
-
DrawerOverlay,
|
|
426
|
-
DrawerPortal,
|
|
427
|
-
DrawerTitle,
|
|
428
|
-
DrawerTrigger,
|
|
429
|
-
} from "./components/organisms/drawer";
|
|
430
|
-
export {
|
|
431
|
-
DropdownMenu,
|
|
432
|
-
DropdownMenuCheckboxItem,
|
|
433
|
-
DropdownMenuContent,
|
|
434
|
-
DropdownMenuGroup,
|
|
435
|
-
DropdownMenuItem,
|
|
436
|
-
DropdownMenuLabel,
|
|
437
|
-
DropdownMenuPortal,
|
|
438
|
-
DropdownMenuRadioGroup,
|
|
439
|
-
DropdownMenuRadioItem,
|
|
440
|
-
DropdownMenuSeparator,
|
|
441
|
-
DropdownMenuShortcut,
|
|
442
|
-
DropdownMenuSub,
|
|
443
|
-
DropdownMenuSubContent,
|
|
444
|
-
DropdownMenuSubTrigger,
|
|
445
|
-
DropdownMenuTrigger,
|
|
446
|
-
} from "./components/organisms/dropdown-menu";
|
|
447
|
-
export {
|
|
448
|
-
CodeEditor,
|
|
449
|
-
type CodeEditorLanguage,
|
|
450
|
-
type CodeEditorProps,
|
|
451
|
-
MarkdownEditor,
|
|
452
|
-
type MarkdownEditorProps,
|
|
453
|
-
RichTextEditor,
|
|
454
|
-
type RichTextEditorProps,
|
|
455
|
-
TOOLBAR_ITEM_IDS,
|
|
456
|
-
type ToolbarItemId,
|
|
457
|
-
} from "./components/organisms/editors";
|
|
458
|
-
export {
|
|
459
|
-
ErrorBoundary,
|
|
460
|
-
type ErrorBoundaryProps,
|
|
461
|
-
} from "./components/organisms/error-boundary";
|
|
462
|
-
export {
|
|
463
|
-
Form,
|
|
464
|
-
FormControl,
|
|
465
|
-
FormDescription,
|
|
466
|
-
FormField,
|
|
467
|
-
FormItem,
|
|
468
|
-
FormLabel,
|
|
469
|
-
FormMessage,
|
|
470
|
-
useFormField,
|
|
471
|
-
} from "./components/organisms/form";
|
|
472
|
-
export {
|
|
473
|
-
HoverCard,
|
|
474
|
-
HoverCardContent,
|
|
475
|
-
HoverCardTrigger,
|
|
476
|
-
} from "./components/organisms/hover-card";
|
|
477
|
-
export {
|
|
478
|
-
Menubar,
|
|
479
|
-
MenubarCheckboxItem,
|
|
480
|
-
MenubarContent,
|
|
481
|
-
MenubarGroup,
|
|
482
|
-
MenubarItem,
|
|
483
|
-
MenubarLabel,
|
|
484
|
-
MenubarMenu,
|
|
485
|
-
MenubarPortal,
|
|
486
|
-
MenubarRadioGroup,
|
|
487
|
-
MenubarRadioItem,
|
|
488
|
-
MenubarSeparator,
|
|
489
|
-
MenubarShortcut,
|
|
490
|
-
MenubarSub,
|
|
491
|
-
MenubarSubContent,
|
|
492
|
-
MenubarSubTrigger,
|
|
493
|
-
MenubarTrigger,
|
|
494
|
-
} from "./components/organisms/menubar";
|
|
495
|
-
export {
|
|
496
|
-
NavBar,
|
|
497
|
-
type NavBarProps,
|
|
498
|
-
type NavLink,
|
|
499
|
-
} from "./components/organisms/navbar";
|
|
500
|
-
export {
|
|
501
|
-
NavigationMenu,
|
|
502
|
-
NavigationMenuContent,
|
|
503
|
-
NavigationMenuIndicator,
|
|
504
|
-
NavigationMenuItem,
|
|
505
|
-
NavigationMenuLink,
|
|
506
|
-
NavigationMenuList,
|
|
507
|
-
NavigationMenuTrigger,
|
|
508
|
-
NavigationMenuViewport,
|
|
509
|
-
navigationMenuTriggerStyle,
|
|
510
|
-
} from "./components/organisms/navigation-menu";
|
|
511
|
-
export {
|
|
512
|
-
Popover,
|
|
513
|
-
PopoverAnchor,
|
|
514
|
-
PopoverContent,
|
|
515
|
-
PopoverTrigger,
|
|
516
|
-
} from "./components/organisms/popover";
|
|
517
|
-
export {
|
|
518
|
-
ResizableHandle,
|
|
519
|
-
ResizablePanel,
|
|
520
|
-
ResizablePanelGroup,
|
|
521
|
-
} from "./components/organisms/resizable";
|
|
522
|
-
export {
|
|
523
|
-
canvasSchemaFormTemplates,
|
|
524
|
-
canvasSchemaFormWidgets,
|
|
525
|
-
type IChangeEvent,
|
|
526
|
-
type RJSFSchema,
|
|
527
|
-
SchemaForm,
|
|
528
|
-
type SchemaFormProps,
|
|
529
|
-
type UiSchema,
|
|
530
|
-
type WidgetProps,
|
|
531
|
-
} from "./components/organisms/schema-form";
|
|
532
|
-
export {
|
|
533
|
-
Select,
|
|
534
|
-
SelectContent,
|
|
535
|
-
SelectGroup,
|
|
536
|
-
SelectItem,
|
|
537
|
-
SelectLabel,
|
|
538
|
-
SelectScrollDownButton,
|
|
539
|
-
SelectScrollUpButton,
|
|
540
|
-
SelectSeparator,
|
|
541
|
-
SelectTrigger,
|
|
542
|
-
SelectValue,
|
|
543
|
-
} from "./components/organisms/select";
|
|
544
|
-
export {
|
|
545
|
-
Sheet,
|
|
546
|
-
SheetClose,
|
|
547
|
-
SheetContent,
|
|
548
|
-
SheetDescription,
|
|
549
|
-
SheetFooter,
|
|
550
|
-
SheetHeader,
|
|
551
|
-
SheetOverlay,
|
|
552
|
-
SheetPortal,
|
|
553
|
-
SheetTitle,
|
|
554
|
-
SheetTrigger,
|
|
555
|
-
} from "./components/organisms/sheet";
|
|
556
|
-
export {
|
|
557
|
-
Sidebar,
|
|
558
|
-
SidebarContent,
|
|
559
|
-
SidebarFooter,
|
|
560
|
-
SidebarGroup,
|
|
561
|
-
SidebarGroupAction,
|
|
562
|
-
SidebarGroupContent,
|
|
563
|
-
SidebarGroupLabel,
|
|
564
|
-
SidebarHeader,
|
|
565
|
-
SidebarInput,
|
|
566
|
-
SidebarInset,
|
|
567
|
-
SidebarMenu,
|
|
568
|
-
SidebarMenuAction,
|
|
569
|
-
SidebarMenuBadge,
|
|
570
|
-
SidebarMenuButton,
|
|
571
|
-
SidebarMenuItem,
|
|
572
|
-
SidebarMenuSkeleton,
|
|
573
|
-
SidebarMenuSub,
|
|
574
|
-
SidebarMenuSubButton,
|
|
575
|
-
SidebarMenuSubItem,
|
|
576
|
-
SidebarProvider,
|
|
577
|
-
SidebarRail,
|
|
578
|
-
SidebarSeparator,
|
|
579
|
-
SidebarTrigger,
|
|
580
|
-
useSidebar,
|
|
581
|
-
} from "./components/organisms/sidebar";
|
|
582
|
-
export { Toaster, toast } from "./components/organisms/sonner";
|
|
583
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/organisms/tabs";
|
|
584
|
-
export {
|
|
585
|
-
type ResolvedTheme,
|
|
586
|
-
type Theme,
|
|
587
|
-
ThemeProvider,
|
|
588
|
-
type ThemeProviderProps,
|
|
589
|
-
useTheme,
|
|
590
|
-
} from "./components/organisms/theme-provider";
|
|
591
|
-
// Hooks
|
|
592
|
-
export { useIsMobile } from "./hooks/use-mobile";
|
|
593
|
-
export {
|
|
594
|
-
PortalContainerProvider,
|
|
595
|
-
usePortalContainer,
|
|
596
|
-
} from "./lib/portal-container";
|
|
597
|
-
export { cn } from "./lib/utils";
|
|
598
|
-
|
|
599
|
-
/* ────────────────────────────────────────────────────────────────
|
|
600
|
-
Design tokens (cross-platform)
|
|
601
|
-
──────────────────────────────────────────────────────────────── */
|
|
602
|
-
export { colors, hslToString, hslToVar } from "./tokens/colors";
|
|
603
|
-
export { defaultRadius, radius, spacing } from "./tokens/spacing";
|
|
604
|
-
export { fontFamily, fontSize, fontWeight } from "./tokens/typography";
|
|
13
|
+
export type { Theme, Surface, Density } from "./theme.js";
|
package/src/theme.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type Theme = "light" | "dark";
|
|
2
|
+
export type Surface = "default" | "glass";
|
|
3
|
+
export type Density = "compact" | "regular" | "comfy";
|
|
4
|
+
|
|
5
|
+
const STORAGE_KEY_THEME = "canvas-theme";
|
|
6
|
+
const STORAGE_KEY_SURFACE = "canvas-surface";
|
|
7
|
+
const STORAGE_KEY_DENSITY = "canvas-density";
|
|
8
|
+
|
|
9
|
+
function store(key: string, value: string): void {
|
|
10
|
+
try { localStorage.setItem(key, value); } catch {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function load(key: string): string | null {
|
|
14
|
+
try { return localStorage.getItem(key); } catch { return null; }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getTheme(): Theme {
|
|
18
|
+
const saved = load(STORAGE_KEY_THEME);
|
|
19
|
+
if (saved === "light" || saved === "dark") return saved;
|
|
20
|
+
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function setTheme(theme: Theme): void {
|
|
24
|
+
document.documentElement.classList.toggle("dark", theme === "dark");
|
|
25
|
+
store(STORAGE_KEY_THEME, theme);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function toggleTheme(): Theme {
|
|
29
|
+
const next = getTheme() === "dark" ? "light" : "dark";
|
|
30
|
+
setTheme(next);
|
|
31
|
+
return next;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function getSurface(): Surface {
|
|
35
|
+
const saved = load(STORAGE_KEY_SURFACE);
|
|
36
|
+
if (saved === "default" || saved === "glass") return saved;
|
|
37
|
+
return (document.documentElement.dataset.surface as Surface) ?? "default";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function setSurface(surface: Surface): void {
|
|
41
|
+
if (surface === "default") {
|
|
42
|
+
delete document.documentElement.dataset.surface;
|
|
43
|
+
} else {
|
|
44
|
+
document.documentElement.dataset.surface = surface;
|
|
45
|
+
}
|
|
46
|
+
store(STORAGE_KEY_SURFACE, surface);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function getDensity(): Density {
|
|
50
|
+
const saved = load(STORAGE_KEY_DENSITY);
|
|
51
|
+
if (saved === "compact" || saved === "regular" || saved === "comfy") return saved;
|
|
52
|
+
return (document.documentElement.dataset.density as Density) ?? "regular";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function setDensity(density: Density): void {
|
|
56
|
+
if (density === "regular") {
|
|
57
|
+
delete document.documentElement.dataset.density;
|
|
58
|
+
} else {
|
|
59
|
+
document.documentElement.dataset.density = density;
|
|
60
|
+
}
|
|
61
|
+
store(STORAGE_KEY_DENSITY, density);
|
|
62
|
+
}
|
package/src/tokens.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function token(name: string): string {
|
|
2
|
+
return getComputedStyle(document.documentElement).getPropertyValue(`--${name}`).trim();
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function hsl(name: string, alpha?: number): string {
|
|
6
|
+
const raw = token(name);
|
|
7
|
+
if (alpha !== undefined) {
|
|
8
|
+
return `hsl(${raw} / ${alpha})`;
|
|
9
|
+
}
|
|
10
|
+
return `hsl(${raw})`;
|
|
11
|
+
}
|
package/styles/base.css
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@layer canvas.base {
|
|
2
|
+
*,
|
|
3
|
+
::after,
|
|
4
|
+
::before {
|
|
5
|
+
border-color: hsl(var(--border));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
font-family: var(--font-sans);
|
|
10
|
+
color: hsl(var(--foreground));
|
|
11
|
+
background-color: hsl(var(--background));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
code, pre, kbd {
|
|
15
|
+
font-family: var(--font-mono);
|
|
16
|
+
}
|
|
17
|
+
}
|