@reopt-ai/opt-ui 1.4.1
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/CHANGELOG.md +40 -0
- package/COMPONENT_CATALOG.md +3000 -0
- package/LICENSE +21 -0
- package/README.md +244 -0
- package/dist/chunk-3GWWZKX7.js +38 -0
- package/dist/chunk-AFF2HPE5.cjs +5008 -0
- package/dist/chunk-ELWICXYY.js +4745 -0
- package/dist/chunk-N4NDU5ET.cjs +4745 -0
- package/dist/chunk-ONE3C5RV.cjs +38 -0
- package/dist/chunk-QWBHD54V.js +3218 -0
- package/dist/chunk-RBM2RNC2.js +5008 -0
- package/dist/chunk-X5WCXJAF.cjs +3218 -0
- package/dist/core/index.cjs +324 -0
- package/dist/core/index.d.cts +5 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +324 -0
- package/dist/docs/01-getting-started.md +129 -0
- package/dist/docs/02-components/01-core.md +1841 -0
- package/dist/docs/02-components/02-visuals.md +11 -0
- package/dist/docs/02-components/03-shells.md +1361 -0
- package/dist/docs/02-components/04-surfaces.md +11 -0
- package/dist/docs/02-components/index.md +106 -0
- package/dist/docs/03-recipes/01-forms.md +471 -0
- package/dist/docs/03-recipes/02-dashboards.md +397 -0
- package/dist/docs/03-recipes/03-layouts.md +424 -0
- package/dist/docs/04-theming.md +232 -0
- package/dist/docs/05-migration/01-breaking-changes.md +117 -0
- package/dist/docs/05-migration/02-formstore.md +336 -0
- package/dist/docs/06-troubleshooting.md +119 -0
- package/dist/docs/index.md +71 -0
- package/dist/id-registry.cjs +1875 -0
- package/dist/id-registry.d.cts +27 -0
- package/dist/id-registry.d.ts +27 -0
- package/dist/id-registry.js +1875 -0
- package/dist/id-registry.json +3799 -0
- package/dist/index-BZ_lBlO1.d.ts +474 -0
- package/dist/index-BuvxoWHf.d.cts +474 -0
- package/dist/index-DlAcuvQp.d.cts +1686 -0
- package/dist/index-Slu5hOj1.d.ts +1686 -0
- package/dist/index.cjs +9959 -0
- package/dist/index.d.cts +2351 -0
- package/dist/index.d.ts +2351 -0
- package/dist/index.js +9959 -0
- package/dist/meta.cjs +6898 -0
- package/dist/meta.d.cts +36 -0
- package/dist/meta.d.ts +36 -0
- package/dist/meta.js +6869 -0
- package/dist/shells/index.cjs +65 -0
- package/dist/shells/index.d.cts +5 -0
- package/dist/shells/index.d.ts +5 -0
- package/dist/shells/index.js +65 -0
- package/dist/tailwind.css +401 -0
- package/dist/theme/presets/default.css +355 -0
- package/dist/theme/presets/minimal.css +354 -0
- package/dist/theme/presets/mono-dark.css +354 -0
- package/dist/theme/presets/natural.css +181 -0
- package/dist/theme/presets/pro.css +354 -0
- package/dist/types-D4-0lwaE.d.cts +298 -0
- package/dist/types-D4-0lwaE.d.ts +298 -0
- package/dist/visuals/index.cjs +4 -0
- package/dist/visuals/index.d.cts +1 -0
- package/dist/visuals/index.d.ts +1 -0
- package/dist/visuals/index.js +4 -0
- package/package.json +165 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var _chunkX5WCXJAFcjs = require('../chunk-X5WCXJAF.cjs');
|
|
27
|
+
require('../chunk-AFF2HPE5.cjs');
|
|
28
|
+
require('../chunk-ONE3C5RV.cjs');
|
|
29
|
+
|
|
30
|
+
// src/shells/index.ts
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
var _optcharts = require('@reopt-ai/opt-charts');
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
exports.AppMenubar = _chunkX5WCXJAFcjs.AppMenubar; exports.BranchSelect = _chunkX5WCXJAFcjs.BranchSelect; exports.CommandPalette = _chunkX5WCXJAFcjs.CommandPalette; exports.CommandPaletteTrigger = _chunkX5WCXJAFcjs.CommandPaletteTrigger; exports.ContentTabs = _chunkX5WCXJAFcjs.ContentTabs; exports.DashboardGrid = _chunkX5WCXJAFcjs.DashboardGrid; exports.DataTable = _chunkX5WCXJAFcjs.DataTable; exports.DeploymentTimeline = _chunkX5WCXJAFcjs.DeploymentTimeline; exports.DomainTable = _chunkX5WCXJAFcjs.DomainTable; exports.EditorToolbar = _chunkX5WCXJAFcjs.EditorToolbar; exports.EnvPanel = _chunkX5WCXJAFcjs.EnvPanel; exports.EventSparkline = _optcharts.EventSparkline; exports.FailureList = _chunkX5WCXJAFcjs.FailureList; exports.FaqAccordion = _chunkX5WCXJAFcjs.FaqAccordion; exports.KeyValueEditor = _chunkX5WCXJAFcjs.KeyValueEditor; exports.MetricsCard = _optcharts.MetricsCard; exports.NotificationToast = _chunkX5WCXJAFcjs.NotificationToast; exports.ProjectSwitcher = _chunkX5WCXJAFcjs.ProjectSwitcher; exports.ReportWidget = _optcharts.ReportWidget; exports.SearchCombobox = _chunkX5WCXJAFcjs.SearchCombobox; exports.SettingsForm = _chunkX5WCXJAFcjs.SettingsForm; exports.SidebarNav = _chunkX5WCXJAFcjs.SidebarNav; exports.StatusSelect = _chunkX5WCXJAFcjs.StatusSelect; exports.ToastProvider = _chunkX5WCXJAFcjs.ToastProvider; exports.TrendChart = _optcharts.TrendChart; exports.WorkflowCanvas = _chunkX5WCXJAFcjs.WorkflowCanvas; exports.useToast = _chunkX5WCXJAFcjs.useToast;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { A as AppMenubar, a as AppMenubarProps, B as BranchSelect, b as BranchSelectProps, C as ColumnDef, c as CommandPalette, d as CommandPaletteProps, e as CommandPaletteTrigger, f as CommandPaletteTriggerProps, g as ContentTabs, h as ContentTabsProps, D as DashboardGrid, i as DashboardGridProps, j as DataTable, k as DataTableProps, l as DeploymentTimeline, m as DeploymentTimelineProps, n as DomainTable, o as DomainTableProps, E as EditorToolbar, p as EditorToolbarProps, q as EnvPanel, r as EnvPanelProps, F as FailureList, s as FailureListLabels, t as FailureListProps, u as FaqAccordion, v as FaqAccordionProps, K as KeyValueEditor, w as KeyValueEditorLabels, x as KeyValueEditorProps, y as KeyValueEntry, N as NotificationToast, P as ProjectSwitcher, z as ProjectSwitcherProps, S as SearchCombobox, G as SearchComboboxProps, H as SettingsForm, I as SettingsFormProps, J as SidebarNav, L as SidebarNavProps, M as StatusSelect, O as StatusSelectProps, Q as ToastContextValue, R as ToastMessage, U as ToastProvider, V as ToastProviderProps, X as WorkflowCanvas, Y as WorkflowCanvasConnection, Z as WorkflowCanvasProps, _ as WorkflowCanvasStep, a0 as useToast } from '../index-BuvxoWHf.cjs';
|
|
2
|
+
export { EventSparkline, EventSparklineLabels, EventSparklineProps, MetricsCard, MetricsCardProps, ReportWidget, ReportWidgetConfig, ReportWidgetLabels, ReportWidgetProps, ReportWidgetType, TrendChart, TrendChartProps } from '@reopt-ai/opt-charts';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '../types-D4-0lwaE.cjs';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { A as AppMenubar, a as AppMenubarProps, B as BranchSelect, b as BranchSelectProps, C as ColumnDef, c as CommandPalette, d as CommandPaletteProps, e as CommandPaletteTrigger, f as CommandPaletteTriggerProps, g as ContentTabs, h as ContentTabsProps, D as DashboardGrid, i as DashboardGridProps, j as DataTable, k as DataTableProps, l as DeploymentTimeline, m as DeploymentTimelineProps, n as DomainTable, o as DomainTableProps, E as EditorToolbar, p as EditorToolbarProps, q as EnvPanel, r as EnvPanelProps, F as FailureList, s as FailureListLabels, t as FailureListProps, u as FaqAccordion, v as FaqAccordionProps, K as KeyValueEditor, w as KeyValueEditorLabels, x as KeyValueEditorProps, y as KeyValueEntry, N as NotificationToast, P as ProjectSwitcher, z as ProjectSwitcherProps, S as SearchCombobox, G as SearchComboboxProps, H as SettingsForm, I as SettingsFormProps, J as SidebarNav, L as SidebarNavProps, M as StatusSelect, O as StatusSelectProps, Q as ToastContextValue, R as ToastMessage, U as ToastProvider, V as ToastProviderProps, X as WorkflowCanvas, Y as WorkflowCanvasConnection, Z as WorkflowCanvasProps, _ as WorkflowCanvasStep, a0 as useToast } from '../index-BZ_lBlO1.js';
|
|
2
|
+
export { EventSparkline, EventSparklineLabels, EventSparklineProps, MetricsCard, MetricsCardProps, ReportWidget, ReportWidgetConfig, ReportWidgetLabels, ReportWidgetProps, ReportWidgetType, TrendChart, TrendChartProps } from '@reopt-ai/opt-charts';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '../types-D4-0lwaE.js';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
AppMenubar,
|
|
4
|
+
BranchSelect,
|
|
5
|
+
CommandPalette,
|
|
6
|
+
CommandPaletteTrigger,
|
|
7
|
+
ContentTabs,
|
|
8
|
+
DashboardGrid,
|
|
9
|
+
DataTable,
|
|
10
|
+
DeploymentTimeline,
|
|
11
|
+
DomainTable,
|
|
12
|
+
EditorToolbar,
|
|
13
|
+
EnvPanel,
|
|
14
|
+
FailureList,
|
|
15
|
+
FaqAccordion,
|
|
16
|
+
KeyValueEditor,
|
|
17
|
+
NotificationToast,
|
|
18
|
+
ProjectSwitcher,
|
|
19
|
+
SearchCombobox,
|
|
20
|
+
SettingsForm,
|
|
21
|
+
SidebarNav,
|
|
22
|
+
StatusSelect,
|
|
23
|
+
ToastProvider,
|
|
24
|
+
WorkflowCanvas,
|
|
25
|
+
useToast
|
|
26
|
+
} from "../chunk-QWBHD54V.js";
|
|
27
|
+
import "../chunk-RBM2RNC2.js";
|
|
28
|
+
import "../chunk-3GWWZKX7.js";
|
|
29
|
+
|
|
30
|
+
// src/shells/index.ts
|
|
31
|
+
import {
|
|
32
|
+
MetricsCard,
|
|
33
|
+
TrendChart,
|
|
34
|
+
EventSparkline,
|
|
35
|
+
ReportWidget
|
|
36
|
+
} from "@reopt-ai/opt-charts";
|
|
37
|
+
export {
|
|
38
|
+
AppMenubar,
|
|
39
|
+
BranchSelect,
|
|
40
|
+
CommandPalette,
|
|
41
|
+
CommandPaletteTrigger,
|
|
42
|
+
ContentTabs,
|
|
43
|
+
DashboardGrid,
|
|
44
|
+
DataTable,
|
|
45
|
+
DeploymentTimeline,
|
|
46
|
+
DomainTable,
|
|
47
|
+
EditorToolbar,
|
|
48
|
+
EnvPanel,
|
|
49
|
+
EventSparkline,
|
|
50
|
+
FailureList,
|
|
51
|
+
FaqAccordion,
|
|
52
|
+
KeyValueEditor,
|
|
53
|
+
MetricsCard,
|
|
54
|
+
NotificationToast,
|
|
55
|
+
ProjectSwitcher,
|
|
56
|
+
ReportWidget,
|
|
57
|
+
SearchCombobox,
|
|
58
|
+
SettingsForm,
|
|
59
|
+
SidebarNav,
|
|
60
|
+
StatusSelect,
|
|
61
|
+
ToastProvider,
|
|
62
|
+
TrendChart,
|
|
63
|
+
WorkflowCanvas,
|
|
64
|
+
useToast
|
|
65
|
+
};
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @reopt-ai/opt-ui — Tailwind v4 Integration
|
|
3
|
+
*
|
|
4
|
+
* Usage in consumer project's globals.css:
|
|
5
|
+
*
|
|
6
|
+
* @import "tailwindcss";
|
|
7
|
+
* @import "@reopt-ai/opt-ui/tailwind.css";
|
|
8
|
+
* @source "../../node_modules/@reopt-ai/opt-ui/src";
|
|
9
|
+
*
|
|
10
|
+
* Requires: data-theme attribute on <html> (e.g. data-theme="default")
|
|
11
|
+
* Use OptThemeProvider for automatic theme management.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/* ── Theme Presets (5 presets × light/dark, natural force-light) ── */
|
|
15
|
+
@import "./lib/theme/presets/default.css";
|
|
16
|
+
@import "./lib/theme/presets/minimal.css";
|
|
17
|
+
@import "./lib/theme/presets/natural.css";
|
|
18
|
+
@import "./lib/theme/presets/pro.css";
|
|
19
|
+
@import "./lib/theme/presets/mono-dark.css";
|
|
20
|
+
|
|
21
|
+
/* ── Dark Mode Variant ── */
|
|
22
|
+
@custom-variant dark (&:where([data-theme$="-dark"], [data-theme$="-dark"] *));
|
|
23
|
+
|
|
24
|
+
/* ── CSS Variable → Tailwind Utility Mapping ── */
|
|
25
|
+
@theme inline {
|
|
26
|
+
/* Surface colors */
|
|
27
|
+
--color-surface: var(--opt-surface);
|
|
28
|
+
--color-surface-raised: var(--opt-surface-raised);
|
|
29
|
+
--color-surface-overlay: var(--opt-surface-overlay);
|
|
30
|
+
--color-surface-input: var(--opt-surface-input);
|
|
31
|
+
--color-surface-input-hover: var(--opt-surface-input-hover);
|
|
32
|
+
--color-surface-inset: var(--opt-surface-inset);
|
|
33
|
+
|
|
34
|
+
/* Accent colors */
|
|
35
|
+
--color-accent: var(--opt-accent);
|
|
36
|
+
--color-accent-hover: var(--opt-accent-hover);
|
|
37
|
+
--color-accent-active: var(--opt-accent-active);
|
|
38
|
+
--color-accent-subtle: var(--opt-accent-subtle);
|
|
39
|
+
--color-accent-fg: var(--opt-accent-fg);
|
|
40
|
+
|
|
41
|
+
/* Text colors */
|
|
42
|
+
--color-text-primary: var(--opt-text);
|
|
43
|
+
--color-text-secondary: var(--opt-text-secondary);
|
|
44
|
+
--color-text-tertiary: var(--opt-text-tertiary);
|
|
45
|
+
|
|
46
|
+
/* Border colors */
|
|
47
|
+
--color-border: var(--opt-border);
|
|
48
|
+
--color-border-hover: var(--opt-border-hover);
|
|
49
|
+
--color-border-subtle: var(--opt-border-subtle);
|
|
50
|
+
|
|
51
|
+
/* Focus ring */
|
|
52
|
+
--color-ring: var(--opt-ring);
|
|
53
|
+
--color-ring-offset: var(--opt-ring-offset);
|
|
54
|
+
|
|
55
|
+
/* Background colors */
|
|
56
|
+
--color-bg: var(--opt-bg);
|
|
57
|
+
--color-bg-subtle: var(--opt-bg-subtle);
|
|
58
|
+
--color-bg-muted: var(--opt-bg-muted);
|
|
59
|
+
|
|
60
|
+
/* Status colors */
|
|
61
|
+
--color-success: var(--opt-success);
|
|
62
|
+
--color-success-subtle: var(--opt-success-subtle);
|
|
63
|
+
--color-success-fg: var(--opt-success-fg);
|
|
64
|
+
--color-warning: var(--opt-warning);
|
|
65
|
+
--color-warning-subtle: var(--opt-warning-subtle);
|
|
66
|
+
--color-warning-fg: var(--opt-warning-fg);
|
|
67
|
+
--color-danger: var(--opt-danger);
|
|
68
|
+
--color-danger-subtle: var(--opt-danger-subtle);
|
|
69
|
+
--color-danger-fg: var(--opt-danger-fg);
|
|
70
|
+
--color-info: var(--opt-info);
|
|
71
|
+
--color-info-subtle: var(--opt-info-subtle);
|
|
72
|
+
--color-info-fg: var(--opt-info-fg);
|
|
73
|
+
|
|
74
|
+
/* Chart colors */
|
|
75
|
+
--color-chart-1: var(--opt-chart-1);
|
|
76
|
+
--color-chart-2: var(--opt-chart-2);
|
|
77
|
+
--color-chart-3: var(--opt-chart-3);
|
|
78
|
+
--color-chart-4: var(--opt-chart-4);
|
|
79
|
+
--color-chart-5: var(--opt-chart-5);
|
|
80
|
+
--color-chart-6: var(--opt-chart-6);
|
|
81
|
+
--color-chart-7: var(--opt-chart-7);
|
|
82
|
+
--color-chart-8: var(--opt-chart-8);
|
|
83
|
+
--color-chart-9: var(--opt-chart-9);
|
|
84
|
+
--color-chart-10: var(--opt-chart-10);
|
|
85
|
+
--color-chart-11: var(--opt-chart-11);
|
|
86
|
+
--color-chart-12: var(--opt-chart-12);
|
|
87
|
+
--color-chart-13: var(--opt-chart-13);
|
|
88
|
+
--color-chart-14: var(--opt-chart-14);
|
|
89
|
+
--color-chart-15: var(--opt-chart-15);
|
|
90
|
+
--color-chart-16: var(--opt-chart-16);
|
|
91
|
+
|
|
92
|
+
/* Semantic aliases */
|
|
93
|
+
--color-background: var(--opt-bg);
|
|
94
|
+
--color-foreground: var(--opt-text);
|
|
95
|
+
|
|
96
|
+
/* Border radius */
|
|
97
|
+
--radius-sm: var(--opt-radius-sm);
|
|
98
|
+
--radius-md: var(--opt-radius-md);
|
|
99
|
+
--radius-lg: var(--opt-radius-lg);
|
|
100
|
+
--radius-xl: var(--opt-radius-xl);
|
|
101
|
+
|
|
102
|
+
/* Shadows */
|
|
103
|
+
--shadow-sm: var(--opt-shadow-sm);
|
|
104
|
+
--shadow-md: var(--opt-shadow-md);
|
|
105
|
+
--shadow-lg: var(--opt-shadow-lg);
|
|
106
|
+
|
|
107
|
+
/* Semantic spacing */
|
|
108
|
+
--spacing-section: var(--opt-space-section);
|
|
109
|
+
--spacing-group: var(--opt-space-group);
|
|
110
|
+
--spacing-element: var(--opt-space-element);
|
|
111
|
+
|
|
112
|
+
/* Typography */
|
|
113
|
+
--font-heading: var(--opt-font-heading, system-ui, sans-serif);
|
|
114
|
+
--font-body: var(--opt-font-body, system-ui, sans-serif);
|
|
115
|
+
--tracking-heading: var(--opt-tracking-heading, -0.015em);
|
|
116
|
+
--weight-heading: var(--opt-weight-heading, 600);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* ── Density ── */
|
|
120
|
+
[data-density="compact"],
|
|
121
|
+
[data-harness-density="compact"] {
|
|
122
|
+
--opt-control-sm: 1.75rem;
|
|
123
|
+
--opt-control-md: 2.25rem;
|
|
124
|
+
--opt-control-lg: 2.75rem;
|
|
125
|
+
--opt-control-padding-sm: 0.625rem;
|
|
126
|
+
--opt-control-padding-md: 0.75rem;
|
|
127
|
+
--opt-control-padding-lg: 1rem;
|
|
128
|
+
--opt-space-element: var(--opt-space-1-5);
|
|
129
|
+
--opt-space-group: var(--opt-space-3);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ── Semantic typography roles ── */
|
|
133
|
+
.opt-type-body,
|
|
134
|
+
.opt-type-label,
|
|
135
|
+
.opt-type-supporting,
|
|
136
|
+
.opt-type-code,
|
|
137
|
+
.opt-type-heading-1,
|
|
138
|
+
.opt-type-heading-2,
|
|
139
|
+
.opt-type-heading-3,
|
|
140
|
+
.opt-type-heading-4,
|
|
141
|
+
.opt-type-heading-5,
|
|
142
|
+
.opt-type-heading-6,
|
|
143
|
+
.opt-type-display-1,
|
|
144
|
+
.opt-type-display-2,
|
|
145
|
+
.opt-type-display-3 {
|
|
146
|
+
font-size: var(--opt-type-size);
|
|
147
|
+
font-weight: var(--opt-type-weight);
|
|
148
|
+
line-height: var(--opt-type-leading);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.opt-type-body {
|
|
152
|
+
--opt-type-size: var(--opt-text-body-size);
|
|
153
|
+
--opt-type-weight: var(--opt-text-body-weight);
|
|
154
|
+
--opt-type-leading: var(--opt-text-body-leading);
|
|
155
|
+
}
|
|
156
|
+
.opt-type-label {
|
|
157
|
+
--opt-type-size: var(--opt-text-label-size);
|
|
158
|
+
--opt-type-weight: var(--opt-text-label-weight);
|
|
159
|
+
--opt-type-leading: var(--opt-text-label-leading);
|
|
160
|
+
}
|
|
161
|
+
.opt-type-supporting {
|
|
162
|
+
--opt-type-size: var(--opt-text-supporting-size);
|
|
163
|
+
--opt-type-weight: var(--opt-text-supporting-weight);
|
|
164
|
+
--opt-type-leading: var(--opt-text-supporting-leading);
|
|
165
|
+
}
|
|
166
|
+
.opt-type-code {
|
|
167
|
+
--opt-type-size: var(--opt-text-code-size);
|
|
168
|
+
--opt-type-weight: var(--opt-text-code-weight);
|
|
169
|
+
--opt-type-leading: var(--opt-text-code-leading);
|
|
170
|
+
font-family: var(--opt-font-code);
|
|
171
|
+
}
|
|
172
|
+
.opt-type-heading-1 {
|
|
173
|
+
--opt-type-size: var(--opt-text-heading-1-size);
|
|
174
|
+
--opt-type-weight: var(--opt-text-heading-1-weight);
|
|
175
|
+
--opt-type-leading: var(--opt-text-heading-1-leading);
|
|
176
|
+
}
|
|
177
|
+
.opt-type-heading-2 {
|
|
178
|
+
--opt-type-size: var(--opt-text-heading-2-size);
|
|
179
|
+
--opt-type-weight: var(--opt-text-heading-2-weight);
|
|
180
|
+
--opt-type-leading: var(--opt-text-heading-2-leading);
|
|
181
|
+
}
|
|
182
|
+
.opt-type-heading-3 {
|
|
183
|
+
--opt-type-size: var(--opt-text-heading-3-size);
|
|
184
|
+
--opt-type-weight: var(--opt-text-heading-3-weight);
|
|
185
|
+
--opt-type-leading: var(--opt-text-heading-3-leading);
|
|
186
|
+
}
|
|
187
|
+
.opt-type-heading-4 {
|
|
188
|
+
--opt-type-size: var(--opt-text-heading-4-size);
|
|
189
|
+
--opt-type-weight: var(--opt-text-heading-4-weight);
|
|
190
|
+
--opt-type-leading: var(--opt-text-heading-4-leading);
|
|
191
|
+
}
|
|
192
|
+
.opt-type-heading-5 {
|
|
193
|
+
--opt-type-size: var(--opt-text-heading-5-size);
|
|
194
|
+
--opt-type-weight: var(--opt-text-heading-5-weight);
|
|
195
|
+
--opt-type-leading: var(--opt-text-heading-5-leading);
|
|
196
|
+
}
|
|
197
|
+
.opt-type-heading-6 {
|
|
198
|
+
--opt-type-size: var(--opt-text-heading-6-size);
|
|
199
|
+
--opt-type-weight: var(--opt-text-heading-6-weight);
|
|
200
|
+
--opt-type-leading: var(--opt-text-heading-6-leading);
|
|
201
|
+
}
|
|
202
|
+
.opt-type-display-1 {
|
|
203
|
+
--opt-type-size: var(--opt-text-display-1-size);
|
|
204
|
+
--opt-type-weight: var(--opt-text-display-1-weight);
|
|
205
|
+
--opt-type-leading: var(--opt-text-display-1-leading);
|
|
206
|
+
}
|
|
207
|
+
.opt-type-display-2 {
|
|
208
|
+
--opt-type-size: var(--opt-text-display-2-size);
|
|
209
|
+
--opt-type-weight: var(--opt-text-display-2-weight);
|
|
210
|
+
--opt-type-leading: var(--opt-text-display-2-leading);
|
|
211
|
+
}
|
|
212
|
+
.opt-type-display-3 {
|
|
213
|
+
--opt-type-size: var(--opt-text-display-3-size);
|
|
214
|
+
--opt-type-weight: var(--opt-text-display-3-weight);
|
|
215
|
+
--opt-type-leading: var(--opt-text-display-3-leading);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* ── Base Styles ── */
|
|
219
|
+
body {
|
|
220
|
+
background: var(--opt-bg);
|
|
221
|
+
color: var(--opt-text);
|
|
222
|
+
font-family: var(--opt-font-body, system-ui, sans-serif);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
h1,
|
|
226
|
+
h2,
|
|
227
|
+
h3,
|
|
228
|
+
h4,
|
|
229
|
+
h5,
|
|
230
|
+
h6 {
|
|
231
|
+
font-family: var(--opt-font-heading, system-ui, sans-serif);
|
|
232
|
+
letter-spacing: var(--opt-tracking-heading, -0.015em);
|
|
233
|
+
font-weight: var(--opt-weight-heading, 600);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
h1[tabindex="-1"]:focus,
|
|
237
|
+
h2[tabindex="-1"]:focus {
|
|
238
|
+
outline: none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* ── Primitive Transition States ──
|
|
242
|
+
*
|
|
243
|
+
* floating-ui-backed primitives (Popover, Menu, Tooltip, Combobox)는 inline
|
|
244
|
+
* `style="transform: translate(Xpx, Ypx)"`로 위치를 통제한다. data-enter
|
|
245
|
+
* 어트리뷰트가 첫 렌더부터 붙고 floating-ui ref attach 직후에 inline transform
|
|
246
|
+
* 값이 (0,0) → (Xpx, Ypx)로 바뀌는데, CSS가 transform에 transition을 걸어두면
|
|
247
|
+
* 그 변화가 애니메이션돼 popover가 viewport 좌상단에서 트리거 위치로 미끄러져
|
|
248
|
+
* 들어오는 시각 버그가 발생한다.
|
|
249
|
+
*
|
|
250
|
+
* 해결: slide 효과는 `translate` CSS 속성으로 옮겨 inline `transform`과 독립적으로
|
|
251
|
+
* 합성(CSS Transforms 2: translate × rotate × scale × transform)되도록 한다.
|
|
252
|
+
*
|
|
253
|
+
* dialog 엘리먼트는 `-translate-x-1/2`로 가로 중앙 정렬을 위해 같은 `translate`
|
|
254
|
+
* 속성을 쓰므로 제외한다 (포함 시 가로 정렬이 깨져 오른쪽으로 밀린다). */
|
|
255
|
+
[data-enter]:not(dialog) {
|
|
256
|
+
opacity: 1;
|
|
257
|
+
translate: 0 0;
|
|
258
|
+
transition:
|
|
259
|
+
opacity 150ms ease-out,
|
|
260
|
+
translate 150ms ease-out;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
[data-leave]:not(dialog) {
|
|
264
|
+
opacity: 0;
|
|
265
|
+
translate: 0 -4px;
|
|
266
|
+
transition:
|
|
267
|
+
opacity 100ms ease-in,
|
|
268
|
+
translate 100ms ease-in;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[data-backdrop] {
|
|
272
|
+
transition: opacity 200ms ease-out;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
[data-backdrop][data-leave] {
|
|
276
|
+
transition: opacity 150ms ease-in;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* Native <dialog> backdrop styling (opt-ui-primitives) */
|
|
280
|
+
dialog::backdrop {
|
|
281
|
+
background: rgb(0 0 0 / 0.5);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
dialog[data-enter]::backdrop {
|
|
285
|
+
animation: opt-backdrop-in 200ms ease-out;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
dialog[data-leave]::backdrop {
|
|
289
|
+
animation: opt-backdrop-out 150ms ease-in forwards;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@keyframes opt-backdrop-in {
|
|
293
|
+
from {
|
|
294
|
+
opacity: 0;
|
|
295
|
+
}
|
|
296
|
+
to {
|
|
297
|
+
opacity: 1;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@keyframes opt-backdrop-out {
|
|
302
|
+
from {
|
|
303
|
+
opacity: 1;
|
|
304
|
+
}
|
|
305
|
+
to {
|
|
306
|
+
opacity: 0;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@keyframes opt-shimmer {
|
|
311
|
+
from {
|
|
312
|
+
background-position: 100% center;
|
|
313
|
+
}
|
|
314
|
+
to {
|
|
315
|
+
background-position: 0% center;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/* ── opt-chat: Message entry animation ─────────────────── */
|
|
320
|
+
|
|
321
|
+
[data-opt-chat-message] {
|
|
322
|
+
opacity: 1;
|
|
323
|
+
transform: translateY(0);
|
|
324
|
+
transition:
|
|
325
|
+
opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
|
|
326
|
+
transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@starting-style {
|
|
330
|
+
[data-opt-chat-message] {
|
|
331
|
+
opacity: 0;
|
|
332
|
+
transform: translateY(8px);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* ── opt-chat: Part stagger entry ─────────────────────── */
|
|
337
|
+
|
|
338
|
+
[data-opt-chat-stagger] > * {
|
|
339
|
+
opacity: 1;
|
|
340
|
+
transform: translateY(0);
|
|
341
|
+
transition:
|
|
342
|
+
opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
|
|
343
|
+
transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
344
|
+
transition-delay: calc(var(--stagger-i, 0) * 40ms);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@starting-style {
|
|
348
|
+
[data-opt-chat-stagger] > * {
|
|
349
|
+
opacity: 0;
|
|
350
|
+
transform: translateY(6px);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* ── opt-chat: Streaming accent bar ────────────────────── */
|
|
355
|
+
|
|
356
|
+
[data-opt-chat-message][data-streaming="true"] {
|
|
357
|
+
border-left: 2px solid var(--opt-accent);
|
|
358
|
+
padding-left: 12px;
|
|
359
|
+
transition:
|
|
360
|
+
opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
|
|
361
|
+
transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
|
|
362
|
+
border-color 0.4s ease-out;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
[data-opt-chat-message]:not([data-streaming="true"]) {
|
|
366
|
+
border-left: 2px solid transparent;
|
|
367
|
+
padding-left: 12px;
|
|
368
|
+
transition: border-color 0.6s ease-out;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/* ── opt-chat: Collapsible content ─────────────────────── */
|
|
372
|
+
|
|
373
|
+
[data-opt-chat-collapse] {
|
|
374
|
+
display: grid;
|
|
375
|
+
grid-template-rows: 1fr;
|
|
376
|
+
opacity: 1;
|
|
377
|
+
transition:
|
|
378
|
+
grid-template-rows 0.25s cubic-bezier(0.16, 1, 0.3, 1),
|
|
379
|
+
opacity 0.2s ease-out;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
[data-opt-chat-collapse] > * {
|
|
383
|
+
overflow: hidden;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
[data-opt-chat-collapse][data-state="closed"] {
|
|
387
|
+
grid-template-rows: 0fr;
|
|
388
|
+
opacity: 0;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* ── Reduced motion ────────────────────────────────────── */
|
|
392
|
+
|
|
393
|
+
@media (prefers-reduced-motion: reduce) {
|
|
394
|
+
*,
|
|
395
|
+
*::before,
|
|
396
|
+
*::after {
|
|
397
|
+
animation-duration: 0.01ms !important;
|
|
398
|
+
animation-iteration-count: 1 !important;
|
|
399
|
+
transition-duration: 0.01ms !important;
|
|
400
|
+
}
|
|
401
|
+
}
|