@altertable/data-app 0.67.0 → 0.69.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/AGENTS.md +6 -0
- package/CONTRIBUTING.md +27 -1
- package/README.md +18 -21
- package/THIRD_PARTY_NOTICES +18 -0
- package/dist/chunks/index-22d576sn.js +153 -0
- package/dist/chunks/index-22d576sn.js.map +11 -0
- package/dist/chunks/{index-ktmvs916.js → index-2sbp9h2b.js} +37 -21
- package/dist/chunks/index-2sbp9h2b.js.map +13 -0
- package/dist/chunks/{index-23dktynd.js → index-ap60vggk.js} +4 -4
- package/dist/chunks/{index-m6n8ctfc.js → index-cv36cyna.js} +4 -4
- package/dist/chunks/index-cv36cyna.js.map +10 -0
- package/dist/chunks/{index-ag0cgnvq.js → index-k766wwwr.js} +13 -9
- package/dist/chunks/index-k766wwwr.js.map +13 -0
- package/dist/chunks/{index-mt93ff2b.js → index-kwnqycjt.js} +2 -2
- package/dist/chunks/index-kwnqycjt.js.map +10 -0
- package/dist/chunks/index-m0gbxtgp.js +355 -0
- package/dist/chunks/index-m0gbxtgp.js.map +13 -0
- package/dist/chunks/{index-8qfxv0h5.js → index-qhzdzca2.js} +3951 -2242
- package/dist/chunks/index-qhzdzca2.js.map +118 -0
- package/dist/chunks/{index-x69p7cv7.js → index-r7b1ftwy.js} +3 -3
- package/dist/chunks/index-r7b1ftwy.js.map +10 -0
- package/dist/chunks/{index-ev2b5aaf.js → index-sx488hvs.js} +4 -4
- package/dist/chunks/{index-f5cnbrjz.js → index-wss3gd3h.js} +39 -9
- package/dist/chunks/index-wss3gd3h.js.map +13 -0
- package/dist/chunks/{index-qd5xgx6y.js → index-zcqxfwdq.js} +5 -12
- package/dist/chunks/index-zcqxfwdq.js.map +13 -0
- package/dist/client/index.js +6 -6
- package/dist/core/appearance.js +1 -1
- package/dist/core/config.js +3 -3
- package/dist/core/contract.js +3 -3
- package/dist/core/format.js +10 -2
- package/dist/core/format.js.map +1 -1
- package/dist/embed/index.js +26 -25
- package/dist/embed/index.js.map +4 -4
- package/dist/index.js +3 -3
- package/dist/local.js +166 -144
- package/dist/local.js.map +8 -7
- package/dist/preview.js +1456 -0
- package/dist/preview.js.map +17 -0
- package/dist/react/embed/index.js +1 -1
- package/dist/react/index.js +272 -103
- package/dist/react/index.js.map +10 -11
- package/dist/react/ui/index.js +2124 -1254
- package/dist/react/ui/index.js.map +20 -13
- package/dist/server.js +68 -57
- package/dist/server.js.map +7 -6
- package/dist/types/client/download.d.ts +5 -0
- package/dist/types/client/iframe.d.ts +4 -2
- package/dist/types/client/logger.d.ts +10 -2
- package/dist/types/core/annotations.d.ts +5 -0
- package/dist/types/core/appearance.d.ts +2 -0
- package/dist/types/core/bridge-endpoint.d.ts +2 -2
- package/dist/types/core/bridge.d.ts +22 -0
- package/dist/types/core/config.d.ts +5 -0
- package/dist/types/core/contract.d.ts +3 -1
- package/dist/types/core/date-format.d.ts +24 -0
- package/dist/types/core/dimension.d.ts +2 -1
- package/dist/types/core/filters.d.ts +4 -3
- package/dist/types/core/format.d.ts +5 -3
- package/dist/types/core/messages.d.ts +3 -1
- package/dist/types/core/operation-types.d.ts +7 -7
- package/dist/types/core/time-interval.d.ts +96 -0
- package/dist/types/core/variables.d.ts +13 -4
- package/dist/types/embed/host.d.ts +4 -4
- package/dist/types/react/annotations/annotation-editor-state.d.ts +2 -0
- package/dist/types/react/annotations/annotation-targets.d.ts +1 -0
- package/dist/types/react/annotations/getAnnotationProps.d.ts +5 -3
- package/dist/types/react/annotations/useAnnotationGeometry.d.ts +2 -2
- package/dist/types/react/bindings.d.ts +26 -3
- package/dist/types/react/date-formatting.d.ts +12 -0
- package/dist/types/react/hooks.d.ts +10 -9
- package/dist/types/react/index.d.ts +7 -2
- package/dist/types/react/search-suggestions.d.ts +8 -0
- package/dist/types/react/style-contract.d.ts +13 -5
- package/dist/types/react/ui/ChartLegend.d.ts +4 -3
- package/dist/types/react/ui/ChoicePicker.d.ts +2 -0
- package/dist/types/react/ui/ComposedChart.d.ts +1 -1
- package/dist/types/react/ui/DataApp.d.ts +5 -4
- package/dist/types/react/ui/DataAppFrame.d.ts +14 -3
- package/dist/types/react/ui/DataTable.d.ts +6 -4
- package/dist/types/react/ui/DataWidget.d.ts +4 -0
- package/dist/types/react/ui/DateDisplay.d.ts +9 -0
- package/dist/types/react/ui/DateRangePicker.d.ts +3 -1
- package/dist/types/react/ui/DateTimeTooltip.d.ts +3 -2
- package/dist/types/react/ui/DimensionPicker.d.ts +3 -1
- package/dist/types/react/ui/EmptyState.d.ts +1 -1
- package/dist/types/react/ui/FunnelChart.d.ts +20 -0
- package/dist/types/react/ui/GradientScroll.d.ts +8 -0
- package/dist/types/react/ui/Grid.d.ts +1 -1
- package/dist/types/react/ui/JourneyChart.d.ts +10 -0
- package/dist/types/react/ui/MetricWidget.d.ts +2 -0
- package/dist/types/react/ui/NumberFilterPicker.d.ts +3 -1
- package/dist/types/react/ui/PeriodSummary.d.ts +2 -1
- package/dist/types/react/ui/PickerField.d.ts +15 -0
- package/dist/types/react/ui/PopoverSurface.d.ts +5 -0
- package/dist/types/react/ui/RequestHint.d.ts +2 -2
- package/dist/types/react/ui/RetentionChart.d.ts +27 -0
- package/dist/types/react/ui/SearchField.d.ts +3 -1
- package/dist/types/react/ui/SearchTypeahead.d.ts +15 -0
- package/dist/types/react/ui/SectionHeading.d.ts +8 -0
- package/dist/types/react/ui/Select.d.ts +5 -1
- package/dist/types/react/ui/Sheet.d.ts +3 -1
- package/dist/types/react/ui/TableWidget.d.ts +8 -0
- package/dist/types/react/ui/Tabs.d.ts +4 -3
- package/dist/types/react/ui/VariableBar.d.ts +1 -1
- package/dist/types/react/ui/VisualizationWidget.d.ts +1 -1
- package/dist/types/react/ui/chart-data.d.ts +9 -0
- package/dist/types/react/ui/chart-date-axis.d.ts +15 -0
- package/dist/types/react/ui/chart-interaction.d.ts +21 -0
- package/dist/types/react/ui/chart-primitives.d.ts +7 -5
- package/dist/types/react/ui/chart-time.d.ts +16 -0
- package/dist/types/react/ui/chartColor.d.ts +1 -0
- package/dist/types/react/ui/icons.d.ts +3 -1
- package/dist/types/react/ui/index.d.ts +15 -4
- package/dist/types/react/ui/journey-flow.d.ts +49 -0
- package/dist/types/react/ui/metric-comparison.d.ts +2 -2
- package/dist/types/react/ui/metric.d.ts +2 -2
- package/dist/types/react/ui/presentation.d.ts +2 -0
- package/dist/types/react/ui/searchItems.d.ts +2 -0
- package/dist/types/react/ui/useSvgId.d.ts +2 -0
- package/dist/types/react/ui/variables.d.ts +1 -1
- package/dist/types/react/view-control-bar.d.ts +16 -0
- package/dist/types/react/view-controls.d.ts +3 -2
- package/dist/types/react/view-runtime.d.ts +3 -1
- package/dist/types/react/view.d.ts +14 -2
- package/dist/types/server/local.d.ts +3 -1
- package/dist/types/server/preview/host.d.ts +1 -0
- package/dist/types/server/preview/index.d.ts +16 -0
- package/dist/types/server/reload-channel.d.ts +6 -0
- package/dist/types/server/request-body.d.ts +4 -0
- package/dist/worker.js +2 -2
- package/docs/app-authoring.md +17 -9
- package/docs/client.md +1 -1
- package/docs/contract.md +10 -10
- package/docs/embed.md +11 -3
- package/docs/formatting-and-appearance.md +36 -5
- package/docs/layout.md +31 -8
- package/docs/react-embed.md +4 -4
- package/docs/react.md +1 -1
- package/docs/server-bun.md +25 -0
- package/docs/server.md +1 -1
- package/docs/styling.md +7 -28
- package/docs/ui.md +33 -12
- package/docs/variables.md +92 -15
- package/docs/views.md +13 -36
- package/docs/widgets.md +38 -23
- package/docs/worker.md +2 -1
- package/examples/starter-data-app/index.tsx +0 -1
- package/examples/starter-local-data-app/.bun-version +1 -0
- package/examples/starter-local-data-app/.node-version +1 -0
- package/examples/starter-local-data-app/.oxfmtrc.json +4 -0
- package/examples/starter-local-data-app/.oxlintrc.json +33 -0
- package/examples/starter-local-data-app/AGENTS.md +22 -0
- package/examples/starter-local-data-app/README.md +54 -0
- package/examples/starter-local-data-app/app.ts +22 -0
- package/examples/starter-local-data-app/bunfig.toml +2 -0
- package/examples/starter-local-data-app/package.json +33 -0
- package/examples/starter-local-data-app/src/App.tsx +8 -0
- package/examples/starter-local-data-app/src/assets.d.ts +1 -0
- package/examples/starter-local-data-app/src/data-context.ts +21 -0
- package/examples/starter-local-data-app/src/favicon.svg +13 -0
- package/examples/starter-local-data-app/src/index.html +14 -0
- package/examples/starter-local-data-app/src/main.tsx +7 -0
- package/examples/starter-local-data-app/src/operations.ts +6 -0
- package/examples/starter-local-data-app/src/server.ts +6 -0
- package/examples/starter-local-data-app/tsconfig.json +15 -0
- package/package.json +13 -3
- package/dist/chunks/index-8qfxv0h5.js.map +0 -108
- package/dist/chunks/index-ag0cgnvq.js.map +0 -13
- package/dist/chunks/index-dq7b35fn.js +0 -307
- package/dist/chunks/index-dq7b35fn.js.map +0 -13
- package/dist/chunks/index-f5cnbrjz.js.map +0 -13
- package/dist/chunks/index-ktmvs916.js.map +0 -13
- package/dist/chunks/index-m6n8ctfc.js.map +0 -10
- package/dist/chunks/index-mev09s5v.js +0 -77
- package/dist/chunks/index-mev09s5v.js.map +0 -10
- package/dist/chunks/index-mt93ff2b.js.map +0 -10
- package/dist/chunks/index-qd5xgx6y.js.map +0 -13
- package/dist/chunks/index-x69p7cv7.js.map +0 -10
- package/dist/types/react/shellStyles.d.ts +0 -3
- package/dist/types/react/ui/DataAppSkeleton.d.ts +0 -7
- /package/dist/chunks/{index-23dktynd.js.map → index-ap60vggk.js.map} +0 -0
- /package/dist/chunks/{index-ev2b5aaf.js.map → index-sx488hvs.js.map} +0 -0
package/dist/react/index.js
CHANGED
|
@@ -2,6 +2,8 @@ import {
|
|
|
2
2
|
injectStyles,
|
|
3
3
|
injectDataAppStyles2,
|
|
4
4
|
useDataApp,
|
|
5
|
+
DateFormattingContext,
|
|
6
|
+
useDateFormatting2,
|
|
5
7
|
AppIcon2,
|
|
6
8
|
classNames,
|
|
7
9
|
Button2,
|
|
@@ -17,6 +19,8 @@ import {
|
|
|
17
19
|
useDeclaredResult,
|
|
18
20
|
PrimaryViewContext,
|
|
19
21
|
ownedSource,
|
|
22
|
+
DateTimeTooltip2,
|
|
23
|
+
DateDisplay2,
|
|
20
24
|
registeredEvidence,
|
|
21
25
|
datasetTable,
|
|
22
26
|
exportDatasets,
|
|
@@ -25,76 +29,113 @@ import {
|
|
|
25
29
|
multiChoiceVariable2,
|
|
26
30
|
dateRangeVariable2,
|
|
27
31
|
sectionContent,
|
|
28
|
-
|
|
32
|
+
SearchSuggestionsContext,
|
|
29
33
|
Skeleton2,
|
|
30
34
|
createDataHooks2,
|
|
31
35
|
useDataAppAnnotations2,
|
|
32
36
|
AnnotationTooltip,
|
|
33
|
-
|
|
34
|
-
Grid2,
|
|
37
|
+
IconButton2,
|
|
35
38
|
TextContent2,
|
|
39
|
+
Stack2,
|
|
40
|
+
DataAppFrame,
|
|
36
41
|
getAnnotationProps,
|
|
37
42
|
ContentSkeleton,
|
|
38
43
|
VisualizationWidget2,
|
|
39
44
|
comparisonChange,
|
|
40
45
|
metricComparison,
|
|
41
46
|
MetricWidget2,
|
|
42
|
-
DateTimeTooltip2,
|
|
43
47
|
TableWidget2,
|
|
44
48
|
TextWidget2,
|
|
45
49
|
DataValue2,
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
chartColor2,
|
|
51
|
+
createDataContext2,
|
|
52
|
+
SectionHeading2
|
|
53
|
+
} from "../chunks/index-qhzdzca2.js";
|
|
48
54
|
import {
|
|
55
|
+
parseDateTime2,
|
|
56
|
+
formatDateTime2,
|
|
49
57
|
formatDateRange2,
|
|
50
58
|
formatMetric2,
|
|
51
59
|
formatCount2,
|
|
52
60
|
formatPercent2
|
|
53
|
-
} from "../chunks/index-
|
|
61
|
+
} from "../chunks/index-22d576sn.js";
|
|
54
62
|
import {
|
|
55
63
|
parseDataAppAnnotationDraft2
|
|
56
|
-
} from "../chunks/index-
|
|
57
|
-
import"../chunks/index-
|
|
58
|
-
import"../chunks/index-
|
|
59
|
-
import"../chunks/index-
|
|
64
|
+
} from "../chunks/index-k766wwwr.js";
|
|
65
|
+
import"../chunks/index-kwnqycjt.js";
|
|
66
|
+
import"../chunks/index-cv36cyna.js";
|
|
67
|
+
import"../chunks/index-sx488hvs.js";
|
|
60
68
|
import {
|
|
61
69
|
DataAppError2
|
|
62
|
-
} from "../chunks/index-
|
|
70
|
+
} from "../chunks/index-2sbp9h2b.js";
|
|
63
71
|
import {
|
|
64
72
|
invariant
|
|
65
|
-
} from "../chunks/index-
|
|
73
|
+
} from "../chunks/index-zcqxfwdq.js";
|
|
66
74
|
// src/react/ui/DataApp.tsx
|
|
67
75
|
import { jsx } from "react/jsx-runtime";
|
|
68
76
|
function DataApp(props) {
|
|
69
|
-
const {
|
|
77
|
+
const {
|
|
78
|
+
view,
|
|
79
|
+
datasets,
|
|
80
|
+
story,
|
|
81
|
+
showSearchSuggestions = true,
|
|
82
|
+
...frame
|
|
83
|
+
} = props;
|
|
70
84
|
const app = useDataApp();
|
|
71
85
|
const result = useDeclaredResult(view);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
...
|
|
80
|
-
|
|
81
|
-
}))
|
|
82
|
-
|
|
86
|
+
const source = ownedSource(view, result.snapshot ?? { loading: true });
|
|
87
|
+
const suggestionGroups = showSearchSuggestions && frame.showSearch !== false && result.searchControls ? datasets.flatMap((dataset, index) => {
|
|
88
|
+
const reading = dataset.readSearchSuggestions(source);
|
|
89
|
+
if (!reading)
|
|
90
|
+
return [];
|
|
91
|
+
return [
|
|
92
|
+
reading.loading ? [] : reading.value.map((item) => ({
|
|
93
|
+
...item,
|
|
94
|
+
id: `${index}:${item.id}`
|
|
95
|
+
}))
|
|
96
|
+
];
|
|
97
|
+
}) : [];
|
|
98
|
+
return /* @__PURE__ */ jsx(DateFormattingContext, {
|
|
99
|
+
value: { timeZone: result.timeZone },
|
|
100
|
+
children: /* @__PURE__ */ jsx(SearchSuggestionsContext, {
|
|
101
|
+
value: suggestionGroups.length ? {
|
|
102
|
+
groups: suggestionGroups,
|
|
103
|
+
busy: result.refreshing
|
|
104
|
+
} : null,
|
|
105
|
+
children: /* @__PURE__ */ jsx(PrimaryViewContext, {
|
|
106
|
+
value: { declaration: view, result },
|
|
107
|
+
children: /* @__PURE__ */ jsx(DataAppFrame, {
|
|
108
|
+
...frame,
|
|
109
|
+
request: result,
|
|
110
|
+
dataContext: result.dataContext,
|
|
111
|
+
story: (snapshot) => story(ownedSource(view, snapshot)).map((finding) => ({
|
|
112
|
+
...finding,
|
|
113
|
+
evidence: registeredEvidence(finding.evidence, view)
|
|
114
|
+
})),
|
|
115
|
+
csvExport: (snapshot) => exportDatasets(datasets, ownedSource(view, snapshot), view.scope(snapshot), app.title)
|
|
116
|
+
})
|
|
117
|
+
})
|
|
83
118
|
})
|
|
84
119
|
});
|
|
85
120
|
}
|
|
86
|
-
// src/react/ui/
|
|
121
|
+
// src/react/ui/Grid.tsx
|
|
87
122
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
88
|
-
function
|
|
123
|
+
function Grid({
|
|
89
124
|
children,
|
|
125
|
+
columns = 1,
|
|
126
|
+
minItemWidth = "regular",
|
|
90
127
|
gap = "lg",
|
|
128
|
+
align = "start",
|
|
91
129
|
className,
|
|
92
130
|
...props
|
|
93
131
|
}) {
|
|
94
132
|
return /* @__PURE__ */ jsx2("div", {
|
|
95
133
|
...props,
|
|
96
|
-
className: classNames("altertable-
|
|
134
|
+
className: classNames("altertable-grid", className),
|
|
135
|
+
"data-columns": columns,
|
|
136
|
+
"data-min-item-width": minItemWidth,
|
|
97
137
|
"data-gap": gap,
|
|
138
|
+
"data-align": align,
|
|
98
139
|
children
|
|
99
140
|
});
|
|
100
141
|
}
|
|
@@ -225,13 +266,6 @@ function DataValue(props) {
|
|
|
225
266
|
children: children ?? ((value) => value)
|
|
226
267
|
});
|
|
227
268
|
}
|
|
228
|
-
// src/react/ui/chartColor.ts
|
|
229
|
-
function chartColor(id) {
|
|
230
|
-
let hash = 2166136261;
|
|
231
|
-
for (const codePoint of id)
|
|
232
|
-
hash = Math.imul(hash ^ codePoint.codePointAt(0), 16777619);
|
|
233
|
-
return `var(--atbl-chart-${(hash >>> 0) % 8 + 1})`;
|
|
234
|
-
}
|
|
235
269
|
// src/react/ui/Breakdown.tsx
|
|
236
270
|
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
237
271
|
function Breakdown({
|
|
@@ -268,7 +302,7 @@ function Breakdown({
|
|
|
268
302
|
children: items.map((item) => /* @__PURE__ */ jsx5("span", {
|
|
269
303
|
style: {
|
|
270
304
|
width: `${total ? item.value / total * 100 : 0}%`,
|
|
271
|
-
backgroundColor:
|
|
305
|
+
backgroundColor: chartColor2(item.id)
|
|
272
306
|
}
|
|
273
307
|
}, item.id))
|
|
274
308
|
}),
|
|
@@ -277,7 +311,7 @@ function Breakdown({
|
|
|
277
311
|
children: items.map((item) => {
|
|
278
312
|
const share = total ? item.value / total : 0;
|
|
279
313
|
const color = {
|
|
280
|
-
"--altertable-breakdown-color":
|
|
314
|
+
"--altertable-breakdown-color": chartColor2(item.id)
|
|
281
315
|
};
|
|
282
316
|
return /* @__PURE__ */ jsxs("div", {
|
|
283
317
|
className: "altertable-breakdown-row",
|
|
@@ -352,12 +386,13 @@ function Ranking({
|
|
|
352
386
|
// src/react/ui/Comparison.tsx
|
|
353
387
|
import { jsx as jsx7, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
354
388
|
function Comparison(props) {
|
|
389
|
+
const dateFormatting = useDateFormatting2();
|
|
355
390
|
if ("metric" in props) {
|
|
356
391
|
if (props.reading.loading)
|
|
357
392
|
return /* @__PURE__ */ jsx7(ContentSkeleton, {
|
|
358
393
|
variant: "panel"
|
|
359
394
|
});
|
|
360
|
-
const comparison = metricComparison(props.metric, props.reading);
|
|
395
|
+
const comparison = metricComparison(props.metric, props.reading, dateFormatting);
|
|
361
396
|
if (!comparison)
|
|
362
397
|
return null;
|
|
363
398
|
return /* @__PURE__ */ jsx7(ComparisonContent, {
|
|
@@ -579,8 +614,8 @@ function errorPresentation(cause) {
|
|
|
579
614
|
};
|
|
580
615
|
case "source_query_rejected":
|
|
581
616
|
return {
|
|
582
|
-
title: "
|
|
583
|
-
description: "Ask the app owner to
|
|
617
|
+
title: "Couldn’t load results",
|
|
618
|
+
description: "This data app’s query was rejected. Ask the app owner to fix it.",
|
|
584
619
|
retryable: false
|
|
585
620
|
};
|
|
586
621
|
case "source_rate_limited":
|
|
@@ -688,13 +723,16 @@ function IndependentSection({
|
|
|
688
723
|
result,
|
|
689
724
|
notice: "inline"
|
|
690
725
|
});
|
|
691
|
-
return /* @__PURE__ */ jsx11(
|
|
692
|
-
value: {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
726
|
+
return /* @__PURE__ */ jsx11(DateFormattingContext, {
|
|
727
|
+
value: { timeZone: result.timeZone },
|
|
728
|
+
children: /* @__PURE__ */ jsx11(InspectionContext, {
|
|
729
|
+
value: {
|
|
730
|
+
...defaults,
|
|
731
|
+
dataContext: result.dataContext,
|
|
732
|
+
queries: result.queries
|
|
733
|
+
},
|
|
734
|
+
children: section
|
|
735
|
+
})
|
|
698
736
|
});
|
|
699
737
|
}
|
|
700
738
|
// src/react/ui/UpdatedAt.tsx
|
|
@@ -708,13 +746,16 @@ function UpdatedAt({
|
|
|
708
746
|
triggerProps,
|
|
709
747
|
...props
|
|
710
748
|
}) {
|
|
749
|
+
const defaults = useDateFormatting2({ locale, timeZone: props.timeZone });
|
|
711
750
|
const [now, setNow] = useState(Date.now);
|
|
712
751
|
useEffect(() => {
|
|
713
752
|
const interval = window.setInterval(() => setNow(Date.now()), 30000);
|
|
714
753
|
return () => window.clearInterval(interval);
|
|
715
754
|
}, []);
|
|
716
755
|
const elapsedMinutes = Math.floor(Math.max(0, now - timestamp) / 60000);
|
|
717
|
-
const relative = new Intl.RelativeTimeFormat(locale, {
|
|
756
|
+
const relative = new Intl.RelativeTimeFormat(defaults.locale, {
|
|
757
|
+
numeric: "auto"
|
|
758
|
+
});
|
|
718
759
|
let age = "just now";
|
|
719
760
|
if (elapsedMinutes >= 1440)
|
|
720
761
|
age = relative.format(-Math.floor(elapsedMinutes / 1440), "day");
|
|
@@ -722,9 +763,14 @@ function UpdatedAt({
|
|
|
722
763
|
age = relative.format(-Math.floor(elapsedMinutes / 60), "hour");
|
|
723
764
|
else if (elapsedMinutes >= 1)
|
|
724
765
|
age = relative.format(-elapsedMinutes, "minute");
|
|
725
|
-
const date =
|
|
766
|
+
const date = parseDateTime2(timestamp);
|
|
767
|
+
if (!date)
|
|
768
|
+
return /* @__PURE__ */ jsx12("span", {
|
|
769
|
+
children: children ?? `${label} —`
|
|
770
|
+
});
|
|
726
771
|
return /* @__PURE__ */ jsx12(DateTimeTooltip2, {
|
|
727
772
|
...props,
|
|
773
|
+
...defaults,
|
|
728
774
|
date,
|
|
729
775
|
triggerProps: {
|
|
730
776
|
...triggerProps,
|
|
@@ -745,41 +791,42 @@ import { jsx as jsx13, jsxs as jsxs7, Fragment as Fragment2 } from "react/jsx-ru
|
|
|
745
791
|
function duration(period) {
|
|
746
792
|
return `${period.amount} ${period.unit}${period.amount === 1 ? "" : "s"}`;
|
|
747
793
|
}
|
|
748
|
-
function label(period) {
|
|
794
|
+
function label(period, options = {}) {
|
|
749
795
|
if (period.kind === "rolling")
|
|
750
796
|
return `Last ${duration(period)}`;
|
|
751
|
-
return formatDateRange2(period);
|
|
797
|
+
return formatDateRange2(period, options);
|
|
752
798
|
}
|
|
753
|
-
function comparisonLabel(period, comparison) {
|
|
799
|
+
function comparisonLabel(period, comparison, options) {
|
|
754
800
|
if (comparison.kind === "period") {
|
|
755
801
|
if (comparison.period.kind === "calendar")
|
|
756
|
-
return label(comparison.period);
|
|
757
|
-
return `${duration(comparison.period)} ending ${
|
|
802
|
+
return label(comparison.period, options);
|
|
803
|
+
return `${duration(comparison.period)} ending ${formatDateTime2(comparison.period.end, options)}`;
|
|
758
804
|
}
|
|
759
805
|
return period.kind === "rolling" ? `Previous ${duration(period)}` : "Previous period";
|
|
760
806
|
}
|
|
761
|
-
function reportingPeriodText(period) {
|
|
807
|
+
function reportingPeriodText(period, options = {}) {
|
|
762
808
|
if (period.kind === "calendar")
|
|
763
|
-
return `${label(period)} in ${period.timeZone}`;
|
|
764
|
-
const end =
|
|
765
|
-
if (
|
|
766
|
-
return label(period);
|
|
809
|
+
return `${label(period, options)} in ${period.timeZone}`;
|
|
810
|
+
const end = parseDateTime2(period.end);
|
|
811
|
+
if (!end)
|
|
812
|
+
return label(period, options);
|
|
767
813
|
const start = new Date(end.getTime() - period.amount * (period.unit === "hour" ? 3600000 : 86400000));
|
|
768
|
-
return `${label(period)}, ${start
|
|
814
|
+
return `${label(period, options)}, ${formatDateTime2(start, options)} to ${formatDateTime2(end, options)} in ${options.timeZone ?? "UTC"}`;
|
|
769
815
|
}
|
|
770
816
|
function PeriodSummary({
|
|
771
817
|
period,
|
|
772
818
|
comparison,
|
|
773
819
|
className
|
|
774
820
|
}) {
|
|
775
|
-
const
|
|
776
|
-
const
|
|
821
|
+
const options = useDateFormatting2();
|
|
822
|
+
const comparisonText = comparison ? comparisonLabel(period, comparison, options) : null;
|
|
823
|
+
const comparisonDetail = comparison?.kind === "period" ? reportingPeriodText(comparison.period, options) : comparisonText;
|
|
777
824
|
return /* @__PURE__ */ jsxs7("p", {
|
|
778
825
|
className: classNames("altertable-period-summary", className),
|
|
779
826
|
children: [
|
|
780
827
|
/* @__PURE__ */ jsx13("span", {
|
|
781
828
|
className: "altertable-sr-only",
|
|
782
|
-
children: `Reporting period: ${reportingPeriodText(period)}${comparisonDetail ? `, compared with ${comparisonDetail}` : ""}`
|
|
829
|
+
children: `Reporting period: ${reportingPeriodText(period, options)}${comparisonDetail ? `, compared with ${comparisonDetail}` : ""}`
|
|
783
830
|
}),
|
|
784
831
|
/* @__PURE__ */ jsxs7("span", {
|
|
785
832
|
"aria-hidden": "true",
|
|
@@ -791,7 +838,7 @@ function PeriodSummary({
|
|
|
791
838
|
}),
|
|
792
839
|
/* @__PURE__ */ jsx13("span", {
|
|
793
840
|
className: "altertable-period-summary-current",
|
|
794
|
-
children: label(period)
|
|
841
|
+
children: label(period, options)
|
|
795
842
|
}),
|
|
796
843
|
comparisonText && /* @__PURE__ */ jsxs7(Fragment2, {
|
|
797
844
|
children: [
|
|
@@ -1403,7 +1450,6 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1403
1450
|
css: `/* src/react/tokens.css */
|
|
1404
1451
|
@layer atbl.tokens {
|
|
1405
1452
|
:root {
|
|
1406
|
-
--atbl-control-text-size: var(--atbl-type-body-size);
|
|
1407
1453
|
--atbl-background: var(--atbl-palette-background);
|
|
1408
1454
|
--atbl-surface: var(--atbl-palette-surface);
|
|
1409
1455
|
--atbl-subtle: var(--atbl-palette-subtle);
|
|
@@ -1411,10 +1457,10 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1411
1457
|
--atbl-text: var(--atbl-palette-text);
|
|
1412
1458
|
--atbl-muted: var(--atbl-palette-muted);
|
|
1413
1459
|
--atbl-border: var(--atbl-palette-border);
|
|
1414
|
-
--atbl-accent: var(--atbl-
|
|
1415
|
-
--atbl-on-accent: var(--atbl-
|
|
1416
|
-
--atbl-
|
|
1417
|
-
--atbl-danger
|
|
1460
|
+
--atbl-accent: var(--atbl-palette-accent);
|
|
1461
|
+
--atbl-on-accent: var(--atbl-palette-on-accent);
|
|
1462
|
+
--atbl-positive: var(--atbl-palette-positive);
|
|
1463
|
+
--atbl-danger: var(--atbl-palette-danger);
|
|
1418
1464
|
--atbl-code-surface: #f4f6f9;
|
|
1419
1465
|
--atbl-code-text: #273242;
|
|
1420
1466
|
--atbl-mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
@@ -1426,7 +1472,7 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1426
1472
|
--atbl-space-md: 16px;
|
|
1427
1473
|
--atbl-space-lg: 24px;
|
|
1428
1474
|
--atbl-space-xl: 32px;
|
|
1429
|
-
--atbl-content-width:
|
|
1475
|
+
--atbl-content-width: 1920px;
|
|
1430
1476
|
--atbl-control-height: 2.375rem;
|
|
1431
1477
|
--atbl-control-compact-height: 1.875rem;
|
|
1432
1478
|
--atbl-control-icon-size: 1rem;
|
|
@@ -1461,7 +1507,7 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1461
1507
|
--atbl-type-meta-weight: 500;
|
|
1462
1508
|
--atbl-type-page-size: clamp(1.375rem, 2.4vw, 1.75rem);
|
|
1463
1509
|
--atbl-type-section-size: 1.25rem;
|
|
1464
|
-
--atbl-type-widget-size:
|
|
1510
|
+
--atbl-type-widget-size: var(--atbl-type-label-size);
|
|
1465
1511
|
--atbl-type-body-size: .875rem;
|
|
1466
1512
|
--atbl-type-label-size: .8125rem;
|
|
1467
1513
|
--atbl-type-meta-size: .75rem;
|
|
@@ -1485,6 +1531,10 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1485
1531
|
--atbl-palette-text: #202124;
|
|
1486
1532
|
--atbl-palette-muted: #687078;
|
|
1487
1533
|
--atbl-palette-border: #e3e6e8;
|
|
1534
|
+
--atbl-palette-accent: var(--atbl-input-accent, var(--atbl-text));
|
|
1535
|
+
--atbl-palette-on-accent: var(--atbl-input-on-accent, #fff);
|
|
1536
|
+
--atbl-palette-positive: #147862;
|
|
1537
|
+
--atbl-palette-danger: #b42318;
|
|
1488
1538
|
--atbl-chart-strength: 100%;
|
|
1489
1539
|
--atbl-accent-subtle-strength: 12%;
|
|
1490
1540
|
}
|
|
@@ -1535,10 +1585,11 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1535
1585
|
}
|
|
1536
1586
|
|
|
1537
1587
|
:root[data-atbl-theme="dark"] {
|
|
1538
|
-
--atbl-accent: var(--atbl-input-dark-accent,
|
|
1588
|
+
--atbl-palette-accent: var(--atbl-input-dark-accent, var(--atbl-text));
|
|
1539
1589
|
--atbl-accent-subtle-strength: 22%;
|
|
1540
|
-
--atbl-on-accent: var(--atbl-input-on-accent, var(--atbl-background));
|
|
1541
|
-
--atbl-
|
|
1590
|
+
--atbl-palette-on-accent: var(--atbl-input-on-accent, var(--atbl-background));
|
|
1591
|
+
--atbl-palette-positive: #6bc39a;
|
|
1592
|
+
--atbl-palette-danger: #f97066;
|
|
1542
1593
|
--atbl-backdrop: #0000008c;
|
|
1543
1594
|
--atbl-code-surface: #242a31;
|
|
1544
1595
|
--atbl-code-text: #e5e9ef;
|
|
@@ -1547,6 +1598,8 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1547
1598
|
|
|
1548
1599
|
:root[data-atbl-density="compact"] {
|
|
1549
1600
|
--atbl-control-height: 2.125rem;
|
|
1601
|
+
--atbl-control-compact-height: 1.625rem;
|
|
1602
|
+
--atbl-control-gap: .375rem;
|
|
1550
1603
|
--atbl-control-padding-inline: .625rem;
|
|
1551
1604
|
--atbl-control-padding-block: .25rem;
|
|
1552
1605
|
--atbl-space-xs: 4px;
|
|
@@ -1558,6 +1611,8 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1558
1611
|
|
|
1559
1612
|
:root[data-atbl-density="spacious"] {
|
|
1560
1613
|
--atbl-control-height: 2.625rem;
|
|
1614
|
+
--atbl-control-compact-height: 2.125rem;
|
|
1615
|
+
--atbl-control-gap: .625rem;
|
|
1561
1616
|
--atbl-control-padding-inline: 1rem;
|
|
1562
1617
|
--atbl-control-padding-block: .5rem;
|
|
1563
1618
|
--atbl-space-xs: 6px;
|
|
@@ -1594,6 +1649,7 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1594
1649
|
:root[data-atbl-elevation="raised"] {
|
|
1595
1650
|
--atbl-shadow-surface: 0 8px 28px #141c281a;
|
|
1596
1651
|
--atbl-shadow-overlay: 0 24px 72px #0000003d;
|
|
1652
|
+
--atbl-shadow-control: 0 2px 6px #00000029;
|
|
1597
1653
|
}
|
|
1598
1654
|
|
|
1599
1655
|
@media (forced-colors: active) {
|
|
@@ -1754,8 +1810,8 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1754
1810
|
|
|
1755
1811
|
.altertable-button[data-size="compact"] {
|
|
1756
1812
|
min-height: var(--atbl-control-compact-height);
|
|
1813
|
+
padding: calc(var(--atbl-control-padding-block) * 2 / 3) calc(var(--atbl-control-padding-inline) * 2 / 3);
|
|
1757
1814
|
font-size: var(--atbl-type-meta-size);
|
|
1758
|
-
padding: .25rem .5rem;
|
|
1759
1815
|
}
|
|
1760
1816
|
|
|
1761
1817
|
.altertable-button[data-size="icon-compact"] {
|
|
@@ -1828,6 +1884,24 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1828
1884
|
animation: none;
|
|
1829
1885
|
}
|
|
1830
1886
|
}
|
|
1887
|
+
|
|
1888
|
+
.altertable-chart-tooltip-row {
|
|
1889
|
+
display: flex;
|
|
1890
|
+
align-items: flex-start;
|
|
1891
|
+
gap: 6px;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
.altertable-chart-tooltip-marker {
|
|
1895
|
+
flex-shrink: 0;
|
|
1896
|
+
width: 8px;
|
|
1897
|
+
height: 8px;
|
|
1898
|
+
margin-top: .3em;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
.altertable-chart-tooltip-reading {
|
|
1902
|
+
overflow-wrap: anywhere;
|
|
1903
|
+
min-width: 0;
|
|
1904
|
+
}
|
|
1831
1905
|
}
|
|
1832
1906
|
|
|
1833
1907
|
/* src/react/ui/Kbd.css */
|
|
@@ -1846,6 +1920,12 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
1846
1920
|
min-width: 1.6em;
|
|
1847
1921
|
padding: 2px 5px;
|
|
1848
1922
|
}
|
|
1923
|
+
|
|
1924
|
+
.altertable-button[data-variant="primary"] .altertable-kbd {
|
|
1925
|
+
color: inherit;
|
|
1926
|
+
border-color: color-mix(in srgb, currentColor 30%, transparent);
|
|
1927
|
+
background: none;
|
|
1928
|
+
}
|
|
1849
1929
|
}
|
|
1850
1930
|
|
|
1851
1931
|
/* src/react/annotations/AnnotationBar.css */
|
|
@@ -2202,7 +2282,7 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
2202
2282
|
|
|
2203
2283
|
.altertable-sheet {
|
|
2204
2284
|
position: fixed;
|
|
2205
|
-
overflow:
|
|
2285
|
+
overflow: visible;
|
|
2206
2286
|
border: 0;
|
|
2207
2287
|
border-left: 1px solid var(--atbl-border);
|
|
2208
2288
|
background: var(--atbl-surface);
|
|
@@ -2272,20 +2352,20 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
2272
2352
|
|
|
2273
2353
|
.altertable-sheet-header {
|
|
2274
2354
|
display: flex;
|
|
2275
|
-
border-bottom: 1px solid var(--atbl-border);
|
|
2276
2355
|
justify-content: space-between;
|
|
2277
2356
|
align-items: flex-start;
|
|
2278
|
-
gap:
|
|
2279
|
-
padding:
|
|
2357
|
+
gap: var(--atbl-space-md);
|
|
2358
|
+
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);
|
|
2359
|
+
border-bottom: 1px solid var(--atbl-border);
|
|
2280
2360
|
}
|
|
2281
2361
|
|
|
2282
2362
|
.altertable-sheet-header h2 {
|
|
2363
|
+
font-size: var(--atbl-type-section-size);
|
|
2364
|
+
font-weight: var(--atbl-type-heading-weight);
|
|
2365
|
+
line-height: var(--atbl-type-heading-leading);
|
|
2283
2366
|
letter-spacing: -.02em;
|
|
2284
2367
|
overflow-wrap: anywhere;
|
|
2285
2368
|
margin: 0;
|
|
2286
|
-
font-size: 18px;
|
|
2287
|
-
font-weight: 650;
|
|
2288
|
-
line-height: 1.25;
|
|
2289
2369
|
}
|
|
2290
2370
|
|
|
2291
2371
|
.altertable-sheet-header p {
|
|
@@ -2309,13 +2389,36 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
2309
2389
|
.altertable-sheet-body {
|
|
2310
2390
|
overflow-y: auto;
|
|
2311
2391
|
overscroll-behavior: contain;
|
|
2392
|
+
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);
|
|
2312
2393
|
min-height: 0;
|
|
2313
|
-
padding: 24px 28px 40px;
|
|
2314
2394
|
}
|
|
2315
2395
|
|
|
2316
2396
|
.altertable-sheet-footer {
|
|
2397
|
+
padding: var(--atbl-space-md) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2);
|
|
2317
2398
|
border-top: 1px solid var(--atbl-border);
|
|
2318
|
-
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
@media (min-width: 601px) {
|
|
2402
|
+
.altertable-sheet:where([data-placement="side"][data-side="left"]) {
|
|
2403
|
+
border-left: 0;
|
|
2404
|
+
border-right: 1px solid var(--atbl-border);
|
|
2405
|
+
inset: 0 auto 0 0;
|
|
2406
|
+
translate: -100%;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
.altertable-sheet:where([data-placement="side"][data-side="left"])[open] {
|
|
2410
|
+
translate: 0;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
.altertable-sheet:where([data-placement="side"][data-side="left"])[open][data-closing] {
|
|
2414
|
+
translate: -100%;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
@starting-style {
|
|
2418
|
+
.altertable-sheet:where([data-placement="side"][data-side="left"])[open] {
|
|
2419
|
+
translate: -100%;
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2319
2422
|
}
|
|
2320
2423
|
|
|
2321
2424
|
@media (max-width: 960px) {
|
|
@@ -2581,12 +2684,12 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
2581
2684
|
|
|
2582
2685
|
[data-atbl-control="text"] {
|
|
2583
2686
|
cursor: text;
|
|
2584
|
-
font-size: var(--atbl-control-text-size);
|
|
2687
|
+
font-size: var(--atbl-control-text-size, var(--atbl-type-body-size));
|
|
2585
2688
|
}
|
|
2586
2689
|
|
|
2587
2690
|
@media (max-width: 560px), (any-pointer: coarse) {
|
|
2588
2691
|
[data-atbl-control="text"] {
|
|
2589
|
-
font-size: max(16px, var(--atbl-control-text-size));
|
|
2692
|
+
font-size: max(16px, var(--atbl-control-text-size, var(--atbl-type-body-size)));
|
|
2590
2693
|
}
|
|
2591
2694
|
}
|
|
2592
2695
|
|
|
@@ -2670,30 +2773,93 @@ function injectDataAppAnnotationStyles(options = {}) {
|
|
|
2670
2773
|
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));
|
|
2671
2774
|
}
|
|
2672
2775
|
|
|
2673
|
-
:where([data-atbl-internal-surface="control"]
|
|
2674
|
-
background: var(--atbl-control-
|
|
2675
|
-
|
|
2776
|
+
: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))) {
|
|
2777
|
+
background: var(--atbl-control-open-surface, var(--atbl-surface));
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
: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))) {
|
|
2781
|
+
background: var(--atbl-control-open-surface, var(--atbl-surface));
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
:where([data-atbl-internal-surface="control"]):is([aria-expanded="true"], [data-open="true"]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2785
|
+
background: var(--atbl-control-open-surface, var(--atbl-surface));
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
: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))) {
|
|
2789
|
+
border-color: var(--atbl-control-open-border, var(--atbl-muted));
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
: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))) {
|
|
2793
|
+
border-color: var(--atbl-control-open-border, var(--atbl-muted));
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
: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))) {
|
|
2797
|
+
border-color: var(--atbl-control-open-border, var(--atbl-muted));
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
: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))) {
|
|
2801
|
+
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2802
|
+
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
: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))) {
|
|
2806
|
+
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2807
|
+
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
: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))) {
|
|
2811
|
+
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2812
|
+
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
:where([data-atbl-internal-surface="option"])[data-selected]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2816
|
+
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2817
|
+
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
:where([data-atbl-internal-surface="option"])[data-selected]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2821
|
+
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2822
|
+
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
:where([data-atbl-internal-surface="option"])[data-selected]:not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2826
|
+
background: var(--atbl-control-selected-surface, var(--atbl-subtle));
|
|
2827
|
+
color: var(--atbl-control-selected-text, var(--atbl-text));
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
: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))) {
|
|
2831
|
+
background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
: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))) {
|
|
2835
|
+
background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
:where([data-atbl-internal-surface="option"])[data-selected]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2839
|
+
background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
: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))) {
|
|
2843
|
+
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2676
2844
|
}
|
|
2677
2845
|
|
|
2678
|
-
:where([data-atbl-internal-surface="
|
|
2679
|
-
background: var(--atbl-control-
|
|
2680
|
-
color: var(--atbl-control-selected-text, var(--atbl-accent));
|
|
2846
|
+
: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))) {
|
|
2847
|
+
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2681
2848
|
}
|
|
2682
2849
|
|
|
2683
|
-
:where([data-atbl-internal-surface="
|
|
2684
|
-
background: var(--atbl-control-
|
|
2685
|
-
color: var(--atbl-control-selected-text, var(--atbl-accent));
|
|
2850
|
+
:where([data-atbl-internal-surface="option"])[data-selected]:is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
|
|
2851
|
+
background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
|
|
2686
2852
|
}
|
|
2687
2853
|
|
|
2688
|
-
[data-atbl-internal-surface="field"]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:has(input:disabled), [data-disabled], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
|
|
2854
|
+
: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"]))) {
|
|
2689
2855
|
border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
|
|
2690
2856
|
}
|
|
2691
2857
|
|
|
2692
|
-
[data-atbl-internal-surface="field"]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:has(input:disabled), [data-disabled], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
|
|
2858
|
+
: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"]))) {
|
|
2693
2859
|
border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
|
|
2694
2860
|
}
|
|
2695
2861
|
|
|
2696
|
-
[data-atbl-internal-surface="field"]:is(:hover, [data-hovered]):not(:is(:has(input:disabled), [data-disabled], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
|
|
2862
|
+
: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"]))) {
|
|
2697
2863
|
border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
|
|
2698
2864
|
}
|
|
2699
2865
|
|
|
@@ -2745,16 +2911,18 @@ export {
|
|
|
2745
2911
|
DataApp,
|
|
2746
2912
|
DataSection,
|
|
2747
2913
|
DataValue,
|
|
2914
|
+
DateDisplay2 as DateDisplay,
|
|
2748
2915
|
DateTimeTooltip2 as DateTimeTooltip,
|
|
2749
2916
|
EmptyState2 as EmptyState,
|
|
2750
|
-
|
|
2917
|
+
Grid,
|
|
2751
2918
|
GridItem,
|
|
2752
2919
|
IconButton2 as IconButton,
|
|
2753
2920
|
MetricWidget,
|
|
2754
2921
|
PeriodSummary,
|
|
2755
2922
|
Ranking,
|
|
2923
|
+
SectionHeading2 as SectionHeading,
|
|
2756
2924
|
Skeleton2 as Skeleton,
|
|
2757
|
-
Stack,
|
|
2925
|
+
Stack2 as Stack,
|
|
2758
2926
|
TableWidget,
|
|
2759
2927
|
TextContent2 as TextContent,
|
|
2760
2928
|
TextWidget,
|
|
@@ -2762,7 +2930,7 @@ export {
|
|
|
2762
2930
|
TooltipProvider2 as TooltipProvider,
|
|
2763
2931
|
UpdatedAt,
|
|
2764
2932
|
VisualizationWidget,
|
|
2765
|
-
chartColor,
|
|
2933
|
+
chartColor2 as chartColor,
|
|
2766
2934
|
choiceVariable2 as choiceVariable,
|
|
2767
2935
|
createDataContext2 as createDataContext,
|
|
2768
2936
|
createDataHooks2 as createDataHooks,
|
|
@@ -2773,7 +2941,8 @@ export {
|
|
|
2773
2941
|
mountDataApp2 as mountDataApp,
|
|
2774
2942
|
multiChoiceVariable2 as multiChoiceVariable,
|
|
2775
2943
|
searchVariable2 as searchVariable,
|
|
2776
|
-
useDataAppAnnotations2 as useDataAppAnnotations
|
|
2944
|
+
useDataAppAnnotations2 as useDataAppAnnotations,
|
|
2945
|
+
useDateFormatting2 as useDateFormatting
|
|
2777
2946
|
};
|
|
2778
2947
|
|
|
2779
|
-
//# debugId=
|
|
2948
|
+
//# debugId=1E1121DA24A2E4B464756E2164756E21
|