reke-ui 0.5.3 → 0.5.4
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/custom-elements.json +465 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts +99 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.js +319 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts +2 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.js +36 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/dist/node_modules/echarts/lib/chart/bar/BarSeries.js +50 -0
- package/dist/node_modules/echarts/lib/chart/bar/BarView.js +431 -0
- package/dist/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +65 -0
- package/dist/node_modules/echarts/lib/chart/bar/install.js +22 -0
- package/dist/node_modules/echarts/lib/chart/helper/Symbol.js +142 -0
- package/dist/node_modules/echarts/lib/chart/helper/SymbolDraw.js +99 -0
- package/dist/node_modules/echarts/lib/chart/helper/axisSnippets.js +19 -0
- package/dist/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +50 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesData.js +55 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +3 -3
- package/dist/node_modules/echarts/lib/chart/helper/labelHelper.js +24 -0
- package/dist/node_modules/echarts/lib/chart/line/LineSeries.js +60 -0
- package/dist/node_modules/echarts/lib/chart/line/LineView.js +471 -0
- package/dist/node_modules/echarts/lib/chart/line/helper.js +34 -0
- package/dist/node_modules/echarts/lib/chart/line/install.js +16 -0
- package/dist/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +59 -0
- package/dist/node_modules/echarts/lib/chart/line/poly.js +135 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +32 -32
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +69 -69
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +25 -25
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +16 -16
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +153 -153
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +13 -13
- package/dist/node_modules/echarts/lib/component/axis/CartesianAxisView.js +106 -0
- package/dist/node_modules/echarts/lib/component/axis/axisSplitHelper.js +50 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +20 -20
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +30 -30
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +13 -13
- package/dist/node_modules/echarts/lib/component/dataZoom/AxisProxy.js +114 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomModel.js +189 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomView.js +15 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js +21 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomView.js +67 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js +75 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomView.js +465 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomAction.js +17 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js +55 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/helper.js +88 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installCommon.js +14 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js +10 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js +9 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/roams.js +132 -0
- package/dist/node_modules/echarts/lib/component/grid/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/grid/installSimple.js +32 -0
- package/dist/node_modules/echarts/lib/component/helper/RoamController.js +172 -0
- package/dist/node_modules/echarts/lib/component/helper/cursorHelper.js +17 -0
- package/dist/node_modules/echarts/lib/component/helper/interactionMutex.js +15 -0
- package/dist/node_modules/echarts/lib/component/helper/sliderMove.js +29 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +31 -31
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +61 -61
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +29 -29
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +4 -4
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +105 -105
- package/dist/node_modules/echarts/lib/coord/Axis.js +92 -0
- package/dist/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
- package/dist/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
- package/dist/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisDefault.js +124 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +123 -14
- package/dist/node_modules/echarts/lib/coord/axisModelCommonMixin.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisModelCreator.js +39 -0
- package/dist/node_modules/echarts/lib/coord/axisNiceTicks.js +64 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +101 -22
- package/dist/node_modules/echarts/lib/coord/axisStatisticsMetricsImpl.js +43 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +151 -5
- package/dist/node_modules/echarts/lib/coord/cartesian/Axis2D.js +24 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/AxisModel.js +18 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian.js +23 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +69 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Grid.js +314 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/GridModel.js +40 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +43 -12
- package/dist/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +175 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +39 -16
- package/dist/node_modules/echarts/lib/core/echarts.js +421 -421
- package/dist/node_modules/echarts/lib/data/OrdinalMeta.js +30 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +18 -18
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +6 -6
- package/dist/node_modules/echarts/lib/data/helper/dataStackHelper.js +59 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +13 -13
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +7 -4
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +40 -8
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +3 -3
- package/dist/node_modules/echarts/lib/data/helper/transform.js +8 -8
- package/dist/node_modules/echarts/lib/extension.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelStyle.js +34 -25
- package/dist/node_modules/echarts/lib/label/sectorLabel.js +83 -0
- package/dist/node_modules/echarts/lib/layout/barCommon.js +19 -0
- package/dist/node_modules/echarts/lib/layout/barGrid.js +165 -0
- package/dist/node_modules/echarts/lib/layout/points.js +37 -0
- package/dist/node_modules/echarts/lib/loading/default.js +6 -6
- package/dist/node_modules/echarts/lib/model/Component.js +39 -39
- package/dist/node_modules/echarts/lib/model/Global.js +122 -122
- package/dist/node_modules/echarts/lib/model/Series.js +78 -78
- package/dist/node_modules/echarts/lib/model/referHelper.js +58 -0
- package/dist/node_modules/echarts/lib/processor/dataSample.js +43 -0
- package/dist/node_modules/echarts/lib/scale/Interval.js +68 -0
- package/dist/node_modules/echarts/lib/scale/Log.js +100 -0
- package/dist/node_modules/echarts/lib/scale/Ordinal.js +92 -0
- package/dist/node_modules/echarts/lib/scale/Scale.js +13 -0
- package/dist/node_modules/echarts/lib/scale/Time.js +242 -0
- package/dist/node_modules/echarts/lib/scale/break.js +10 -2
- package/dist/node_modules/echarts/lib/scale/helper.js +61 -3
- package/dist/node_modules/echarts/lib/scale/minorTicks.js +22 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +89 -7
- package/dist/node_modules/echarts/lib/util/clazz.js +35 -35
- package/dist/node_modules/echarts/lib/util/component.js +16 -16
- package/dist/node_modules/echarts/lib/util/cycleCache.js +4 -1
- package/dist/node_modules/echarts/lib/util/decal.js +11 -11
- package/dist/node_modules/echarts/lib/util/format.js +1 -1
- package/dist/node_modules/echarts/lib/util/graphic.js +170 -170
- package/dist/node_modules/echarts/lib/util/layout.js +23 -23
- package/dist/node_modules/echarts/lib/util/model.js +128 -68
- package/dist/node_modules/echarts/lib/util/number.js +55 -37
- package/dist/node_modules/echarts/lib/util/shape/sausage.js +25 -0
- package/dist/node_modules/echarts/lib/util/states.js +96 -82
- package/dist/node_modules/echarts/lib/util/styleCompat.js +10 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +24 -21
- package/dist/node_modules/echarts/lib/util/time.js +154 -18
- package/dist/node_modules/echarts/lib/util/vendor.js +26 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +19 -19
- package/dist/node_modules/echarts/lib/view/Component.js +7 -7
- package/dist/node_modules/echarts/lib/visual/style.js +5 -5
- package/dist/node_modules/zrender/lib/Element.js +35 -35
- package/dist/node_modules/zrender/lib/canvas/graphic.js +36 -36
- package/dist/node_modules/zrender/lib/core/PathProxy.js +25 -25
- package/dist/node_modules/zrender/lib/core/event.js +4 -1
- package/dist/node_modules/zrender/lib/core/util.js +69 -64
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +7 -7
- package/dist/node_modules/zrender/lib/graphic/Text.js +37 -37
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +59 -59
- package/dist/node_modules/zrender/lib/tool/color.js +60 -41
- package/dist/react.d.ts +5 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +83 -77
- package/package.json +5 -1
package/custom-elements.json
CHANGED
|
@@ -128,6 +128,471 @@
|
|
|
128
128
|
}
|
|
129
129
|
]
|
|
130
130
|
},
|
|
131
|
+
{
|
|
132
|
+
"kind": "javascript-module",
|
|
133
|
+
"path": "src/components/reke-bar-chart/reke-bar-chart.ts",
|
|
134
|
+
"declarations": [
|
|
135
|
+
{
|
|
136
|
+
"kind": "class",
|
|
137
|
+
"description": "",
|
|
138
|
+
"name": "RekeBarChart",
|
|
139
|
+
"cssProperties": [
|
|
140
|
+
{
|
|
141
|
+
"description": "Series colors 1–6 (`--reke-chart-1` … `--reke-chart-6`).",
|
|
142
|
+
"name": "--reke-chart-1",
|
|
143
|
+
"default": "#22C55E"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"description": "Chart height.",
|
|
147
|
+
"name": "--reke-bar-chart-height",
|
|
148
|
+
"default": "280px"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"description": "Loading spinner color.",
|
|
152
|
+
"name": "--reke-color-primary",
|
|
153
|
+
"default": "#22C55E"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"description": "Loading mask tint.",
|
|
157
|
+
"name": "--reke-color-bg",
|
|
158
|
+
"default": "#0A0A0B"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"description": "Tooltip background.",
|
|
162
|
+
"name": "--reke-color-surface",
|
|
163
|
+
"default": "#1A1A1A"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"description": "Tooltip border and grid lines.",
|
|
167
|
+
"name": "--reke-color-border",
|
|
168
|
+
"default": "#252525"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"description": "Tooltip text.",
|
|
172
|
+
"name": "--reke-color-text",
|
|
173
|
+
"default": "#E5E5E5"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"description": "Axis labels and legend text.",
|
|
177
|
+
"name": "--reke-color-text-label",
|
|
178
|
+
"default": "#8A8A8A"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"description": "Legend items toggled off.",
|
|
182
|
+
"name": "--reke-color-text-disabled",
|
|
183
|
+
"default": "#3B3B3B"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"description": "Chart font family.",
|
|
187
|
+
"name": "--reke-font-mono",
|
|
188
|
+
"default": "JetBrains Mono"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"cssParts": [
|
|
192
|
+
{
|
|
193
|
+
"description": "The chart canvas container.",
|
|
194
|
+
"name": "chart"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"members": [
|
|
198
|
+
{
|
|
199
|
+
"kind": "field",
|
|
200
|
+
"name": "categories",
|
|
201
|
+
"type": {
|
|
202
|
+
"text": "string[]"
|
|
203
|
+
},
|
|
204
|
+
"default": "[]",
|
|
205
|
+
"description": "X-axis categories (e.g. months)."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"kind": "field",
|
|
209
|
+
"name": "series",
|
|
210
|
+
"type": {
|
|
211
|
+
"text": "BarChartSeries[]"
|
|
212
|
+
},
|
|
213
|
+
"default": "[]",
|
|
214
|
+
"description": "Bar series; each `data` array is aligned with `categories`."
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"kind": "field",
|
|
218
|
+
"name": "label",
|
|
219
|
+
"type": {
|
|
220
|
+
"text": "string"
|
|
221
|
+
},
|
|
222
|
+
"default": "'Bar chart'",
|
|
223
|
+
"description": "Accessible label describing the chart. Required for screen readers.",
|
|
224
|
+
"attribute": "label"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"kind": "field",
|
|
228
|
+
"name": "stacked",
|
|
229
|
+
"type": {
|
|
230
|
+
"text": "boolean"
|
|
231
|
+
},
|
|
232
|
+
"default": "false",
|
|
233
|
+
"description": "Stack every series into a single bar per category instead of grouping them side by side.",
|
|
234
|
+
"attribute": "stacked",
|
|
235
|
+
"reflects": true
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"kind": "field",
|
|
239
|
+
"name": "showLegend",
|
|
240
|
+
"type": {
|
|
241
|
+
"text": "boolean"
|
|
242
|
+
},
|
|
243
|
+
"default": "false",
|
|
244
|
+
"description": "Show the legend above the chart.",
|
|
245
|
+
"attribute": "show-legend",
|
|
246
|
+
"reflects": true
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"kind": "field",
|
|
250
|
+
"name": "loading",
|
|
251
|
+
"type": {
|
|
252
|
+
"text": "boolean"
|
|
253
|
+
},
|
|
254
|
+
"default": "false",
|
|
255
|
+
"description": "Show ECharts' native loading spinner over the chart.",
|
|
256
|
+
"attribute": "loading",
|
|
257
|
+
"reflects": true
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"kind": "field",
|
|
261
|
+
"name": "palette",
|
|
262
|
+
"type": {
|
|
263
|
+
"text": "string[] | undefined"
|
|
264
|
+
},
|
|
265
|
+
"description": "Explicit color palette. Overrides the `--reke-chart-*` tokens when set."
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"kind": "field",
|
|
269
|
+
"name": "animationDuration",
|
|
270
|
+
"type": {
|
|
271
|
+
"text": "number"
|
|
272
|
+
},
|
|
273
|
+
"default": "700",
|
|
274
|
+
"description": "Entry/update animation length in ms. `0` disables animation.",
|
|
275
|
+
"attribute": "animation-duration"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"kind": "field",
|
|
279
|
+
"name": "maxVisible",
|
|
280
|
+
"type": {
|
|
281
|
+
"text": "number"
|
|
282
|
+
},
|
|
283
|
+
"default": "0",
|
|
284
|
+
"description": "Most categories drawn at once. Past it the chart opens on the latest ones\nand becomes scrollable/zoomable (wheel, drag, and a slider below). `0` = show all.",
|
|
285
|
+
"attribute": "max-visible"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"kind": "field",
|
|
289
|
+
"name": "chart",
|
|
290
|
+
"type": {
|
|
291
|
+
"text": "ECharts | undefined"
|
|
292
|
+
},
|
|
293
|
+
"privacy": "private"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"kind": "field",
|
|
297
|
+
"name": "observer",
|
|
298
|
+
"type": {
|
|
299
|
+
"text": "ResizeObserver | undefined"
|
|
300
|
+
},
|
|
301
|
+
"privacy": "private"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"kind": "field",
|
|
305
|
+
"name": "themeObserver",
|
|
306
|
+
"type": {
|
|
307
|
+
"text": "MutationObserver | undefined"
|
|
308
|
+
},
|
|
309
|
+
"privacy": "private"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"kind": "field",
|
|
313
|
+
"name": "colorScheme",
|
|
314
|
+
"type": {
|
|
315
|
+
"text": "MediaQueryList | undefined"
|
|
316
|
+
},
|
|
317
|
+
"privacy": "private"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"kind": "method",
|
|
321
|
+
"name": "readToken",
|
|
322
|
+
"privacy": "private",
|
|
323
|
+
"return": {
|
|
324
|
+
"type": {
|
|
325
|
+
"text": "string"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"parameters": [
|
|
329
|
+
{
|
|
330
|
+
"name": "name",
|
|
331
|
+
"type": {
|
|
332
|
+
"text": "string"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "fallback",
|
|
337
|
+
"type": {
|
|
338
|
+
"text": "string"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"description": "Read a CSS custom property off the host's computed style (canvas can't read var())."
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"kind": "method",
|
|
346
|
+
"name": "motionDuration",
|
|
347
|
+
"privacy": "private",
|
|
348
|
+
"return": {
|
|
349
|
+
"type": {
|
|
350
|
+
"text": "number"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"description": "Honours the OS \"reduce motion\" setting: 0ms means ECharts paints statically."
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"kind": "method",
|
|
357
|
+
"name": "resolvePalette",
|
|
358
|
+
"privacy": "private",
|
|
359
|
+
"return": {
|
|
360
|
+
"type": {
|
|
361
|
+
"text": "string[]"
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"kind": "method",
|
|
367
|
+
"name": "watchTheme",
|
|
368
|
+
"privacy": "private",
|
|
369
|
+
"return": {
|
|
370
|
+
"type": {
|
|
371
|
+
"text": "void"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"description": "Repaints with freshly read tokens when the theme switches."
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"kind": "field",
|
|
378
|
+
"name": "repaint",
|
|
379
|
+
"privacy": "private",
|
|
380
|
+
"description": "Static repaint: a theme switch should not replay the entry animation."
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"kind": "method",
|
|
384
|
+
"name": "applyLoading",
|
|
385
|
+
"privacy": "private",
|
|
386
|
+
"return": {
|
|
387
|
+
"type": {
|
|
388
|
+
"text": "void"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"kind": "method",
|
|
394
|
+
"name": "describeCategory",
|
|
395
|
+
"privacy": "private",
|
|
396
|
+
"return": {
|
|
397
|
+
"type": {
|
|
398
|
+
"text": "string"
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"parameters": [
|
|
402
|
+
{
|
|
403
|
+
"name": "index",
|
|
404
|
+
"type": {
|
|
405
|
+
"text": "number"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
"description": "\"2026-01: USDC 100, USDT 20\" — one line per category for assistive tech."
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"kind": "field",
|
|
413
|
+
"name": "chartAriaLabel",
|
|
414
|
+
"type": {
|
|
415
|
+
"text": "string"
|
|
416
|
+
},
|
|
417
|
+
"privacy": "private",
|
|
418
|
+
"readonly": true
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"kind": "method",
|
|
422
|
+
"name": "buildOption",
|
|
423
|
+
"privacy": "private",
|
|
424
|
+
"return": {
|
|
425
|
+
"type": {
|
|
426
|
+
"text": "ChartOption"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"parameters": [
|
|
430
|
+
{
|
|
431
|
+
"name": "animate",
|
|
432
|
+
"type": {
|
|
433
|
+
"text": "boolean"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"kind": "method",
|
|
440
|
+
"name": "itemRadius",
|
|
441
|
+
"privacy": "private",
|
|
442
|
+
"return": {
|
|
443
|
+
"type": {
|
|
444
|
+
"text": "number | number[]"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"parameters": [
|
|
448
|
+
{
|
|
449
|
+
"name": "i",
|
|
450
|
+
"type": {
|
|
451
|
+
"text": "number"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "index",
|
|
456
|
+
"type": {
|
|
457
|
+
"text": "number"
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"name": "value",
|
|
462
|
+
"type": {
|
|
463
|
+
"text": "number"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "stacked",
|
|
468
|
+
"type": {
|
|
469
|
+
"text": "boolean"
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"description": "Corner radius per bar item. A bar is rounded at its far end from zero: top\ncorners above zero, bottom corners below. Stacked, only the outermost\nsegment on each side of zero is rounded, so each stack reads as one shape\n(ECharts stacks positives and negatives separately — `samesign`)."
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"kind": "method",
|
|
477
|
+
"name": "buildSeries",
|
|
478
|
+
"privacy": "private",
|
|
479
|
+
"return": {
|
|
480
|
+
"type": {
|
|
481
|
+
"text": "BarSeriesOption | LineSeriesOption"
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"parameters": [
|
|
485
|
+
{
|
|
486
|
+
"name": "s",
|
|
487
|
+
"type": {
|
|
488
|
+
"text": "BarChartSeries"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "i",
|
|
493
|
+
"type": {
|
|
494
|
+
"text": "number"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "stacked",
|
|
499
|
+
"type": {
|
|
500
|
+
"text": "boolean"
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
]
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"events": [
|
|
507
|
+
{
|
|
508
|
+
"description": "Fired when a bar is clicked. `detail: { category, series, value, index }`.",
|
|
509
|
+
"name": "reke-bar-chart-select"
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"attributes": [
|
|
513
|
+
{
|
|
514
|
+
"name": "label",
|
|
515
|
+
"type": {
|
|
516
|
+
"text": "string"
|
|
517
|
+
},
|
|
518
|
+
"default": "'Bar chart'",
|
|
519
|
+
"description": "Accessible label describing the chart. Required for screen readers.",
|
|
520
|
+
"fieldName": "label"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "stacked",
|
|
524
|
+
"type": {
|
|
525
|
+
"text": "boolean"
|
|
526
|
+
},
|
|
527
|
+
"default": "false",
|
|
528
|
+
"description": "Stack every series into a single bar per category instead of grouping them side by side.",
|
|
529
|
+
"fieldName": "stacked"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "show-legend",
|
|
533
|
+
"type": {
|
|
534
|
+
"text": "boolean"
|
|
535
|
+
},
|
|
536
|
+
"default": "false",
|
|
537
|
+
"description": "Show the legend above the chart.",
|
|
538
|
+
"fieldName": "showLegend"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "loading",
|
|
542
|
+
"type": {
|
|
543
|
+
"text": "boolean"
|
|
544
|
+
},
|
|
545
|
+
"default": "false",
|
|
546
|
+
"description": "Show ECharts' native loading spinner over the chart.",
|
|
547
|
+
"fieldName": "loading"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "animation-duration",
|
|
551
|
+
"type": {
|
|
552
|
+
"text": "number"
|
|
553
|
+
},
|
|
554
|
+
"default": "700",
|
|
555
|
+
"description": "Entry/update animation length in ms. `0` disables animation.",
|
|
556
|
+
"fieldName": "animationDuration"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"name": "max-visible",
|
|
560
|
+
"type": {
|
|
561
|
+
"text": "number"
|
|
562
|
+
},
|
|
563
|
+
"default": "0",
|
|
564
|
+
"description": "Most categories drawn at once. Past it the chart opens on the latest ones\nand becomes scrollable/zoomable (wheel, drag, and a slider below). `0` = show all.",
|
|
565
|
+
"fieldName": "maxVisible"
|
|
566
|
+
}
|
|
567
|
+
],
|
|
568
|
+
"superclass": {
|
|
569
|
+
"name": "RekeElement",
|
|
570
|
+
"module": "/src/shared/base-element.js"
|
|
571
|
+
},
|
|
572
|
+
"tagName": "reke-bar-chart",
|
|
573
|
+
"customElement": true,
|
|
574
|
+
"summary": "A categorical bar chart (grouped or stacked) rendered with ECharts, isolated in Shadow DOM.\n\nCanvas cannot resolve `var()`, so every token below is read off the host's\ncomputed style and re-read whenever `data-reke-theme` or the OS color scheme\nchanges on the document."
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
"exports": [
|
|
578
|
+
{
|
|
579
|
+
"kind": "js",
|
|
580
|
+
"name": "RekeBarChart",
|
|
581
|
+
"declaration": {
|
|
582
|
+
"name": "RekeBarChart",
|
|
583
|
+
"module": "src/components/reke-bar-chart/reke-bar-chart.ts"
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"kind": "custom-element-definition",
|
|
588
|
+
"name": "reke-bar-chart",
|
|
589
|
+
"declaration": {
|
|
590
|
+
"name": "RekeBarChart",
|
|
591
|
+
"module": "src/components/reke-bar-chart/reke-bar-chart.ts"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
]
|
|
595
|
+
},
|
|
131
596
|
{
|
|
132
597
|
"kind": "javascript-module",
|
|
133
598
|
"path": "src/components/reke-badge/reke-badge.ts",
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type PropertyValues } from 'lit';
|
|
2
|
+
import { RekeElement } from '../../shared/base-element.js';
|
|
3
|
+
export interface BarChartSeries {
|
|
4
|
+
name: string;
|
|
5
|
+
/** One value per entry in `categories`, in the same order. Negative values draw below zero. */
|
|
6
|
+
data: number[];
|
|
7
|
+
color?: string;
|
|
8
|
+
/** `line` overlays the series as a line (e.g. a running total); it is never stacked. Defaults to `bar`. */
|
|
9
|
+
type?: 'bar' | 'line';
|
|
10
|
+
}
|
|
11
|
+
export interface BarChartSelectDetail {
|
|
12
|
+
category: string;
|
|
13
|
+
series: string;
|
|
14
|
+
value: number;
|
|
15
|
+
index: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @tag reke-bar-chart
|
|
19
|
+
* @summary A categorical bar chart (grouped or stacked) rendered with ECharts, isolated in Shadow DOM.
|
|
20
|
+
*
|
|
21
|
+
* Canvas cannot resolve `var()`, so every token below is read off the host's
|
|
22
|
+
* computed style and re-read whenever `data-reke-theme` or the OS color scheme
|
|
23
|
+
* changes on the document.
|
|
24
|
+
*
|
|
25
|
+
* @csspart chart - The chart canvas container.
|
|
26
|
+
*
|
|
27
|
+
* @fires reke-bar-chart-select - Fired when a bar is clicked. `detail: { category, series, value, index }`.
|
|
28
|
+
*
|
|
29
|
+
* @cssprop [--reke-chart-1=#22C55E] - Series colors 1–6 (`--reke-chart-1` … `--reke-chart-6`).
|
|
30
|
+
* @cssprop [--reke-bar-chart-height=280px] - Chart height.
|
|
31
|
+
* @cssprop [--reke-color-primary=#22C55E] - Loading spinner color.
|
|
32
|
+
* @cssprop [--reke-color-bg=#0A0A0B] - Loading mask tint.
|
|
33
|
+
* @cssprop [--reke-color-surface=#1A1A1A] - Tooltip background.
|
|
34
|
+
* @cssprop [--reke-color-border=#252525] - Tooltip border and grid lines.
|
|
35
|
+
* @cssprop [--reke-color-text=#E5E5E5] - Tooltip text.
|
|
36
|
+
* @cssprop [--reke-color-text-label=#8A8A8A] - Axis labels and legend text.
|
|
37
|
+
* @cssprop [--reke-color-text-disabled=#3B3B3B] - Legend items toggled off.
|
|
38
|
+
* @cssprop [--reke-font-mono=JetBrains Mono] - Chart font family.
|
|
39
|
+
*/
|
|
40
|
+
export declare class RekeBarChart extends RekeElement {
|
|
41
|
+
static styles: import("lit").CSSResult[];
|
|
42
|
+
/** X-axis categories (e.g. months). */
|
|
43
|
+
categories: string[];
|
|
44
|
+
/** Bar series; each `data` array is aligned with `categories`. */
|
|
45
|
+
series: BarChartSeries[];
|
|
46
|
+
/** Accessible label describing the chart. Required for screen readers. */
|
|
47
|
+
label: string;
|
|
48
|
+
/** Stack every series into a single bar per category instead of grouping them side by side. */
|
|
49
|
+
stacked: boolean;
|
|
50
|
+
/** Show the legend above the chart. */
|
|
51
|
+
showLegend: boolean;
|
|
52
|
+
/** Show ECharts' native loading spinner over the chart. */
|
|
53
|
+
loading: boolean;
|
|
54
|
+
/** Explicit color palette. Overrides the `--reke-chart-*` tokens when set. */
|
|
55
|
+
palette?: string[];
|
|
56
|
+
/** Entry/update animation length in ms. `0` disables animation. */
|
|
57
|
+
animationDuration: number;
|
|
58
|
+
/**
|
|
59
|
+
* Most categories drawn at once. Past it the chart opens on the latest ones
|
|
60
|
+
* and becomes scrollable/zoomable (wheel, drag, and a slider below). `0` = show all.
|
|
61
|
+
*/
|
|
62
|
+
maxVisible: number;
|
|
63
|
+
private chart?;
|
|
64
|
+
private observer?;
|
|
65
|
+
private themeObserver?;
|
|
66
|
+
private colorScheme?;
|
|
67
|
+
/** Read a CSS custom property off the host's computed style (canvas can't read var()). */
|
|
68
|
+
private readToken;
|
|
69
|
+
/** Honours the OS "reduce motion" setting: 0ms means ECharts paints statically. */
|
|
70
|
+
private motionDuration;
|
|
71
|
+
private resolvePalette;
|
|
72
|
+
firstUpdated(): void;
|
|
73
|
+
/** Repaints with freshly read tokens when the theme switches. */
|
|
74
|
+
private watchTheme;
|
|
75
|
+
/** Static repaint: a theme switch should not replay the entry animation. */
|
|
76
|
+
private repaint;
|
|
77
|
+
updated(changed: PropertyValues): void;
|
|
78
|
+
private applyLoading;
|
|
79
|
+
disconnectedCallback(): void;
|
|
80
|
+
/** "2026-01: USDC 100, USDT 20" — one line per category for assistive tech. */
|
|
81
|
+
private describeCategory;
|
|
82
|
+
private get chartAriaLabel();
|
|
83
|
+
private buildOption;
|
|
84
|
+
/**
|
|
85
|
+
* Corner radius per bar item. A bar is rounded at its far end from zero: top
|
|
86
|
+
* corners above zero, bottom corners below. Stacked, only the outermost
|
|
87
|
+
* segment on each side of zero is rounded, so each stack reads as one shape
|
|
88
|
+
* (ECharts stacks positives and negatives separately — `samesign`).
|
|
89
|
+
*/
|
|
90
|
+
private itemRadius;
|
|
91
|
+
private buildSeries;
|
|
92
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
93
|
+
}
|
|
94
|
+
declare global {
|
|
95
|
+
interface HTMLElementTagNameMap {
|
|
96
|
+
'reke-bar-chart': RekeBarChart;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=reke-bar-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reke-bar-chart.d.ts","sourceRoot":"","sources":["../../../src/components/reke-bar-chart/reke-bar-chart.ts"],"names":[],"mappings":"AAeA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAuB3D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,+FAA+F;IAC/F,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2GAA2G;IAC3G,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AA+BD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,YAAa,SAAQ,WAAW;IAC3C,OAAgB,MAAM,4BAAU;IAEhC,uCAAuC;IAEvC,UAAU,EAAE,MAAM,EAAE,CAAM;IAE1B,kEAAkE;IAElE,MAAM,EAAE,cAAc,EAAE,CAAM;IAE9B,0EAA0E;IAE1E,KAAK,SAAe;IAEpB,+FAA+F;IAE/F,OAAO,UAAS;IAEhB,uCAAuC;IAEvC,UAAU,UAAS;IAEnB,2DAA2D;IAE3D,OAAO,UAAS;IAEhB,8EAA8E;IAE9E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,mEAAmE;IAEnE,iBAAiB,SAAO;IAExB;;;OAGG;IAEH,UAAU,SAAK;IAEf,OAAO,CAAC,KAAK,CAAC,CAAU;IACxB,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAClC,OAAO,CAAC,aAAa,CAAC,CAAmB;IACzC,OAAO,CAAC,WAAW,CAAC,CAAiB;IAErC,0FAA0F;IAC1F,OAAO,CAAC,SAAS;IAKjB,mFAAmF;IACnF,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IAKb,YAAY,IAAI,IAAI;IAmB7B,iEAAiE;IACjE,OAAO,CAAC,UAAU;IAYlB,4EAA4E;IAC5E,OAAO,CAAC,OAAO,CAGb;IAEO,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAiB/C,OAAO,CAAC,YAAY;IAYX,oBAAoB,IAAI,IAAI;IAWrC,+EAA+E;IAC/E,OAAO,CAAC,gBAAgB;IAKxB,OAAO,KAAK,cAAc,GAGzB;IAED,OAAO,CAAC,WAAW;IA4HnB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,WAAW;IAqCV,MAAM;CAUhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
|