@altertable/data-app-react 0.72.0 → 0.74.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 +3 -7
- package/dist/chunks/SectionHeading-DYRGGLUr.js +7987 -0
- package/dist/chunks/SectionHeading-DYRGGLUr.js.map +1 -0
- package/dist/index.js +1009 -2848
- package/dist/index.js.map +1 -23
- package/dist/types/chunks/date-formatting.d.ts +864 -0
- package/dist/types/index.d.ts +749 -78
- package/dist/types/ui/index.d.ts +591 -111
- package/dist/ui/index.js +2853 -3403
- package/dist/ui/index.js.map +1 -36
- package/package.json +7 -6
- package/dist/chunks/index-xwy62xrb.js +0 -16996
- package/dist/chunks/index-xwy62xrb.js.map +0 -120
- package/dist/types/actions.d.ts +0 -53
- package/dist/types/annotations/AnnotationBar.d.ts +0 -30
- package/dist/types/annotations/AnnotationControls.d.ts +0 -10
- package/dist/types/annotations/AnnotationEditor.d.ts +0 -16
- package/dist/types/annotations/AnnotationMarkers.d.ts +0 -19
- package/dist/types/annotations/AnnotationSelectionLayer.d.ts +0 -12
- package/dist/types/annotations/AnnotationTarget.d.ts +0 -9
- package/dist/types/annotations/AnnotationTooltip.d.ts +0 -9
- package/dist/types/annotations/AnnotationTrigger.d.ts +0 -10
- package/dist/types/annotations/annotation-editor-state.d.ts +0 -58
- package/dist/types/annotations/annotation-screenshot.d.ts +0 -4
- package/dist/types/annotations/annotation-targets.d.ts +0 -34
- package/dist/types/annotations/getAnnotationProps.d.ts +0 -17
- package/dist/types/annotations/styles.d.ts +0 -3
- package/dist/types/annotations/useAnnotationGeometry.d.ts +0 -22
- package/dist/types/annotations/useDataAppAnnotations.d.ts +0 -22
- package/dist/types/app-context.d.ts +0 -3
- package/dist/types/bindings.d.ts +0 -169
- package/dist/types/content.d.ts +0 -36
- package/dist/types/date-formatting.d.ts +0 -12
- package/dist/types/details.d.ts +0 -46
- package/dist/types/exploration.d.ts +0 -44
- package/dist/types/hooks.d.ts +0 -114
- package/dist/types/injectStyles.d.ts +0 -7
- package/dist/types/mount.d.ts +0 -13
- package/dist/types/search-suggestions.d.ts +0 -8
- package/dist/types/source-owner.d.ts +0 -2
- package/dist/types/style-contract.d.ts +0 -88
- package/dist/types/style-validation.d.ts +0 -2
- package/dist/types/styles.d.ts +0 -8
- package/dist/types/ui/AboutData.d.ts +0 -73
- package/dist/types/ui/AltertableLogo.d.ts +0 -3
- package/dist/types/ui/AppFooter.d.ts +0 -6
- package/dist/types/ui/AppHeader.d.ts +0 -10
- package/dist/types/ui/AppLayout.d.ts +0 -10
- package/dist/types/ui/AppScope.d.ts +0 -7
- package/dist/types/ui/AppToolbar.d.ts +0 -30
- package/dist/types/ui/AreaChart.d.ts +0 -7
- package/dist/types/ui/BarChart.d.ts +0 -6
- package/dist/types/ui/Breakdown.d.ts +0 -13
- package/dist/types/ui/Button.d.ts +0 -12
- package/dist/types/ui/ChartLegend.d.ts +0 -32
- package/dist/types/ui/Checkbox.d.ts +0 -21
- package/dist/types/ui/CheckboxGroup.d.ts +0 -7
- package/dist/types/ui/ChoicePicker.d.ts +0 -39
- package/dist/types/ui/Comparison.d.ts +0 -14
- package/dist/types/ui/ComposedChart.d.ts +0 -41
- package/dist/types/ui/ComposedChartLegend.d.ts +0 -9
- package/dist/types/ui/ContentSkeleton.d.ts +0 -7
- package/dist/types/ui/DataApp.d.ts +0 -24
- package/dist/types/ui/DataAppFrame.d.ts +0 -52
- package/dist/types/ui/DataBoundary.d.ts +0 -14
- package/dist/types/ui/DataSection.d.ts +0 -14
- package/dist/types/ui/DataSectionBoundary.d.ts +0 -30
- package/dist/types/ui/DataTable.d.ts +0 -29
- package/dist/types/ui/DataValue.d.ts +0 -9
- package/dist/types/ui/DataViewToast.d.ts +0 -11
- package/dist/types/ui/DataWidget.d.ts +0 -37
- package/dist/types/ui/DateDisplay.d.ts +0 -9
- package/dist/types/ui/DateRangePicker.d.ts +0 -30
- package/dist/types/ui/DateTimeTooltip.d.ts +0 -10
- package/dist/types/ui/DimensionPicker.d.ts +0 -14
- package/dist/types/ui/EmptyState.d.ts +0 -6
- package/dist/types/ui/ExplorationActionControl.d.ts +0 -60
- package/dist/types/ui/ExportControl.d.ts +0 -4
- package/dist/types/ui/FilterActions.d.ts +0 -10
- package/dist/types/ui/FilterBar.d.ts +0 -3
- package/dist/types/ui/FunnelChart.d.ts +0 -20
- package/dist/types/ui/GettingStarted.d.ts +0 -6
- package/dist/types/ui/GlossaryDefinition.d.ts +0 -7
- package/dist/types/ui/GlossaryExplanation.d.ts +0 -16
- package/dist/types/ui/GradientScroll.d.ts +0 -23
- package/dist/types/ui/Grid.d.ts +0 -12
- package/dist/types/ui/GridItem.d.ts +0 -7
- package/dist/types/ui/HelpPopover.d.ts +0 -21
- package/dist/types/ui/IconButton.d.ts +0 -19
- package/dist/types/ui/InspectionContext.d.ts +0 -12
- package/dist/types/ui/InspectionProvider.d.ts +0 -29
- package/dist/types/ui/JourneyChart.d.ts +0 -10
- package/dist/types/ui/Kbd.d.ts +0 -7
- package/dist/types/ui/LineChart.d.ts +0 -7
- package/dist/types/ui/LiveControl.d.ts +0 -10
- package/dist/types/ui/Menu.d.ts +0 -13
- package/dist/types/ui/MetricWidget.d.ts +0 -51
- package/dist/types/ui/NumberField.d.ts +0 -27
- package/dist/types/ui/NumberFilterPicker.d.ts +0 -11
- package/dist/types/ui/PeriodSummary.d.ts +0 -17
- package/dist/types/ui/PickerField.d.ts +0 -23
- package/dist/types/ui/PieChart.d.ts +0 -11
- package/dist/types/ui/PopoverSurface.d.ts +0 -5
- package/dist/types/ui/PresentStory.d.ts +0 -30
- package/dist/types/ui/QueryList.d.ts +0 -14
- package/dist/types/ui/RadioGroup.d.ts +0 -18
- package/dist/types/ui/Ranking.d.ts +0 -13
- package/dist/types/ui/RefreshControl.d.ts +0 -9
- package/dist/types/ui/RequestHint.d.ts +0 -20
- package/dist/types/ui/RetentionChart.d.ts +0 -27
- package/dist/types/ui/ScatterChart.d.ts +0 -17
- package/dist/types/ui/SearchField.d.ts +0 -23
- package/dist/types/ui/SearchInput.d.ts +0 -10
- package/dist/types/ui/SearchMatch.d.ts +0 -6
- package/dist/types/ui/SearchTypeahead.d.ts +0 -15
- package/dist/types/ui/SectionHeading.d.ts +0 -8
- package/dist/types/ui/Select.d.ts +0 -22
- package/dist/types/ui/SelectionMark.d.ts +0 -5
- package/dist/types/ui/Sheet.d.ts +0 -21
- package/dist/types/ui/Skeleton.d.ts +0 -8
- package/dist/types/ui/Stack.d.ts +0 -7
- package/dist/types/ui/StaticDataApp.d.ts +0 -4
- package/dist/types/ui/StatusPanel.d.ts +0 -10
- package/dist/types/ui/TableWidget.d.ts +0 -67
- package/dist/types/ui/Tabs.d.ts +0 -10
- package/dist/types/ui/TextContent.d.ts +0 -4
- package/dist/types/ui/TextWidget.d.ts +0 -20
- package/dist/types/ui/ThemeSelector.d.ts +0 -12
- package/dist/types/ui/Toast.d.ts +0 -8
- package/dist/types/ui/Tooltip.d.ts +0 -23
- package/dist/types/ui/TooltipSurface.d.ts +0 -3
- package/dist/types/ui/TrendChart.d.ts +0 -5
- package/dist/types/ui/UpdatedAt.d.ts +0 -9
- package/dist/types/ui/VariableBar.d.ts +0 -6
- package/dist/types/ui/VisualizationWidget.d.ts +0 -43
- package/dist/types/ui/WidgetDisclosure.d.ts +0 -6
- package/dist/types/ui/WidgetEvidence.d.ts +0 -12
- package/dist/types/ui/WidgetViewTabs.d.ts +0 -16
- package/dist/types/ui/chart-data.d.ts +0 -36
- package/dist/types/ui/chart-date-axis.d.ts +0 -15
- package/dist/types/ui/chart-interaction.d.ts +0 -27
- package/dist/types/ui/chart-primitives.d.ts +0 -22
- package/dist/types/ui/chart-time.d.ts +0 -19
- package/dist/types/ui/chartColor.d.ts +0 -2
- package/dist/types/ui/classNames.d.ts +0 -1
- package/dist/types/ui/csv-export.d.ts +0 -19
- package/dist/types/ui/data-context.d.ts +0 -76
- package/dist/types/ui/data-identifiers.d.ts +0 -32
- package/dist/types/ui/icons.d.ts +0 -49
- package/dist/types/ui/journey-flow.d.ts +0 -49
- package/dist/types/ui/keyboard.d.ts +0 -6
- package/dist/types/ui/metric-comparison.d.ts +0 -30
- package/dist/types/ui/metric.d.ts +0 -11
- package/dist/types/ui/presentation.d.ts +0 -25
- package/dist/types/ui/search.d.ts +0 -6
- package/dist/types/ui/searchItems.d.ts +0 -36
- package/dist/types/ui/shortcuts.d.ts +0 -45
- package/dist/types/ui/story.d.ts +0 -20
- package/dist/types/ui/time-interval.d.ts +0 -96
- package/dist/types/ui/use-chart-scroll-to-end.d.ts +0 -2
- package/dist/types/ui/useAppAppearance.d.ts +0 -3
- package/dist/types/ui/useDataAppPresentation.d.ts +0 -3
- package/dist/types/ui/useSvgId.d.ts +0 -2
- package/dist/types/ui/variables.d.ts +0 -36
- package/dist/types/ui/widget-views.d.ts +0 -3
- package/dist/types/view-control-bar.d.ts +0 -18
- package/dist/types/view-controls.d.ts +0 -20
- package/dist/types/view-runtime.d.ts +0 -34
- package/dist/types/view.d.ts +0 -87
- package/dist/types/widgets.d.ts +0 -90
package/dist/index.js
CHANGED
|
@@ -1,2888 +1,1049 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Kbd,
|
|
13
|
-
TooltipProvider2,
|
|
14
|
-
Tooltip2,
|
|
15
|
-
Sheet2,
|
|
16
|
-
InspectionContext,
|
|
17
|
-
useInspectionDefaults,
|
|
18
|
-
mountDataApp2,
|
|
19
|
-
breakdownState,
|
|
20
|
-
useDeclaredResult,
|
|
21
|
-
PrimaryViewContext,
|
|
22
|
-
ownedSource,
|
|
23
|
-
DataSectionBoundary,
|
|
24
|
-
DetailView2,
|
|
25
|
-
DetailContent2,
|
|
26
|
-
useDetailNavigation2,
|
|
27
|
-
DetailRoutes,
|
|
28
|
-
resolveActions,
|
|
29
|
-
DateTimeTooltip2,
|
|
30
|
-
DateDisplay2,
|
|
31
|
-
RegisteredBinding,
|
|
32
|
-
registeredEvidence,
|
|
33
|
-
datasetTable,
|
|
34
|
-
MetricRecords,
|
|
35
|
-
exportDatasets,
|
|
36
|
-
searchVariable2,
|
|
37
|
-
choiceVariable2,
|
|
38
|
-
multiChoiceVariable2,
|
|
39
|
-
dateRangeVariable2,
|
|
40
|
-
sectionContent,
|
|
41
|
-
SearchSuggestionsContext,
|
|
42
|
-
Select2,
|
|
43
|
-
Skeleton2,
|
|
44
|
-
createDataHooks2,
|
|
45
|
-
useDataAppAnnotations2,
|
|
46
|
-
AnnotationTooltip,
|
|
47
|
-
IconButton2,
|
|
48
|
-
TextContent2,
|
|
49
|
-
Stack2,
|
|
50
|
-
DataAppFrame,
|
|
51
|
-
ExplorationActionControl2,
|
|
52
|
-
getAnnotationProps,
|
|
53
|
-
ContentSkeleton,
|
|
54
|
-
VisualizationWidget2,
|
|
55
|
-
comparisonChange,
|
|
56
|
-
metricComparison,
|
|
57
|
-
MetricWidget2,
|
|
58
|
-
TableWidget2,
|
|
59
|
-
TextWidget2,
|
|
60
|
-
DataValue2,
|
|
61
|
-
chartColor2,
|
|
62
|
-
createDataContext2,
|
|
63
|
-
SectionHeading2
|
|
64
|
-
} from "./chunks/index-xwy62xrb.js";
|
|
65
|
-
// packages/data-app-react/src/ui/DataApp.tsx
|
|
66
|
-
import { KEY_SEPARATOR } from "@altertable/data-app/internal";
|
|
67
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { At as resolveActions, C as ContentSkeleton, Ct as DetailContent, D as TextContent, Dt as DataSectionBoundary, E as DataAppFrame, Et as useDetailNavigation, H as PrimaryViewContext, Jt as InspectionContext, Kt as Kbd, L as IconButton, Nt as mountDataApp, O as Stack, Q as Select, Qt as Button, R as useDataAppAnnotations, S as withWidgetBoundary, T as DataValue$1, Tt as DetailView, U as useDeclaredResult, Ut as Tooltip, V as createDataHooks, Vt as Sheet, Wt as TooltipProvider, Xt as AppIcon, Yt as useInspectionDefaults, Zt as EmptyState, _t as datasetTable, a as TextWidget$1, an as injectStyles, bt as DateDisplay, d as MetricWidget$1, dt as multiChoiceVariable, en as classNames, f as VisualizationWidget$1, ft as searchVariable, gt as RegisteredBinding, h as ExplorationActionControl, ht as MetricRecords, i as chartColor, in as injectDataAppStyles, it as Skeleton, jt as breakdownState, kt as ownedSource, lt as choiceVariable, m as comparisonChange, mt as sectionContent, n as createDataContext, nn as useDateFormatting, o as TableWidget$1, ot as SearchSuggestionsContext, p as metricComparison, qt as shortcuts, rn as useDataApp, t as SectionHeading, tn as DateFormattingContext, ut as dateRangeVariable, vt as exportDatasets, w as getAnnotationProps, wt as DetailRoutes, xt as DateTimeTooltip, yt as registeredEvidence, z as AnnotationTooltip } from "./chunks/SectionHeading-DYRGGLUr.js";
|
|
2
|
+
import { KEY_SEPARATOR, invariant } from "@altertable/data-app/internal";
|
|
3
|
+
import { useContext, useEffect, useEffectEvent, useImperativeHandle, useReducer, useRef, useState } from "react";
|
|
4
|
+
import { autoUpdate, flip, offset, shift, useFloating, useMergeRefs } from "@floating-ui/react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Eye, EyeOff, GripVertical, LoaderCircle, Minus, Trash2, X } from "lucide-react";
|
|
7
|
+
import { formatCount, formatDateRange, formatDateTime, formatMetric, formatPercent, parseDateTime } from "@altertable/data-app/format";
|
|
8
|
+
import { parseDataAppAnnotationDraft } from "@altertable/data-app/contract";
|
|
9
|
+
import { createPortal } from "react-dom";
|
|
10
|
+
//#region src/ui/DataApp.tsx
|
|
11
|
+
/** Executes the primary view and owns its controls, inspection, exports, and stories. */
|
|
68
12
|
function DataApp(props) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
})),
|
|
111
|
-
csvExport: (snapshot) => exportDatasets(datasets, ownedSource(view, snapshot), view.scope(snapshot), app.title),
|
|
112
|
-
children
|
|
113
|
-
})
|
|
114
|
-
})
|
|
115
|
-
})
|
|
116
|
-
})
|
|
117
|
-
});
|
|
13
|
+
const { view, datasets, story, showSearchSuggestions = true, details = [], children, ...frame } = props;
|
|
14
|
+
const app = useDataApp();
|
|
15
|
+
const result = useDeclaredResult(view);
|
|
16
|
+
const source = ownedSource(view, result.snapshot ?? { loading: true });
|
|
17
|
+
const suggestionGroups = showSearchSuggestions && frame.showSearch !== false && result.searchControls ? datasets.flatMap((dataset, index) => {
|
|
18
|
+
const reading = dataset.readSearchSuggestions(source);
|
|
19
|
+
if (!reading) return [];
|
|
20
|
+
return [reading.loading ? [] : reading.value.map((item) => ({
|
|
21
|
+
...item,
|
|
22
|
+
id: [index, item.id].join(KEY_SEPARATOR)
|
|
23
|
+
}))];
|
|
24
|
+
}) : [];
|
|
25
|
+
return /* @__PURE__ */ jsx(DateFormattingContext, {
|
|
26
|
+
value: { timeZone: result.timeZone },
|
|
27
|
+
children: /* @__PURE__ */ jsx(SearchSuggestionsContext, {
|
|
28
|
+
value: suggestionGroups.length ? {
|
|
29
|
+
groups: suggestionGroups,
|
|
30
|
+
busy: result.refreshing
|
|
31
|
+
} : null,
|
|
32
|
+
children: /* @__PURE__ */ jsx(PrimaryViewContext, {
|
|
33
|
+
value: {
|
|
34
|
+
declaration: view,
|
|
35
|
+
result
|
|
36
|
+
},
|
|
37
|
+
children: /* @__PURE__ */ jsx(DetailRoutes, {
|
|
38
|
+
details,
|
|
39
|
+
children: /* @__PURE__ */ jsx(DataAppFrame, {
|
|
40
|
+
...frame,
|
|
41
|
+
request: result,
|
|
42
|
+
dataContext: result.dataContext,
|
|
43
|
+
story: (snapshot) => story(ownedSource(view, snapshot)).map((finding) => ({
|
|
44
|
+
...finding,
|
|
45
|
+
evidence: registeredEvidence(finding.evidence, view)
|
|
46
|
+
})),
|
|
47
|
+
csvExport: (snapshot) => exportDatasets(datasets, ownedSource(view, snapshot), view.scope(snapshot), app.title),
|
|
48
|
+
children
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
});
|
|
118
54
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
className: classNames("altertable-grid", className),
|
|
133
|
-
"data-columns": columns,
|
|
134
|
-
"data-min-item-width": minItemWidth,
|
|
135
|
-
"data-gap": gap,
|
|
136
|
-
"data-align": align,
|
|
137
|
-
children
|
|
138
|
-
});
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/ui/Grid.tsx
|
|
57
|
+
/** Responsive layout for peer cards and panels. Cards keep their content height by default. */
|
|
58
|
+
function Grid({ children, columns = 1, minItemWidth = "regular", gap = "lg", align = "start", className, ...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx("div", {
|
|
60
|
+
...props,
|
|
61
|
+
className: classNames("altertable-grid", className),
|
|
62
|
+
"data-columns": columns,
|
|
63
|
+
"data-min-item-width": minItemWidth,
|
|
64
|
+
"data-gap": gap,
|
|
65
|
+
"data-align": align,
|
|
66
|
+
children
|
|
67
|
+
});
|
|
139
68
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
function GridItem({
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
...props,
|
|
150
|
-
className: classNames("altertable-grid-item", className),
|
|
151
|
-
"data-span": span,
|
|
152
|
-
children
|
|
153
|
-
});
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/ui/GridItem.tsx
|
|
71
|
+
function GridItem({ children, span = 1, className, ...props }) {
|
|
72
|
+
return /* @__PURE__ */ jsx("div", {
|
|
73
|
+
...props,
|
|
74
|
+
className: classNames("altertable-grid-item", className),
|
|
75
|
+
"data-span": span,
|
|
76
|
+
children
|
|
77
|
+
});
|
|
154
78
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
reading: metric.read(source),
|
|
176
|
-
action: action || availableActions.length ? /* @__PURE__ */ jsxs(Fragment, {
|
|
177
|
-
children: [
|
|
178
|
-
action,
|
|
179
|
-
/* @__PURE__ */ jsx4(ExplorationActionControl2, {
|
|
180
|
-
actions: availableActions,
|
|
181
|
-
ariaLabel: metric.definition.label
|
|
182
|
-
})
|
|
183
|
-
]
|
|
184
|
-
}) : undefined,
|
|
185
|
-
records: records ? MetricRecords.render(records, metric, source, {
|
|
186
|
-
open(target, input) {
|
|
187
|
-
navigation.open(target, input, widgetElement?.querySelector("header button"));
|
|
188
|
-
}
|
|
189
|
-
}) : undefined
|
|
190
|
-
});
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/widgets.tsx
|
|
81
|
+
function MetricWidgetContent({ metric, source, records, actions, action, ...presentation }) {
|
|
82
|
+
const navigation = useDetailNavigation();
|
|
83
|
+
const itemActions = resolveActions(actions, metric, RegisteredBinding.owner(metric), source, (target, input, trigger) => navigation.open(target, input, trigger));
|
|
84
|
+
const [widgetElement, setWidgetElement] = useState(null);
|
|
85
|
+
const availableActions = itemActions(void 0);
|
|
86
|
+
return /* @__PURE__ */ jsx(MetricWidget$1, {
|
|
87
|
+
...presentation,
|
|
88
|
+
ref: setWidgetElement,
|
|
89
|
+
metric: metric.definition,
|
|
90
|
+
reading: metric.read(source),
|
|
91
|
+
action: action || availableActions.length ? /* @__PURE__ */ jsxs(Fragment$1, { children: [action, /* @__PURE__ */ jsx(ExplorationActionControl, {
|
|
92
|
+
actions: availableActions,
|
|
93
|
+
ariaLabel: metric.definition.label
|
|
94
|
+
})] }) : void 0,
|
|
95
|
+
records: records ? MetricRecords.render(records, metric, source, { open(target, input) {
|
|
96
|
+
navigation.open(target, input, widgetElement?.querySelector("header button"));
|
|
97
|
+
} }) : void 0
|
|
98
|
+
});
|
|
191
99
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
id: "$exploration-actions",
|
|
211
|
-
header: "Actions",
|
|
212
|
-
cell: (row) => /* @__PURE__ */ jsx4(ExplorationActionControl2, {
|
|
213
|
-
actions: itemActions(row),
|
|
214
|
-
ariaLabel: `${data.title}: ${data.rowKey(row)}`
|
|
215
|
-
})
|
|
216
|
-
}
|
|
217
|
-
] : data.columns
|
|
218
|
-
});
|
|
100
|
+
function TableWidgetContent({ dataset, source, title, actions, ...presentation }) {
|
|
101
|
+
const data = datasetTable(dataset, source);
|
|
102
|
+
const navigation = useDetailNavigation();
|
|
103
|
+
const itemActions = resolveActions(actions, dataset, RegisteredBinding.owner(dataset), source, (target, input, trigger) => navigation.open(target, input, trigger));
|
|
104
|
+
const hasRowActions = actions && (data.reading.loading || data.reading.value.some((row) => itemActions(row).length > 0));
|
|
105
|
+
return /* @__PURE__ */ jsx(TableWidget$1, {
|
|
106
|
+
...presentation,
|
|
107
|
+
...data,
|
|
108
|
+
title: title ?? data.title,
|
|
109
|
+
columns: hasRowActions ? [...data.columns, {
|
|
110
|
+
id: "$exploration-actions",
|
|
111
|
+
header: "Actions",
|
|
112
|
+
cell: (row) => /* @__PURE__ */ jsx(ExplorationActionControl, {
|
|
113
|
+
actions: itemActions(row),
|
|
114
|
+
ariaLabel: `${data.title}: ${data.rowKey(row)}`
|
|
115
|
+
})
|
|
116
|
+
}] : data.columns
|
|
117
|
+
});
|
|
219
118
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
...common,
|
|
280
|
-
children: (rows) => children(rows, resolvedActions)
|
|
281
|
-
}) : /* @__PURE__ */ jsx4(VisualizationWidget2, {
|
|
282
|
-
...common,
|
|
283
|
-
views: views.map((view) => ({
|
|
284
|
-
...view,
|
|
285
|
-
render: (rows) => view.render(rows, resolvedActions)
|
|
286
|
-
})),
|
|
287
|
-
viewLabel,
|
|
288
|
-
initialView
|
|
289
|
-
});
|
|
119
|
+
function VisualizationWidgetContent({ dataset, source, title, actions, breakdown, children, views, viewLabel, initialView, ...presentation }) {
|
|
120
|
+
const data = datasetTable(dataset, source);
|
|
121
|
+
const navigation = useDetailNavigation();
|
|
122
|
+
const itemActions = resolveActions(actions, dataset, RegisteredBinding.owner(dataset), source, (target, input, trigger) => navigation.open(target, input, trigger));
|
|
123
|
+
const state = breakdown && breakdownState(breakdown, RegisteredBinding.owner(dataset));
|
|
124
|
+
const controlRef = useRef(null);
|
|
125
|
+
const recoverFocus = useRef(false);
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
if (recoverFocus.current) {
|
|
128
|
+
recoverFocus.current = false;
|
|
129
|
+
controlRef.current?.querySelector("button")?.focus();
|
|
130
|
+
}
|
|
131
|
+
}, [state?.value]);
|
|
132
|
+
function resolvedActions(row) {
|
|
133
|
+
return itemActions(row).map((action) => ({
|
|
134
|
+
...action,
|
|
135
|
+
onSelect(trigger) {
|
|
136
|
+
recoverFocus.current = true;
|
|
137
|
+
action.onSelect(trigger);
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
const action = state ? /* @__PURE__ */ jsx("div", {
|
|
142
|
+
ref: controlRef,
|
|
143
|
+
children: /* @__PURE__ */ jsx(Select, {
|
|
144
|
+
label: state.variable.label ?? "Break down by",
|
|
145
|
+
labelPlacement: "inline",
|
|
146
|
+
icon: "breakdown",
|
|
147
|
+
size: "compact",
|
|
148
|
+
align: "end",
|
|
149
|
+
options: state.options.map((level) => ({
|
|
150
|
+
id: level.id,
|
|
151
|
+
label: level.label
|
|
152
|
+
})),
|
|
153
|
+
value: state.value,
|
|
154
|
+
onChange: (id) => state.set(id)
|
|
155
|
+
})
|
|
156
|
+
}) : presentation.action;
|
|
157
|
+
const common = {
|
|
158
|
+
...presentation,
|
|
159
|
+
action,
|
|
160
|
+
title: title ?? data.title,
|
|
161
|
+
reading: data.reading,
|
|
162
|
+
evidence: data.evidence,
|
|
163
|
+
emptyFallback: data.emptyFallback,
|
|
164
|
+
isEmpty: (rows) => rows.length === 0
|
|
165
|
+
};
|
|
166
|
+
return children ? /* @__PURE__ */ jsx(VisualizationWidget$1, {
|
|
167
|
+
...common,
|
|
168
|
+
children: (rows) => children(rows, resolvedActions)
|
|
169
|
+
}) : /* @__PURE__ */ jsx(VisualizationWidget$1, {
|
|
170
|
+
...common,
|
|
171
|
+
views: views.map((view) => ({
|
|
172
|
+
...view,
|
|
173
|
+
render: (rows) => view.render(rows, resolvedActions)
|
|
174
|
+
})),
|
|
175
|
+
viewLabel,
|
|
176
|
+
initialView
|
|
177
|
+
});
|
|
290
178
|
}
|
|
291
|
-
function
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
179
|
+
function TextWidgetContent(props) {
|
|
180
|
+
if (props.metric) {
|
|
181
|
+
const { metric, source, title, children, ...presentation } = props;
|
|
182
|
+
return /* @__PURE__ */ jsx(TextWidget$1, {
|
|
183
|
+
...presentation,
|
|
184
|
+
title: title ?? metric.definition.label,
|
|
185
|
+
evidence: metric.definition.evidence,
|
|
186
|
+
reading: metric.read(source),
|
|
187
|
+
children: children ?? ((values) => formatMetric(values.current, metric.definition.format))
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
const { dataset, source, title, children, ...presentation } = props;
|
|
191
|
+
return /* @__PURE__ */ jsx(TextWidget$1, {
|
|
192
|
+
...presentation,
|
|
193
|
+
title: title ?? dataset.name,
|
|
194
|
+
evidence: dataset.evidence,
|
|
195
|
+
reading: dataset.read(source),
|
|
196
|
+
children
|
|
197
|
+
});
|
|
310
198
|
}
|
|
311
199
|
function DataValue(props) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
...presentation
|
|
338
|
-
} = props;
|
|
339
|
-
return /* @__PURE__ */ jsx4(DataValue2, {
|
|
340
|
-
...presentation,
|
|
341
|
-
reading: dataset.read(source),
|
|
342
|
-
loadingFallback,
|
|
343
|
-
children
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
const {
|
|
347
|
-
scope,
|
|
348
|
-
children,
|
|
349
|
-
loadingFallback = /* @__PURE__ */ jsx4(Skeleton2, {
|
|
350
|
-
inline: true
|
|
351
|
-
}),
|
|
352
|
-
...presentation
|
|
353
|
-
} = props;
|
|
354
|
-
return /* @__PURE__ */ jsx4(DataValue2, {
|
|
355
|
-
...presentation,
|
|
356
|
-
reading: scope,
|
|
357
|
-
loadingFallback,
|
|
358
|
-
children: children ?? ((value) => value)
|
|
359
|
-
});
|
|
200
|
+
if (props.metric) {
|
|
201
|
+
const { metric, source, children, loadingFallback = /* @__PURE__ */ jsx(Skeleton, { inline: true }), ...presentation } = props;
|
|
202
|
+
return /* @__PURE__ */ jsx(DataValue$1, {
|
|
203
|
+
...presentation,
|
|
204
|
+
reading: metric.read(source),
|
|
205
|
+
loadingFallback,
|
|
206
|
+
children: children ?? ((values) => formatMetric(values.current, metric.definition.format))
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
if (props.dataset) {
|
|
210
|
+
const { dataset, source, children, loadingFallback = /* @__PURE__ */ jsx(Skeleton, { inline: true }), ...presentation } = props;
|
|
211
|
+
return /* @__PURE__ */ jsx(DataValue$1, {
|
|
212
|
+
...presentation,
|
|
213
|
+
reading: dataset.read(source),
|
|
214
|
+
loadingFallback,
|
|
215
|
+
children
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
const { scope, children, loadingFallback = /* @__PURE__ */ jsx(Skeleton, { inline: true }), ...presentation } = props;
|
|
219
|
+
return /* @__PURE__ */ jsx(DataValue$1, {
|
|
220
|
+
...presentation,
|
|
221
|
+
reading: scope,
|
|
222
|
+
loadingFallback,
|
|
223
|
+
children: children ?? ((value) => value)
|
|
224
|
+
});
|
|
360
225
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
children: [
|
|
417
|
-
/* @__PURE__ */ jsx5("span", {
|
|
418
|
-
className: "altertable-breakdown-swatch",
|
|
419
|
-
"aria-hidden": "true"
|
|
420
|
-
}),
|
|
421
|
-
item.label
|
|
422
|
-
]
|
|
423
|
-
}),
|
|
424
|
-
/* @__PURE__ */ jsx5("dd", {
|
|
425
|
-
className: "altertable-breakdown-value",
|
|
426
|
-
children: formatValue(item.value)
|
|
427
|
-
}),
|
|
428
|
-
/* @__PURE__ */ jsx5("dd", {
|
|
429
|
-
className: "altertable-breakdown-share",
|
|
430
|
-
children: formatPercent(share)
|
|
431
|
-
})
|
|
432
|
-
]
|
|
433
|
-
}, item.id);
|
|
434
|
-
})
|
|
435
|
-
})
|
|
436
|
-
]
|
|
437
|
-
});
|
|
226
|
+
const MetricWidget = withWidgetBoundary(MetricWidgetContent);
|
|
227
|
+
const TableWidget = withWidgetBoundary(TableWidgetContent);
|
|
228
|
+
const VisualizationWidget = withWidgetBoundary(VisualizationWidgetContent);
|
|
229
|
+
const TextWidget = withWidgetBoundary(TextWidgetContent);
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/ui/Breakdown.tsx
|
|
232
|
+
/** Mutually exclusive parts of one observed whole. Every share uses the supplied total. */
|
|
233
|
+
function Breakdown({ total, items, formatValue = formatCount, className, ...props }) {
|
|
234
|
+
invariant(Number.isFinite(total) && total >= 0 && items.every((item) => Number.isFinite(item.value) && item.value >= 0) && items.reduce((sum, item) => sum + item.value, 0) <= total, "Breakdown items must be nonnegative parts of the observed total.");
|
|
235
|
+
const dominant = total > 0 && items.some((item) => item.value / total >= .85);
|
|
236
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
237
|
+
...props,
|
|
238
|
+
className: classNames("altertable-breakdown", className),
|
|
239
|
+
"data-dominant": dominant || void 0,
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ jsxs("div", {
|
|
242
|
+
className: "altertable-breakdown-summary",
|
|
243
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Share of total" }), /* @__PURE__ */ jsxs("strong", { children: [formatValue(total), " total"] })]
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ jsx("div", {
|
|
246
|
+
className: "altertable-breakdown-bar",
|
|
247
|
+
"aria-hidden": "true",
|
|
248
|
+
children: items.map((item) => /* @__PURE__ */ jsx("span", { style: {
|
|
249
|
+
width: `${total ? item.value / total * 100 : 0}%`,
|
|
250
|
+
backgroundColor: chartColor(item.id)
|
|
251
|
+
} }, item.id))
|
|
252
|
+
}),
|
|
253
|
+
/* @__PURE__ */ jsx("dl", {
|
|
254
|
+
className: "altertable-breakdown-list",
|
|
255
|
+
children: items.map((item) => {
|
|
256
|
+
const share = total ? item.value / total : 0;
|
|
257
|
+
const color = { "--altertable-breakdown-color": chartColor(item.id) };
|
|
258
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
259
|
+
className: "altertable-breakdown-row",
|
|
260
|
+
"data-empty": item.value === 0 || void 0,
|
|
261
|
+
style: color,
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ jsxs("dt", { children: [/* @__PURE__ */ jsx("span", {
|
|
264
|
+
className: "altertable-breakdown-swatch",
|
|
265
|
+
"aria-hidden": "true"
|
|
266
|
+
}), item.label] }),
|
|
267
|
+
/* @__PURE__ */ jsx("dd", {
|
|
268
|
+
className: "altertable-breakdown-value",
|
|
269
|
+
children: formatValue(item.value)
|
|
270
|
+
}),
|
|
271
|
+
/* @__PURE__ */ jsx("dd", {
|
|
272
|
+
className: "altertable-breakdown-share",
|
|
273
|
+
children: formatPercent(share)
|
|
274
|
+
})
|
|
275
|
+
]
|
|
276
|
+
}, item.id);
|
|
277
|
+
})
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
});
|
|
438
281
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
})
|
|
465
|
-
]
|
|
466
|
-
}),
|
|
467
|
-
/* @__PURE__ */ jsx6("div", {
|
|
468
|
-
className: "altertable-ranking-track",
|
|
469
|
-
"aria-hidden": "true",
|
|
470
|
-
children: /* @__PURE__ */ jsx6("span", {
|
|
471
|
-
style: { width: `${max ? item.value / max * 100 : 0}%` }
|
|
472
|
-
})
|
|
473
|
-
}),
|
|
474
|
-
item.detail != null && /* @__PURE__ */ jsx6("div", {
|
|
475
|
-
className: "altertable-ranking-detail",
|
|
476
|
-
children: item.detail
|
|
477
|
-
})
|
|
478
|
-
]
|
|
479
|
-
}, item.id))
|
|
480
|
-
});
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/ui/Ranking.tsx
|
|
284
|
+
/** Ordered values scaled to the largest visible item, not shares of a whole. */
|
|
285
|
+
function Ranking({ items, formatValue = formatCount, className, ...props }) {
|
|
286
|
+
invariant(items.every((item) => Number.isFinite(item.value) && item.value >= 0), "Ranking values must be finite and nonnegative.");
|
|
287
|
+
const max = Math.max(0, ...items.map((item) => item.value));
|
|
288
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
289
|
+
...props,
|
|
290
|
+
className: classNames("altertable-ranking", className),
|
|
291
|
+
children: items.map((item) => /* @__PURE__ */ jsxs("li", { children: [
|
|
292
|
+
/* @__PURE__ */ jsxs("div", {
|
|
293
|
+
className: "altertable-ranking-reading",
|
|
294
|
+
children: [/* @__PURE__ */ jsx("span", { children: item.label }), /* @__PURE__ */ jsx("strong", { children: formatValue(item.value) })]
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ jsx("div", {
|
|
297
|
+
className: "altertable-ranking-track",
|
|
298
|
+
"aria-hidden": "true",
|
|
299
|
+
children: /* @__PURE__ */ jsx("span", { style: { width: `${max ? item.value / max * 100 : 0}%` } })
|
|
300
|
+
}),
|
|
301
|
+
item.detail != null && /* @__PURE__ */ jsx("div", {
|
|
302
|
+
className: "altertable-ranking-detail",
|
|
303
|
+
children: item.detail
|
|
304
|
+
})
|
|
305
|
+
] }, item.id))
|
|
306
|
+
});
|
|
481
307
|
}
|
|
482
|
-
|
|
483
|
-
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/ui/Comparison.tsx
|
|
484
310
|
function Comparison(props) {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
emphasis: props.emphasis
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
return /* @__PURE__ */ jsx7(ComparisonContent, {
|
|
501
|
-
...props
|
|
502
|
-
});
|
|
311
|
+
const dateFormatting = useDateFormatting();
|
|
312
|
+
if ("metric" in props) {
|
|
313
|
+
if (props.reading.loading) return /* @__PURE__ */ jsx(ContentSkeleton, { variant: "panel" });
|
|
314
|
+
const comparison = metricComparison(props.metric, props.reading, dateFormatting);
|
|
315
|
+
if (!comparison) return null;
|
|
316
|
+
return /* @__PURE__ */ jsx(ComparisonContent, {
|
|
317
|
+
...comparison,
|
|
318
|
+
label: props.metric.label,
|
|
319
|
+
emphasis: props.emphasis
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
return /* @__PURE__ */ jsx(ComparisonContent, { ...props });
|
|
503
323
|
}
|
|
504
|
-
function ComparisonContent({
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
})
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
"data-period": "previous",
|
|
550
|
-
children: [
|
|
551
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
552
|
-
children: [
|
|
553
|
-
/* @__PURE__ */ jsx7("span", {
|
|
554
|
-
children: previous.periodLabel ?? "Previous period"
|
|
555
|
-
}),
|
|
556
|
-
/* @__PURE__ */ jsx7("strong", {
|
|
557
|
-
children: previous.formattedValue
|
|
558
|
-
})
|
|
559
|
-
]
|
|
560
|
-
}),
|
|
561
|
-
/* @__PURE__ */ jsx7("span", {
|
|
562
|
-
className: "altertable-comparison-track",
|
|
563
|
-
children: /* @__PURE__ */ jsx7("span", {
|
|
564
|
-
style: { width: `${(previous.value ?? 0) / max * 100}%` }
|
|
565
|
-
})
|
|
566
|
-
})
|
|
567
|
-
]
|
|
568
|
-
}),
|
|
569
|
-
/* @__PURE__ */ jsx7("p", {
|
|
570
|
-
className: "altertable-comparison-change",
|
|
571
|
-
"data-tone": tone,
|
|
572
|
-
children: percent === null ? "No comparable previous value" : /* @__PURE__ */ jsxs4(Fragment2, {
|
|
573
|
-
children: [
|
|
574
|
-
/* @__PURE__ */ jsx7(AppIcon2, {
|
|
575
|
-
name: icon,
|
|
576
|
-
size: 17
|
|
577
|
-
}),
|
|
578
|
-
Math.abs(percent).toFixed(1),
|
|
579
|
-
"% vs",
|
|
580
|
-
" ",
|
|
581
|
-
previous?.periodLabel?.toLowerCase() ?? "previous period"
|
|
582
|
-
]
|
|
583
|
-
})
|
|
584
|
-
})
|
|
585
|
-
]
|
|
586
|
-
});
|
|
324
|
+
function ComparisonContent({ label, current, previous, favorableDirection, emphasis = "standard" }) {
|
|
325
|
+
const max = Math.max(current.value, previous?.value ?? 0, 1);
|
|
326
|
+
const { percent, tone, icon } = comparisonChange({
|
|
327
|
+
current,
|
|
328
|
+
previous,
|
|
329
|
+
favorableDirection
|
|
330
|
+
});
|
|
331
|
+
return /* @__PURE__ */ jsxs("figure", {
|
|
332
|
+
className: "altertable-comparison-visual",
|
|
333
|
+
"data-emphasis": emphasis,
|
|
334
|
+
"aria-label": `${label} comparison`,
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ jsx("figcaption", { children: label }),
|
|
337
|
+
/* @__PURE__ */ jsxs("div", {
|
|
338
|
+
className: "altertable-comparison-row",
|
|
339
|
+
"data-period": "current",
|
|
340
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", { children: current.periodLabel ?? "Current period" }), /* @__PURE__ */ jsx("strong", { children: current.formattedValue })] }), /* @__PURE__ */ jsx("span", {
|
|
341
|
+
className: "altertable-comparison-track",
|
|
342
|
+
children: /* @__PURE__ */ jsx("span", { style: { width: `${current.value / max * 100}%` } })
|
|
343
|
+
})]
|
|
344
|
+
}),
|
|
345
|
+
previous && /* @__PURE__ */ jsxs("div", {
|
|
346
|
+
className: "altertable-comparison-row",
|
|
347
|
+
"data-period": "previous",
|
|
348
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", { children: previous.periodLabel ?? "Previous period" }), /* @__PURE__ */ jsx("strong", { children: previous.formattedValue })] }), /* @__PURE__ */ jsx("span", {
|
|
349
|
+
className: "altertable-comparison-track",
|
|
350
|
+
children: /* @__PURE__ */ jsx("span", { style: { width: `${(previous.value ?? 0) / max * 100}%` } })
|
|
351
|
+
})]
|
|
352
|
+
}),
|
|
353
|
+
/* @__PURE__ */ jsx("p", {
|
|
354
|
+
className: "altertable-comparison-change",
|
|
355
|
+
"data-tone": tone,
|
|
356
|
+
children: percent === null ? "No comparable previous value" : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
357
|
+
/* @__PURE__ */ jsx(AppIcon, {
|
|
358
|
+
name: icon,
|
|
359
|
+
size: 17
|
|
360
|
+
}),
|
|
361
|
+
Math.abs(percent).toFixed(1),
|
|
362
|
+
"% vs",
|
|
363
|
+
" ",
|
|
364
|
+
previous?.periodLabel?.toLowerCase() ?? "previous period"
|
|
365
|
+
] })
|
|
366
|
+
})
|
|
367
|
+
]
|
|
368
|
+
});
|
|
587
369
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
view,
|
|
608
|
-
...section,
|
|
609
|
-
...presentation
|
|
610
|
-
});
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/ui/DataSection.tsx
|
|
372
|
+
function DataSection({ content, ...presentation }) {
|
|
373
|
+
const primary = useContext(PrimaryViewContext);
|
|
374
|
+
const { view, ...section } = sectionContent(content);
|
|
375
|
+
if (primary?.declaration === view) {
|
|
376
|
+
const result = primary.result;
|
|
377
|
+
return /* @__PURE__ */ jsx(DataSectionBoundary, {
|
|
378
|
+
...section,
|
|
379
|
+
...presentation,
|
|
380
|
+
result,
|
|
381
|
+
notice: "none"
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
return /* @__PURE__ */ jsx(IndependentSection, {
|
|
385
|
+
view,
|
|
386
|
+
...section,
|
|
387
|
+
...presentation
|
|
388
|
+
});
|
|
611
389
|
}
|
|
612
|
-
function IndependentSection({
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
children: section
|
|
632
|
-
})
|
|
633
|
-
});
|
|
390
|
+
function IndependentSection({ view, ...props }) {
|
|
391
|
+
const result = useDeclaredResult(view);
|
|
392
|
+
const defaults = useInspectionDefaults();
|
|
393
|
+
const section = /* @__PURE__ */ jsx(DataSectionBoundary, {
|
|
394
|
+
...props,
|
|
395
|
+
result,
|
|
396
|
+
notice: "inline"
|
|
397
|
+
});
|
|
398
|
+
return /* @__PURE__ */ jsx(DateFormattingContext, {
|
|
399
|
+
value: { timeZone: result.timeZone },
|
|
400
|
+
children: /* @__PURE__ */ jsx(InspectionContext, {
|
|
401
|
+
value: {
|
|
402
|
+
...defaults,
|
|
403
|
+
dataContext: result.dataContext,
|
|
404
|
+
queries: result.queries
|
|
405
|
+
},
|
|
406
|
+
children: section
|
|
407
|
+
})
|
|
408
|
+
});
|
|
634
409
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
})
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
date,
|
|
673
|
-
triggerProps: {
|
|
674
|
-
...triggerProps,
|
|
675
|
-
className: ["altertable-updated-at", triggerProps?.className].filter(Boolean).join(" ")
|
|
676
|
-
},
|
|
677
|
-
children: children ?? /* @__PURE__ */ jsxs5("time", {
|
|
678
|
-
dateTime: date.toISOString(),
|
|
679
|
-
children: [
|
|
680
|
-
label,
|
|
681
|
-
" ",
|
|
682
|
-
age
|
|
683
|
-
]
|
|
684
|
-
})
|
|
685
|
-
});
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/ui/UpdatedAt.tsx
|
|
412
|
+
function UpdatedAt({ timestamp, locale, label = "Updated", children, triggerProps, ...props }) {
|
|
413
|
+
const defaults = useDateFormatting({
|
|
414
|
+
locale,
|
|
415
|
+
timeZone: props.timeZone
|
|
416
|
+
});
|
|
417
|
+
const [now, setNow] = useState(Date.now);
|
|
418
|
+
useEffect(() => {
|
|
419
|
+
const interval = window.setInterval(() => setNow(Date.now()), 3e4);
|
|
420
|
+
return () => window.clearInterval(interval);
|
|
421
|
+
}, []);
|
|
422
|
+
const elapsedMinutes = Math.floor(Math.max(0, now - timestamp) / 6e4);
|
|
423
|
+
const relative = new Intl.RelativeTimeFormat(defaults.locale, { numeric: "auto" });
|
|
424
|
+
let age = "just now";
|
|
425
|
+
if (elapsedMinutes >= 1440) age = relative.format(-Math.floor(elapsedMinutes / 1440), "day");
|
|
426
|
+
else if (elapsedMinutes >= 60) age = relative.format(-Math.floor(elapsedMinutes / 60), "hour");
|
|
427
|
+
else if (elapsedMinutes >= 1) age = relative.format(-elapsedMinutes, "minute");
|
|
428
|
+
const date = parseDateTime(timestamp);
|
|
429
|
+
if (!date) return /* @__PURE__ */ jsx("span", { children: children ?? `${label} —` });
|
|
430
|
+
return /* @__PURE__ */ jsx(DateTimeTooltip, {
|
|
431
|
+
...props,
|
|
432
|
+
...defaults,
|
|
433
|
+
date,
|
|
434
|
+
triggerProps: {
|
|
435
|
+
...triggerProps,
|
|
436
|
+
className: ["altertable-updated-at", triggerProps?.className].filter(Boolean).join(" ")
|
|
437
|
+
},
|
|
438
|
+
children: children ?? /* @__PURE__ */ jsxs("time", {
|
|
439
|
+
dateTime: date.toISOString(),
|
|
440
|
+
children: [
|
|
441
|
+
label,
|
|
442
|
+
" ",
|
|
443
|
+
age
|
|
444
|
+
]
|
|
445
|
+
})
|
|
446
|
+
});
|
|
686
447
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
formatDateRange,
|
|
690
|
-
formatDateTime,
|
|
691
|
-
parseDateTime as parseDateTime2
|
|
692
|
-
} from "@altertable/data-app/format";
|
|
693
|
-
import { jsx as jsx10, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region src/ui/PeriodSummary.tsx
|
|
694
450
|
function duration(period) {
|
|
695
|
-
|
|
451
|
+
return `${period.amount} ${period.unit}${period.amount === 1 ? "" : "s"}`;
|
|
696
452
|
}
|
|
697
453
|
function label(period, options = {}) {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
return formatDateRange(period, options);
|
|
454
|
+
if (period.kind === "rolling") return `Last ${duration(period)}`;
|
|
455
|
+
return formatDateRange(period, options);
|
|
701
456
|
}
|
|
702
457
|
function comparisonLabel(period, comparison, options) {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
return period.kind === "rolling" ? `Previous ${duration(period)}` : "Previous period";
|
|
458
|
+
if (comparison.kind === "period") {
|
|
459
|
+
if (comparison.period.kind === "calendar") return label(comparison.period, options);
|
|
460
|
+
return `${duration(comparison.period)} ending ${formatDateTime(comparison.period.end, options)}`;
|
|
461
|
+
}
|
|
462
|
+
return period.kind === "rolling" ? `Previous ${duration(period)}` : "Previous period";
|
|
709
463
|
}
|
|
710
464
|
function reportingPeriodText(period, options = {}) {
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
const start = new Date(end.getTime() - period.amount * (period.unit === "hour" ? 3600000 : 86400000));
|
|
717
|
-
return `${label(period, options)}, ${formatDateTime(start, options)} to ${formatDateTime(end, options)} in ${options.timeZone ?? "UTC"}`;
|
|
465
|
+
if (period.kind === "calendar") return `${label(period, options)} in ${period.timeZone}`;
|
|
466
|
+
const end = parseDateTime(period.end);
|
|
467
|
+
if (!end) return label(period, options);
|
|
468
|
+
const start = /* @__PURE__ */ new Date(end.getTime() - period.amount * (period.unit === "hour" ? 36e5 : 864e5));
|
|
469
|
+
return `${label(period, options)}, ${formatDateTime(start, options)} to ${formatDateTime(end, options)} in ${options.timeZone ?? "UTC"}`;
|
|
718
470
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
className: "altertable-period-summary-vs",
|
|
750
|
-
"aria-hidden": "true",
|
|
751
|
-
children: "vs"
|
|
752
|
-
}),
|
|
753
|
-
/* @__PURE__ */ jsx10("span", {
|
|
754
|
-
children: comparisonText
|
|
755
|
-
})
|
|
756
|
-
]
|
|
757
|
-
})
|
|
758
|
-
]
|
|
759
|
-
})
|
|
760
|
-
]
|
|
761
|
-
});
|
|
471
|
+
/** Read-only period context for the variable bar, including exact bounds for assistive technology. */
|
|
472
|
+
function PeriodSummary({ period, comparison, className }) {
|
|
473
|
+
const options = useDateFormatting();
|
|
474
|
+
const comparisonText = comparison ? comparisonLabel(period, comparison, options) : null;
|
|
475
|
+
const comparisonDetail = comparison?.kind === "period" ? reportingPeriodText(comparison.period, options) : comparisonText;
|
|
476
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
477
|
+
className: classNames("altertable-period-summary", className),
|
|
478
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
479
|
+
className: "altertable-sr-only",
|
|
480
|
+
children: `Reporting period: ${reportingPeriodText(period, options)}${comparisonDetail ? `, compared with ${comparisonDetail}` : ""}`
|
|
481
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
482
|
+
"aria-hidden": "true",
|
|
483
|
+
className: "altertable-period-summary-visible",
|
|
484
|
+
children: [
|
|
485
|
+
/* @__PURE__ */ jsx(AppIcon, {
|
|
486
|
+
name: period.kind === "rolling" ? "clock" : "calendar",
|
|
487
|
+
size: 16
|
|
488
|
+
}),
|
|
489
|
+
/* @__PURE__ */ jsx("span", {
|
|
490
|
+
className: "altertable-period-summary-current",
|
|
491
|
+
children: label(period, options)
|
|
492
|
+
}),
|
|
493
|
+
comparisonText && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
494
|
+
className: "altertable-period-summary-vs",
|
|
495
|
+
"aria-hidden": "true",
|
|
496
|
+
children: "vs"
|
|
497
|
+
}), /* @__PURE__ */ jsx("span", { children: comparisonText })] })
|
|
498
|
+
]
|
|
499
|
+
})]
|
|
500
|
+
});
|
|
762
501
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region src/ui/data-identifiers.tsx
|
|
766
504
|
function qualifiedName(definition) {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
505
|
+
const table = definition.kind === "table" ? definition : definition.table;
|
|
506
|
+
const path = [
|
|
507
|
+
table.catalog,
|
|
508
|
+
table.schema,
|
|
509
|
+
table.name
|
|
510
|
+
].join(".");
|
|
511
|
+
return definition.kind === "column" ? `${path}.${definition.name}` : path;
|
|
770
512
|
}
|
|
771
513
|
function assertAlias(id) {
|
|
772
|
-
|
|
514
|
+
invariant(!!id && !id.includes("."), `Invalid data identifier alias ${id}.`);
|
|
773
515
|
}
|
|
516
|
+
/** Register exact source names once; returned JSX IDs are checked against this registry. */
|
|
774
517
|
function defineDataIdentifiers({ tables, columns }) {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
};
|
|
518
|
+
const definitions = Object.create(null);
|
|
519
|
+
for (const [id, table] of Object.entries(tables)) {
|
|
520
|
+
assertAlias(id);
|
|
521
|
+
definitions[`tables.${id}`] = {
|
|
522
|
+
kind: "table",
|
|
523
|
+
...table
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
for (const [id, column] of Object.entries(columns)) {
|
|
527
|
+
assertAlias(id);
|
|
528
|
+
const table = tables[column.table];
|
|
529
|
+
invariant(table, `Unknown table ${column.table} for column ${id}.`);
|
|
530
|
+
definitions[`columns.${column.table}.${id}`] = {
|
|
531
|
+
kind: "column",
|
|
532
|
+
tableId: `tables.${column.table}`,
|
|
533
|
+
table,
|
|
534
|
+
name: column.name
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
function DataIdentifier({ id, display }) {
|
|
538
|
+
const definition = definitions[id];
|
|
539
|
+
invariant(definition, `Unknown data identifier ${id}.`);
|
|
540
|
+
const qualified = qualifiedName(definition);
|
|
541
|
+
const shown = display ?? (definition.kind === "table" ? "qualified" : "short");
|
|
542
|
+
const table = definition.kind === "table" ? definition : definition.table;
|
|
543
|
+
const prefix = definition.kind === "table" ? [table.catalog, table.schema] : [
|
|
544
|
+
table.catalog,
|
|
545
|
+
table.schema,
|
|
546
|
+
table.name
|
|
547
|
+
];
|
|
548
|
+
return /* @__PURE__ */ jsxs("code", {
|
|
549
|
+
className: "altertable-data-identifier",
|
|
550
|
+
"data-kind": definition.kind,
|
|
551
|
+
title: qualified,
|
|
552
|
+
"data-identifier-id": id,
|
|
553
|
+
children: [shown === "qualified" && /* @__PURE__ */ jsx("span", {
|
|
554
|
+
className: "altertable-data-identifier-path",
|
|
555
|
+
children: prefix.map((segment, index) => /* @__PURE__ */ jsxs("span", { children: [
|
|
556
|
+
segment,
|
|
557
|
+
".",
|
|
558
|
+
/* @__PURE__ */ jsx("wbr", {})
|
|
559
|
+
] }, index))
|
|
560
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
561
|
+
className: "altertable-data-identifier-name",
|
|
562
|
+
children: definition.name
|
|
563
|
+
})]
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
return {
|
|
567
|
+
definitions,
|
|
568
|
+
DataIdentifier
|
|
569
|
+
};
|
|
828
570
|
}
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
evidence,
|
|
843
|
-
kind: "element"
|
|
844
|
-
})
|
|
845
|
-
});
|
|
571
|
+
//#endregion
|
|
572
|
+
//#region src/annotations/AnnotationTarget.tsx
|
|
573
|
+
/** A stable feedback target for app-owned content outside the built-in widgets. */
|
|
574
|
+
function AnnotationTarget({ annotationId, label, evidence, ...props }) {
|
|
575
|
+
return /* @__PURE__ */ jsx("div", {
|
|
576
|
+
...props,
|
|
577
|
+
...getAnnotationProps({
|
|
578
|
+
id: annotationId,
|
|
579
|
+
label,
|
|
580
|
+
evidence,
|
|
581
|
+
kind: "element"
|
|
582
|
+
})
|
|
583
|
+
});
|
|
846
584
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
useEffect as useEffect3,
|
|
850
|
-
useEffectEvent,
|
|
851
|
-
useRef as useRef2,
|
|
852
|
-
useReducer,
|
|
853
|
-
useImperativeHandle
|
|
854
|
-
} from "react";
|
|
855
|
-
import { createPortal } from "react-dom";
|
|
856
|
-
import {
|
|
857
|
-
autoUpdate,
|
|
858
|
-
flip,
|
|
859
|
-
offset,
|
|
860
|
-
shift,
|
|
861
|
-
useFloating,
|
|
862
|
-
useMergeRefs
|
|
863
|
-
} from "@floating-ui/react";
|
|
864
|
-
import {
|
|
865
|
-
GripVertical,
|
|
866
|
-
Eye,
|
|
867
|
-
EyeOff,
|
|
868
|
-
Trash2,
|
|
869
|
-
X,
|
|
870
|
-
Minus,
|
|
871
|
-
LoaderCircle
|
|
872
|
-
} from "lucide-react";
|
|
873
|
-
import {
|
|
874
|
-
parseDataAppAnnotationDraft
|
|
875
|
-
} from "@altertable/data-app/contract";
|
|
876
|
-
import { jsx as jsx13, jsxs as jsxs8, Fragment as Fragment4 } from "react/jsx-runtime";
|
|
585
|
+
//#endregion
|
|
586
|
+
//#region src/annotations/AnnotationBar.tsx
|
|
877
587
|
function annotationBarReducer(state, action) {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
588
|
+
switch (action.type) {
|
|
589
|
+
case "positionMoved": return {
|
|
590
|
+
...state,
|
|
591
|
+
position: action.position
|
|
592
|
+
};
|
|
593
|
+
case "reviewToggled": return {
|
|
594
|
+
...state,
|
|
595
|
+
reviewOpen: !state.reviewOpen
|
|
596
|
+
};
|
|
597
|
+
case "reviewClosed": return {
|
|
598
|
+
...state,
|
|
599
|
+
reviewOpen: false
|
|
600
|
+
};
|
|
601
|
+
case "previewOpened": return {
|
|
602
|
+
...state,
|
|
603
|
+
previewId: action.id
|
|
604
|
+
};
|
|
605
|
+
case "previewClosed": return {
|
|
606
|
+
...state,
|
|
607
|
+
previewId: void 0
|
|
608
|
+
};
|
|
609
|
+
case "discardDialogChanged": return {
|
|
610
|
+
...state,
|
|
611
|
+
discardOpen: action.open
|
|
612
|
+
};
|
|
613
|
+
case "annotationsDiscarded": return {
|
|
614
|
+
...state,
|
|
615
|
+
discardOpen: false,
|
|
616
|
+
reviewOpen: false
|
|
617
|
+
};
|
|
618
|
+
case "submissionStarted": return {
|
|
619
|
+
...state,
|
|
620
|
+
pending: true,
|
|
621
|
+
error: ""
|
|
622
|
+
};
|
|
623
|
+
case "submissionAccepted": return {
|
|
624
|
+
...state,
|
|
625
|
+
reviewOpen: false
|
|
626
|
+
};
|
|
627
|
+
case "submissionFailed": return {
|
|
628
|
+
...state,
|
|
629
|
+
error: "Could not send annotations. Try again."
|
|
630
|
+
};
|
|
631
|
+
case "submissionFinished": return {
|
|
632
|
+
...state,
|
|
633
|
+
pending: false
|
|
634
|
+
};
|
|
635
|
+
case "annotationModeObserved": return {
|
|
636
|
+
...state,
|
|
637
|
+
observedActive: action.active,
|
|
638
|
+
...!action.active ? {
|
|
639
|
+
reviewOpen: false,
|
|
640
|
+
previewId: void 0
|
|
641
|
+
} : {}
|
|
642
|
+
};
|
|
643
|
+
}
|
|
908
644
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
})
|
|
1299
|
-
]
|
|
1300
|
-
}, annotation.id))
|
|
1301
|
-
}),
|
|
1302
|
-
undo
|
|
1303
|
-
]
|
|
1304
|
-
}), document.body),
|
|
1305
|
-
/* @__PURE__ */ jsx13(Sheet2, {
|
|
1306
|
-
open: Boolean(preview),
|
|
1307
|
-
onOpenChange: (open) => {
|
|
1308
|
-
if (!open)
|
|
1309
|
-
dispatch({ type: "previewClosed" });
|
|
1310
|
-
},
|
|
1311
|
-
placement: "center",
|
|
1312
|
-
className: "altertable-annotation-image-dialog",
|
|
1313
|
-
title: preview?.target.label ?? "Screenshot",
|
|
1314
|
-
description: preview?.comment,
|
|
1315
|
-
returnFocus: reviewTrigger,
|
|
1316
|
-
children: preview?.context.screenshot && /* @__PURE__ */ jsx13("img", {
|
|
1317
|
-
className: "altertable-annotation-preview",
|
|
1318
|
-
src: preview.context.screenshot.dataUrl,
|
|
1319
|
-
alt: `Captured area for ${preview.target.label}`
|
|
1320
|
-
})
|
|
1321
|
-
}),
|
|
1322
|
-
!requestDiscard && /* @__PURE__ */ jsx13(Sheet2, {
|
|
1323
|
-
open: discardOpen,
|
|
1324
|
-
onOpenChange: (open) => dispatch({ type: "discardDialogChanged", open }),
|
|
1325
|
-
placement: "center",
|
|
1326
|
-
title: "Discard all pending annotations?",
|
|
1327
|
-
returnFocus: barRef,
|
|
1328
|
-
footer: /* @__PURE__ */ jsxs8(Fragment4, {
|
|
1329
|
-
children: [
|
|
1330
|
-
/* @__PURE__ */ jsx13(Button2, {
|
|
1331
|
-
ref: cancelDiscard,
|
|
1332
|
-
variant: "ghost",
|
|
1333
|
-
onClick: () => dispatch({ type: "discardDialogChanged", open: false }),
|
|
1334
|
-
children: "Cancel"
|
|
1335
|
-
}),
|
|
1336
|
-
/* @__PURE__ */ jsx13(Button2, {
|
|
1337
|
-
className: "altertable-annotation-discard-confirm",
|
|
1338
|
-
disabled: locked,
|
|
1339
|
-
onClick: discardAnnotations,
|
|
1340
|
-
children: "Discard"
|
|
1341
|
-
})
|
|
1342
|
-
]
|
|
1343
|
-
}),
|
|
1344
|
-
children: /* @__PURE__ */ jsx13("p", {
|
|
1345
|
-
className: "altertable-annotation-discard-description",
|
|
1346
|
-
children: "These annotations will be removed and won’t be sent to the agent."
|
|
1347
|
-
})
|
|
1348
|
-
})
|
|
1349
|
-
]
|
|
1350
|
-
});
|
|
645
|
+
/** Host-owned batch controls. Collection changes and agent submission stay with the outer app. */
|
|
646
|
+
function AnnotationBar({ ref, annotations, active = true, theme = "light", disabled = false, deletedAnnotationId, onUndoDelete, onDismissUndo, hasUnsavedChanges = false, pinsVisible, onPinsVisibleChange, onSelect, onDelete, onClear, requestDiscard, onSend, onClose }) {
|
|
647
|
+
const reviewElement = useRef(null);
|
|
648
|
+
const reviewTrigger = useRef(null);
|
|
649
|
+
const cancelDiscard = useRef(null);
|
|
650
|
+
const barRef = useRef(null);
|
|
651
|
+
const drag = useRef(void 0);
|
|
652
|
+
const submitting = useRef(false);
|
|
653
|
+
const [state, dispatch] = useReducer(annotationBarReducer, {
|
|
654
|
+
reviewOpen: false,
|
|
655
|
+
pending: false,
|
|
656
|
+
error: "",
|
|
657
|
+
discardOpen: false,
|
|
658
|
+
observedActive: active
|
|
659
|
+
});
|
|
660
|
+
const { position, reviewOpen, pending, error, discardOpen, previewId } = state;
|
|
661
|
+
const preview = annotations.find((annotation) => annotation.id === previewId);
|
|
662
|
+
const locked = disabled || pending;
|
|
663
|
+
const canSend = active && !locked && !hasUnsavedChanges && annotations.length > 0;
|
|
664
|
+
const { refs, floatingStyles } = useFloating({
|
|
665
|
+
placement: "top",
|
|
666
|
+
strategy: "fixed",
|
|
667
|
+
middleware: [
|
|
668
|
+
offset(10),
|
|
669
|
+
flip(),
|
|
670
|
+
shift({ padding: 12 })
|
|
671
|
+
],
|
|
672
|
+
whileElementsMounted: autoUpdate
|
|
673
|
+
});
|
|
674
|
+
const barElementRef = useMergeRefs([refs.setReference, barRef]);
|
|
675
|
+
const reviewRef = useMergeRefs([refs.setFloating, reviewElement]);
|
|
676
|
+
function move(left, top) {
|
|
677
|
+
const rect = barRef.current?.getBoundingClientRect();
|
|
678
|
+
if (!rect) return;
|
|
679
|
+
dispatch({
|
|
680
|
+
type: "positionMoved",
|
|
681
|
+
position: {
|
|
682
|
+
left: Math.max(12, Math.min(left, window.innerWidth - rect.width - 12)),
|
|
683
|
+
top: Math.max(12, Math.min(top, window.innerHeight - rect.height - 12))
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
const keepInViewport = useEffectEvent(() => {
|
|
688
|
+
if (position) move(position.left, position.top);
|
|
689
|
+
});
|
|
690
|
+
useEffect(() => {
|
|
691
|
+
window.addEventListener("resize", keepInViewport);
|
|
692
|
+
return () => window.removeEventListener("resize", keepInViewport);
|
|
693
|
+
}, []);
|
|
694
|
+
useEffect(() => {
|
|
695
|
+
if (reviewOpen) reviewElement.current?.querySelector("button")?.focus();
|
|
696
|
+
}, [reviewOpen]);
|
|
697
|
+
if (state.observedActive !== active) dispatch({
|
|
698
|
+
type: "annotationModeObserved",
|
|
699
|
+
active
|
|
700
|
+
});
|
|
701
|
+
function closeReview() {
|
|
702
|
+
dispatch({ type: "reviewClosed" });
|
|
703
|
+
reviewTrigger.current?.focus();
|
|
704
|
+
}
|
|
705
|
+
async function send() {
|
|
706
|
+
if (submitting.current || !canSend) return;
|
|
707
|
+
submitting.current = true;
|
|
708
|
+
dispatch({ type: "submissionStarted" });
|
|
709
|
+
try {
|
|
710
|
+
await onSend(annotations.map(parseDataAppAnnotationDraft));
|
|
711
|
+
dispatch({ type: "submissionAccepted" });
|
|
712
|
+
} catch {
|
|
713
|
+
dispatch({ type: "submissionFailed" });
|
|
714
|
+
} finally {
|
|
715
|
+
submitting.current = false;
|
|
716
|
+
dispatch({ type: "submissionFinished" });
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
useImperativeHandle(ref, () => ({ send }));
|
|
720
|
+
useEffect(() => {
|
|
721
|
+
if (discardOpen) cancelDiscard.current?.focus();
|
|
722
|
+
}, [discardOpen]);
|
|
723
|
+
function discardAnnotations() {
|
|
724
|
+
dispatch({ type: "annotationsDiscarded" });
|
|
725
|
+
onClear();
|
|
726
|
+
onClose();
|
|
727
|
+
}
|
|
728
|
+
const undo = deletedAnnotationId && onUndoDelete ? /* @__PURE__ */ jsxs("div", {
|
|
729
|
+
className: "altertable-annotation-undo",
|
|
730
|
+
"data-theme": theme,
|
|
731
|
+
"data-inline": active && reviewOpen && annotations.length > 0 || void 0,
|
|
732
|
+
"data-bar-visible": active && annotations.length > 0 || void 0,
|
|
733
|
+
children: [
|
|
734
|
+
/* @__PURE__ */ jsx("output", { children: "Annotation deleted" }),
|
|
735
|
+
/* @__PURE__ */ jsx(Button, {
|
|
736
|
+
variant: "ghost",
|
|
737
|
+
onClick: () => onUndoDelete(deletedAnnotationId),
|
|
738
|
+
children: "Undo"
|
|
739
|
+
}),
|
|
740
|
+
onDismissUndo && /* @__PURE__ */ jsx(Button, {
|
|
741
|
+
variant: "ghost",
|
|
742
|
+
size: "icon-compact",
|
|
743
|
+
"aria-label": "Dismiss deleted annotation",
|
|
744
|
+
onClick: onDismissUndo,
|
|
745
|
+
children: /* @__PURE__ */ jsx(X, {
|
|
746
|
+
size: 14,
|
|
747
|
+
"aria-hidden": true
|
|
748
|
+
})
|
|
749
|
+
})
|
|
750
|
+
]
|
|
751
|
+
}) : null;
|
|
752
|
+
if (annotations.length === 0 && !deletedAnnotationId) return null;
|
|
753
|
+
const style = position ? {
|
|
754
|
+
left: position.left,
|
|
755
|
+
top: position.top,
|
|
756
|
+
bottom: "auto",
|
|
757
|
+
transform: "none"
|
|
758
|
+
} : {};
|
|
759
|
+
return /* @__PURE__ */ jsxs(TooltipProvider, { children: [
|
|
760
|
+
active && annotations.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
761
|
+
ref: barElementRef,
|
|
762
|
+
className: "altertable-annotation-bar",
|
|
763
|
+
"data-theme": theme,
|
|
764
|
+
style,
|
|
765
|
+
tabIndex: -1,
|
|
766
|
+
role: "toolbar",
|
|
767
|
+
"aria-label": "Annotations",
|
|
768
|
+
onKeyDown: (event) => {
|
|
769
|
+
if (event.key !== "Escape" || locked || hasUnsavedChanges) return;
|
|
770
|
+
event.preventDefault();
|
|
771
|
+
if (reviewOpen) closeReview();
|
|
772
|
+
else onClose();
|
|
773
|
+
},
|
|
774
|
+
children: [
|
|
775
|
+
/* @__PURE__ */ jsx(Button, {
|
|
776
|
+
variant: "ghost",
|
|
777
|
+
size: "icon-compact",
|
|
778
|
+
"aria-label": "Move annotation bar",
|
|
779
|
+
"data-atbl-internal-drag-handle": true,
|
|
780
|
+
disabled: locked,
|
|
781
|
+
onPointerDown: (event) => {
|
|
782
|
+
const rect = barRef.current?.getBoundingClientRect();
|
|
783
|
+
if (!rect) return;
|
|
784
|
+
drag.current = {
|
|
785
|
+
x: event.clientX,
|
|
786
|
+
y: event.clientY,
|
|
787
|
+
left: rect.left,
|
|
788
|
+
top: rect.top
|
|
789
|
+
};
|
|
790
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
791
|
+
},
|
|
792
|
+
onPointerMove: (event) => {
|
|
793
|
+
const origin = drag.current;
|
|
794
|
+
if (origin) move(origin.left + event.clientX - origin.x, origin.top + event.clientY - origin.y);
|
|
795
|
+
},
|
|
796
|
+
onPointerUp: () => {
|
|
797
|
+
drag.current = void 0;
|
|
798
|
+
},
|
|
799
|
+
onPointerCancel: () => {
|
|
800
|
+
drag.current = void 0;
|
|
801
|
+
},
|
|
802
|
+
onKeyDown: (event) => {
|
|
803
|
+
const delta = {
|
|
804
|
+
ArrowLeft: [-10, 0],
|
|
805
|
+
ArrowRight: [10, 0],
|
|
806
|
+
ArrowUp: [0, -10],
|
|
807
|
+
ArrowDown: [0, 10]
|
|
808
|
+
}[event.key];
|
|
809
|
+
const rect = barRef.current?.getBoundingClientRect();
|
|
810
|
+
if (!delta || !rect) return;
|
|
811
|
+
event.preventDefault();
|
|
812
|
+
move(rect.left + delta[0], rect.top + delta[1]);
|
|
813
|
+
},
|
|
814
|
+
children: /* @__PURE__ */ jsx(GripVertical, {
|
|
815
|
+
size: 16,
|
|
816
|
+
"aria-hidden": true
|
|
817
|
+
})
|
|
818
|
+
}),
|
|
819
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
820
|
+
ref: reviewTrigger,
|
|
821
|
+
className: "altertable-annotation-bar-count",
|
|
822
|
+
variant: "ghost",
|
|
823
|
+
size: "compact",
|
|
824
|
+
"aria-label": "Review annotations",
|
|
825
|
+
"aria-expanded": reviewOpen && annotations.length > 0,
|
|
826
|
+
"aria-haspopup": "dialog",
|
|
827
|
+
disabled: locked || !annotations.length,
|
|
828
|
+
onClick: () => dispatch({ type: "reviewToggled" }),
|
|
829
|
+
children: ["Annotating · ", annotations.length]
|
|
830
|
+
}),
|
|
831
|
+
/* @__PURE__ */ jsx(AnnotationTooltip, {
|
|
832
|
+
content: pinsVisible ? "Hide annotation pins" : "Show annotation pins",
|
|
833
|
+
theme,
|
|
834
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
835
|
+
variant: "ghost",
|
|
836
|
+
size: "icon-compact",
|
|
837
|
+
"aria-label": pinsVisible ? "Hide annotation pins" : "Show annotation pins",
|
|
838
|
+
"aria-pressed": !pinsVisible,
|
|
839
|
+
disabled: locked,
|
|
840
|
+
onClick: () => onPinsVisibleChange(!pinsVisible),
|
|
841
|
+
children: pinsVisible ? /* @__PURE__ */ jsx(EyeOff, {
|
|
842
|
+
size: 16,
|
|
843
|
+
"aria-hidden": true
|
|
844
|
+
}) : /* @__PURE__ */ jsx(Eye, {
|
|
845
|
+
size: 16,
|
|
846
|
+
"aria-hidden": true
|
|
847
|
+
})
|
|
848
|
+
})
|
|
849
|
+
}),
|
|
850
|
+
/* @__PURE__ */ jsx(AnnotationTooltip, {
|
|
851
|
+
content: "Discard all annotations",
|
|
852
|
+
theme,
|
|
853
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
854
|
+
variant: "ghost",
|
|
855
|
+
size: "icon-compact",
|
|
856
|
+
"aria-label": "Discard all annotations",
|
|
857
|
+
disabled: locked,
|
|
858
|
+
onClick: () => requestDiscard ? requestDiscard(discardAnnotations) : dispatch({
|
|
859
|
+
type: "discardDialogChanged",
|
|
860
|
+
open: true
|
|
861
|
+
}),
|
|
862
|
+
children: /* @__PURE__ */ jsx(Trash2, {
|
|
863
|
+
size: 16,
|
|
864
|
+
"aria-hidden": true
|
|
865
|
+
})
|
|
866
|
+
})
|
|
867
|
+
}),
|
|
868
|
+
/* @__PURE__ */ jsx(AnnotationTooltip, {
|
|
869
|
+
content: hasUnsavedChanges ? "Save the open annotation before sending" : /* @__PURE__ */ jsxs(Fragment$1, { children: ["Send annotations ", /* @__PURE__ */ jsx(Kbd, { shortcut: shortcuts.sendAnnotations })] }),
|
|
870
|
+
theme,
|
|
871
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
872
|
+
className: "altertable-annotation-bar-send",
|
|
873
|
+
"data-pending": pending || void 0,
|
|
874
|
+
"aria-busy": pending,
|
|
875
|
+
size: "compact",
|
|
876
|
+
"aria-label": "Send annotations",
|
|
877
|
+
disabled: !canSend,
|
|
878
|
+
onClick: () => void send(),
|
|
879
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
880
|
+
className: "altertable-annotation-bar-send-label",
|
|
881
|
+
children: "Send"
|
|
882
|
+
}), pending && /* @__PURE__ */ jsx(LoaderCircle, {
|
|
883
|
+
className: "altertable-annotation-bar-spinner",
|
|
884
|
+
size: 16,
|
|
885
|
+
"aria-hidden": true
|
|
886
|
+
})]
|
|
887
|
+
})
|
|
888
|
+
}),
|
|
889
|
+
/* @__PURE__ */ jsx(AnnotationTooltip, {
|
|
890
|
+
content: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
891
|
+
hasUnsavedChanges ? "Save or discard the open annotation first" : "Exit annotation mode",
|
|
892
|
+
" ",
|
|
893
|
+
/* @__PURE__ */ jsx(Kbd, { children: "Esc" })
|
|
894
|
+
] }),
|
|
895
|
+
theme,
|
|
896
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
897
|
+
variant: "ghost",
|
|
898
|
+
size: "icon-compact",
|
|
899
|
+
"aria-label": "Exit annotation mode",
|
|
900
|
+
disabled: locked || hasUnsavedChanges,
|
|
901
|
+
onClick: onClose,
|
|
902
|
+
children: /* @__PURE__ */ jsx(X, {
|
|
903
|
+
size: 16,
|
|
904
|
+
"aria-hidden": true
|
|
905
|
+
})
|
|
906
|
+
})
|
|
907
|
+
}),
|
|
908
|
+
error && /* @__PURE__ */ jsx("output", {
|
|
909
|
+
className: "altertable-annotation-bar-error",
|
|
910
|
+
role: "alert",
|
|
911
|
+
children: error
|
|
912
|
+
})
|
|
913
|
+
]
|
|
914
|
+
}),
|
|
915
|
+
(!active || !reviewOpen || annotations.length === 0) && undo && createPortal(undo, document.body),
|
|
916
|
+
active && reviewOpen && annotations.length > 0 && createPortal(/* @__PURE__ */ jsxs("dialog", {
|
|
917
|
+
open: true,
|
|
918
|
+
ref: reviewRef,
|
|
919
|
+
className: "altertable-annotation-bar-panel",
|
|
920
|
+
"data-theme": theme,
|
|
921
|
+
style: floatingStyles,
|
|
922
|
+
"aria-label": "Review annotations",
|
|
923
|
+
onKeyDown: (event) => {
|
|
924
|
+
if (event.key === "Escape") {
|
|
925
|
+
event.preventDefault();
|
|
926
|
+
closeReview();
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
children: [
|
|
930
|
+
/* @__PURE__ */ jsxs("header", { children: [/* @__PURE__ */ jsx("strong", { children: "Annotations" }), /* @__PURE__ */ jsx(Button, {
|
|
931
|
+
variant: "ghost",
|
|
932
|
+
size: "icon-compact",
|
|
933
|
+
"aria-label": "Minimize annotation review",
|
|
934
|
+
onClick: closeReview,
|
|
935
|
+
children: /* @__PURE__ */ jsx(Minus, {
|
|
936
|
+
size: 16,
|
|
937
|
+
"aria-hidden": true
|
|
938
|
+
})
|
|
939
|
+
})] }),
|
|
940
|
+
/* @__PURE__ */ jsx("div", {
|
|
941
|
+
"aria-label": "Annotation drafts",
|
|
942
|
+
children: annotations.map((annotation, index) => /* @__PURE__ */ jsxs("div", {
|
|
943
|
+
className: "altertable-annotation-bar-row",
|
|
944
|
+
children: [
|
|
945
|
+
annotation.context.screenshot && /* @__PURE__ */ jsx("button", {
|
|
946
|
+
"data-atbl-focus": "ring",
|
|
947
|
+
"data-atbl-control": "action",
|
|
948
|
+
type: "button",
|
|
949
|
+
className: "altertable-annotation-thumbnail",
|
|
950
|
+
"aria-label": `View screenshot of ${annotation.target.label}`,
|
|
951
|
+
onClick: () => dispatch({
|
|
952
|
+
type: "previewOpened",
|
|
953
|
+
id: annotation.id
|
|
954
|
+
}),
|
|
955
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
956
|
+
src: annotation.context.screenshot.dataUrl,
|
|
957
|
+
alt: ""
|
|
958
|
+
})
|
|
959
|
+
}),
|
|
960
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
961
|
+
variant: "ghost",
|
|
962
|
+
className: "altertable-annotation-bar-open",
|
|
963
|
+
"aria-label": `Open annotation ${index + 1}`,
|
|
964
|
+
disabled: locked,
|
|
965
|
+
onClick: () => {
|
|
966
|
+
onPinsVisibleChange(true);
|
|
967
|
+
onSelect(annotation.id);
|
|
968
|
+
dispatch({ type: "reviewClosed" });
|
|
969
|
+
},
|
|
970
|
+
children: [/* @__PURE__ */ jsx("strong", { children: annotation.target.label }), /* @__PURE__ */ jsx("span", { children: annotation.comment })]
|
|
971
|
+
}),
|
|
972
|
+
/* @__PURE__ */ jsx(Button, {
|
|
973
|
+
variant: "ghost",
|
|
974
|
+
size: "icon-compact",
|
|
975
|
+
"aria-label": `Delete annotation ${index + 1}`,
|
|
976
|
+
disabled: locked,
|
|
977
|
+
onClick: () => onDelete(annotation.id),
|
|
978
|
+
children: /* @__PURE__ */ jsx(Trash2, {
|
|
979
|
+
size: 16,
|
|
980
|
+
"aria-hidden": true
|
|
981
|
+
})
|
|
982
|
+
})
|
|
983
|
+
]
|
|
984
|
+
}, annotation.id))
|
|
985
|
+
}),
|
|
986
|
+
undo
|
|
987
|
+
]
|
|
988
|
+
}), document.body),
|
|
989
|
+
/* @__PURE__ */ jsx(Sheet, {
|
|
990
|
+
open: Boolean(preview),
|
|
991
|
+
onOpenChange: (open) => {
|
|
992
|
+
if (!open) dispatch({ type: "previewClosed" });
|
|
993
|
+
},
|
|
994
|
+
placement: "center",
|
|
995
|
+
className: "altertable-annotation-image-dialog",
|
|
996
|
+
title: preview?.target.label ?? "Screenshot",
|
|
997
|
+
description: preview?.comment,
|
|
998
|
+
returnFocus: reviewTrigger,
|
|
999
|
+
children: preview?.context.screenshot && /* @__PURE__ */ jsx("img", {
|
|
1000
|
+
className: "altertable-annotation-preview",
|
|
1001
|
+
src: preview.context.screenshot.dataUrl,
|
|
1002
|
+
alt: `Captured area for ${preview.target.label}`
|
|
1003
|
+
})
|
|
1004
|
+
}),
|
|
1005
|
+
!requestDiscard && /* @__PURE__ */ jsx(Sheet, {
|
|
1006
|
+
open: discardOpen,
|
|
1007
|
+
onOpenChange: (open) => dispatch({
|
|
1008
|
+
type: "discardDialogChanged",
|
|
1009
|
+
open
|
|
1010
|
+
}),
|
|
1011
|
+
placement: "center",
|
|
1012
|
+
title: "Discard all pending annotations?",
|
|
1013
|
+
returnFocus: barRef,
|
|
1014
|
+
footer: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
1015
|
+
ref: cancelDiscard,
|
|
1016
|
+
variant: "ghost",
|
|
1017
|
+
onClick: () => dispatch({
|
|
1018
|
+
type: "discardDialogChanged",
|
|
1019
|
+
open: false
|
|
1020
|
+
}),
|
|
1021
|
+
children: "Cancel"
|
|
1022
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1023
|
+
className: "altertable-annotation-discard-confirm",
|
|
1024
|
+
disabled: locked,
|
|
1025
|
+
onClick: discardAnnotations,
|
|
1026
|
+
children: "Discard"
|
|
1027
|
+
})] }),
|
|
1028
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1029
|
+
className: "altertable-annotation-discard-description",
|
|
1030
|
+
children: "These annotations will be removed and won’t be sent to the agent."
|
|
1031
|
+
})
|
|
1032
|
+
})
|
|
1033
|
+
] });
|
|
1351
1034
|
}
|
|
1352
|
-
|
|
1035
|
+
//#endregion
|
|
1036
|
+
//#region src/annotations/styles.ts
|
|
1037
|
+
/** Install only the outer-frame annotation controls; leave host page typography and layout intact. */
|
|
1353
1038
|
function injectDataAppAnnotationStyles(options = {}) {
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
css: `/* packages/data-app-react/src/tokens.css */
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
--atbl-background: var(--atbl-palette-background);
|
|
1361
|
-
--atbl-surface: var(--atbl-palette-surface);
|
|
1362
|
-
--atbl-subtle: var(--atbl-palette-subtle);
|
|
1363
|
-
--atbl-backdrop: #0f171e38;
|
|
1364
|
-
--atbl-text: var(--atbl-palette-text);
|
|
1365
|
-
--atbl-muted: var(--atbl-palette-muted);
|
|
1366
|
-
--atbl-border: var(--atbl-palette-border);
|
|
1367
|
-
--atbl-accent: var(--atbl-palette-accent);
|
|
1368
|
-
--atbl-on-accent: var(--atbl-palette-on-accent);
|
|
1369
|
-
--atbl-positive: var(--atbl-palette-positive);
|
|
1370
|
-
--atbl-danger: var(--atbl-palette-danger);
|
|
1371
|
-
--atbl-code-surface: #f4f6f9;
|
|
1372
|
-
--atbl-code-text: #273242;
|
|
1373
|
-
--atbl-mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
1374
|
-
--atbl-focus-ring-offset: 2px;
|
|
1375
|
-
--atbl-focus-ring-inset: -1px;
|
|
1376
|
-
--atbl-font: var(--atbl-input-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, ui-sans-serif, sans-serif);
|
|
1377
|
-
--atbl-space-xs: 5px;
|
|
1378
|
-
--atbl-space-sm: 10px;
|
|
1379
|
-
--atbl-space-md: 16px;
|
|
1380
|
-
--atbl-space-lg: 24px;
|
|
1381
|
-
--atbl-space-xl: 32px;
|
|
1382
|
-
--atbl-content-width: 1920px;
|
|
1383
|
-
--atbl-control-height: 2.375rem;
|
|
1384
|
-
--atbl-control-compact-height: 1.875rem;
|
|
1385
|
-
--atbl-control-icon-size: 1rem;
|
|
1386
|
-
--atbl-control-padding-inline: .75rem;
|
|
1387
|
-
--atbl-control-padding-block: .375rem;
|
|
1388
|
-
--atbl-control-gap: .5rem;
|
|
1389
|
-
--atbl-control-disabled-opacity: .5;
|
|
1390
|
-
--atbl-dropdown-padding: calc(var(--atbl-control-padding-block) * 2 / 3);
|
|
1391
|
-
--atbl-dropdown-item-padding-block: var(--atbl-control-padding-block);
|
|
1392
|
-
--atbl-dropdown-item-padding-inline: calc(var(--atbl-control-padding-inline) * 3 / 4);
|
|
1393
|
-
--atbl-dropdown-item-gap: 2px;
|
|
1394
|
-
--atbl-radius-control: 7px;
|
|
1395
|
-
--atbl-radius-surface: 12px;
|
|
1396
|
-
--atbl-radius-overlay: 16px;
|
|
1397
|
-
--atbl-shadow-surface: 0 3px 16px #141c280d;
|
|
1398
|
-
--atbl-shadow-overlay: 0 18px 50px #00000029;
|
|
1399
|
-
--atbl-shadow-control: 0 1px 3px #0000001a;
|
|
1400
|
-
--atbl-cursor-action: pointer;
|
|
1401
|
-
--atbl-cursor-disabled: default;
|
|
1402
|
-
--atbl-cursor-help: help;
|
|
1403
|
-
--atbl-cursor-busy: progress;
|
|
1404
|
-
--atbl-duration-fast: .12s;
|
|
1405
|
-
--atbl-duration-normal: .18s;
|
|
1406
|
-
--atbl-duration-slow: .24s;
|
|
1407
|
-
--atbl-ease-standard: ease;
|
|
1408
|
-
--atbl-ease-enter: cubic-bezier(.2, .7, .2, 1);
|
|
1409
|
-
--atbl-chart-1: color-mix(in srgb, var(--atbl-input-chart-1, #285fc0) var(--atbl-chart-strength), white);
|
|
1410
|
-
--atbl-chart-2: color-mix(in srgb, var(--atbl-input-chart-2, #a95319) var(--atbl-chart-strength), white);
|
|
1411
|
-
--atbl-chart-3: color-mix(in srgb, var(--atbl-input-chart-3, #147862) var(--atbl-chart-strength), white);
|
|
1412
|
-
--atbl-chart-4: color-mix(in srgb, var(--atbl-input-chart-4, #7243aa) var(--atbl-chart-strength), white);
|
|
1413
|
-
--atbl-chart-5: color-mix(in srgb, var(--atbl-input-chart-5, #aa3958) var(--atbl-chart-strength), white);
|
|
1414
|
-
--atbl-chart-6: color-mix(in srgb, var(--atbl-input-chart-6, #475569) var(--atbl-chart-strength), white);
|
|
1415
|
-
--atbl-chart-7: color-mix(in srgb, var(--atbl-input-chart-7, #285fc0) var(--atbl-chart-strength), white);
|
|
1416
|
-
--atbl-chart-8: color-mix(in srgb, var(--atbl-input-chart-8, #a95319) var(--atbl-chart-strength), white);
|
|
1417
|
-
--atbl-type-emphasis-weight: 680;
|
|
1418
|
-
--atbl-type-meta-weight: 500;
|
|
1419
|
-
--atbl-type-page-size: clamp(1.375rem, 2.4vw, 1.75rem);
|
|
1420
|
-
--atbl-type-section-size: 1.25rem;
|
|
1421
|
-
--atbl-type-widget-size: var(--atbl-type-label-size);
|
|
1422
|
-
--atbl-type-body-size: .875rem;
|
|
1423
|
-
--atbl-type-label-size: .8125rem;
|
|
1424
|
-
--atbl-type-meta-size: .75rem;
|
|
1425
|
-
--atbl-type-metric-size: clamp(1.625rem, 3vw, 2.125rem);
|
|
1426
|
-
--atbl-type-heading-weight: 650;
|
|
1427
|
-
--atbl-type-label-weight: 600;
|
|
1428
|
-
--atbl-type-body-leading: 1.65;
|
|
1429
|
-
--atbl-type-label-leading: 1.4;
|
|
1430
|
-
--atbl-type-heading-leading: 1.3;
|
|
1431
|
-
--atbl-type-metric-leading: 1.08;
|
|
1432
|
-
--atbl-text-measure: 70ch;
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
/* packages/data-app-react/src/appearance.css */
|
|
1437
|
-
@layer atbl.tokens {
|
|
1438
|
-
:root {
|
|
1439
|
-
--atbl-palette-background: #fff;
|
|
1440
|
-
--atbl-palette-surface: #fff;
|
|
1441
|
-
--atbl-palette-subtle: #f6f7f7;
|
|
1442
|
-
--atbl-palette-text: #202124;
|
|
1443
|
-
--atbl-palette-muted: #687078;
|
|
1444
|
-
--atbl-palette-border: #e3e6e8;
|
|
1445
|
-
--atbl-palette-accent: var(--atbl-input-accent, var(--atbl-text));
|
|
1446
|
-
--atbl-palette-on-accent: var(--atbl-input-on-accent, #fff);
|
|
1447
|
-
--atbl-palette-positive: #147862;
|
|
1448
|
-
--atbl-palette-danger: #b42318;
|
|
1449
|
-
--atbl-chart-strength: 100%;
|
|
1450
|
-
--atbl-accent-subtle-strength: 12%;
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
:root[data-atbl-theme="dark"] {
|
|
1454
|
-
--atbl-palette-background: #151719;
|
|
1455
|
-
--atbl-palette-surface: #202326;
|
|
1456
|
-
--atbl-palette-subtle: #292d31;
|
|
1457
|
-
--atbl-palette-text: #f2f3f4;
|
|
1458
|
-
--atbl-palette-muted: #aeb5bc;
|
|
1459
|
-
--atbl-palette-border: #3b4248;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
:root[data-atbl-base-color="slate"] {
|
|
1463
|
-
--atbl-palette-background: #f8fafc;
|
|
1464
|
-
--atbl-palette-surface: #fff;
|
|
1465
|
-
--atbl-palette-subtle: #f1f5f9;
|
|
1466
|
-
--atbl-palette-text: #17212f;
|
|
1467
|
-
--atbl-palette-muted: #607083;
|
|
1468
|
-
--atbl-palette-border: #dce3ea;
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
:root[data-atbl-base-color="slate"][data-atbl-theme="dark"] {
|
|
1472
|
-
--atbl-palette-background: #111820;
|
|
1473
|
-
--atbl-palette-surface: #1b2530;
|
|
1474
|
-
--atbl-palette-subtle: #263340;
|
|
1475
|
-
--atbl-palette-text: #f0f4f8;
|
|
1476
|
-
--atbl-palette-muted: #a8b5c3;
|
|
1477
|
-
--atbl-palette-border: #3a4857;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
:root[data-atbl-base-color="warm"] {
|
|
1481
|
-
--atbl-palette-background: #fbfaf8;
|
|
1482
|
-
--atbl-palette-surface: #fff;
|
|
1483
|
-
--atbl-palette-subtle: #f5f2ed;
|
|
1484
|
-
--atbl-palette-text: #292723;
|
|
1485
|
-
--atbl-palette-muted: #736e66;
|
|
1486
|
-
--atbl-palette-border: #e8e2da;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
:root[data-atbl-base-color="warm"][data-atbl-theme="dark"] {
|
|
1490
|
-
--atbl-palette-background: #1b1916;
|
|
1491
|
-
--atbl-palette-surface: #25221e;
|
|
1492
|
-
--atbl-palette-subtle: #302c27;
|
|
1493
|
-
--atbl-palette-text: #f5f1eb;
|
|
1494
|
-
--atbl-palette-muted: #bcb3a8;
|
|
1495
|
-
--atbl-palette-border: #494239;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
:root[data-atbl-theme="dark"] {
|
|
1499
|
-
--atbl-palette-accent: var(--atbl-input-dark-accent, var(--atbl-text));
|
|
1500
|
-
--atbl-accent-subtle-strength: 22%;
|
|
1501
|
-
--atbl-palette-on-accent: var(--atbl-input-on-accent, var(--atbl-background));
|
|
1502
|
-
--atbl-palette-positive: #6bc39a;
|
|
1503
|
-
--atbl-palette-danger: #f97066;
|
|
1504
|
-
--atbl-backdrop: #0000008c;
|
|
1505
|
-
--atbl-code-surface: #242a31;
|
|
1506
|
-
--atbl-code-text: #e5e9ef;
|
|
1507
|
-
--atbl-chart-strength: 60%;
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
:root[data-atbl-density="compact"] {
|
|
1511
|
-
--atbl-control-height: 2.125rem;
|
|
1512
|
-
--atbl-control-compact-height: 1.625rem;
|
|
1513
|
-
--atbl-control-gap: .375rem;
|
|
1514
|
-
--atbl-control-padding-inline: .625rem;
|
|
1515
|
-
--atbl-control-padding-block: .25rem;
|
|
1516
|
-
--atbl-space-xs: 4px;
|
|
1517
|
-
--atbl-space-sm: 8px;
|
|
1518
|
-
--atbl-space-md: 12px;
|
|
1519
|
-
--atbl-space-lg: 18px;
|
|
1520
|
-
--atbl-space-xl: 24px;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
:root[data-atbl-density="spacious"] {
|
|
1524
|
-
--atbl-control-height: 2.625rem;
|
|
1525
|
-
--atbl-control-compact-height: 2.125rem;
|
|
1526
|
-
--atbl-control-gap: .625rem;
|
|
1527
|
-
--atbl-control-padding-inline: 1rem;
|
|
1528
|
-
--atbl-control-padding-block: .5rem;
|
|
1529
|
-
--atbl-space-xs: 6px;
|
|
1530
|
-
--atbl-space-sm: 12px;
|
|
1531
|
-
--atbl-space-md: 20px;
|
|
1532
|
-
--atbl-space-lg: 30px;
|
|
1533
|
-
--atbl-space-xl: 40px;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
:root[data-atbl-radius="none"] {
|
|
1537
|
-
--atbl-radius-control: 0px;
|
|
1538
|
-
--atbl-radius-surface: 0px;
|
|
1539
|
-
--atbl-radius-overlay: 0px;
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
:root[data-atbl-radius="small"] {
|
|
1543
|
-
--atbl-radius-control: 4px;
|
|
1544
|
-
--atbl-radius-surface: 7px;
|
|
1545
|
-
--atbl-radius-overlay: 9px;
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
:root[data-atbl-radius="large"] {
|
|
1549
|
-
--atbl-radius-control: 10px;
|
|
1550
|
-
--atbl-radius-surface: 18px;
|
|
1551
|
-
--atbl-radius-overlay: 24px;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
:root[data-atbl-elevation="flat"] {
|
|
1555
|
-
--atbl-shadow-surface: none;
|
|
1556
|
-
--atbl-shadow-overlay: none;
|
|
1557
|
-
--atbl-shadow-control: none;
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
:root[data-atbl-elevation="raised"] {
|
|
1561
|
-
--atbl-shadow-surface: 0 8px 28px #141c281a;
|
|
1562
|
-
--atbl-shadow-overlay: 0 24px 72px #0000003d;
|
|
1563
|
-
--atbl-shadow-control: 0 2px 6px #00000029;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
@media (forced-colors: active) {
|
|
1567
|
-
:root {
|
|
1568
|
-
--atbl-focus-color: Highlight !important;
|
|
1569
|
-
--atbl-on-accent: HighlightText !important;
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
/* packages/data-app-react/src/base.css */
|
|
1575
|
-
@layer atbl.base {
|
|
1576
|
-
:where([class^="altertable-"], [class*=" altertable-"]) {
|
|
1577
|
-
box-sizing: border-box;
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
:where([class^="altertable-"], [class*=" altertable-"]) * {
|
|
1581
|
-
box-sizing: border-box;
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
:where([class^="starter-"], [class*=" starter-"]) * {
|
|
1585
|
-
box-sizing: border-box;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
:where([class^="altertable-"], [class*=" altertable-"]) button {
|
|
1589
|
-
font: inherit;
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
:root[data-atbl-appearance] {
|
|
1593
|
-
scrollbar-gutter: stable;
|
|
1594
|
-
font-family: var(--atbl-font);
|
|
1595
|
-
color: var(--atbl-text);
|
|
1596
|
-
background: var(--atbl-background);
|
|
1597
|
-
font-synthesis: none;
|
|
1598
|
-
-webkit-font-smoothing: antialiased;
|
|
1599
|
-
text-rendering: optimizeLegibility;
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
:root[data-atbl-theme="light"] {
|
|
1603
|
-
--buncss-light: initial;
|
|
1604
|
-
--buncss-dark: ;
|
|
1605
|
-
color-scheme: light;
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
:root[data-atbl-theme="dark"] {
|
|
1609
|
-
--buncss-light: ;
|
|
1610
|
-
--buncss-dark: initial;
|
|
1611
|
-
color-scheme: dark;
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
:root[data-atbl-appearance] body, :root[data-atbl-appearance] #root {
|
|
1615
|
-
margin: 0;
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
.altertable-sr-only {
|
|
1619
|
-
position: fixed;
|
|
1620
|
-
overflow: hidden;
|
|
1621
|
-
clip: rect(0, 0, 0, 0);
|
|
1622
|
-
clip-path: inset(50%);
|
|
1623
|
-
white-space: nowrap;
|
|
1624
|
-
border: 0;
|
|
1625
|
-
width: 1px;
|
|
1626
|
-
height: 1px;
|
|
1627
|
-
margin: -1px;
|
|
1628
|
-
padding: 0;
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
/* packages/data-app-react/src/annotations/colors.css */
|
|
1633
|
-
@layer atbl.components {
|
|
1634
|
-
:root {
|
|
1635
|
-
--atbl-annotation-accent: #c026d3;
|
|
1636
|
-
--atbl-annotation-accent-hover: #a21caf;
|
|
1637
|
-
--atbl-annotation-on-accent: #fff;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
.altertable-annotation-trigger, .altertable-annotation-composer {
|
|
1641
|
-
--atbl-control-selected-surface: var(--atbl-annotation-accent);
|
|
1642
|
-
--atbl-control-selected-text: var(--atbl-annotation-on-accent);
|
|
1643
|
-
--atbl-focus-outline: 2px solid var(--atbl-annotation-accent);
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
.altertable-annotation-trigger[aria-pressed="true"], .altertable-annotation-trigger:not([aria-pressed]) {
|
|
1647
|
-
background: var(--atbl-annotation-accent);
|
|
1648
|
-
color: var(--atbl-annotation-on-accent);
|
|
1649
|
-
border-color: #0000;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.altertable-annotation-trigger[aria-pressed="true"]:hover:not(:disabled) {
|
|
1653
|
-
--atbl-control-selected-surface: var(--atbl-annotation-accent-hover);
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
.altertable-annotation-trigger:not([aria-pressed]) {
|
|
1657
|
-
--atbl-control-hover-surface: var(--atbl-annotation-accent-hover);
|
|
1658
|
-
--atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
/* packages/data-app-react/src/ui/Button.css */
|
|
1663
|
-
@layer atbl.components {
|
|
1664
|
-
.altertable-button {
|
|
1665
|
-
display: inline-flex;
|
|
1666
|
-
justify-content: center;
|
|
1667
|
-
align-items: center;
|
|
1668
|
-
gap: var(--atbl-control-gap);
|
|
1669
|
-
min-height: var(--atbl-control-height);
|
|
1670
|
-
padding: var(--atbl-control-padding-block) var(--atbl-control-padding-inline);
|
|
1671
|
-
border: 1px solid var(--atbl-border);
|
|
1672
|
-
border-radius: var(--atbl-radius-control);
|
|
1673
|
-
background: var(--atbl-surface);
|
|
1674
|
-
color: var(--atbl-text);
|
|
1675
|
-
font: inherit;
|
|
1676
|
-
font-size: var(--atbl-type-label-size);
|
|
1677
|
-
font-weight: var(--atbl-type-label-weight);
|
|
1678
|
-
line-height: var(--atbl-type-label-leading);
|
|
1679
|
-
overflow-wrap: anywhere;
|
|
1680
|
-
transition: background-color var(--atbl-duration-fast) var(--atbl-ease-standard), border-color var(--atbl-duration-fast) var(--atbl-ease-standard), color var(--atbl-duration-fast) var(--atbl-ease-standard);
|
|
1681
|
-
-webkit-tap-highlight-color: transparent;
|
|
1682
|
-
max-inline-size: 100%;
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
.altertable-button[data-size="icon"] {
|
|
1686
|
-
width: var(--atbl-control-height);
|
|
1687
|
-
min-width: var(--atbl-control-height);
|
|
1688
|
-
height: var(--atbl-control-height);
|
|
1689
|
-
min-height: var(--atbl-control-height);
|
|
1690
|
-
flex: none;
|
|
1691
|
-
padding: 0;
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
.altertable-button[data-variant="primary"] {
|
|
1695
|
-
border-color: var(--atbl-text);
|
|
1696
|
-
background: var(--atbl-text);
|
|
1697
|
-
color: var(--atbl-background);
|
|
1698
|
-
--atbl-control-hover-surface: color-mix(in srgb, var(--atbl-text) 92%, var(--atbl-background));
|
|
1699
|
-
--atbl-control-pressed-surface: color-mix(in srgb, var(--atbl-text) 84%, var(--atbl-background));
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
.altertable-button[data-variant="outline"] {
|
|
1703
|
-
box-shadow: none;
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
.altertable-button[data-variant="elevated"] {
|
|
1707
|
-
box-shadow: var(--atbl-shadow-surface);
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
.altertable-button[data-variant="ghost"] {
|
|
1711
|
-
box-shadow: none;
|
|
1712
|
-
background: none;
|
|
1713
|
-
border-color: #0000;
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1717
|
-
.altertable-button {
|
|
1718
|
-
transition: none;
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
.altertable-button[data-size="compact"] {
|
|
1723
|
-
min-height: var(--atbl-control-compact-height);
|
|
1724
|
-
padding: calc(var(--atbl-control-padding-block) * 2 / 3) calc(var(--atbl-control-padding-inline) * 2 / 3);
|
|
1725
|
-
font-size: var(--atbl-type-meta-size);
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
.altertable-button[data-size="icon-compact"] {
|
|
1729
|
-
width: var(--atbl-control-compact-height);
|
|
1730
|
-
min-width: var(--atbl-control-compact-height);
|
|
1731
|
-
height: var(--atbl-control-compact-height);
|
|
1732
|
-
min-height: var(--atbl-control-compact-height);
|
|
1733
|
-
flex: none;
|
|
1734
|
-
padding: 0;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
.altertable-button[data-size^="icon"] > svg {
|
|
1738
|
-
inline-size: var(--atbl-control-icon-size);
|
|
1739
|
-
block-size: var(--atbl-control-icon-size);
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
.altertable-button[data-variant="inline"] {
|
|
1743
|
-
--atbl-control-hover-surface: transparent;
|
|
1744
|
-
--atbl-control-pressed-surface: transparent;
|
|
1745
|
-
--atbl-control-open-surface: transparent;
|
|
1746
|
-
box-shadow: none;
|
|
1747
|
-
font: inherit;
|
|
1748
|
-
text-underline-offset: .2em;
|
|
1749
|
-
background: none;
|
|
1750
|
-
border: 0;
|
|
1751
|
-
border-radius: 0;
|
|
1752
|
-
min-height: 0;
|
|
1753
|
-
padding: 0;
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
.altertable-button[data-variant="inline"]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled])) {
|
|
1757
|
-
text-decoration: underline;
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
.altertable-button[data-variant="inline"]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled])) {
|
|
1761
|
-
text-decoration: underline;
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
.altertable-button[data-variant="inline"]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled])) {
|
|
1765
|
-
text-decoration: underline;
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
/* packages/data-app-react/src/ui/Tooltip.css */
|
|
1770
|
-
@layer atbl.components {
|
|
1771
|
-
.altertable-tooltip-trigger {
|
|
1772
|
-
display: inline-flex;
|
|
1773
|
-
align-items: center;
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
.altertable-tooltip-trigger[data-variant="chart"] {
|
|
1777
|
-
display: flex;
|
|
1778
|
-
align-items: flex-end;
|
|
1779
|
-
width: 100%;
|
|
1780
|
-
min-width: 0;
|
|
1781
|
-
height: 100%;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
.altertable-tooltip-content {
|
|
1785
|
-
z-index: 1300;
|
|
1786
|
-
border: 1px solid var(--atbl-border);
|
|
1787
|
-
border-radius: var(--atbl-radius-control);
|
|
1788
|
-
background: var(--atbl-surface);
|
|
1789
|
-
color: var(--atbl-text);
|
|
1790
|
-
box-shadow: var(--atbl-shadow-overlay);
|
|
1791
|
-
font: var(--atbl-type-meta-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);
|
|
1792
|
-
white-space: normal;
|
|
1793
|
-
pointer-events: none;
|
|
1794
|
-
animation: altertable-tooltip-in var(--atbl-duration-fast) ease-out;
|
|
1795
|
-
width: max-content;
|
|
1796
|
-
max-width: min(240px, 100vw - 24px);
|
|
1797
|
-
padding: 6px 9px;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
.altertable-tooltip-content[data-variant="chart"] {
|
|
1801
|
-
display: grid;
|
|
1802
|
-
font-variant-numeric: tabular-nums;
|
|
1803
|
-
gap: 2px;
|
|
1804
|
-
padding: 8px 10px;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
.altertable-tooltip-content[data-variant="chart"] strong {
|
|
1808
|
-
font-size: var(--atbl-type-body-size);
|
|
1809
|
-
font-weight: 650;
|
|
1810
|
-
line-height: 1.2;
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
@keyframes altertable-tooltip-in {
|
|
1814
|
-
from {
|
|
1815
|
-
opacity: 0;
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1820
|
-
.altertable-tooltip-content {
|
|
1821
|
-
animation: none;
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
.altertable-chart-tooltip-row {
|
|
1826
|
-
display: flex;
|
|
1827
|
-
align-items: flex-start;
|
|
1828
|
-
gap: 6px;
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
.altertable-chart-tooltip-marker {
|
|
1832
|
-
flex-shrink: 0;
|
|
1833
|
-
width: 8px;
|
|
1834
|
-
height: 8px;
|
|
1835
|
-
margin-top: .3em;
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
.altertable-chart-tooltip-reading {
|
|
1839
|
-
overflow-wrap: anywhere;
|
|
1840
|
-
min-width: 0;
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
/* packages/data-app-react/src/ui/Kbd.css */
|
|
1845
|
-
@layer atbl.components {
|
|
1846
|
-
.altertable-kbd {
|
|
1847
|
-
display: inline-flex;
|
|
1848
|
-
border: 1px solid var(--atbl-border);
|
|
1849
|
-
background: var(--atbl-subtle);
|
|
1850
|
-
color: var(--atbl-muted);
|
|
1851
|
-
font: var(--atbl-type-label-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);
|
|
1852
|
-
font-variant-numeric: tabular-nums;
|
|
1853
|
-
white-space: nowrap;
|
|
1854
|
-
border-radius: 5px;
|
|
1855
|
-
justify-content: center;
|
|
1856
|
-
align-items: center;
|
|
1857
|
-
min-width: 1.6em;
|
|
1858
|
-
padding: 2px 5px;
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
.altertable-button[data-variant="primary"] .altertable-kbd {
|
|
1862
|
-
color: inherit;
|
|
1863
|
-
border-color: color-mix(in srgb, currentColor 30%, transparent);
|
|
1864
|
-
background: none;
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
/* packages/data-app-react/src/annotations/AnnotationBar.css */
|
|
1869
|
-
@layer atbl.components {
|
|
1870
|
-
.altertable-annotation-bar, .altertable-annotation-bar-panel {
|
|
1871
|
-
--bar-surface: #202326;
|
|
1872
|
-
--bar-text: #f2f3f4;
|
|
1873
|
-
--bar-muted: #aeb5bc;
|
|
1874
|
-
--bar-border: #3b4248;
|
|
1875
|
-
--bar-danger: #ffa6a0;
|
|
1876
|
-
--bar-danger-surface: #572723;
|
|
1877
|
-
--atbl-control-selected-surface: var(--atbl-subtle);
|
|
1878
|
-
--atbl-control-selected-text: var(--bar-text);
|
|
1879
|
-
--atbl-control-disabled-opacity: 1;
|
|
1880
|
-
--atbl-surface: var(--bar-surface);
|
|
1881
|
-
--atbl-text: var(--bar-text);
|
|
1882
|
-
--atbl-muted: var(--bar-muted);
|
|
1883
|
-
--atbl-border: var(--bar-border);
|
|
1884
|
-
--atbl-focus-outline: 2px solid var(--atbl-annotation-accent);
|
|
1885
|
-
--atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));
|
|
1886
|
-
color: var(--bar-text);
|
|
1887
|
-
background: var(--bar-surface);
|
|
1888
|
-
font: 14px / 1.5 var(--atbl-font);
|
|
1889
|
-
box-sizing: border-box;
|
|
1890
|
-
border: 1px solid var(--bar-border);
|
|
1891
|
-
box-shadow: 0 8px 28px #0003;
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
.altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {
|
|
1895
|
-
--bar-surface: #202326;
|
|
1896
|
-
--bar-text: #f2f3f4;
|
|
1897
|
-
--bar-muted: #aeb5bc;
|
|
1898
|
-
--bar-border: #3b4248;
|
|
1899
|
-
--bar-danger: #ffa6a0;
|
|
1900
|
-
--bar-danger-surface: #572723;
|
|
1901
|
-
--atbl-control-selected-surface: var(--atbl-subtle);
|
|
1902
|
-
--atbl-control-selected-text: var(--bar-text);
|
|
1903
|
-
--atbl-control-disabled-opacity: 1;
|
|
1904
|
-
--atbl-surface: var(--bar-surface);
|
|
1905
|
-
--atbl-text: var(--bar-text);
|
|
1906
|
-
--atbl-muted: var(--bar-muted);
|
|
1907
|
-
--atbl-border: var(--bar-border);
|
|
1908
|
-
--atbl-focus-outline: 2px solid var(--atbl-annotation-accent);
|
|
1909
|
-
--atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));
|
|
1910
|
-
color: var(--bar-text);
|
|
1911
|
-
background: var(--bar-surface);
|
|
1912
|
-
font: 14px / 1.5 var(--atbl-font);
|
|
1913
|
-
box-sizing: border-box;
|
|
1914
|
-
border: 1px solid var(--bar-border);
|
|
1915
|
-
box-shadow: 0 8px 28px #0003;
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
.altertable-annotation-bar[data-theme="dark"], .altertable-annotation-bar-panel[data-theme="dark"] {
|
|
1919
|
-
--bar-surface: #f2f3f4;
|
|
1920
|
-
--bar-text: #151719;
|
|
1921
|
-
--bar-muted: #505963;
|
|
1922
|
-
--bar-border: #dfe3e6;
|
|
1923
|
-
--bar-danger: #b42318;
|
|
1924
|
-
--bar-danger-surface: #ffe3e3;
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
.altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip[data-theme="dark"]) {
|
|
1928
|
-
--bar-surface: #f2f3f4;
|
|
1929
|
-
--bar-text: #151719;
|
|
1930
|
-
--bar-muted: #505963;
|
|
1931
|
-
--bar-border: #dfe3e6;
|
|
1932
|
-
--bar-danger: #b42318;
|
|
1933
|
-
--bar-danger-surface: #ffe3e3;
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
.altertable-annotation-bar {
|
|
1937
|
-
position: fixed;
|
|
1938
|
-
z-index: 1200;
|
|
1939
|
-
display: flex;
|
|
1940
|
-
border-radius: 18px;
|
|
1941
|
-
align-items: center;
|
|
1942
|
-
gap: 4px;
|
|
1943
|
-
max-width: calc(100vw - 24px);
|
|
1944
|
-
padding: 8px;
|
|
1945
|
-
bottom: 16px;
|
|
1946
|
-
left: 50%;
|
|
1947
|
-
transform: translateX(-50%);
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
.altertable-annotation-bar .altertable-button, .altertable-annotation-bar-panel .altertable-button {
|
|
1951
|
-
color: var(--bar-muted);
|
|
1952
|
-
font: inherit;
|
|
1953
|
-
flex-shrink: 0;
|
|
1954
|
-
width: auto;
|
|
1955
|
-
transition: none;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
.altertable-annotation-bar .altertable-annotation-bar-count {
|
|
1959
|
-
white-space: nowrap;
|
|
1960
|
-
color: var(--bar-text);
|
|
1961
|
-
padding-inline-start: 6px;
|
|
1962
|
-
padding-inline-end: 6px;
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
.altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle] {
|
|
1966
|
-
--atbl-cursor-action: grab;
|
|
1967
|
-
touch-action: none;
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
.altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle]:active {
|
|
1971
|
-
--atbl-cursor-action: grabbing;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
.altertable-annotation-bar .altertable-annotation-bar-send {
|
|
1975
|
-
--atbl-control-hover-surface: var(--atbl-annotation-accent-hover);
|
|
1976
|
-
--atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);
|
|
1977
|
-
background: var(--atbl-annotation-accent);
|
|
1978
|
-
color: var(--atbl-annotation-on-accent);
|
|
1979
|
-
border-color: #0000;
|
|
1980
|
-
border-radius: 12px;
|
|
1981
|
-
padding-inline-start: 14px;
|
|
1982
|
-
padding-inline-end: 14px;
|
|
1983
|
-
font-weight: 600;
|
|
1984
|
-
line-height: 1.25;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
.altertable-annotation-bar-panel {
|
|
1988
|
-
position: fixed;
|
|
1989
|
-
z-index: 1201;
|
|
1990
|
-
overflow: auto;
|
|
1991
|
-
border-radius: 16px;
|
|
1992
|
-
width: min(420px, 100vw - 24px);
|
|
1993
|
-
max-height: min(440px, 45vh);
|
|
1994
|
-
margin: 0;
|
|
1995
|
-
padding: 6px;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
.altertable-annotation-bar-panel header {
|
|
1999
|
-
display: flex;
|
|
2000
|
-
justify-content: space-between;
|
|
2001
|
-
align-items: center;
|
|
2002
|
-
padding: 4px 8px;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
.altertable-annotation-bar-row {
|
|
2006
|
-
display: flex;
|
|
2007
|
-
border-radius: 10px;
|
|
2008
|
-
align-items: center;
|
|
2009
|
-
gap: 8px;
|
|
2010
|
-
padding: 4px;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
.altertable-annotation-bar-row:hover, .altertable-annotation-bar-row:focus-within {
|
|
2014
|
-
background: var(--atbl-subtle);
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
.altertable-annotation-bar-row + .altertable-annotation-bar-row {
|
|
2018
|
-
border-top: 1px solid var(--bar-border);
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
.altertable-annotation-bar-panel .altertable-annotation-bar-open {
|
|
2022
|
-
display: grid;
|
|
2023
|
-
text-align: left;
|
|
2024
|
-
flex: 1;
|
|
2025
|
-
justify-content: stretch;
|
|
2026
|
-
gap: 2px;
|
|
2027
|
-
min-width: 0;
|
|
2028
|
-
height: auto;
|
|
2029
|
-
padding: 4px 6px;
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
.altertable-annotation-bar-open strong {
|
|
2033
|
-
color: var(--bar-text);
|
|
2034
|
-
font-weight: 600;
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
.altertable-annotation-bar-open span {
|
|
2038
|
-
color: var(--bar-muted);
|
|
2039
|
-
overflow-wrap: anywhere;
|
|
2040
|
-
font-size: 13px;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
.altertable-annotation-bar-panel .altertable-annotation-bar-open:hover:not(:disabled) {
|
|
2044
|
-
background: none;
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
.altertable-annotation-bar-error {
|
|
2048
|
-
position: absolute;
|
|
2049
|
-
background: var(--bar-surface);
|
|
2050
|
-
color: var(--bar-text);
|
|
2051
|
-
border: 1px solid var(--bar-border);
|
|
2052
|
-
border-radius: 10px;
|
|
2053
|
-
padding: 8px 12px;
|
|
2054
|
-
font-size: 12px;
|
|
2055
|
-
bottom: calc(100% + 8px);
|
|
2056
|
-
left: 0;
|
|
2057
|
-
right: 0;
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
@media (max-width: 420px) {
|
|
2061
|
-
.altertable-annotation-bar {
|
|
2062
|
-
gap: 0;
|
|
2063
|
-
padding: 6px;
|
|
2064
|
-
font-size: 12px;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
.altertable-annotation-bar .altertable-annotation-bar-send {
|
|
2068
|
-
padding-inline-start: 10px;
|
|
2069
|
-
padding-inline-end: 10px;
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
@media (max-width: 360px) {
|
|
2074
|
-
.altertable-annotation-bar .altertable-button[data-size="icon-compact"] {
|
|
2075
|
-
width: 26px;
|
|
2076
|
-
min-width: 26px;
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
.altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {
|
|
2081
|
-
font-size: 12px;
|
|
2082
|
-
line-height: 1.3;
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
.altertable-annotation-bar .altertable-button:hover:not(:disabled), .altertable-annotation-bar-panel .altertable-button:hover:not(:disabled) {
|
|
2086
|
-
color: var(--bar-text);
|
|
2087
|
-
background: var(--atbl-subtle);
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
.altertable-annotation-bar .altertable-annotation-bar-send:hover:not(:disabled) {
|
|
2091
|
-
color: var(--atbl-annotation-on-accent);
|
|
2092
|
-
background: var(--atbl-annotation-accent-hover);
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
.altertable-annotation-bar .altertable-button:disabled, .altertable-annotation-bar-panel .altertable-button:disabled {
|
|
2096
|
-
color: var(--bar-muted);
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
.altertable-annotation-bar .altertable-annotation-bar-send:disabled {
|
|
2100
|
-
color: var(--bar-muted);
|
|
2101
|
-
background: var(--atbl-subtle);
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
.altertable-annotation-bar .altertable-annotation-bar-send {
|
|
2105
|
-
position: relative;
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
.altertable-annotation-bar-send[data-pending] .altertable-annotation-bar-send-label {
|
|
2109
|
-
visibility: hidden;
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
.altertable-annotation-bar-spinner {
|
|
2113
|
-
position: absolute;
|
|
2114
|
-
animation: 1s linear infinite annotation-bar-spin;
|
|
2115
|
-
margin: auto;
|
|
2116
|
-
inset: 0;
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
@keyframes annotation-bar-spin {
|
|
2120
|
-
to {
|
|
2121
|
-
rotate: 360deg;
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
.altertable-annotation-discard-description {
|
|
2126
|
-
color: var(--atbl-muted);
|
|
2127
|
-
font: 14px / 1.55 var(--atbl-font);
|
|
2128
|
-
margin: 0;
|
|
2129
|
-
}
|
|
2130
|
-
|
|
2131
|
-
.altertable-annotation-discard-confirm {
|
|
2132
|
-
color: var(--atbl-danger);
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2136
|
-
.altertable-annotation-bar-spinner {
|
|
2137
|
-
animation: none;
|
|
2138
|
-
}
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
.altertable-annotation-bar .altertable-button[aria-pressed="true"] {
|
|
2142
|
-
color: var(--bar-text);
|
|
2143
|
-
background: var(--atbl-subtle);
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
.altertable-annotation-undo {
|
|
2147
|
-
position: fixed;
|
|
2148
|
-
z-index: 1202;
|
|
2149
|
-
display: flex;
|
|
2150
|
-
border: 1px solid var(--atbl-border);
|
|
2151
|
-
border-radius: var(--atbl-radius-overlay);
|
|
2152
|
-
background: var(--atbl-surface);
|
|
2153
|
-
color: var(--atbl-text);
|
|
2154
|
-
box-shadow: var(--atbl-shadow-overlay);
|
|
2155
|
-
font: 13px / 1.5 var(--atbl-font);
|
|
2156
|
-
align-items: center;
|
|
2157
|
-
gap: 12px;
|
|
2158
|
-
padding: 8px 12px;
|
|
2159
|
-
bottom: 16px;
|
|
2160
|
-
left: 16px;
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
.altertable-annotation-thumbnail {
|
|
2164
|
-
border: 1px solid var(--bar-border);
|
|
2165
|
-
overflow: hidden;
|
|
2166
|
-
background: var(--bar-surface);
|
|
2167
|
-
--atbl-cursor-action: zoom-in;
|
|
2168
|
-
border-radius: 6px;
|
|
2169
|
-
flex-shrink: 0;
|
|
2170
|
-
width: 56px;
|
|
2171
|
-
height: 40px;
|
|
2172
|
-
padding: 0;
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
.altertable-annotation-thumbnail img {
|
|
2176
|
-
object-fit: contain;
|
|
2177
|
-
display: block;
|
|
2178
|
-
width: 100%;
|
|
2179
|
-
height: 100%;
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
.altertable-annotation-thumbnail:focus-visible {
|
|
2183
|
-
outline: 2px solid var(--atbl-annotation-accent);
|
|
2184
|
-
outline-offset: 2px;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
.altertable-annotation-preview {
|
|
2188
|
-
display: block;
|
|
2189
|
-
object-fit: contain;
|
|
2190
|
-
width: 100%;
|
|
2191
|
-
max-height: 65vh;
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
|
-
.altertable-annotation-undo[data-bar-visible] {
|
|
2195
|
-
bottom: 88px;
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
.altertable-annotation-undo[data-inline] {
|
|
2199
|
-
position: static;
|
|
2200
|
-
box-shadow: none;
|
|
2201
|
-
border-radius: 8px;
|
|
2202
|
-
margin-top: 6px;
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2205
|
-
.altertable-sheet.altertable-annotation-image-dialog[data-placement="center"] {
|
|
2206
|
-
width: min(960px, 100vw - 32px);
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
/* packages/data-app-react/src/ui/Sheet.css */
|
|
2211
|
-
@layer atbl.components {
|
|
2212
|
-
:root:has(.altertable-sheet:modal) {
|
|
2213
|
-
overflow: hidden;
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
.altertable-sheet:not([open]) {
|
|
2217
|
-
display: none;
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
.altertable-sheet {
|
|
2221
|
-
position: fixed;
|
|
2222
|
-
overflow: visible;
|
|
2223
|
-
border: 0;
|
|
2224
|
-
border-left: 1px solid var(--atbl-border);
|
|
2225
|
-
background: var(--atbl-surface);
|
|
2226
|
-
color: var(--atbl-text);
|
|
2227
|
-
box-shadow: var(--atbl-shadow-overlay);
|
|
2228
|
-
font: var(--atbl-type-body-size) / var(--atbl-type-label-leading) var(--atbl-font);
|
|
2229
|
-
opacity: 0;
|
|
2230
|
-
transition: translate var(--atbl-duration-slow) cubic-bezier(.22, 1, .36, 1), opacity var(--atbl-duration-slow) var(--atbl-ease-standard);
|
|
2231
|
-
border-radius: 0;
|
|
2232
|
-
width: min(640px, 100vw);
|
|
2233
|
-
max-width: none;
|
|
2234
|
-
height: 100dvh;
|
|
2235
|
-
max-height: none;
|
|
2236
|
-
margin: 0;
|
|
2237
|
-
padding: 0;
|
|
2238
|
-
inset: 0 0 0 auto;
|
|
2239
|
-
translate: 100%;
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
.altertable-sheet[data-wide] {
|
|
2243
|
-
width: min(960px, 100vw);
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
.altertable-sheet[open] {
|
|
2247
|
-
opacity: 1;
|
|
2248
|
-
translate: 0;
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
@starting-style {
|
|
2252
|
-
.altertable-sheet[open] {
|
|
2253
|
-
opacity: 0;
|
|
2254
|
-
translate: 100%;
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
.altertable-sheet[open][data-closing] {
|
|
2259
|
-
opacity: 0;
|
|
2260
|
-
transition-timing-function: ease-in;
|
|
2261
|
-
translate: 100%;
|
|
2262
|
-
}
|
|
2263
|
-
|
|
2264
|
-
.altertable-sheet::backdrop {
|
|
2265
|
-
background: var(--atbl-backdrop);
|
|
2266
|
-
opacity: 0;
|
|
2267
|
-
transition: opacity var(--atbl-duration-slow) var(--atbl-ease-standard);
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
.altertable-sheet[open]::backdrop {
|
|
2271
|
-
opacity: 1;
|
|
2272
|
-
}
|
|
2273
|
-
|
|
2274
|
-
.altertable-sheet[open][data-closing]::backdrop {
|
|
2275
|
-
opacity: 0;
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
@starting-style {
|
|
2279
|
-
.altertable-sheet[open]::backdrop {
|
|
2280
|
-
opacity: 0;
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
|
|
2284
|
-
.altertable-sheet-shell {
|
|
2285
|
-
display: grid;
|
|
2286
|
-
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
2287
|
-
height: 100%;
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
.altertable-sheet-header {
|
|
2291
|
-
display: flex;
|
|
2292
|
-
justify-content: space-between;
|
|
2293
|
-
align-items: flex-start;
|
|
2294
|
-
gap: var(--atbl-space-md);
|
|
2295
|
-
padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc((var(--atbl-space-md) + var(--atbl-space-lg)) / 2);
|
|
2296
|
-
border-bottom: 1px solid var(--atbl-border);
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
.altertable-sheet-header h2 {
|
|
2300
|
-
font-size: var(--atbl-type-section-size);
|
|
2301
|
-
font-weight: var(--atbl-type-heading-weight);
|
|
2302
|
-
line-height: var(--atbl-type-heading-leading);
|
|
2303
|
-
letter-spacing: -.02em;
|
|
2304
|
-
overflow-wrap: anywhere;
|
|
2305
|
-
margin: 0;
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
.altertable-sheet-header p {
|
|
2309
|
-
color: var(--atbl-muted);
|
|
2310
|
-
font-size: var(--atbl-type-label-size);
|
|
2311
|
-
margin: 4px 0 0;
|
|
2312
|
-
line-height: 1.45;
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
.altertable-sheet-actions {
|
|
2316
|
-
display: flex;
|
|
2317
|
-
align-items: center;
|
|
2318
|
-
gap: 4px;
|
|
2319
|
-
margin: -4px -8px 0 0;
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
|
-
.altertable-sheet-close {
|
|
2323
|
-
color: var(--atbl-muted);
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
.altertable-sheet-body {
|
|
2327
|
-
overflow-y: auto;
|
|
2328
|
-
overscroll-behavior: contain;
|
|
2329
|
-
padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc(var(--atbl-space-xl) + var(--atbl-space-md) / 2);
|
|
2330
|
-
min-height: 0;
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
.altertable-sheet-footer {
|
|
2334
|
-
padding: var(--atbl-space-md) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2);
|
|
2335
|
-
border-top: 1px solid var(--atbl-border);
|
|
2336
|
-
}
|
|
2337
|
-
|
|
2338
|
-
@media (min-width: 601px) {
|
|
2339
|
-
.altertable-sheet:where([data-placement="side"][data-side="left"]) {
|
|
2340
|
-
border-left: 0;
|
|
2341
|
-
border-right: 1px solid var(--atbl-border);
|
|
2342
|
-
inset: 0 auto 0 0;
|
|
2343
|
-
translate: -100%;
|
|
2344
|
-
}
|
|
2345
|
-
|
|
2346
|
-
.altertable-sheet:where([data-placement="side"][data-side="left"])[open] {
|
|
2347
|
-
translate: 0;
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
.altertable-sheet:where([data-placement="side"][data-side="left"])[open][data-closing] {
|
|
2351
|
-
translate: -100%;
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
@starting-style {
|
|
2355
|
-
.altertable-sheet:where([data-placement="side"][data-side="left"])[open] {
|
|
2356
|
-
translate: -100%;
|
|
2357
|
-
}
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
@media (max-width: 960px) {
|
|
2362
|
-
.altertable-sheet[data-wide] {
|
|
2363
|
-
box-shadow: none;
|
|
2364
|
-
border: 0;
|
|
2365
|
-
inset: auto 0 0;
|
|
2366
|
-
translate: 0 100%;
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
.altertable-sheet[data-wide][open] {
|
|
2370
|
-
translate: 0;
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
.altertable-sheet[data-wide][open][data-closing] {
|
|
2374
|
-
translate: 0 100%;
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
@starting-style {
|
|
2378
|
-
.altertable-sheet[data-wide][open] {
|
|
2379
|
-
translate: 0 100%;
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
@media (max-width: 600px) {
|
|
2385
|
-
.altertable-sheet {
|
|
2386
|
-
box-shadow: none;
|
|
2387
|
-
border: 0;
|
|
2388
|
-
inset: auto 0 0;
|
|
2389
|
-
translate: 0 100%;
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
.altertable-sheet[open] {
|
|
2393
|
-
translate: 0;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
.altertable-sheet[open][data-closing] {
|
|
2397
|
-
translate: 0 100%;
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
@starting-style {
|
|
2401
|
-
.altertable-sheet[open] {
|
|
2402
|
-
translate: 0 100%;
|
|
2403
|
-
}
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
|
-
.altertable-sheet-header {
|
|
2407
|
-
padding: 20px 20px 16px;
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
.altertable-sheet-body {
|
|
2411
|
-
padding: 20px 20px 32px;
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
.altertable-sheet-footer {
|
|
2415
|
-
padding: 14px 20px;
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2420
|
-
.altertable-sheet, .altertable-sheet[open][data-closing] {
|
|
2421
|
-
transition: none;
|
|
2422
|
-
translate: 0;
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
.altertable-sheet::backdrop {
|
|
2426
|
-
transition: none;
|
|
2427
|
-
}
|
|
2428
|
-
|
|
2429
|
-
@starting-style {
|
|
2430
|
-
.altertable-sheet[open] {
|
|
2431
|
-
translate: 0;
|
|
2432
|
-
}
|
|
2433
|
-
}
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
.altertable-sheet[data-placement="center"] {
|
|
2437
|
-
border: 1px solid var(--atbl-border, #e3e6e8);
|
|
2438
|
-
border-radius: var(--atbl-radius-overlay);
|
|
2439
|
-
width: min(480px, 100vw - 32px);
|
|
2440
|
-
height: -moz-fit-content;
|
|
2441
|
-
height: fit-content;
|
|
2442
|
-
max-height: calc(100dvh - 32px);
|
|
2443
|
-
margin: auto;
|
|
2444
|
-
inset: 0;
|
|
2445
|
-
translate: 0;
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
|
-
.altertable-sheet[data-placement="center"] .altertable-sheet-shell {
|
|
2449
|
-
height: auto;
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
.altertable-sheet[data-placement="center"] .altertable-sheet-header {
|
|
2453
|
-
padding: 20px 24px 16px;
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
.altertable-sheet[data-placement="center"] .altertable-sheet-body {
|
|
2457
|
-
padding: 0 24px 20px;
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
.altertable-sheet[data-placement="center"] .altertable-sheet-footer {
|
|
2461
|
-
padding: 16px 24px;
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
/* packages/data-app-react/src/ui/GradientScroll.css */
|
|
2466
|
-
@layer atbl.components {
|
|
2467
|
-
.altertable-gradient-scroll {
|
|
2468
|
-
overflow: auto;
|
|
2469
|
-
--atbl-scroll-fade-size: 1.5rem;
|
|
2470
|
-
min-width: 0;
|
|
2471
|
-
min-height: 0;
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
.altertable-gradient-scroll[data-axis="vertical"] {
|
|
2475
|
-
overflow-x: hidden;
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
.altertable-gradient-scroll[data-axis="horizontal"] {
|
|
2479
|
-
overflow-y: hidden;
|
|
2480
|
-
}
|
|
2481
|
-
|
|
2482
|
-
.altertable-gradient-scroll[data-axis="vertical"][data-fade-start][data-fade-end] {
|
|
2483
|
-
mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);
|
|
2484
|
-
}
|
|
2485
|
-
|
|
2486
|
-
.altertable-gradient-scroll[data-axis="vertical"][data-fade-start]:not([data-fade-end]) {
|
|
2487
|
-
mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size));
|
|
2488
|
-
}
|
|
2489
|
-
|
|
2490
|
-
.altertable-gradient-scroll[data-axis="vertical"][data-fade-end]:not([data-fade-start]) {
|
|
2491
|
-
mask-image: linear-gradient(to bottom, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);
|
|
2492
|
-
}
|
|
2493
|
-
|
|
2494
|
-
.altertable-gradient-scroll[data-axis="horizontal"][data-fade-start][data-fade-end] {
|
|
2495
|
-
mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);
|
|
2496
|
-
}
|
|
2497
|
-
|
|
2498
|
-
.altertable-gradient-scroll[data-axis="horizontal"][data-fade-start]:not([data-fade-end]) {
|
|
2499
|
-
mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size));
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
|
-
.altertable-gradient-scroll[data-axis="horizontal"][data-fade-end]:not([data-fade-start]) {
|
|
2503
|
-
mask-image: linear-gradient(to right, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);
|
|
2504
|
-
}
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
/* packages/data-app-react/src/ui/Focus.css */
|
|
2508
|
-
@layer atbl.interaction {
|
|
2509
|
-
[data-atbl-focus="inset"][data-atbl-internal-focus-state="focused"][data-focused] {
|
|
2510
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2511
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2512
|
-
}
|
|
2513
|
-
|
|
2514
|
-
[data-atbl-focus="ring"]:-webkit-any(:focus-visible, [data-focus-visible]) {
|
|
2515
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2516
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
[data-atbl-focus="ring"]:-moz-any(:focus-visible, [data-focus-visible]) {
|
|
2520
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2521
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2522
|
-
}
|
|
2523
|
-
|
|
2524
|
-
[data-atbl-focus="ring"]:is(:focus-visible, [data-focus-visible]) {
|
|
2525
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2526
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
[data-atbl-focus="ring"]:has( > input:focus-visible) {
|
|
2530
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2531
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
[data-atbl-focus="inset"]:-webkit-any(:focus-visible, [data-focus-visible]) {
|
|
2535
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2536
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
[data-atbl-focus="inset"]:-moz-any(:focus-visible, [data-focus-visible]) {
|
|
2540
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2541
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
[data-atbl-focus="inset"]:is(:focus-visible, [data-focus-visible]) {
|
|
2545
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2546
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2547
|
-
}
|
|
2548
|
-
|
|
2549
|
-
[data-atbl-internal-prose] a:focus-visible {
|
|
2550
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2551
|
-
outline-offset: var(--atbl-focus-ring-offset);
|
|
2552
|
-
}
|
|
2553
|
-
|
|
2554
|
-
[data-atbl-focus="inset"][data-atbl-internal-focus-state="focused"][data-focused] {
|
|
2555
|
-
outline-offset: var(--atbl-focus-ring-inset);
|
|
2556
|
-
}
|
|
2557
|
-
|
|
2558
|
-
[data-atbl-focus="inset"]:-webkit-any(:focus-visible, [data-focus-visible]) {
|
|
2559
|
-
outline-offset: var(--atbl-focus-ring-inset);
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
|
-
[data-atbl-focus="inset"]:-moz-any(:focus-visible, [data-focus-visible]) {
|
|
2563
|
-
outline-offset: var(--atbl-focus-ring-inset);
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
|
-
[data-atbl-focus="inset"]:is(:focus-visible, [data-focus-visible]) {
|
|
2567
|
-
outline-offset: var(--atbl-focus-ring-inset);
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
|
-
[data-atbl-focus="group"]:-webkit-any(:focus-within, [data-focus-within], [data-focus-visible]) {
|
|
2571
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2572
|
-
outline-offset: var(--atbl-focus-ring-inset);
|
|
2573
|
-
}
|
|
2574
|
-
|
|
2575
|
-
[data-atbl-focus="group"]:-moz-any(:focus-within, [data-focus-within], [data-focus-visible]) {
|
|
2576
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2577
|
-
outline-offset: var(--atbl-focus-ring-inset);
|
|
2578
|
-
}
|
|
2579
|
-
|
|
2580
|
-
[data-atbl-focus="group"]:is(:focus-within, [data-focus-within], [data-focus-visible]) {
|
|
2581
|
-
outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
|
|
2582
|
-
outline-offset: var(--atbl-focus-ring-inset);
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
|
-
[data-atbl-focus="group"] input:focus-visible {
|
|
2586
|
-
outline: none;
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
@media (forced-colors: active) {
|
|
2590
|
-
[data-atbl-focus]:-webkit-any(:focus-visible, :focus-within, [data-focus-visible]) {
|
|
2591
|
-
outline-color: highlight !important;
|
|
2592
|
-
}
|
|
2593
|
-
|
|
2594
|
-
[data-atbl-focus]:-moz-any(:focus-visible, :focus-within, [data-focus-visible]) {
|
|
2595
|
-
outline-color: highlight !important;
|
|
2596
|
-
}
|
|
2597
|
-
|
|
2598
|
-
[data-atbl-focus]:is(:focus-visible, :focus-within, [data-focus-visible]) {
|
|
2599
|
-
outline-color: highlight !important;
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
[data-atbl-internal-prose] a:focus-visible {
|
|
2603
|
-
outline-color: highlight !important;
|
|
2604
|
-
}
|
|
2605
|
-
}
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
|
-
/* packages/data-app-react/src/interaction.css */
|
|
2609
|
-
@layer atbl.interaction {
|
|
2610
|
-
[data-atbl-control="default"] {
|
|
2611
|
-
cursor: default;
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
[data-atbl-control="action"], [data-atbl-internal-prose] a {
|
|
2615
|
-
cursor: var(--atbl-cursor-action);
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
[data-atbl-control="help"] {
|
|
2619
|
-
cursor: var(--atbl-cursor-help);
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
|
-
[data-atbl-control="text"] {
|
|
2623
|
-
cursor: text;
|
|
2624
|
-
font-size: var(--atbl-control-text-size, var(--atbl-type-body-size));
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
@media (max-width: 560px), (any-pointer: coarse) {
|
|
2628
|
-
[data-atbl-control="text"] {
|
|
2629
|
-
font-size: max(16px, var(--atbl-control-text-size, var(--atbl-type-body-size)));
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
|
|
2633
|
-
[data-atbl-control]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], [data-unavailable]) {
|
|
2634
|
-
cursor: var(--atbl-cursor-disabled);
|
|
2635
|
-
}
|
|
2636
|
-
|
|
2637
|
-
[data-atbl-control]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], [data-unavailable]) {
|
|
2638
|
-
cursor: var(--atbl-cursor-disabled);
|
|
2639
|
-
}
|
|
2640
|
-
|
|
2641
|
-
[data-atbl-control]:is(:disabled, [data-disabled], [aria-disabled="true"], [data-unavailable]) {
|
|
2642
|
-
cursor: var(--atbl-cursor-disabled);
|
|
2643
|
-
}
|
|
2644
|
-
|
|
2645
|
-
[data-atbl-control]:has( > input:disabled) {
|
|
2646
|
-
cursor: var(--atbl-cursor-disabled);
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
[data-atbl-control="action"]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2650
|
-
opacity: var(--atbl-control-disabled-opacity);
|
|
2651
|
-
}
|
|
2652
|
-
|
|
2653
|
-
[data-atbl-control="action"]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2654
|
-
opacity: var(--atbl-control-disabled-opacity);
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
[data-atbl-control="action"]:is(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2658
|
-
opacity: var(--atbl-control-disabled-opacity);
|
|
2659
|
-
}
|
|
2660
|
-
|
|
2661
|
-
[data-atbl-control="help"]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2662
|
-
opacity: var(--atbl-control-disabled-opacity);
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
|
-
[data-atbl-control="help"]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2666
|
-
opacity: var(--atbl-control-disabled-opacity);
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
|
-
[data-atbl-control="help"]:is(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2670
|
-
opacity: var(--atbl-control-disabled-opacity);
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
[data-atbl-control]:has( > input:disabled) {
|
|
2674
|
-
opacity: var(--atbl-control-disabled-opacity);
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
[data-atbl-control][aria-busy="true"]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2678
|
-
cursor: var(--atbl-cursor-busy);
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
[data-atbl-control][aria-busy="true"]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2682
|
-
cursor: var(--atbl-cursor-busy);
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
[data-atbl-control][aria-busy="true"]:not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2686
|
-
cursor: var(--atbl-cursor-busy);
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
:where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-webkit-any(:hover, [data-hovered], [data-focused], [data-open="true"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2690
|
-
background: var(--atbl-control-hover-surface, var(--atbl-subtle));
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
:where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-moz-any(:hover, [data-hovered], [data-focused], [data-open="true"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2694
|
-
background: var(--atbl-control-hover-surface, var(--atbl-subtle));
|
|
2695
|
-
}
|
|
2696
|
-
|
|
2697
|
-
:where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):is(:hover, [data-hovered], [data-focused], [data-open="true"]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2698
|
-
background: var(--atbl-control-hover-surface, var(--atbl-subtle));
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
:where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2702
|
-
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
:where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2706
|
-
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));
|
|
2707
|
-
}
|
|
2708
|
-
|
|
2709
|
-
:where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2710
|
-
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));
|
|
2711
|
-
}
|
|
2712
|
-
|
|
2713
|
-
:where([data-atbl-internal-surface="control"]):-webkit-any([aria-expanded="true"], [data-open="true"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2714
|
-
background: var(--atbl-control-open-surface, var(--atbl-surface));
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
:where([data-atbl-internal-surface="control"]):-moz-any([aria-expanded="true"], [data-open="true"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2718
|
-
background: var(--atbl-control-open-surface, var(--atbl-surface));
|
|
2719
|
-
}
|
|
2720
|
-
|
|
2721
|
-
:where([data-atbl-internal-surface="control"]):is([aria-expanded="true"], [data-open="true"]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2722
|
-
background: var(--atbl-control-open-surface, var(--atbl-surface));
|
|
2723
|
-
}
|
|
2724
|
-
|
|
2725
|
-
:where([data-atbl-internal-surface="control"]):-webkit-any([data-variant="outline"], [data-variant="elevated"]):-webkit-any([aria-expanded="true"], [data-open="true"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2726
|
-
border-color: var(--atbl-control-open-border, var(--atbl-muted));
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
:where([data-atbl-internal-surface="control"]):-moz-any([data-variant="outline"], [data-variant="elevated"]):-moz-any([aria-expanded="true"], [data-open="true"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2730
|
-
border-color: var(--atbl-control-open-border, var(--atbl-muted));
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
:where([data-atbl-internal-surface="control"]):is([data-variant="outline"], [data-variant="elevated"]):is([aria-expanded="true"], [data-open="true"]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2734
|
-
border-color: var(--atbl-control-open-border, var(--atbl-muted));
|
|
2735
|
-
}
|
|
2736
|
-
|
|
2737
|
-
:where([data-atbl-internal-surface="control"]):-webkit-any([aria-pressed="true"], [data-selected], [aria-current="true"], :has( > input:checked)):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2738
|
-
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2739
|
-
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2742
|
-
:where([data-atbl-internal-surface="control"]):-moz-any([aria-pressed="true"], [data-selected], [aria-current="true"], :has( > input:checked)):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2743
|
-
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2744
|
-
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
:where([data-atbl-internal-surface="control"]):is([aria-pressed="true"], [data-selected], [aria-current="true"], :has( > input:checked)):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2748
|
-
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2749
|
-
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2750
|
-
}
|
|
2751
|
-
|
|
2752
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2753
|
-
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2754
|
-
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2755
|
-
}
|
|
2756
|
-
|
|
2757
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2758
|
-
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2759
|
-
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2763
|
-
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2764
|
-
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2768
|
-
background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2769
|
-
}
|
|
2770
|
-
|
|
2771
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2772
|
-
background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2776
|
-
background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2777
|
-
}
|
|
2778
|
-
|
|
2779
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2780
|
-
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2784
|
-
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2785
|
-
}
|
|
2786
|
-
|
|
2787
|
-
:where([data-atbl-internal-surface="option"])[data-selected]:is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2788
|
-
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
:where([data-atbl-internal-surface="field"], [data-atbl-internal-surface="control"][data-variant="outline"], [data-atbl-internal-surface="control"][data-variant="elevated"]):-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled="true"], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
|
|
2792
|
-
border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
|
|
2793
|
-
}
|
|
2794
|
-
|
|
2795
|
-
:where([data-atbl-internal-surface="field"], [data-atbl-internal-surface="control"][data-variant="outline"], [data-atbl-internal-surface="control"][data-variant="elevated"]):-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled="true"], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
|
|
2796
|
-
border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
:where([data-atbl-internal-surface="field"], [data-atbl-internal-surface="control"][data-variant="outline"], [data-atbl-internal-surface="control"][data-variant="elevated"]):is(:hover, [data-hovered]):not(:is(:disabled, :has(input:disabled), [data-disabled], [aria-disabled="true"], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
|
|
2800
|
-
border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
|
-
[data-atbl-internal-surface="field"]:-webkit-any([data-invalid], [aria-invalid="true"]) {
|
|
2804
|
-
border-color: var(--atbl-danger);
|
|
2805
|
-
--atbl-focus-color: var(--atbl-danger);
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
[data-atbl-internal-surface="field"]:-moz-any([data-invalid], [aria-invalid="true"]) {
|
|
2809
|
-
border-color: var(--atbl-danger);
|
|
2810
|
-
--atbl-focus-color: var(--atbl-danger);
|
|
2811
|
-
}
|
|
2812
|
-
|
|
2813
|
-
[data-atbl-internal-surface="field"]:is([data-invalid], [aria-invalid="true"]) {
|
|
2814
|
-
border-color: var(--atbl-danger);
|
|
2815
|
-
--atbl-focus-color: var(--atbl-danger);
|
|
2816
|
-
}
|
|
2817
|
-
|
|
2818
|
-
[data-atbl-internal-surface="field"]:has(input[aria-invalid="true"]) {
|
|
2819
|
-
border-color: var(--atbl-danger);
|
|
2820
|
-
--atbl-focus-color: var(--atbl-danger);
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
[data-atbl-control="text"]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2824
|
-
color: var(--atbl-muted);
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
[data-atbl-control="text"]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2828
|
-
color: var(--atbl-muted);
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
[data-atbl-control="text"]:is(:disabled, [data-disabled], [aria-disabled="true"]) {
|
|
2832
|
-
color: var(--atbl-muted);
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
|
-
/* packages/data-app-react/src/annotations/styles.css */
|
|
2837
|
-
@layer atbl.tokens, atbl.base, atbl.components, atbl.interaction;
|
|
2838
|
-
`,
|
|
2839
|
-
options
|
|
2840
|
-
});
|
|
1039
|
+
return injectStyles({
|
|
1040
|
+
name: "injectDataAppAnnotationStyles",
|
|
1041
|
+
attribute: "data-altertable-annotation-styles",
|
|
1042
|
+
css: "/* packages/data-app-react/src/tokens.css */\n@layer atbl.tokens {\n :root {\n --atbl-background: var(--atbl-palette-background);\n --atbl-surface: var(--atbl-palette-surface);\n --atbl-subtle: var(--atbl-palette-subtle);\n --atbl-backdrop: #0f171e38;\n --atbl-text: var(--atbl-palette-text);\n --atbl-muted: var(--atbl-palette-muted);\n --atbl-border: var(--atbl-palette-border);\n --atbl-accent: var(--atbl-palette-accent);\n --atbl-on-accent: var(--atbl-palette-on-accent);\n --atbl-positive: var(--atbl-palette-positive);\n --atbl-danger: var(--atbl-palette-danger);\n --atbl-code-surface: #f4f6f9;\n --atbl-code-text: #273242;\n --atbl-mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n --atbl-focus-ring-offset: 2px;\n --atbl-focus-ring-inset: -1px;\n --atbl-font: var(--atbl-input-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, ui-sans-serif, sans-serif);\n --atbl-space-xs: 5px;\n --atbl-space-sm: 10px;\n --atbl-space-md: 16px;\n --atbl-space-lg: 24px;\n --atbl-space-xl: 32px;\n --atbl-content-width: 1920px;\n --atbl-control-height: 2.375rem;\n --atbl-control-compact-height: 1.875rem;\n --atbl-control-icon-size: 1rem;\n --atbl-control-padding-inline: .75rem;\n --atbl-control-padding-block: .375rem;\n --atbl-control-gap: .5rem;\n --atbl-control-disabled-opacity: .5;\n --atbl-dropdown-padding: calc(var(--atbl-control-padding-block) * 2 / 3);\n --atbl-dropdown-item-padding-block: var(--atbl-control-padding-block);\n --atbl-dropdown-item-padding-inline: calc(var(--atbl-control-padding-inline) * 3 / 4);\n --atbl-dropdown-item-gap: 2px;\n --atbl-radius-control: 7px;\n --atbl-radius-surface: 12px;\n --atbl-radius-overlay: 16px;\n --atbl-shadow-surface: 0 3px 16px #141c280d;\n --atbl-shadow-overlay: 0 18px 50px #00000029;\n --atbl-shadow-control: 0 1px 3px #0000001a;\n --atbl-cursor-action: pointer;\n --atbl-cursor-disabled: default;\n --atbl-cursor-help: help;\n --atbl-cursor-busy: progress;\n --atbl-duration-fast: .12s;\n --atbl-duration-normal: .18s;\n --atbl-duration-slow: .24s;\n --atbl-ease-standard: ease;\n --atbl-ease-enter: cubic-bezier(.2, .7, .2, 1);\n --atbl-chart-1: color-mix(in srgb, var(--atbl-input-chart-1, #285fc0) var(--atbl-chart-strength), white);\n --atbl-chart-2: color-mix(in srgb, var(--atbl-input-chart-2, #a95319) var(--atbl-chart-strength), white);\n --atbl-chart-3: color-mix(in srgb, var(--atbl-input-chart-3, #147862) var(--atbl-chart-strength), white);\n --atbl-chart-4: color-mix(in srgb, var(--atbl-input-chart-4, #7243aa) var(--atbl-chart-strength), white);\n --atbl-chart-5: color-mix(in srgb, var(--atbl-input-chart-5, #aa3958) var(--atbl-chart-strength), white);\n --atbl-chart-6: color-mix(in srgb, var(--atbl-input-chart-6, #475569) var(--atbl-chart-strength), white);\n --atbl-chart-7: color-mix(in srgb, var(--atbl-input-chart-7, #285fc0) var(--atbl-chart-strength), white);\n --atbl-chart-8: color-mix(in srgb, var(--atbl-input-chart-8, #a95319) var(--atbl-chart-strength), white);\n --atbl-type-emphasis-weight: 680;\n --atbl-type-meta-weight: 500;\n --atbl-type-page-size: clamp(1.375rem, 2.4vw, 1.75rem);\n --atbl-type-section-size: 1.25rem;\n --atbl-type-widget-size: var(--atbl-type-label-size);\n --atbl-type-body-size: .875rem;\n --atbl-type-label-size: .8125rem;\n --atbl-type-meta-size: .75rem;\n --atbl-type-metric-size: clamp(1.625rem, 3vw, 2.125rem);\n --atbl-type-heading-weight: 650;\n --atbl-type-label-weight: 600;\n --atbl-type-body-leading: 1.65;\n --atbl-type-label-leading: 1.4;\n --atbl-type-heading-leading: 1.3;\n --atbl-type-metric-leading: 1.08;\n --atbl-text-measure: 70ch;\n }\n}\n\n/* packages/data-app-react/src/appearance.css */\n@layer atbl.tokens {\n :root {\n --atbl-palette-background: #fff;\n --atbl-palette-surface: #fff;\n --atbl-palette-subtle: #f6f7f7;\n --atbl-palette-text: #202124;\n --atbl-palette-muted: #687078;\n --atbl-palette-border: #e3e6e8;\n --atbl-palette-accent: var(--atbl-input-accent, var(--atbl-text));\n --atbl-palette-on-accent: var(--atbl-input-on-accent, #fff);\n --atbl-palette-positive: #147862;\n --atbl-palette-danger: #b42318;\n --atbl-chart-strength: 100%;\n --atbl-accent-subtle-strength: 12%;\n }\n\n :root[data-atbl-theme=\"dark\"] {\n --atbl-palette-background: #151719;\n --atbl-palette-surface: #202326;\n --atbl-palette-subtle: #292d31;\n --atbl-palette-text: #f2f3f4;\n --atbl-palette-muted: #aeb5bc;\n --atbl-palette-border: #3b4248;\n }\n\n :root[data-atbl-base-color=\"slate\"] {\n --atbl-palette-background: #f8fafc;\n --atbl-palette-surface: #fff;\n --atbl-palette-subtle: #f1f5f9;\n --atbl-palette-text: #17212f;\n --atbl-palette-muted: #607083;\n --atbl-palette-border: #dce3ea;\n }\n\n :root[data-atbl-base-color=\"slate\"][data-atbl-theme=\"dark\"] {\n --atbl-palette-background: #111820;\n --atbl-palette-surface: #1b2530;\n --atbl-palette-subtle: #263340;\n --atbl-palette-text: #f0f4f8;\n --atbl-palette-muted: #a8b5c3;\n --atbl-palette-border: #3a4857;\n }\n\n :root[data-atbl-base-color=\"warm\"] {\n --atbl-palette-background: #fbfaf8;\n --atbl-palette-surface: #fff;\n --atbl-palette-subtle: #f5f2ed;\n --atbl-palette-text: #292723;\n --atbl-palette-muted: #736e66;\n --atbl-palette-border: #e8e2da;\n }\n\n :root[data-atbl-base-color=\"warm\"][data-atbl-theme=\"dark\"] {\n --atbl-palette-background: #1b1916;\n --atbl-palette-surface: #25221e;\n --atbl-palette-subtle: #302c27;\n --atbl-palette-text: #f5f1eb;\n --atbl-palette-muted: #bcb3a8;\n --atbl-palette-border: #494239;\n }\n\n :root[data-atbl-theme=\"dark\"] {\n --atbl-palette-accent: var(--atbl-input-dark-accent, var(--atbl-text));\n --atbl-accent-subtle-strength: 22%;\n --atbl-palette-on-accent: var(--atbl-input-on-accent, var(--atbl-background));\n --atbl-palette-positive: #6bc39a;\n --atbl-palette-danger: #f97066;\n --atbl-backdrop: #0000008c;\n --atbl-code-surface: #242a31;\n --atbl-code-text: #e5e9ef;\n --atbl-chart-strength: 60%;\n }\n\n :root[data-atbl-density=\"compact\"] {\n --atbl-control-height: 2.125rem;\n --atbl-control-compact-height: 1.625rem;\n --atbl-control-gap: .375rem;\n --atbl-control-padding-inline: .625rem;\n --atbl-control-padding-block: .25rem;\n --atbl-space-xs: 4px;\n --atbl-space-sm: 8px;\n --atbl-space-md: 12px;\n --atbl-space-lg: 18px;\n --atbl-space-xl: 24px;\n }\n\n :root[data-atbl-density=\"spacious\"] {\n --atbl-control-height: 2.625rem;\n --atbl-control-compact-height: 2.125rem;\n --atbl-control-gap: .625rem;\n --atbl-control-padding-inline: 1rem;\n --atbl-control-padding-block: .5rem;\n --atbl-space-xs: 6px;\n --atbl-space-sm: 12px;\n --atbl-space-md: 20px;\n --atbl-space-lg: 30px;\n --atbl-space-xl: 40px;\n }\n\n :root[data-atbl-radius=\"none\"] {\n --atbl-radius-control: 0px;\n --atbl-radius-surface: 0px;\n --atbl-radius-overlay: 0px;\n }\n\n :root[data-atbl-radius=\"small\"] {\n --atbl-radius-control: 4px;\n --atbl-radius-surface: 7px;\n --atbl-radius-overlay: 9px;\n }\n\n :root[data-atbl-radius=\"large\"] {\n --atbl-radius-control: 10px;\n --atbl-radius-surface: 18px;\n --atbl-radius-overlay: 24px;\n }\n\n :root[data-atbl-elevation=\"flat\"] {\n --atbl-shadow-surface: none;\n --atbl-shadow-overlay: none;\n --atbl-shadow-control: none;\n }\n\n :root[data-atbl-elevation=\"raised\"] {\n --atbl-shadow-surface: 0 8px 28px #141c281a;\n --atbl-shadow-overlay: 0 24px 72px #0000003d;\n --atbl-shadow-control: 0 2px 6px #00000029;\n }\n\n @media (forced-colors: active) {\n :root {\n --atbl-focus-color: Highlight !important;\n --atbl-on-accent: HighlightText !important;\n }\n }\n}\n\n/* packages/data-app-react/src/base.css */\n@layer atbl.base {\n :where([class^=\"altertable-\"], [class*=\" altertable-\"]) {\n box-sizing: border-box;\n }\n\n :where([class^=\"altertable-\"], [class*=\" altertable-\"]) * {\n box-sizing: border-box;\n }\n\n :where([class^=\"starter-\"], [class*=\" starter-\"]) * {\n box-sizing: border-box;\n }\n\n :where([class^=\"altertable-\"], [class*=\" altertable-\"]) button {\n font: inherit;\n }\n\n :root[data-atbl-appearance] {\n scrollbar-gutter: stable;\n font-family: var(--atbl-font);\n color: var(--atbl-text);\n background: var(--atbl-background);\n font-synthesis: none;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n }\n\n :root[data-atbl-frame-sizing=\"content\"] {\n overflow: hidden;\n scrollbar-gutter: auto;\n }\n\n :root {\n --atbl-frame-visible-height: calc(100dvh - var(--atbl-frame-inset-top, 0px) - var(--atbl-frame-inset-bottom, 0px));\n }\n\n :root[data-atbl-theme=\"light\"] {\n --buncss-light: initial;\n --buncss-dark: ;\n color-scheme: light;\n }\n\n :root[data-atbl-theme=\"dark\"] {\n --buncss-light: ;\n --buncss-dark: initial;\n color-scheme: dark;\n }\n\n :root[data-atbl-appearance] body, :root[data-atbl-appearance] #root {\n margin: 0;\n }\n\n .altertable-sr-only {\n position: fixed;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n }\n}\n\n/* packages/data-app-react/src/annotations/colors.css */\n@layer atbl.components {\n :root {\n --atbl-annotation-accent: #c026d3;\n --atbl-annotation-accent-hover: #a21caf;\n --atbl-annotation-on-accent: #fff;\n }\n\n .altertable-annotation-trigger, .altertable-annotation-composer {\n --atbl-control-selected-surface: var(--atbl-annotation-accent);\n --atbl-control-selected-text: var(--atbl-annotation-on-accent);\n --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);\n }\n\n .altertable-annotation-trigger[aria-pressed=\"true\"], .altertable-annotation-trigger:not([aria-pressed]) {\n background: var(--atbl-annotation-accent);\n color: var(--atbl-annotation-on-accent);\n border-color: #0000;\n }\n\n .altertable-annotation-trigger[aria-pressed=\"true\"]:hover:not(:disabled) {\n --atbl-control-selected-surface: var(--atbl-annotation-accent-hover);\n }\n\n .altertable-annotation-trigger:not([aria-pressed]) {\n --atbl-control-hover-surface: var(--atbl-annotation-accent-hover);\n --atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);\n }\n}\n\n/* packages/data-app-react/src/ui/Button.css */\n@layer atbl.components {\n .altertable-button {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n gap: var(--atbl-control-gap);\n min-height: var(--atbl-control-height);\n padding: var(--atbl-control-padding-block) var(--atbl-control-padding-inline);\n border: 1px solid var(--atbl-border);\n border-radius: var(--atbl-radius-control);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n font: inherit;\n font-size: var(--atbl-type-label-size);\n font-weight: var(--atbl-type-label-weight);\n line-height: var(--atbl-type-label-leading);\n overflow-wrap: anywhere;\n transition: background-color var(--atbl-duration-fast) var(--atbl-ease-standard), border-color var(--atbl-duration-fast) var(--atbl-ease-standard), color var(--atbl-duration-fast) var(--atbl-ease-standard);\n -webkit-tap-highlight-color: transparent;\n max-inline-size: 100%;\n }\n\n .altertable-button[data-size=\"icon\"] {\n width: var(--atbl-control-height);\n min-width: var(--atbl-control-height);\n height: var(--atbl-control-height);\n min-height: var(--atbl-control-height);\n flex: none;\n padding: 0;\n }\n\n .altertable-button[data-variant=\"primary\"] {\n border-color: var(--atbl-text);\n background: var(--atbl-text);\n color: var(--atbl-background);\n --atbl-control-hover-surface: color-mix(in srgb, var(--atbl-text) 92%, var(--atbl-background));\n --atbl-control-pressed-surface: color-mix(in srgb, var(--atbl-text) 84%, var(--atbl-background));\n }\n\n .altertable-button[data-variant=\"outline\"] {\n box-shadow: none;\n }\n\n .altertable-button[data-variant=\"elevated\"] {\n box-shadow: var(--atbl-shadow-surface);\n }\n\n .altertable-button[data-variant=\"ghost\"] {\n box-shadow: none;\n background: none;\n border-color: #0000;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-button {\n transition: none;\n }\n }\n\n .altertable-button[data-size=\"compact\"] {\n min-height: var(--atbl-control-compact-height);\n padding: calc(var(--atbl-control-padding-block) * 2 / 3) calc(var(--atbl-control-padding-inline) * 2 / 3);\n font-size: var(--atbl-type-meta-size);\n }\n\n .altertable-button[data-size=\"icon-compact\"] {\n width: var(--atbl-control-compact-height);\n min-width: var(--atbl-control-compact-height);\n height: var(--atbl-control-compact-height);\n min-height: var(--atbl-control-compact-height);\n flex: none;\n padding: 0;\n }\n\n .altertable-button[data-size^=\"icon\"] > svg {\n inline-size: var(--atbl-control-icon-size);\n block-size: var(--atbl-control-icon-size);\n }\n\n .altertable-button[data-variant=\"inline\"] {\n --atbl-control-hover-surface: transparent;\n --atbl-control-pressed-surface: transparent;\n --atbl-control-open-surface: transparent;\n box-shadow: none;\n font: inherit;\n text-underline-offset: .2em;\n background: none;\n border: 0;\n border-radius: 0;\n min-height: 0;\n padding: 0;\n }\n\n .altertable-button[data-variant=\"inline\"]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled])) {\n text-decoration: underline;\n }\n\n .altertable-button[data-variant=\"inline\"]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled])) {\n text-decoration: underline;\n }\n\n .altertable-button[data-variant=\"inline\"]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled])) {\n text-decoration: underline;\n }\n}\n\n/* packages/data-app-react/src/ui/Tooltip.css */\n@layer atbl.components {\n .altertable-tooltip-trigger {\n display: inline-flex;\n align-items: center;\n }\n\n .altertable-tooltip-trigger[data-variant=\"chart\"] {\n display: flex;\n align-items: flex-end;\n width: 100%;\n min-width: 0;\n height: 100%;\n }\n\n .altertable-tooltip-content {\n z-index: 1300;\n border: 1px solid var(--atbl-border);\n border-radius: var(--atbl-radius-control);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n box-shadow: var(--atbl-shadow-overlay);\n font: var(--atbl-type-meta-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);\n white-space: normal;\n pointer-events: none;\n animation: altertable-tooltip-in var(--atbl-duration-fast) ease-out;\n width: max-content;\n max-width: min(240px, 100vw - 24px);\n padding: 6px 9px;\n }\n\n .altertable-tooltip-content[data-variant=\"chart\"] {\n display: grid;\n font-variant-numeric: tabular-nums;\n gap: 2px;\n padding: 8px 10px;\n }\n\n .altertable-tooltip-content[data-variant=\"chart\"] strong {\n font-size: var(--atbl-type-body-size);\n font-weight: 650;\n line-height: 1.2;\n }\n\n @keyframes altertable-tooltip-in {\n from {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-tooltip-content {\n animation: none;\n }\n }\n\n .altertable-chart-tooltip-row {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n }\n\n .altertable-chart-tooltip-marker {\n flex-shrink: 0;\n width: 8px;\n height: 8px;\n margin-top: .3em;\n }\n\n .altertable-chart-tooltip-reading {\n overflow-wrap: anywhere;\n min-width: 0;\n }\n}\n\n/* packages/data-app-react/src/ui/Kbd.css */\n@layer atbl.components {\n .altertable-kbd {\n display: inline-flex;\n border: 1px solid var(--atbl-border);\n background: var(--atbl-subtle);\n color: var(--atbl-muted);\n font: var(--atbl-type-label-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n border-radius: 5px;\n justify-content: center;\n align-items: center;\n min-width: 1.6em;\n padding: 2px 5px;\n }\n\n .altertable-button[data-variant=\"primary\"] .altertable-kbd {\n color: inherit;\n border-color: color-mix(in srgb, currentColor 30%, transparent);\n background: none;\n }\n}\n\n/* packages/data-app-react/src/annotations/AnnotationBar.css */\n@layer atbl.components {\n .altertable-annotation-bar, .altertable-annotation-bar-panel {\n --bar-surface: #202326;\n --bar-text: #f2f3f4;\n --bar-muted: #aeb5bc;\n --bar-border: #3b4248;\n --bar-danger: #ffa6a0;\n --bar-danger-surface: #572723;\n --atbl-control-selected-surface: var(--atbl-subtle);\n --atbl-control-selected-text: var(--bar-text);\n --atbl-control-disabled-opacity: 1;\n --atbl-surface: var(--bar-surface);\n --atbl-text: var(--bar-text);\n --atbl-muted: var(--bar-muted);\n --atbl-border: var(--bar-border);\n --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);\n --atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));\n color: var(--bar-text);\n background: var(--bar-surface);\n font: 14px / 1.5 var(--atbl-font);\n box-sizing: border-box;\n border: 1px solid var(--bar-border);\n box-shadow: 0 8px 28px #0003;\n }\n\n .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {\n --bar-surface: #202326;\n --bar-text: #f2f3f4;\n --bar-muted: #aeb5bc;\n --bar-border: #3b4248;\n --bar-danger: #ffa6a0;\n --bar-danger-surface: #572723;\n --atbl-control-selected-surface: var(--atbl-subtle);\n --atbl-control-selected-text: var(--bar-text);\n --atbl-control-disabled-opacity: 1;\n --atbl-surface: var(--bar-surface);\n --atbl-text: var(--bar-text);\n --atbl-muted: var(--bar-muted);\n --atbl-border: var(--bar-border);\n --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);\n --atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));\n color: var(--bar-text);\n background: var(--bar-surface);\n font: 14px / 1.5 var(--atbl-font);\n box-sizing: border-box;\n border: 1px solid var(--bar-border);\n box-shadow: 0 8px 28px #0003;\n }\n\n .altertable-annotation-bar[data-theme=\"dark\"], .altertable-annotation-bar-panel[data-theme=\"dark\"] {\n --bar-surface: #f2f3f4;\n --bar-text: #151719;\n --bar-muted: #505963;\n --bar-border: #dfe3e6;\n --bar-danger: #b42318;\n --bar-danger-surface: #ffe3e3;\n }\n\n .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip[data-theme=\"dark\"]) {\n --bar-surface: #f2f3f4;\n --bar-text: #151719;\n --bar-muted: #505963;\n --bar-border: #dfe3e6;\n --bar-danger: #b42318;\n --bar-danger-surface: #ffe3e3;\n }\n\n .altertable-annotation-bar {\n position: fixed;\n z-index: 1200;\n display: flex;\n border-radius: 18px;\n align-items: center;\n gap: 4px;\n max-width: calc(100vw - 24px);\n padding: 8px;\n bottom: 16px;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .altertable-annotation-bar .altertable-button, .altertable-annotation-bar-panel .altertable-button {\n color: var(--bar-muted);\n font: inherit;\n flex-shrink: 0;\n width: auto;\n transition: none;\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-count {\n white-space: nowrap;\n color: var(--bar-text);\n padding-inline-start: 6px;\n padding-inline-end: 6px;\n }\n\n .altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle] {\n --atbl-cursor-action: grab;\n touch-action: none;\n }\n\n .altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle]:active {\n --atbl-cursor-action: grabbing;\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send {\n --atbl-control-hover-surface: var(--atbl-annotation-accent-hover);\n --atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);\n background: var(--atbl-annotation-accent);\n color: var(--atbl-annotation-on-accent);\n border-color: #0000;\n border-radius: 12px;\n padding-inline-start: 14px;\n padding-inline-end: 14px;\n font-weight: 600;\n line-height: 1.25;\n }\n\n .altertable-annotation-bar-panel {\n position: fixed;\n z-index: 1201;\n overflow: auto;\n border-radius: 16px;\n width: min(420px, 100vw - 24px);\n max-height: min(440px, 45vh);\n margin: 0;\n padding: 6px;\n }\n\n .altertable-annotation-bar-panel header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 8px;\n }\n\n .altertable-annotation-bar-row {\n display: flex;\n border-radius: 10px;\n align-items: center;\n gap: 8px;\n padding: 4px;\n }\n\n .altertable-annotation-bar-row:hover, .altertable-annotation-bar-row:focus-within {\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-bar-row + .altertable-annotation-bar-row {\n border-top: 1px solid var(--bar-border);\n }\n\n .altertable-annotation-bar-panel .altertable-annotation-bar-open {\n display: grid;\n text-align: left;\n flex: 1;\n justify-content: stretch;\n gap: 2px;\n min-width: 0;\n height: auto;\n padding: 4px 6px;\n }\n\n .altertable-annotation-bar-open strong {\n color: var(--bar-text);\n font-weight: 600;\n }\n\n .altertable-annotation-bar-open span {\n color: var(--bar-muted);\n overflow-wrap: anywhere;\n font-size: 13px;\n }\n\n .altertable-annotation-bar-panel .altertable-annotation-bar-open:hover:not(:disabled) {\n background: none;\n }\n\n .altertable-annotation-bar-error {\n position: absolute;\n background: var(--bar-surface);\n color: var(--bar-text);\n border: 1px solid var(--bar-border);\n border-radius: 10px;\n padding: 8px 12px;\n font-size: 12px;\n bottom: calc(100% + 8px);\n left: 0;\n right: 0;\n }\n\n @media (max-width: 420px) {\n .altertable-annotation-bar {\n gap: 0;\n padding: 6px;\n font-size: 12px;\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send {\n padding-inline-start: 10px;\n padding-inline-end: 10px;\n }\n }\n\n @media (max-width: 360px) {\n .altertable-annotation-bar .altertable-button[data-size=\"icon-compact\"] {\n width: 26px;\n min-width: 26px;\n }\n }\n\n .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {\n font-size: 12px;\n line-height: 1.3;\n }\n\n .altertable-annotation-bar .altertable-button:hover:not(:disabled), .altertable-annotation-bar-panel .altertable-button:hover:not(:disabled) {\n color: var(--bar-text);\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send:hover:not(:disabled) {\n color: var(--atbl-annotation-on-accent);\n background: var(--atbl-annotation-accent-hover);\n }\n\n .altertable-annotation-bar .altertable-button:disabled, .altertable-annotation-bar-panel .altertable-button:disabled {\n color: var(--bar-muted);\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send:disabled {\n color: var(--bar-muted);\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send {\n position: relative;\n }\n\n .altertable-annotation-bar-send[data-pending] .altertable-annotation-bar-send-label {\n visibility: hidden;\n }\n\n .altertable-annotation-bar-spinner {\n position: absolute;\n animation: 1s linear infinite annotation-bar-spin;\n margin: auto;\n inset: 0;\n }\n\n @keyframes annotation-bar-spin {\n to {\n rotate: 360deg;\n }\n }\n\n .altertable-annotation-discard-description {\n color: var(--atbl-muted);\n font: 14px / 1.55 var(--atbl-font);\n margin: 0;\n }\n\n .altertable-annotation-discard-confirm {\n color: var(--atbl-danger);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-annotation-bar-spinner {\n animation: none;\n }\n }\n\n .altertable-annotation-bar .altertable-button[aria-pressed=\"true\"] {\n color: var(--bar-text);\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-undo {\n position: fixed;\n z-index: 1202;\n display: flex;\n border: 1px solid var(--atbl-border);\n border-radius: var(--atbl-radius-overlay);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n box-shadow: var(--atbl-shadow-overlay);\n font: 13px / 1.5 var(--atbl-font);\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n bottom: 16px;\n left: 16px;\n }\n\n .altertable-annotation-thumbnail {\n border: 1px solid var(--bar-border);\n overflow: hidden;\n background: var(--bar-surface);\n --atbl-cursor-action: zoom-in;\n border-radius: 6px;\n flex-shrink: 0;\n width: 56px;\n height: 40px;\n padding: 0;\n }\n\n .altertable-annotation-thumbnail img {\n object-fit: contain;\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .altertable-annotation-thumbnail:focus-visible {\n outline: 2px solid var(--atbl-annotation-accent);\n outline-offset: 2px;\n }\n\n .altertable-annotation-preview {\n display: block;\n object-fit: contain;\n width: 100%;\n max-height: 65vh;\n }\n\n .altertable-annotation-undo[data-bar-visible] {\n bottom: 88px;\n }\n\n .altertable-annotation-undo[data-inline] {\n position: static;\n box-shadow: none;\n border-radius: 8px;\n margin-top: 6px;\n }\n\n .altertable-sheet.altertable-annotation-image-dialog[data-placement=\"center\"] {\n width: min(960px, 100vw - 32px);\n }\n}\n\n/* packages/data-app-react/src/ui/Sheet.css */\n@layer atbl.components {\n :root:has(.altertable-sheet:modal) {\n overflow: hidden;\n }\n\n .altertable-sheet:not([open]) {\n display: none;\n }\n\n .altertable-sheet {\n position: fixed;\n inset: var(--atbl-frame-inset-top, 0px) 0 auto auto;\n height: var(--atbl-frame-visible-height);\n overflow: visible;\n border: 0;\n border-left: 1px solid var(--atbl-border);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n box-shadow: var(--atbl-shadow-overlay);\n font: var(--atbl-type-body-size) / var(--atbl-type-label-leading) var(--atbl-font);\n opacity: 0;\n transition: translate var(--atbl-duration-slow) cubic-bezier(.22, 1, .36, 1), opacity var(--atbl-duration-slow) var(--atbl-ease-standard);\n border-radius: 0;\n width: min(640px, 100vw);\n max-width: none;\n max-height: none;\n margin: 0;\n padding: 0;\n translate: 100%;\n }\n\n .altertable-sheet[data-wide] {\n width: min(960px, 100vw);\n }\n\n .altertable-sheet[open] {\n opacity: 1;\n translate: 0;\n }\n\n @starting-style {\n .altertable-sheet[open] {\n opacity: 0;\n translate: 100%;\n }\n }\n\n .altertable-sheet[open][data-closing] {\n opacity: 0;\n transition-timing-function: ease-in;\n translate: 100%;\n }\n\n .altertable-sheet::backdrop {\n background: var(--atbl-backdrop);\n opacity: 0;\n transition: opacity var(--atbl-duration-slow) var(--atbl-ease-standard);\n }\n\n .altertable-sheet[open]::backdrop {\n opacity: 1;\n }\n\n .altertable-sheet[open][data-closing]::backdrop {\n opacity: 0;\n }\n\n @starting-style {\n .altertable-sheet[open]::backdrop {\n opacity: 0;\n }\n }\n\n .altertable-sheet-shell {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr) auto;\n height: 100%;\n }\n\n .altertable-sheet-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: var(--atbl-space-md);\n padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc((var(--atbl-space-md) + var(--atbl-space-lg)) / 2);\n border-bottom: 1px solid var(--atbl-border);\n }\n\n .altertable-sheet-header h2 {\n font-size: var(--atbl-type-section-size);\n font-weight: var(--atbl-type-heading-weight);\n line-height: var(--atbl-type-heading-leading);\n letter-spacing: -.02em;\n overflow-wrap: anywhere;\n margin: 0;\n }\n\n .altertable-sheet-header p {\n color: var(--atbl-muted);\n font-size: var(--atbl-type-label-size);\n margin: 4px 0 0;\n line-height: 1.45;\n }\n\n .altertable-sheet-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: -4px -8px 0 0;\n }\n\n .altertable-sheet-close {\n color: var(--atbl-muted);\n }\n\n .altertable-sheet-body {\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc(var(--atbl-space-xl) + var(--atbl-space-md) / 2);\n min-height: 0;\n }\n\n .altertable-sheet-footer {\n padding: var(--atbl-space-md) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2);\n border-top: 1px solid var(--atbl-border);\n }\n\n @media (min-width: 601px) {\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"]) {\n inset: var(--atbl-frame-inset-top, 0px) auto auto 0;\n border-left: 0;\n border-right: 1px solid var(--atbl-border);\n translate: -100%;\n }\n\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"])[open] {\n translate: 0;\n }\n\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"])[open][data-closing] {\n translate: -100%;\n }\n\n @starting-style {\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"])[open] {\n translate: -100%;\n }\n }\n }\n\n @media (max-width: 960px) {\n .altertable-sheet[data-wide] {\n inset: auto 0 var(--atbl-frame-inset-bottom, 0px);\n box-shadow: none;\n border: 0;\n translate: 0 100%;\n }\n\n .altertable-sheet[data-wide][open] {\n translate: 0;\n }\n\n .altertable-sheet[data-wide][open][data-closing] {\n translate: 0 100%;\n }\n\n @starting-style {\n .altertable-sheet[data-wide][open] {\n translate: 0 100%;\n }\n }\n }\n\n @media (max-width: 600px) {\n .altertable-sheet {\n inset: auto 0 var(--atbl-frame-inset-bottom, 0px);\n box-shadow: none;\n border: 0;\n translate: 0 100%;\n }\n\n .altertable-sheet[open] {\n translate: 0;\n }\n\n .altertable-sheet[open][data-closing] {\n translate: 0 100%;\n }\n\n @starting-style {\n .altertable-sheet[open] {\n translate: 0 100%;\n }\n }\n\n .altertable-sheet-header {\n padding: 20px 20px 16px;\n }\n\n .altertable-sheet-body {\n padding: 20px 20px 32px;\n }\n\n .altertable-sheet-footer {\n padding: 14px 20px;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-sheet, .altertable-sheet[open][data-closing] {\n transition: none;\n translate: 0;\n }\n\n .altertable-sheet::backdrop {\n transition: none;\n }\n\n @starting-style {\n .altertable-sheet[open] {\n translate: 0;\n }\n }\n }\n\n .altertable-sheet[data-placement=\"center\"] {\n inset: var(--atbl-frame-inset-top, 0px) 0 var(--atbl-frame-inset-bottom, 0px);\n max-height: calc(var(--atbl-frame-visible-height) - 32px);\n border: 1px solid var(--atbl-border, #e3e6e8);\n border-radius: var(--atbl-radius-overlay);\n width: min(480px, 100vw - 32px);\n height: -moz-fit-content;\n height: fit-content;\n margin: auto;\n translate: 0;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-shell {\n height: auto;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-header {\n padding: 20px 24px 16px;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-body {\n padding: 0 24px 20px;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-footer {\n padding: 16px 24px;\n }\n}\n\n/* packages/data-app-react/src/ui/GradientScroll.css */\n@layer atbl.components {\n .altertable-gradient-scroll {\n overflow: auto;\n --atbl-scroll-fade-size: 1.5rem;\n min-width: 0;\n min-height: 0;\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"] {\n overflow-x: hidden;\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"] {\n overflow-y: hidden;\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"][data-fade-start][data-fade-end] {\n mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"][data-fade-start]:not([data-fade-end]) {\n mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size));\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"][data-fade-end]:not([data-fade-start]) {\n mask-image: linear-gradient(to bottom, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"][data-fade-start][data-fade-end] {\n mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"][data-fade-start]:not([data-fade-end]) {\n mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size));\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"][data-fade-end]:not([data-fade-start]) {\n mask-image: linear-gradient(to right, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n}\n\n/* packages/data-app-react/src/ui/Focus.css */\n@layer atbl.interaction {\n [data-atbl-focus=\"inset\"][data-atbl-internal-focus-state=\"focused\"][data-focused] {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:-webkit-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:-moz-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:is(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:has( > input:focus-visible) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"]:-webkit-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"]:-moz-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"]:is(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-internal-prose] a:focus-visible {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"][data-atbl-internal-focus-state=\"focused\"][data-focused] {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"inset\"]:-webkit-any(:focus-visible, [data-focus-visible]) {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"inset\"]:-moz-any(:focus-visible, [data-focus-visible]) {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"inset\"]:is(:focus-visible, [data-focus-visible]) {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"]:-webkit-any(:focus-within, [data-focus-within], [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"]:-moz-any(:focus-within, [data-focus-within], [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"]:is(:focus-within, [data-focus-within], [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"] input:focus-visible {\n outline: none;\n }\n\n @media (forced-colors: active) {\n [data-atbl-focus]:-webkit-any(:focus-visible, :focus-within, [data-focus-visible]) {\n outline-color: highlight !important;\n }\n\n [data-atbl-focus]:-moz-any(:focus-visible, :focus-within, [data-focus-visible]) {\n outline-color: highlight !important;\n }\n\n [data-atbl-focus]:is(:focus-visible, :focus-within, [data-focus-visible]) {\n outline-color: highlight !important;\n }\n\n [data-atbl-internal-prose] a:focus-visible {\n outline-color: highlight !important;\n }\n }\n}\n\n/* packages/data-app-react/src/interaction.css */\n@layer atbl.interaction {\n [data-atbl-control=\"default\"] {\n cursor: default;\n }\n\n [data-atbl-control=\"action\"], [data-atbl-internal-prose] a {\n cursor: var(--atbl-cursor-action);\n }\n\n [data-atbl-control=\"help\"] {\n cursor: var(--atbl-cursor-help);\n }\n\n [data-atbl-control=\"text\"] {\n cursor: text;\n font-size: var(--atbl-control-text-size, var(--atbl-type-body-size));\n }\n\n @media (max-width: 560px), (any-pointer: coarse) {\n [data-atbl-control=\"text\"] {\n font-size: max(16px, var(--atbl-control-text-size, var(--atbl-type-body-size)));\n }\n }\n\n [data-atbl-control]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], [data-unavailable]) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], [data-unavailable]) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control]:is(:disabled, [data-disabled], [aria-disabled=\"true\"], [data-unavailable]) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control]:has( > input:disabled) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control=\"action\"]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"action\"]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"action\"]:is(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"help\"]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"help\"]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"help\"]:is(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control]:has( > input:disabled) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control][aria-busy=\"true\"]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n cursor: var(--atbl-cursor-busy);\n }\n\n [data-atbl-control][aria-busy=\"true\"]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n cursor: var(--atbl-cursor-busy);\n }\n\n [data-atbl-control][aria-busy=\"true\"]:not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n cursor: var(--atbl-cursor-busy);\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-webkit-any(:hover, [data-hovered], [data-focused], [data-open=\"true\"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, var(--atbl-subtle));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-moz-any(:hover, [data-hovered], [data-focused], [data-open=\"true\"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, var(--atbl-subtle));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):is(:hover, [data-hovered], [data-focused], [data-open=\"true\"]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, var(--atbl-subtle));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-webkit-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-open-surface, var(--atbl-surface));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-moz-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-open-surface, var(--atbl-surface));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):is([aria-expanded=\"true\"], [data-open=\"true\"]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-open-surface, var(--atbl-surface));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-webkit-any([data-variant=\"outline\"], [data-variant=\"elevated\"]):-webkit-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n border-color: var(--atbl-control-open-border, var(--atbl-muted));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-moz-any([data-variant=\"outline\"], [data-variant=\"elevated\"]):-moz-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n border-color: var(--atbl-control-open-border, var(--atbl-muted));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):is([data-variant=\"outline\"], [data-variant=\"elevated\"]):is([aria-expanded=\"true\"], [data-open=\"true\"]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n border-color: var(--atbl-control-open-border, var(--atbl-muted));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-webkit-any([aria-pressed=\"true\"], [data-selected], [aria-current=\"true\"], :has( > input:checked)):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-moz-any([aria-pressed=\"true\"], [data-selected], [aria-current=\"true\"], :has( > input:checked)):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):is([aria-pressed=\"true\"], [data-selected], [aria-current=\"true\"], :has( > input:checked)):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"field\"], [data-atbl-internal-surface=\"control\"][data-variant=\"outline\"], [data-atbl-internal-surface=\"control\"][data-variant=\"elevated\"]):-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled=\"true\"], [data-invalid], [aria-invalid=\"true\"], :has(input[aria-invalid=\"true\"]))) {\n border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));\n }\n\n :where([data-atbl-internal-surface=\"field\"], [data-atbl-internal-surface=\"control\"][data-variant=\"outline\"], [data-atbl-internal-surface=\"control\"][data-variant=\"elevated\"]):-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled=\"true\"], [data-invalid], [aria-invalid=\"true\"], :has(input[aria-invalid=\"true\"]))) {\n border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));\n }\n\n :where([data-atbl-internal-surface=\"field\"], [data-atbl-internal-surface=\"control\"][data-variant=\"outline\"], [data-atbl-internal-surface=\"control\"][data-variant=\"elevated\"]):is(:hover, [data-hovered]):not(:is(:disabled, :has(input:disabled), [data-disabled], [aria-disabled=\"true\"], [data-invalid], [aria-invalid=\"true\"], :has(input[aria-invalid=\"true\"]))) {\n border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));\n }\n\n [data-atbl-internal-surface=\"field\"]:-webkit-any([data-invalid], [aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-internal-surface=\"field\"]:-moz-any([data-invalid], [aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-internal-surface=\"field\"]:is([data-invalid], [aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-internal-surface=\"field\"]:has(input[aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-control=\"text\"]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n color: var(--atbl-muted);\n }\n\n [data-atbl-control=\"text\"]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n color: var(--atbl-muted);\n }\n\n [data-atbl-control=\"text\"]:is(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n color: var(--atbl-muted);\n }\n}\n\n/* packages/data-app-react/src/annotations/styles.css */\n@layer atbl.tokens, atbl.base, atbl.components, atbl.interaction;\n",
|
|
1043
|
+
options
|
|
1044
|
+
});
|
|
2841
1045
|
}
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
AnnotationTarget,
|
|
2845
|
-
Breakdown,
|
|
2846
|
-
Button2 as Button,
|
|
2847
|
-
Comparison,
|
|
2848
|
-
DataApp,
|
|
2849
|
-
DataSection,
|
|
2850
|
-
DataValue,
|
|
2851
|
-
DateDisplay2 as DateDisplay,
|
|
2852
|
-
DateTimeTooltip2 as DateTimeTooltip,
|
|
2853
|
-
DetailContent2 as DetailContent,
|
|
2854
|
-
DetailView2 as DetailView,
|
|
2855
|
-
EmptyState2 as EmptyState,
|
|
2856
|
-
Grid,
|
|
2857
|
-
GridItem,
|
|
2858
|
-
IconButton2 as IconButton,
|
|
2859
|
-
MetricWidget,
|
|
2860
|
-
PeriodSummary,
|
|
2861
|
-
Ranking,
|
|
2862
|
-
SectionHeading2 as SectionHeading,
|
|
2863
|
-
Skeleton2 as Skeleton,
|
|
2864
|
-
Stack2 as Stack,
|
|
2865
|
-
TableWidget,
|
|
2866
|
-
TextContent2 as TextContent,
|
|
2867
|
-
TextWidget,
|
|
2868
|
-
Tooltip2 as Tooltip,
|
|
2869
|
-
TooltipProvider2 as TooltipProvider,
|
|
2870
|
-
UpdatedAt,
|
|
2871
|
-
VisualizationWidget,
|
|
2872
|
-
chartColor2 as chartColor,
|
|
2873
|
-
choiceVariable2 as choiceVariable,
|
|
2874
|
-
createDataContext2 as createDataContext,
|
|
2875
|
-
createDataHooks2 as createDataHooks,
|
|
2876
|
-
dateRangeVariable2 as dateRangeVariable,
|
|
2877
|
-
defineDataIdentifiers,
|
|
2878
|
-
injectDataAppAnnotationStyles,
|
|
2879
|
-
injectDataAppStyles2 as injectDataAppStyles,
|
|
2880
|
-
mountDataApp2 as mountDataApp,
|
|
2881
|
-
multiChoiceVariable2 as multiChoiceVariable,
|
|
2882
|
-
searchVariable2 as searchVariable,
|
|
2883
|
-
useDataAppAnnotations2 as useDataAppAnnotations,
|
|
2884
|
-
useDateFormatting2 as useDateFormatting,
|
|
2885
|
-
useDetailNavigation2 as useDetailNavigation
|
|
2886
|
-
};
|
|
1046
|
+
//#endregion
|
|
1047
|
+
export { AnnotationBar, AnnotationTarget, Breakdown, Button, Comparison, DataApp, DataSection, DataValue, DateDisplay, DateTimeTooltip, DetailContent, DetailView, EmptyState, Grid, GridItem, IconButton, MetricWidget, PeriodSummary, Ranking, SectionHeading, Skeleton, Stack, TableWidget, TextContent, TextWidget, Tooltip, TooltipProvider, UpdatedAt, VisualizationWidget, chartColor, choiceVariable, createDataContext, createDataHooks, dateRangeVariable, defineDataIdentifiers, injectDataAppAnnotationStyles, injectDataAppStyles, mountDataApp, multiChoiceVariable, searchVariable, useDataAppAnnotations, useDateFormatting, useDetailNavigation };
|
|
2887
1048
|
|
|
2888
|
-
//#
|
|
1049
|
+
//# sourceMappingURL=index.js.map
|