@olympusoss/canvas 2.20.2 → 3.2.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 +73 -35
- package/package.json +46 -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/atoms/avatar.css +22 -0
- package/styles/atoms/badge.css +83 -0
- package/styles/atoms/breadcrumb.css +35 -0
- package/styles/atoms/button-group.css +23 -0
- package/styles/atoms/button.css +107 -0
- package/styles/atoms/checkbox.css +55 -0
- package/styles/atoms/combobox.css +75 -0
- package/styles/atoms/dropdown.css +54 -0
- package/styles/atoms/icon.css +8 -0
- package/styles/atoms/input-group.css +45 -0
- package/styles/atoms/input.css +56 -0
- package/styles/atoms/kbd.css +15 -0
- package/styles/atoms/pagination.css +48 -0
- package/styles/atoms/popover.css +14 -0
- package/styles/atoms/radio.css +28 -0
- package/styles/atoms/select.css +57 -0
- package/styles/atoms/separator.css +32 -0
- package/styles/atoms/skeleton.css +32 -0
- package/styles/atoms/spinner.css +26 -0
- package/styles/atoms/switch.css +45 -0
- package/styles/atoms/textarea.css +31 -0
- package/styles/atoms/tooltip.css +53 -0
- package/styles/atoms/typography.css +105 -0
- package/styles/base.css +17 -0
- package/styles/canvas.css +77 -52
- package/styles/molecules/alert.css +66 -0
- package/styles/molecules/card.css +58 -0
- package/styles/molecules/code-block.css +18 -0
- package/styles/molecules/empty-state.css +17 -0
- package/styles/molecules/field.css +27 -0
- package/styles/molecules/form.css +27 -0
- package/styles/molecules/page-header.css +52 -0
- package/styles/molecules/section-card.css +49 -0
- package/styles/molecules/stat-card.css +71 -0
- package/styles/molecules/toast.css +95 -0
- package/styles/organisms/app-shell.css +46 -0
- package/styles/organisms/calendar.css +73 -0
- package/styles/organisms/command.css +94 -0
- package/styles/organisms/data-table.css +142 -0
- package/styles/organisms/dialog.css +72 -0
- package/styles/organisms/filter-panel.css +58 -0
- package/styles/organisms/row-menu.css +69 -0
- package/styles/organisms/sheet.css +70 -0
- package/styles/organisms/sidebar.css +146 -0
- package/styles/organisms/stepper.css +63 -0
- package/styles/organisms/tabs.css +40 -0
- package/styles/organisms/topbar.css +24 -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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.select {
|
|
3
|
+
appearance: none;
|
|
4
|
+
height: 2.25rem;
|
|
5
|
+
padding: 0.25rem 2rem 0.25rem 0.75rem;
|
|
6
|
+
border: 1px solid hsl(var(--input));
|
|
7
|
+
border-radius: var(--radius-md, 6px);
|
|
8
|
+
background-color: transparent;
|
|
9
|
+
color: hsl(var(--foreground));
|
|
10
|
+
font-family: var(--font-sans);
|
|
11
|
+
font-size: 0.875rem;
|
|
12
|
+
line-height: 1.25rem;
|
|
13
|
+
box-shadow: var(--shadow-xs);
|
|
14
|
+
outline: none;
|
|
15
|
+
width: 100%;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
|
|
18
|
+
background-repeat: no-repeat;
|
|
19
|
+
background-position: right 0.625rem center;
|
|
20
|
+
background-size: 12px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.select:focus-visible {
|
|
24
|
+
outline: 2px solid hsl(var(--ring));
|
|
25
|
+
outline-offset: 2px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.select:disabled {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.select-trigger {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
gap: 0.5rem;
|
|
38
|
+
height: 2.25rem;
|
|
39
|
+
padding: 0.25rem 0.75rem;
|
|
40
|
+
border: 1px solid hsl(var(--input));
|
|
41
|
+
border-radius: var(--radius-md, 6px);
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
color: hsl(var(--foreground));
|
|
44
|
+
font-family: var(--font-sans);
|
|
45
|
+
font-size: 0.875rem;
|
|
46
|
+
line-height: 1.25rem;
|
|
47
|
+
box-shadow: var(--shadow-xs);
|
|
48
|
+
outline: none;
|
|
49
|
+
width: 100%;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.select-trigger:focus-visible {
|
|
54
|
+
outline: 2px solid hsl(var(--ring));
|
|
55
|
+
outline-offset: 2px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.sep {
|
|
3
|
+
height: 1px;
|
|
4
|
+
background-color: hsl(var(--border));
|
|
5
|
+
border-width: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sep-v {
|
|
10
|
+
width: 1px;
|
|
11
|
+
height: 100%;
|
|
12
|
+
background-color: hsl(var(--border));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.sep-label {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 0.5rem;
|
|
19
|
+
color: hsl(var(--muted-foreground));
|
|
20
|
+
font-family: var(--font-sans);
|
|
21
|
+
font-size: 0.75rem;
|
|
22
|
+
line-height: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sep-label::before,
|
|
26
|
+
.sep-label::after {
|
|
27
|
+
content: "";
|
|
28
|
+
flex: 1;
|
|
29
|
+
height: 1px;
|
|
30
|
+
background-color: hsl(var(--border));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
@keyframes shimmer {
|
|
3
|
+
from { background-position: -200% 0; }
|
|
4
|
+
to { background-position: 200% 0; }
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.skeleton {
|
|
8
|
+
background-color: hsl(var(--muted));
|
|
9
|
+
border-radius: var(--radius-md, 6px);
|
|
10
|
+
background-image: linear-gradient(
|
|
11
|
+
90deg,
|
|
12
|
+
transparent 0%,
|
|
13
|
+
hsl(var(--muted-foreground) / 0.08) 50%,
|
|
14
|
+
transparent 100%
|
|
15
|
+
);
|
|
16
|
+
background-size: 200% 100%;
|
|
17
|
+
animation: shimmer 1.5s ease-in-out infinite;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.skeleton-text {
|
|
21
|
+
height: 1rem;
|
|
22
|
+
margin-bottom: 0.5rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.skeleton-circle {
|
|
26
|
+
border-radius: 9999px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.skeleton-rect {
|
|
30
|
+
border-radius: var(--radius-md, 6px);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
@keyframes spin {
|
|
3
|
+
from { transform: rotate(0deg); }
|
|
4
|
+
to { transform: rotate(360deg); }
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.spinner {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
width: 1rem;
|
|
10
|
+
height: 1rem;
|
|
11
|
+
border: 2px solid hsl(var(--primary));
|
|
12
|
+
border-top-color: transparent;
|
|
13
|
+
border-radius: 9999px;
|
|
14
|
+
animation: spin 600ms linear infinite;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.spinner-sm {
|
|
18
|
+
width: 0.75rem;
|
|
19
|
+
height: 0.75rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.spinner-lg {
|
|
23
|
+
width: 1.5rem;
|
|
24
|
+
height: 1.5rem;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.switch {
|
|
3
|
+
appearance: none;
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 2.25rem;
|
|
6
|
+
height: 1.25rem;
|
|
7
|
+
border-radius: var(--radius-full, 9999px);
|
|
8
|
+
background-color: hsl(var(--muted));
|
|
9
|
+
border: none;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
transition: background-color var(--duration-fast);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.switch::after {
|
|
16
|
+
content: "";
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 2px;
|
|
19
|
+
left: 2px;
|
|
20
|
+
width: 0.875rem;
|
|
21
|
+
height: 0.875rem;
|
|
22
|
+
border-radius: 9999px;
|
|
23
|
+
background-color: white;
|
|
24
|
+
box-shadow: var(--shadow-xs);
|
|
25
|
+
transition: transform var(--duration-fast);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.switch:checked {
|
|
29
|
+
background-color: hsl(var(--primary));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.switch:checked::after {
|
|
33
|
+
transform: translateX(1rem);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.switch:focus-visible {
|
|
37
|
+
outline: 2px solid hsl(var(--ring));
|
|
38
|
+
outline-offset: 2px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.switch:disabled {
|
|
42
|
+
opacity: 0.5;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.textarea {
|
|
3
|
+
min-height: 5rem;
|
|
4
|
+
padding: 0.5rem 0.75rem;
|
|
5
|
+
border: 1px solid hsl(var(--input));
|
|
6
|
+
border-radius: var(--radius-md, 6px);
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
color: hsl(var(--foreground));
|
|
9
|
+
font-family: var(--font-sans);
|
|
10
|
+
font-size: 0.875rem;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
resize: vertical;
|
|
13
|
+
box-shadow: var(--shadow-xs);
|
|
14
|
+
outline: none;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.textarea::placeholder {
|
|
19
|
+
color: hsl(var(--muted-foreground));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.textarea:focus-visible {
|
|
23
|
+
outline: 2px solid hsl(var(--ring));
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.textarea:disabled {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.tooltip {
|
|
3
|
+
position: absolute;
|
|
4
|
+
padding: 6px 12px;
|
|
5
|
+
border-radius: var(--radius-md, 6px);
|
|
6
|
+
background-color: hsl(var(--primary));
|
|
7
|
+
color: hsl(var(--primary-foreground));
|
|
8
|
+
font-family: var(--font-sans);
|
|
9
|
+
font-size: 0.75rem;
|
|
10
|
+
line-height: 1.4;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
z-index: var(--z-popover);
|
|
13
|
+
box-shadow: var(--shadow-sm);
|
|
14
|
+
animation: var(--animate-fade-in);
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tooltip-arrow {
|
|
19
|
+
position: absolute;
|
|
20
|
+
width: 8px;
|
|
21
|
+
height: 8px;
|
|
22
|
+
background-color: hsl(var(--primary));
|
|
23
|
+
transform: rotate(45deg);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.tooltip-arrow.bottom {
|
|
27
|
+
top: 100%;
|
|
28
|
+
left: 50%;
|
|
29
|
+
margin-top: -4px;
|
|
30
|
+
margin-left: -4px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tooltip-arrow.top {
|
|
34
|
+
bottom: 100%;
|
|
35
|
+
left: 50%;
|
|
36
|
+
margin-bottom: -4px;
|
|
37
|
+
margin-left: -4px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.tooltip-arrow.left {
|
|
41
|
+
right: 100%;
|
|
42
|
+
top: 50%;
|
|
43
|
+
margin-right: -4px;
|
|
44
|
+
margin-top: -4px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tooltip-arrow.right {
|
|
48
|
+
left: 100%;
|
|
49
|
+
top: 50%;
|
|
50
|
+
margin-left: -4px;
|
|
51
|
+
margin-top: -4px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.display,
|
|
3
|
+
.h1 {
|
|
4
|
+
font-size: 36px;
|
|
5
|
+
line-height: 40px;
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
letter-spacing: -0.02em;
|
|
8
|
+
color: hsl(var(--foreground));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.h2 {
|
|
12
|
+
font-size: 30px;
|
|
13
|
+
line-height: 2.25rem;
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
letter-spacing: -0.02em;
|
|
16
|
+
color: hsl(var(--foreground));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.h3,
|
|
20
|
+
.page-title {
|
|
21
|
+
font-size: 1.5rem;
|
|
22
|
+
line-height: 2rem;
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
letter-spacing: -0.015em;
|
|
25
|
+
color: hsl(var(--foreground));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.h4,
|
|
29
|
+
.card-title {
|
|
30
|
+
font-size: 1.125rem;
|
|
31
|
+
line-height: 1.75rem;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
letter-spacing: -0.01em;
|
|
34
|
+
color: hsl(var(--foreground));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.h5 {
|
|
38
|
+
font-size: 1rem;
|
|
39
|
+
line-height: 1.5rem;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
color: hsl(var(--foreground));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.p,
|
|
45
|
+
.body {
|
|
46
|
+
font-size: 1rem;
|
|
47
|
+
line-height: 1.5rem;
|
|
48
|
+
color: hsl(var(--foreground));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.small,
|
|
52
|
+
.muted {
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
line-height: 1.25rem;
|
|
55
|
+
color: hsl(var(--muted-foreground));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.tiny,
|
|
59
|
+
.caption {
|
|
60
|
+
font-size: 0.75rem;
|
|
61
|
+
line-height: 1rem;
|
|
62
|
+
color: hsl(var(--muted-foreground));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mono {
|
|
66
|
+
font-family: var(--font-mono);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.code {
|
|
70
|
+
font-family: var(--font-mono);
|
|
71
|
+
font-size: 0.9em;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
code:not(pre code) {
|
|
75
|
+
background-color: hsl(var(--muted));
|
|
76
|
+
padding-inline: 0.35em;
|
|
77
|
+
padding-block: 0.125em;
|
|
78
|
+
border-radius: 0.125rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Color helpers */
|
|
82
|
+
.fg1 {
|
|
83
|
+
color: hsl(var(--foreground));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.fg2 {
|
|
87
|
+
color: hsl(var(--muted-foreground));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.bg1 {
|
|
91
|
+
background-color: hsl(var(--background));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.bg2 {
|
|
95
|
+
background-color: hsl(var(--muted));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.bg-card {
|
|
99
|
+
background-color: hsl(var(--card));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.muted-fg {
|
|
103
|
+
color: hsl(var(--muted-foreground));
|
|
104
|
+
}
|
|
105
|
+
}
|
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
|
+
}
|
package/styles/canvas.css
CHANGED
|
@@ -1,55 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* The single CSS import that gives a consumer Canvas's full styling contract:
|
|
4
|
-
* - Tailwind v4 with @source pointed at canvas/src
|
|
5
|
-
* - Canonical design tokens (light + dark, tiered surfaces, sidebar, stat-card)
|
|
6
|
-
* - @theme inline mapping so `bg-card`, `text-foreground`, etc. resolve
|
|
7
|
-
* - Leaflet defaults for canvas/components/molecules/leaflet-map and scalable-globe
|
|
8
|
-
*
|
|
9
|
-
* Consumers (athena/hera/site/daedalus) and the canvas-docs site both import
|
|
10
|
-
* this file. Inside canvas-docs, the per-example iframe filters parent
|
|
11
|
-
* stylesheets down to ONLY this one — the sentinel rule below
|
|
12
|
-
* (`--canvas-runtime`) is what the filter looks for. Keep that rule.
|
|
13
|
-
*/
|
|
1
|
+
@layer canvas.reset, canvas.tokens, canvas.base, canvas.components, canvas.patterns, canvas.utilities;
|
|
14
2
|
|
|
15
|
-
|
|
16
|
-
@
|
|
17
|
-
@import "./tokens.css";
|
|
18
|
-
@import "./leaflet.css";
|
|
19
|
-
@import "./dashboard-grid.css";
|
|
3
|
+
/* Reset */
|
|
4
|
+
@import "./reset.css";
|
|
20
5
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
30
|
-
--color-secondary: hsl(var(--secondary));
|
|
31
|
-
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
32
|
-
--color-muted: hsl(var(--muted));
|
|
33
|
-
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
34
|
-
--color-accent: hsl(var(--accent));
|
|
35
|
-
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
36
|
-
--color-destructive: hsl(var(--destructive));
|
|
37
|
-
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
38
|
-
--color-brand: hsl(var(--brand));
|
|
39
|
-
--color-brand-foreground: hsl(var(--brand-foreground));
|
|
40
|
-
--color-border: hsl(var(--border));
|
|
41
|
-
--color-input: hsl(var(--input));
|
|
42
|
-
--color-ring: hsl(var(--ring));
|
|
43
|
-
}
|
|
6
|
+
/* Tokens */
|
|
7
|
+
@import "./tokens/colors.css";
|
|
8
|
+
@import "./tokens/typography.css";
|
|
9
|
+
@import "./tokens/radius.css";
|
|
10
|
+
@import "./tokens/spacing.css";
|
|
11
|
+
@import "./tokens/shadows.css";
|
|
12
|
+
@import "./tokens/z-index.css";
|
|
13
|
+
@import "./tokens/motion.css";
|
|
44
14
|
|
|
45
|
-
/*
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
15
|
+
/* Base */
|
|
16
|
+
@import "./base.css";
|
|
17
|
+
|
|
18
|
+
/* Components */
|
|
19
|
+
@import "./atoms/typography.css";
|
|
20
|
+
@import "./atoms/button.css";
|
|
21
|
+
@import "./atoms/input.css";
|
|
22
|
+
@import "./molecules/card.css";
|
|
23
|
+
@import "./atoms/badge.css";
|
|
24
|
+
@import "./atoms/separator.css";
|
|
25
|
+
@import "./atoms/icon.css";
|
|
26
|
+
@import "./atoms/avatar.css";
|
|
27
|
+
@import "./atoms/kbd.css";
|
|
28
|
+
@import "./molecules/code-block.css";
|
|
29
|
+
@import "./organisms/sidebar.css";
|
|
30
|
+
@import "./organisms/topbar.css";
|
|
31
|
+
@import "./organisms/app-shell.css";
|
|
32
|
+
@import "./molecules/stat-card.css";
|
|
33
|
+
@import "./molecules/section-card.css";
|
|
34
|
+
@import "./organisms/data-table.css";
|
|
35
|
+
@import "./molecules/field.css";
|
|
36
|
+
@import "./molecules/page-header.css";
|
|
37
|
+
@import "./molecules/empty-state.css";
|
|
38
|
+
@import "./organisms/row-menu.css";
|
|
39
|
+
@import "./atoms/tooltip.css";
|
|
40
|
+
@import "./atoms/skeleton.css";
|
|
41
|
+
@import "./atoms/spinner.css";
|
|
42
|
+
@import "./atoms/checkbox.css";
|
|
43
|
+
@import "./atoms/radio.css";
|
|
44
|
+
@import "./atoms/switch.css";
|
|
45
|
+
@import "./atoms/select.css";
|
|
46
|
+
@import "./atoms/textarea.css";
|
|
47
|
+
@import "./atoms/combobox.css";
|
|
48
|
+
@import "./molecules/alert.css";
|
|
49
|
+
@import "./molecules/toast.css";
|
|
50
|
+
@import "./organisms/dialog.css";
|
|
51
|
+
@import "./organisms/sheet.css";
|
|
52
|
+
@import "./atoms/popover.css";
|
|
53
|
+
@import "./atoms/dropdown.css";
|
|
54
|
+
@import "./atoms/breadcrumb.css";
|
|
55
|
+
@import "./atoms/pagination.css";
|
|
56
|
+
@import "./organisms/tabs.css";
|
|
57
|
+
@import "./atoms/button-group.css";
|
|
58
|
+
@import "./molecules/form.css";
|
|
59
|
+
@import "./atoms/input-group.css";
|
|
60
|
+
@import "./organisms/command.css";
|
|
61
|
+
@import "./organisms/stepper.css";
|
|
62
|
+
@import "./organisms/calendar.css";
|
|
63
|
+
@import "./organisms/filter-panel.css";
|
|
64
|
+
|
|
65
|
+
/* Patterns */
|
|
66
|
+
@import "./patterns/backdrops.css";
|
|
67
|
+
@import "./patterns/glass.css";
|
|
68
|
+
@import "./patterns/density.css";
|
|
69
|
+
@import "./patterns/focus.css";
|
|
70
|
+
@import "./patterns/scrollbar.css";
|
|
71
|
+
@import "./patterns/reduced-motion.css";
|
|
72
|
+
@import "./patterns/high-contrast.css";
|
|
73
|
+
|
|
74
|
+
/* Utilities */
|
|
75
|
+
@import "./utilities/display.css";
|
|
76
|
+
@import "./utilities/flexbox.css";
|
|
77
|
+
@import "./utilities/grid.css";
|
|
78
|
+
@import "./utilities/gap.css";
|
|
79
|
+
@import "./utilities/sizing.css";
|
|
80
|
+
@import "./utilities/position.css";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.alert {
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 0.75rem;
|
|
5
|
+
padding: 1rem;
|
|
6
|
+
border: 1px solid hsl(var(--border));
|
|
7
|
+
border-radius: var(--radius-lg, 8px);
|
|
8
|
+
font-size: 0.875rem;
|
|
9
|
+
line-height: 1.25rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.alert-title {
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
margin-bottom: 0.25rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.alert-desc {
|
|
18
|
+
font-size: 0.8125rem;
|
|
19
|
+
line-height: 1.25rem;
|
|
20
|
+
color: hsl(var(--muted-foreground));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.alert-default {
|
|
24
|
+
border-color: hsl(var(--border));
|
|
25
|
+
background-color: hsl(var(--card));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.alert-destructive {
|
|
29
|
+
border-color: hsl(var(--destructive) / 0.5);
|
|
30
|
+
color: hsl(var(--destructive));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.alert-destructive .alert-title {
|
|
34
|
+
color: hsl(var(--destructive));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.alert-warning {
|
|
38
|
+
border-color: hsl(var(--warning-fg) / 0.3);
|
|
39
|
+
background-color: hsl(var(--warning-bg));
|
|
40
|
+
color: hsl(var(--warning-fg));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.alert-warning .alert-title {
|
|
44
|
+
color: hsl(var(--warning-fg));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.alert-success {
|
|
48
|
+
border-color: hsl(var(--success-fg) / 0.3);
|
|
49
|
+
background-color: hsl(var(--success-bg));
|
|
50
|
+
color: hsl(var(--success-fg));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.alert-success .alert-title {
|
|
54
|
+
color: hsl(var(--success-fg));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.alert-info {
|
|
58
|
+
border-color: hsl(var(--info-fg) / 0.3);
|
|
59
|
+
background-color: hsl(var(--info-bg));
|
|
60
|
+
color: hsl(var(--info-fg));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.alert-info .alert-title {
|
|
64
|
+
color: hsl(var(--info-fg));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.card {
|
|
3
|
+
background-color: hsl(var(--card));
|
|
4
|
+
color: hsl(var(--card-foreground));
|
|
5
|
+
border-width: 1px;
|
|
6
|
+
border-style: solid;
|
|
7
|
+
border-color: hsl(var(--border));
|
|
8
|
+
border-radius: var(--radius-xl, 12px);
|
|
9
|
+
box-shadow: var(--shadow-xs);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.card-header {
|
|
13
|
+
padding: 1.5rem;
|
|
14
|
+
padding-bottom: 0.75rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.card-content {
|
|
18
|
+
padding: 1.5rem;
|
|
19
|
+
padding-top: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.card-footer {
|
|
23
|
+
padding: 1.5rem;
|
|
24
|
+
padding-top: 0;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 0.5rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.card-desc {
|
|
31
|
+
font-size: 0.875rem;
|
|
32
|
+
line-height: 1.25rem;
|
|
33
|
+
color: hsl(var(--muted-foreground));
|
|
34
|
+
margin-top: 0.25rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.card-img {
|
|
38
|
+
display: block;
|
|
39
|
+
width: 100%;
|
|
40
|
+
border-top-left-radius: var(--radius-xl, 12px);
|
|
41
|
+
border-top-right-radius: var(--radius-xl, 12px);
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.card-toolbar {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
padding: 1rem 1.5rem;
|
|
50
|
+
border-bottom: 1px solid hsl(var(--border));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.card-actions {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: flex-end;
|
|
56
|
+
gap: 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.codeblock {
|
|
3
|
+
background-color: hsl(var(--muted) / 0.5);
|
|
4
|
+
border: 1px solid hsl(var(--border));
|
|
5
|
+
border-radius: var(--radius-lg, 8px);
|
|
6
|
+
padding-left: 0.875rem;
|
|
7
|
+
padding-right: 0.875rem;
|
|
8
|
+
padding-top: 0.75rem;
|
|
9
|
+
padding-bottom: 0.75rem;
|
|
10
|
+
font-family: var(--font-mono);
|
|
11
|
+
font-size: 0.75rem;
|
|
12
|
+
line-height: 1.6;
|
|
13
|
+
color: hsl(var(--foreground));
|
|
14
|
+
white-space: pre-wrap;
|
|
15
|
+
overflow-wrap: break-word;
|
|
16
|
+
overflow-x: auto;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@layer canvas.components {
|
|
2
|
+
.empty-card {
|
|
3
|
+
padding-left: 1.5rem;
|
|
4
|
+
padding-right: 1.5rem;
|
|
5
|
+
padding-top: 3rem;
|
|
6
|
+
padding-bottom: 3rem;
|
|
7
|
+
text-align: center;
|
|
8
|
+
color: hsl(var(--muted-foreground));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.empty-card .title {
|
|
12
|
+
font-size: 15px;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
color: hsl(var(--foreground));
|
|
15
|
+
margin-bottom: 0.375rem;
|
|
16
|
+
}
|
|
17
|
+
}
|