@expressivecss/expressive 0.11.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +392 -7
- package/README.md +37 -1
- package/dist/css/expressive.css +5440 -234
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/fonts/material-symbols-sharp.woff2 +0 -0
- package/dist/js/chunks/{chunk-AYYYWUJ4.mjs → chunk-3CLXLPYS.mjs} +17 -11
- package/dist/js/chunks/chunk-3CLXLPYS.mjs.map +7 -0
- package/dist/js/chunks/chunk-3DHK5CZU.mjs +105 -0
- package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-IMUPRRI6.mjs → chunk-3VOK6J7U.mjs} +3 -3
- package/dist/js/chunks/chunk-4PWAPV6F.mjs +7 -0
- package/dist/js/chunks/chunk-4PWAPV6F.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XFJ452AZ.mjs → chunk-55IA2XUC.mjs} +5 -6
- package/dist/js/chunks/{chunk-XFJ452AZ.mjs.map → chunk-55IA2XUC.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-XDB3G6RL.mjs → chunk-6N2XAEFK.mjs} +15 -4
- package/dist/js/chunks/{chunk-XDB3G6RL.mjs.map → chunk-6N2XAEFK.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-MISGHDUU.mjs → chunk-6OMRGML6.mjs} +9 -7
- package/dist/js/chunks/{chunk-MISGHDUU.mjs.map → chunk-6OMRGML6.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-A3BJA7V4.mjs → chunk-6WLSDZ4O.mjs} +2 -2
- package/dist/js/chunks/chunk-CCWDV5CR.mjs +292 -0
- package/dist/js/chunks/chunk-CCWDV5CR.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JODJAGFS.mjs → chunk-CKQP6P76.mjs} +31 -8
- package/dist/js/chunks/chunk-CKQP6P76.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KR44BSYQ.mjs → chunk-DLWYKFEI.mjs} +3 -3
- package/dist/js/chunks/chunk-DTKR54I6.mjs +270 -0
- package/dist/js/chunks/chunk-DTKR54I6.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SLFNPY5M.mjs → chunk-EC63CHXU.mjs} +2 -2
- package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
- package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-LZVBJ33S.mjs → chunk-GZWPXXY6.mjs} +15 -8
- package/dist/js/chunks/chunk-GZWPXXY6.mjs.map +7 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
- package/dist/js/chunks/{chunk-D4UZ4HFN.mjs → chunk-IFXVDDDH.mjs} +23 -11
- package/dist/js/chunks/chunk-IFXVDDDH.mjs.map +7 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs +262 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs.map +7 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs +163 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs.map +7 -0
- package/dist/js/chunks/{chunk-QSQ24FYT.mjs → chunk-LTWPGFBR.mjs} +2 -2
- package/dist/js/chunks/{chunk-QSQ24FYT.mjs.map → chunk-LTWPGFBR.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-I5KR22BY.mjs → chunk-LWBQIX5J.mjs} +15 -15
- package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +7 -0
- package/dist/js/chunks/{chunk-GY2Z5CJ2.mjs → chunk-NNYP33NB.mjs} +67 -32
- package/dist/js/chunks/chunk-NNYP33NB.mjs.map +7 -0
- package/dist/js/chunks/chunk-NQLC3YMW.mjs +1 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs +166 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs.map +7 -0
- package/dist/js/chunks/{chunk-VAS6JQ6P.mjs → chunk-PIJ2TAR3.mjs} +3 -3
- package/dist/js/chunks/{chunk-74N6U5JJ.mjs → chunk-PLYXLSH3.mjs} +38 -37
- package/dist/js/chunks/chunk-PLYXLSH3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-PIIAEYAJ.mjs → chunk-QDAL4IYN.mjs} +2 -2
- package/dist/js/chunks/chunk-QKWPQK5N.mjs +179 -0
- package/dist/js/chunks/chunk-QKWPQK5N.mjs.map +7 -0
- package/dist/js/chunks/{chunk-FRB7TOCS.mjs → chunk-QV2JAWIZ.mjs} +2 -2
- package/dist/js/chunks/{chunk-N3UHGN3N.mjs → chunk-QVVEWBOF.mjs} +3 -3
- package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
- package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TK6PX2GC.mjs → chunk-U2OTHOTI.mjs} +131 -19
- package/dist/js/chunks/chunk-U2OTHOTI.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TYM6U5DY.mjs → chunk-UAEAQBRC.mjs} +2 -2
- package/dist/js/chunks/{chunk-7UXHSYIA.mjs → chunk-UBLRRJ7N.mjs} +3 -3
- package/dist/js/chunks/{chunk-EP3CVKB5.mjs → chunk-UEZUJQ66.mjs} +8 -5
- package/dist/js/chunks/chunk-UEZUJQ66.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JNPIWFJT.mjs → chunk-UNEMYWEW.mjs} +3 -3
- package/dist/js/chunks/chunk-VTLBW7QS.mjs +124 -0
- package/dist/js/chunks/chunk-VTLBW7QS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JKNPQQWY.mjs → chunk-WJXDBPXQ.mjs} +28 -12
- package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-CDW6WIRT.mjs → chunk-XGHORT7J.mjs} +18 -11
- package/dist/js/chunks/chunk-XGHORT7J.mjs.map +7 -0
- package/dist/js/chunks/{chunk-7GKXUG4B.mjs → chunk-XH6BEEMY.mjs} +78 -25
- package/dist/js/chunks/chunk-XH6BEEMY.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XO5WX3TK.mjs → chunk-YDCS5S3J.mjs} +2 -2
- package/dist/js/expressive.cjs +2540 -233
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +2540 -233
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +10 -10
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +86 -38
- package/dist/js/expressive.mjs.map +1 -1
- package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
- package/dist/js/internal/behaviors/dialogs.mjs +2 -2
- package/dist/js/internal/behaviors/forms.mjs +2 -2
- package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
- package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
- package/dist/js/internal/components/appBar.mjs +2 -2
- package/dist/js/internal/components/autocomplete.mjs +4 -4
- package/dist/js/internal/components/barChart.mjs +10 -0
- package/dist/js/internal/components/barChart.mjs.map +7 -0
- package/dist/js/internal/components/buttonGroup.mjs +2 -2
- package/dist/js/internal/components/buttons.mjs +3 -3
- package/dist/js/internal/components/cards.mjs +3 -3
- package/dist/js/internal/components/carousel.mjs +3 -3
- package/dist/js/internal/components/characterCounter.mjs +2 -2
- package/dist/js/internal/components/chips.mjs +5 -5
- package/dist/js/internal/components/columnChart.mjs +9 -0
- package/dist/js/internal/components/columnChart.mjs.map +7 -0
- package/dist/js/internal/components/commandPalette.mjs +9 -0
- package/dist/js/internal/components/commandPalette.mjs.map +7 -0
- package/dist/js/internal/components/datepicker.mjs +6 -6
- package/dist/js/internal/components/expandingCard.mjs +3 -3
- package/dist/js/internal/components/heatmapChart.mjs +9 -0
- package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
- package/dist/js/internal/components/index.mjs +79 -31
- package/dist/js/internal/components/lightbox.mjs +3 -3
- package/dist/js/internal/components/lineChart.mjs +12 -0
- package/dist/js/internal/components/lineChart.mjs.map +7 -0
- package/dist/js/internal/components/menu.mjs +3 -3
- package/dist/js/internal/components/messageScroller.mjs +9 -0
- package/dist/js/internal/components/messageScroller.mjs.map +7 -0
- package/dist/js/internal/components/mixedChart.mjs +10 -0
- package/dist/js/internal/components/mixedChart.mjs.map +7 -0
- package/dist/js/internal/components/navigationRail.mjs +2 -2
- package/dist/js/internal/components/pieChart.mjs +9 -0
- package/dist/js/internal/components/pieChart.mjs.map +7 -0
- package/dist/js/internal/components/questionnaire.mjs +9 -0
- package/dist/js/internal/components/questionnaire.mjs.map +7 -0
- package/dist/js/internal/components/radarChart.mjs +9 -0
- package/dist/js/internal/components/radarChart.mjs.map +7 -0
- package/dist/js/internal/components/radialChart.mjs +9 -0
- package/dist/js/internal/components/radialChart.mjs.map +7 -0
- package/dist/js/internal/components/registry.mjs +37 -25
- package/dist/js/internal/components/richTextEditor.mjs +9 -0
- package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
- package/dist/js/internal/components/scrollspy.mjs +2 -2
- package/dist/js/internal/components/select.mjs +4 -4
- package/dist/js/internal/components/slider.mjs +3 -3
- package/dist/js/internal/components/snackbar.mjs +2 -2
- package/dist/js/internal/components/tabs.mjs +4 -4
- package/dist/js/internal/components/timepicker.mjs +4 -4
- package/dist/js/internal/components/tooltip.mjs +3 -3
- package/dist/js/internal/core/component.mjs +1 -1
- package/dist/js/internal/core/utils.mjs +1 -1
- package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
- package/dist/js/modular.mjs +86 -38
- package/dist/types/behaviors/forms.d.ts +22 -0
- package/dist/types/components/appBar.d.ts +1 -1
- package/dist/types/components/barChart.d.ts +24 -0
- package/dist/types/components/columnChart.d.ts +21 -0
- package/dist/types/components/commandPalette.d.ts +96 -0
- package/dist/types/components/datepicker.d.ts +5 -2
- package/dist/types/components/heatmapChart.d.ts +49 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/lineChart.d.ts +134 -0
- package/dist/types/components/menu.d.ts +32 -0
- package/dist/types/components/messageScroller.d.ts +111 -0
- package/dist/types/components/mixedChart.d.ts +25 -0
- package/dist/types/components/pieChart.d.ts +40 -0
- package/dist/types/components/questionnaire.d.ts +96 -0
- package/dist/types/components/radarChart.d.ts +39 -0
- package/dist/types/components/radialChart.d.ts +45 -0
- package/dist/types/components/registry.d.ts +44 -0
- package/dist/types/components/richTextEditor.d.ts +71 -0
- package/dist/types/components/slider.d.ts +1 -0
- package/dist/types/components/snackbar.d.ts +6 -0
- package/dist/types/components/timepicker.d.ts +4 -1
- package/dist/types/components/tooltip.d.ts +2 -1
- package/dist/types/modular.d.ts +10 -1
- package/package.json +4 -1
- package/src/sass/README.md +3 -6
- package/src/sass/abstracts/_index.scss +1 -1
- package/src/sass/abstracts/_mixins.scss +226 -0
- package/src/sass/abstracts/_variables.scss +14 -0
- package/src/sass/base/_typography.scss +45 -0
- package/src/sass/components/_accordion.scss +161 -0
- package/src/sass/components/_aura.scss +119 -0
- package/src/sass/components/_avatar.scss +86 -0
- package/src/sass/components/_bar-chart.scss +285 -0
- package/src/sass/components/_bottom-sheet.scss +1 -0
- package/src/sass/components/_button-groups.scss +13 -3
- package/src/sass/components/_cards.scss +16 -13
- package/src/sass/components/_carousel.scss +9 -7
- package/src/sass/components/_column-chart.scss +134 -0
- package/src/sass/components/_command-palette.scss +140 -0
- package/src/sass/components/_countdown.scss +89 -0
- package/src/sass/components/_data-table.scss +188 -0
- package/src/sass/components/_dialog.scss +1 -0
- package/src/sass/components/_empty-state.scss +78 -0
- package/src/sass/components/_expanding-card.scss +3 -0
- package/src/sass/components/_heatmap-chart.scss +156 -0
- package/src/sass/components/_index.scss +27 -0
- package/src/sass/components/_kpi.scss +162 -0
- package/src/sass/components/_line-chart.scss +102 -0
- package/src/sass/components/_marquee.scss +111 -0
- package/src/sass/components/_menu.scss +10 -0
- package/src/sass/components/_message-scroller.scss +66 -0
- package/src/sass/components/_message.scss +202 -0
- package/src/sass/components/_mixed-chart.scss +157 -0
- package/src/sass/components/_navbar.scss +11 -6
- package/src/sass/components/_navigation-bar.scss +1 -0
- package/src/sass/components/_navigation-rail.scss +9 -0
- package/src/sass/components/_page-footer.scss +0 -11
- package/src/sass/components/_pie-chart.scss +203 -0
- package/src/sass/components/_popover.scss +112 -0
- package/src/sass/components/_progress.scss +25 -6
- package/src/sass/components/_questionnaire.scss +144 -0
- package/src/sass/components/_radar-chart.scss +205 -0
- package/src/sass/components/_radial-chart.scss +174 -0
- package/src/sass/components/_rich-text-editor.scss +99 -0
- package/src/sass/components/_search.scss +1 -0
- package/src/sass/components/_side-sheet.scss +1 -0
- package/src/sass/components/_skeleton.scss +81 -0
- package/src/sass/components/_snackbar.scss +2 -1
- package/src/sass/components/_stat.scss +86 -0
- package/src/sass/components/_stepper.scss +190 -0
- package/src/sass/components/_timeline.scss +114 -0
- package/src/sass/components/_timepicker.scss +2 -2
- package/src/sass/components/_toolbar.scss +2 -1
- package/src/sass/components/_tooltip.scss +2 -0
- package/src/sass/components/_tree.scss +139 -0
- package/src/sass/components/forms/_checkboxes.scss +2 -2
- package/src/sass/components/forms/_drop-zone.scss +128 -0
- package/src/sass/components/forms/_index.scss +2 -0
- package/src/sass/components/forms/_input-fields.scss +166 -15
- package/src/sass/components/forms/_radio-buttons.scss +2 -2
- package/src/sass/components/forms/_rating.scss +165 -0
- package/src/sass/components/forms/_slider.scss +51 -29
- package/src/sass/components/forms/_switches.scss +3 -3
- package/src/sass/tokens/_reference.scss +3 -15
- package/src/sass/utilities/_helpers.scss +14 -0
- package/src/sass/utilities/_index.scss +2 -0
- package/src/sass/utilities/_scroll-area.scss +35 -0
- package/src/sass/utilities/_shapes.scss +164 -0
- package/src/sass/utilities/_spacing.scss +29 -23
- package/src/sass/utilities/_visibility.scss +3 -2
- package/dist/js/chunks/chunk-74N6U5JJ.mjs.map +0 -7
- package/dist/js/chunks/chunk-7GKXUG4B.mjs.map +0 -7
- package/dist/js/chunks/chunk-AYYYWUJ4.mjs.map +0 -7
- package/dist/js/chunks/chunk-CDW6WIRT.mjs.map +0 -7
- package/dist/js/chunks/chunk-D4UZ4HFN.mjs.map +0 -7
- package/dist/js/chunks/chunk-EP3CVKB5.mjs.map +0 -7
- package/dist/js/chunks/chunk-GY2Z5CJ2.mjs.map +0 -7
- package/dist/js/chunks/chunk-I5KR22BY.mjs.map +0 -7
- package/dist/js/chunks/chunk-JKNPQQWY.mjs.map +0 -7
- package/dist/js/chunks/chunk-JODJAGFS.mjs.map +0 -7
- package/dist/js/chunks/chunk-JR24UB4X.mjs +0 -100
- package/dist/js/chunks/chunk-JR24UB4X.mjs.map +0 -7
- package/dist/js/chunks/chunk-LZVBJ33S.mjs.map +0 -7
- package/dist/js/chunks/chunk-PMBPAFAS.mjs +0 -7
- package/dist/js/chunks/chunk-PMBPAFAS.mjs.map +0 -7
- package/dist/js/chunks/chunk-TK6PX2GC.mjs.map +0 -7
- package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
- /package/dist/js/chunks/{chunk-IMUPRRI6.mjs.map → chunk-3VOK6J7U.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-A3BJA7V4.mjs.map → chunk-6WLSDZ4O.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-KR44BSYQ.mjs.map → chunk-DLWYKFEI.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-SLFNPY5M.mjs.map → chunk-EC63CHXU.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-NQLC3YMW.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-VAS6JQ6P.mjs.map → chunk-PIJ2TAR3.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-PIIAEYAJ.mjs.map → chunk-QDAL4IYN.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-FRB7TOCS.mjs.map → chunk-QV2JAWIZ.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-N3UHGN3N.mjs.map → chunk-QVVEWBOF.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-TYM6U5DY.mjs.map → chunk-UAEAQBRC.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-7UXHSYIA.mjs.map → chunk-UBLRRJ7N.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-JNPIWFJT.mjs.map → chunk-UNEMYWEW.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-XO5WX3TK.mjs.map → chunk-YDCS5S3J.mjs.map} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InitElements, InitElement } from '../core/component';
|
|
2
|
+
import { LineChart, LineChartOptions } from './lineChart';
|
|
3
|
+
export type ColumnChartOptions = LineChartOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Column chart. It reads its <table>, scales, labels and tooltip like
|
|
6
|
+
* LineChart, but draws each row as a group of columns from zero, or one
|
|
7
|
+
* column of segments with `stacked`. Columns are HTML clipped to their
|
|
8
|
+
* value, so their rounded corners keep their shape at any size.
|
|
9
|
+
*
|
|
10
|
+
* Re-run `ColumnChart.init(el)` after changing the table.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ColumnChart extends LineChart {
|
|
13
|
+
protected get _type(): string;
|
|
14
|
+
protected get _key(): string;
|
|
15
|
+
protected get _fromZero(): boolean;
|
|
16
|
+
protected get _points(): boolean;
|
|
17
|
+
static init(el: HTMLElement, options?: Partial<ColumnChartOptions>): ColumnChart;
|
|
18
|
+
static init(els: InitElements<InitElement>, options?: Partial<ColumnChartOptions>): ColumnChart[];
|
|
19
|
+
static getInstance(el: HTMLElement): ColumnChart;
|
|
20
|
+
protected _draw(drawn?: import("./lineChart").Series[]): Element;
|
|
21
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement, Openable } from '../core/component';
|
|
2
|
+
export interface CommandPaletteOptions extends BaseOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Letter that toggles the palette together with Command on Apple platforms
|
|
5
|
+
* or Ctrl elsewhere. A key event the page has already handled is left
|
|
6
|
+
* alone. `null` turns the shortcut off. `data-shortcut` on the dialog sets
|
|
7
|
+
* it; an empty `data-shortcut` turns it off.
|
|
8
|
+
* @default 'k'
|
|
9
|
+
*/
|
|
10
|
+
shortcut: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* If true, the palette closes after a command runs.
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
closeOnRun: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A command palette: a native modal <dialog class="command-palette"> holding
|
|
19
|
+
* a search input and a list of commands. Typing filters the list; the arrow
|
|
20
|
+
* keys move through what is left and Enter runs it, while focus stays in the
|
|
21
|
+
* input. The dialog owns modality, Escape and returning focus.
|
|
22
|
+
*
|
|
23
|
+
* The input is a combobox and the list a listbox of options, with the active
|
|
24
|
+
* option reported through aria-activedescendant. A command is the link or
|
|
25
|
+
* button inside an option; running it clicks that element, so a page wires
|
|
26
|
+
* commands with ordinary hrefs and click handlers.
|
|
27
|
+
*/
|
|
28
|
+
export declare class CommandPalette extends Component<CommandPaletteOptions> implements Openable {
|
|
29
|
+
el: HTMLDialogElement;
|
|
30
|
+
/** The search input. */
|
|
31
|
+
input: HTMLInputElement;
|
|
32
|
+
/** The list of commands. */
|
|
33
|
+
list: HTMLElement;
|
|
34
|
+
private _active;
|
|
35
|
+
private _generatedIds;
|
|
36
|
+
/** Wires and refilters commands the page adds or removes later. */
|
|
37
|
+
private _observer;
|
|
38
|
+
constructor(el: HTMLDialogElement, options: Partial<CommandPaletteOptions>);
|
|
39
|
+
static get defaults(): CommandPaletteOptions;
|
|
40
|
+
/**
|
|
41
|
+
* Initializes instance of CommandPalette.
|
|
42
|
+
* @param el HTML element.
|
|
43
|
+
* @param options Component options.
|
|
44
|
+
*/
|
|
45
|
+
static init(el: HTMLElement, options?: Partial<CommandPaletteOptions>): CommandPalette;
|
|
46
|
+
/**
|
|
47
|
+
* Initializes instances of CommandPalette.
|
|
48
|
+
* @param els HTML elements.
|
|
49
|
+
* @param options Component options.
|
|
50
|
+
*/
|
|
51
|
+
static init(els: InitElements<InitElement>, options?: Partial<CommandPaletteOptions>): CommandPalette[];
|
|
52
|
+
static getInstance(el: HTMLElement): CommandPalette;
|
|
53
|
+
/** If the palette is open. */
|
|
54
|
+
get isOpen(): boolean;
|
|
55
|
+
/** Opens the palette as a modal dialog with the search input focused. */
|
|
56
|
+
open: () => void;
|
|
57
|
+
/** Closes the palette. The dialog returns focus to where it was. */
|
|
58
|
+
close: () => void;
|
|
59
|
+
destroy(): void;
|
|
60
|
+
private _items;
|
|
61
|
+
private _labels;
|
|
62
|
+
private _empty;
|
|
63
|
+
private _action;
|
|
64
|
+
private _ensureId;
|
|
65
|
+
private _setupAccessibility;
|
|
66
|
+
/** Every command, including ones added since the last pass, is an option. */
|
|
67
|
+
private _wireItems;
|
|
68
|
+
/** Commands on screen: neither hidden by the page nor filtered out. */
|
|
69
|
+
private _shown;
|
|
70
|
+
/** Shown commands the arrows and Enter can reach: disabled ones are skipped. */
|
|
71
|
+
private _visible;
|
|
72
|
+
/** A disabled link or button cannot run, so its option says so. */
|
|
73
|
+
private _isDisabled;
|
|
74
|
+
private _setActive;
|
|
75
|
+
/**
|
|
76
|
+
* Shows the commands matching the query. Filtering marks rows with
|
|
77
|
+
* data-filtered rather than hidden, so a command the page hides stays
|
|
78
|
+
* hidden. `keepActive` holds the active command while it is still
|
|
79
|
+
* reachable, for list changes the user did not make.
|
|
80
|
+
*/
|
|
81
|
+
private _filter;
|
|
82
|
+
private _move;
|
|
83
|
+
/** Runs a command by clicking its link or button; the click handler closes. */
|
|
84
|
+
private _run;
|
|
85
|
+
_handleInput: () => void;
|
|
86
|
+
_handleKeydown: (e: KeyboardEvent) => void;
|
|
87
|
+
_handleListClick: (e: MouseEvent) => void;
|
|
88
|
+
_handlePointerMove: (e: PointerEvent) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Each opening starts from the full list. The close event is queued, so a
|
|
91
|
+
* palette reopened straight away may already be open again; its new search
|
|
92
|
+
* is left alone.
|
|
93
|
+
*/
|
|
94
|
+
_handleClose: () => void;
|
|
95
|
+
_handleShortcut: (e: KeyboardEvent) => void;
|
|
96
|
+
}
|
|
@@ -18,6 +18,8 @@ export interface DatepickerOptions extends BaseOptions {
|
|
|
18
18
|
format: string | ((d: Date) => string);
|
|
19
19
|
/**
|
|
20
20
|
* Used to create date object from current input string.
|
|
21
|
+
* Receives the format string, or an empty string when format is a function.
|
|
22
|
+
* Not called for blank input.
|
|
21
23
|
* @default null
|
|
22
24
|
*/
|
|
23
25
|
parse: ((value: string, format: string) => Date) | null;
|
|
@@ -123,9 +125,9 @@ export interface DatepickerOptions extends BaseOptions {
|
|
|
123
125
|
showClearBtn: boolean;
|
|
124
126
|
/**
|
|
125
127
|
* Autosubmit calendar day select to input field
|
|
126
|
-
* @default
|
|
128
|
+
* @default true
|
|
127
129
|
*/
|
|
128
|
-
autoSubmit:
|
|
130
|
+
autoSubmit: boolean;
|
|
129
131
|
/**
|
|
130
132
|
* Internationalization options.
|
|
131
133
|
*/
|
|
@@ -244,6 +246,7 @@ export declare class Datepicker extends Component<DatepickerOptions> {
|
|
|
244
246
|
static _escape(value: unknown): string;
|
|
245
247
|
static _isDate(obj: any): boolean;
|
|
246
248
|
private static _parseDate;
|
|
249
|
+
private _parseInput;
|
|
247
250
|
static _isWeekend(date: any): boolean;
|
|
248
251
|
/**
|
|
249
252
|
* @deprecated as this function has no effect without any return statement or global parameter setter.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { InitElements, InitElement } from '../core/component';
|
|
2
|
+
import { LineChart, LineChartOptions } from './lineChart';
|
|
3
|
+
export type HeatmapChartOptions = LineChartOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Heatmap chart. It reads its <table> like LineChart, but draws every cell
|
|
6
|
+
* as a square of the grid, shaded from the lowest value to the highest, with
|
|
7
|
+
* the row headers beside it and the column headers below. A `data-label` on
|
|
8
|
+
* a header cell replaces its text on the grid; an empty one hides it. The
|
|
9
|
+
* tooltip shows one cell, and the arrow keys move round the grid.
|
|
10
|
+
*
|
|
11
|
+
* Re-run `HeatmapChart.init(el)` after changing the table.
|
|
12
|
+
*/
|
|
13
|
+
export declare class HeatmapChart extends LineChart {
|
|
14
|
+
/** Every cell, row by row. */
|
|
15
|
+
private _cells;
|
|
16
|
+
/** Each cell's shade from 0 to 1, or null for a gap. */
|
|
17
|
+
private _levels;
|
|
18
|
+
/** The text of the lowest and highest cells, for the legend. */
|
|
19
|
+
private _ends;
|
|
20
|
+
/** The shades of the lowest and highest cells, where the legend's gradient runs. */
|
|
21
|
+
private _endLevels;
|
|
22
|
+
protected get _type(): string;
|
|
23
|
+
protected get _key(): string;
|
|
24
|
+
static init(el: HTMLElement, options?: Partial<HeatmapChartOptions>): HeatmapChart;
|
|
25
|
+
static init(els: InitElements<InitElement>, options?: Partial<HeatmapChartOptions>): HeatmapChart[];
|
|
26
|
+
static getInstance(el: HTMLElement): HeatmapChart;
|
|
27
|
+
/** Highlights one cell, numbered row by row. Pass -1 to hide the tooltip. */
|
|
28
|
+
show(index: number): void;
|
|
29
|
+
/** Arrows move the way they point, so left and right swap in RTL. */
|
|
30
|
+
protected _keyTarget(key: string): number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The cell under the pointer by its position, or -1 off the grid. A touch
|
|
33
|
+
* keeps its first target while it drags, so the target cannot be used. The
|
|
34
|
+
* cells and gaps are even, so each band's edge falls in a gap and a gap
|
|
35
|
+
* counts as the nearer cell.
|
|
36
|
+
*/
|
|
37
|
+
protected _indexAt(e: PointerEvent): number;
|
|
38
|
+
/**
|
|
39
|
+
* The legend: a gradient from the lowest cell's shade to the highest's,
|
|
40
|
+
* labelled with their text. A fixed scale wider than the data shows only
|
|
41
|
+
* the part the data uses.
|
|
42
|
+
*/
|
|
43
|
+
protected _guides(): Element[];
|
|
44
|
+
/**
|
|
45
|
+
* A grid of the row headers and cells, row by row, with the column headers
|
|
46
|
+
* below. Each cell's --level shades it in CSS.
|
|
47
|
+
*/
|
|
48
|
+
protected _draw(): Element;
|
|
49
|
+
}
|
|
@@ -7,8 +7,20 @@ export { ExpandingCard } from "./expandingCard";
|
|
|
7
7
|
export { Carousel } from "./carousel";
|
|
8
8
|
export { CharacterCounter } from "./characterCounter";
|
|
9
9
|
export { Chips } from "./chips";
|
|
10
|
+
export { CommandPalette } from "./commandPalette";
|
|
11
|
+
export { Questionnaire } from "./questionnaire";
|
|
12
|
+
export { LineChart } from "./lineChart";
|
|
13
|
+
export { ColumnChart } from "./columnChart";
|
|
14
|
+
export { BarChart } from "./barChart";
|
|
15
|
+
export { PieChart } from "./pieChart";
|
|
16
|
+
export { HeatmapChart } from "./heatmapChart";
|
|
17
|
+
export { RadarChart } from "./radarChart";
|
|
18
|
+
export { RadialChart } from "./radialChart";
|
|
19
|
+
export { MixedChart } from "./mixedChart";
|
|
10
20
|
export { Datepicker } from "./datepicker";
|
|
11
21
|
export { Menu } from "./menu";
|
|
22
|
+
export { MessageScroller } from "./messageScroller";
|
|
23
|
+
export { RichTextEditor } from "./richTextEditor";
|
|
12
24
|
export { Lightbox } from "./lightbox";
|
|
13
25
|
export { Slider } from "./slider";
|
|
14
26
|
export { ScrollSpy } from "./scrollspy";
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
|
+
export interface LineChartOptions extends BaseOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Lowest value on the y axis. Defaults to the data minimum less 10% of
|
|
5
|
+
* the range; a stacked chart starts at zero or its lowest total, and a
|
|
6
|
+
* column chart always includes zero. Overridden by `data-min` on the chart.
|
|
7
|
+
*/
|
|
8
|
+
min: number | null;
|
|
9
|
+
/**
|
|
10
|
+
* Highest value on the y axis. Defaults to the data maximum plus 10% of
|
|
11
|
+
* the range. Overridden by `data-max` on the chart.
|
|
12
|
+
*/
|
|
13
|
+
max: number | null;
|
|
14
|
+
}
|
|
15
|
+
export declare const COLORS = 4;
|
|
16
|
+
/** An SVG element with its attributes. */
|
|
17
|
+
export declare function svgNode(name: string, attributes?: Record<string, string>): SVGElement;
|
|
18
|
+
export interface Series {
|
|
19
|
+
name: string;
|
|
20
|
+
/** Header cell classes, such as `dashed`. */
|
|
21
|
+
className: string;
|
|
22
|
+
/** Cell text, shown in the tooltip as the author formatted it. */
|
|
23
|
+
text: string[];
|
|
24
|
+
values: (number | null)[];
|
|
25
|
+
/**
|
|
26
|
+
* Where each value is drawn: the value, or in a stacked chart the running
|
|
27
|
+
* total, which is unknown (null) above a gap.
|
|
28
|
+
*/
|
|
29
|
+
tops: (number | null)[];
|
|
30
|
+
/** In a stacked chart, the total of the series below, which this area fills down to. */
|
|
31
|
+
base?: (number | null)[];
|
|
32
|
+
/** The series' y scale: a value's distance down the plot, in percent. */
|
|
33
|
+
y: (value: number) => number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Line chart. The data is the chart's <table>; this class draws it as an SVG
|
|
37
|
+
* with x labels, a legend for more than one series, and a cursor and tooltip
|
|
38
|
+
* that follow the pointer or the arrow keys. Styling is CSS.
|
|
39
|
+
*
|
|
40
|
+
* Re-run `LineChart.init(el)` after changing the table.
|
|
41
|
+
*/
|
|
42
|
+
export declare class LineChart extends Component<LineChartOptions> {
|
|
43
|
+
/** The values' x positions and series, read from the table. */
|
|
44
|
+
labels: string[];
|
|
45
|
+
series: Series[];
|
|
46
|
+
/** The highlighted row, or -1. */
|
|
47
|
+
activeIndex: number;
|
|
48
|
+
private _generated;
|
|
49
|
+
/** The table's header cells and body rows, as read. */
|
|
50
|
+
protected _header: HTMLTableCellElement[];
|
|
51
|
+
protected _rows: HTMLTableRowElement[];
|
|
52
|
+
protected _plot: HTMLElement;
|
|
53
|
+
protected _cursor: HTMLElement;
|
|
54
|
+
protected _tooltip: HTMLElement;
|
|
55
|
+
protected _y: (value: number) => number;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the rows run right to left: a horizontal row axis in a
|
|
58
|
+
* right-to-left context, like the labels. Bar chart rows keep their order.
|
|
59
|
+
*/
|
|
60
|
+
protected _reversed: boolean;
|
|
61
|
+
/** The class prefix of the generated parts; ColumnChart reuses this class. */
|
|
62
|
+
protected get _type(): string;
|
|
63
|
+
/** Whether the y axis always includes zero, as columns grow from it. */
|
|
64
|
+
protected get _fromZero(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the rows run down the plot and the values across it, as in a
|
|
67
|
+
* bar chart. The rows then keep their order in a right-to-left context.
|
|
68
|
+
*/
|
|
69
|
+
protected get _horizontal(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether the rows go round a circle, as in a pie or radar chart. The
|
|
72
|
+
* arrows then step round it, wrapping from the last row to the first.
|
|
73
|
+
*/
|
|
74
|
+
protected get _circular(): boolean;
|
|
75
|
+
/** Whether the cursor marks each series with a point. */
|
|
76
|
+
protected get _points(): boolean;
|
|
77
|
+
protected get _key(): string;
|
|
78
|
+
constructor(el: HTMLElement, options: Partial<LineChartOptions>);
|
|
79
|
+
static get defaults(): LineChartOptions;
|
|
80
|
+
static init(el: HTMLElement, options?: Partial<LineChartOptions>): LineChart;
|
|
81
|
+
static init(els: InitElements<InitElement>, options?: Partial<LineChartOptions>): LineChart[];
|
|
82
|
+
static getInstance(el: HTMLElement): LineChart;
|
|
83
|
+
destroy(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Highlights one row: moves the cursor and fills the tooltip.
|
|
86
|
+
* Pass -1 to hide them. Does nothing for a chart without data.
|
|
87
|
+
*/
|
|
88
|
+
show(index: number): void;
|
|
89
|
+
/**
|
|
90
|
+
* Moves the filled cursor and tooltip to a row: beside its band, with the
|
|
91
|
+
* tooltip opening back over the plot past the middle.
|
|
92
|
+
*/
|
|
93
|
+
protected _place(index: number): void;
|
|
94
|
+
private _read;
|
|
95
|
+
/** A number from one of the chart's data attributes, or null. */
|
|
96
|
+
protected _number(name: string): number;
|
|
97
|
+
/**
|
|
98
|
+
* Fits a y scale to the series' tops, between `min` and `max` where they
|
|
99
|
+
* are set, and gives it to each series.
|
|
100
|
+
*/
|
|
101
|
+
protected _scale(series: Series[], min: number | null, max: number | null, fromZero?: boolean): (value: number) => number;
|
|
102
|
+
/** Each row sits in the middle of an equal band, beside its label. */
|
|
103
|
+
private _x;
|
|
104
|
+
private _render;
|
|
105
|
+
/**
|
|
106
|
+
* The <tfoot> row as a total to show over the plot, its value over its
|
|
107
|
+
* label, or null without one.
|
|
108
|
+
*/
|
|
109
|
+
protected _total(className: string): HTMLElement | null;
|
|
110
|
+
/** The parts below the plot: the row labels and the legend. */
|
|
111
|
+
protected _guides(): Element[];
|
|
112
|
+
/** The series legend, for more than one series. */
|
|
113
|
+
protected _legend(): Element[];
|
|
114
|
+
/** Draws the series, which fill the plot. */
|
|
115
|
+
protected _draw(drawn?: Series[]): Element;
|
|
116
|
+
private _onPointerMove;
|
|
117
|
+
/** The row under the pointer, or -1. */
|
|
118
|
+
protected _indexAt(e: PointerEvent): number;
|
|
119
|
+
/**
|
|
120
|
+
* For a circular chart, the pointer's position from the plot's middle: a
|
|
121
|
+
* fraction of a turn clockwise from the top, and its distance as a share
|
|
122
|
+
* of the plot's width.
|
|
123
|
+
*/
|
|
124
|
+
protected _polarAt(e: PointerEvent): [turn: number, distance: number];
|
|
125
|
+
/** The keys that move to the next row and to the one before. */
|
|
126
|
+
protected get _arrows(): [string[], string[]];
|
|
127
|
+
private _onFocus;
|
|
128
|
+
private _onLeave;
|
|
129
|
+
/** The browser took the touch to scroll the page. */
|
|
130
|
+
private _onCancel;
|
|
131
|
+
/** The index a key moves to, or undefined for a key the chart ignores. */
|
|
132
|
+
protected _keyTarget(key: string): number | undefined;
|
|
133
|
+
private _onKeyDown;
|
|
134
|
+
}
|
|
@@ -40,6 +40,13 @@ export interface MenuOptions extends BaseOptions {
|
|
|
40
40
|
* @default false
|
|
41
41
|
*/
|
|
42
42
|
hover: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* If true, the trigger is a region and the menu is its context menu: it
|
|
45
|
+
* opens at the pointer on right-click, long-press or the keyboard context
|
|
46
|
+
* menu key instead of on click. `data-context-menu` on the trigger sets it.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
contextMenu: boolean;
|
|
43
50
|
/**
|
|
44
51
|
* The duration of the transition enter in milliseconds.
|
|
45
52
|
* @default 150
|
|
@@ -94,6 +101,15 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
|
|
|
94
101
|
private _pendingTimers;
|
|
95
102
|
private _transition;
|
|
96
103
|
private _originalInert;
|
|
104
|
+
private _menuClickTargets;
|
|
105
|
+
/**
|
|
106
|
+
* Viewport point the open context menu belongs to. Null outside a
|
|
107
|
+
* right-click, so a keyboard or programmatic open uses the region's corner
|
|
108
|
+
* rather than an old pointer position.
|
|
109
|
+
*/
|
|
110
|
+
private _contextPoint;
|
|
111
|
+
/** What had focus when a context menu opened; focus goes back there. */
|
|
112
|
+
private _contextReturn;
|
|
97
113
|
constructor(el: HTMLElement, options: Partial<MenuOptions>);
|
|
98
114
|
static get defaults(): MenuOptions;
|
|
99
115
|
/**
|
|
@@ -114,6 +130,8 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
|
|
|
114
130
|
_removeEventHandlers(): void;
|
|
115
131
|
_setupTemporaryEventHandlers(): void;
|
|
116
132
|
_removeTemporaryEventHandlers(): void;
|
|
133
|
+
_handleContextMenu: (e: MouseEvent) => void;
|
|
134
|
+
_handleDocumentContextMenu: (e: MouseEvent) => void;
|
|
117
135
|
_handleClick: (e: MouseEvent) => void;
|
|
118
136
|
_handleMouseEnter: () => void;
|
|
119
137
|
_handleMouseLeave: (e: MouseEvent) => void;
|
|
@@ -156,6 +174,20 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
|
|
|
156
174
|
_animateOut(): void;
|
|
157
175
|
private _getClosestAncestor;
|
|
158
176
|
_placeMenu(): void;
|
|
177
|
+
/** Where a context menu opens without a pointer: the region's start corner. */
|
|
178
|
+
private _regionCorner;
|
|
179
|
+
/**
|
|
180
|
+
* Places a context menu with its start corner on the point, flipping to
|
|
181
|
+
* the other side of the point where it would not fit. The bounds are the
|
|
182
|
+
* viewport, narrowed to a scrolling or clipping ancestor the menu sits in;
|
|
183
|
+
* a menu taller than them gets their height and scrolls.
|
|
184
|
+
*
|
|
185
|
+
* The menu rests at left/top 0 of its containing block, so its rect is the
|
|
186
|
+
* offset to subtract - the same trick _getMenuPosition uses. It is measured
|
|
187
|
+
* without the entry animation's scale, which a second right-click can catch.
|
|
188
|
+
*/
|
|
189
|
+
private _placeMenuAtPoint;
|
|
190
|
+
private _setExpanded;
|
|
159
191
|
/**
|
|
160
192
|
* Open menu.
|
|
161
193
|
*/
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
|
+
export interface MessageScrollerOptions extends BaseOptions {
|
|
3
|
+
/**
|
|
4
|
+
* If true, the viewport follows new content while the reader is at the
|
|
5
|
+
* end, and a newly appended scroll anchor is brought to the top.
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
autoScroll: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Where the transcript opens: `'end'`, `'start'`, or `'last-anchor'`, the
|
|
11
|
+
* start of the last anchored turn. `'last-anchor'` opens at the end when
|
|
12
|
+
* that turn already fits in the viewport.
|
|
13
|
+
* @default 'end'
|
|
14
|
+
*/
|
|
15
|
+
defaultScrollPosition: 'start' | 'end' | 'last-anchor';
|
|
16
|
+
/**
|
|
17
|
+
* Pixels of the previous message left visible above an anchored turn or a
|
|
18
|
+
* message reached with `scrollToMessage()`.
|
|
19
|
+
* @default 64
|
|
20
|
+
*/
|
|
21
|
+
peek: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A chat scroll container: a `.message-scroller` frame holding a scrolling
|
|
25
|
+
* `.message-scroller-viewport` of messages and an optional
|
|
26
|
+
* `.message-scroller-button`. Every child of the viewport is one message.
|
|
27
|
+
*
|
|
28
|
+
* While the reader is at the end, the viewport follows streamed output.
|
|
29
|
+
* Scrolling toward the start releases it; reaching the end again, or the
|
|
30
|
+
* button, resumes it. An appended message marked `data-scroll-anchor` starts a
|
|
31
|
+
* turn and is scrolled to the top, with blank space below it until the reply
|
|
32
|
+
* fills the viewport. Messages added above keep the reader's place.
|
|
33
|
+
*/
|
|
34
|
+
export declare class MessageScroller extends Component<MessageScrollerOptions> {
|
|
35
|
+
/** The scrolling element. */
|
|
36
|
+
viewport: HTMLElement;
|
|
37
|
+
/** The scroll-to-latest button, if present. */
|
|
38
|
+
button: HTMLButtonElement | null;
|
|
39
|
+
private _opened;
|
|
40
|
+
private _following;
|
|
41
|
+
/** A press is down: it may be a tap or a scrollbar drag. */
|
|
42
|
+
private _holding;
|
|
43
|
+
private _lastTop;
|
|
44
|
+
/** Where a programmatic scroll is heading; null when none is running. */
|
|
45
|
+
private _target;
|
|
46
|
+
/** Distance left to the target at the last scroll event. */
|
|
47
|
+
private _distance;
|
|
48
|
+
/** The first visible message and its offset from the viewport top. */
|
|
49
|
+
private _ref;
|
|
50
|
+
private _refOffset;
|
|
51
|
+
/** The latest anchored turn, which the spacer lets reach the top. */
|
|
52
|
+
private _anchor;
|
|
53
|
+
private _spacer;
|
|
54
|
+
private _last;
|
|
55
|
+
private _resizeObserver;
|
|
56
|
+
private _mutationObserver;
|
|
57
|
+
constructor(el: HTMLElement, options: Partial<MessageScrollerOptions>);
|
|
58
|
+
static get defaults(): MessageScrollerOptions;
|
|
59
|
+
/**
|
|
60
|
+
* Initializes instance of MessageScroller.
|
|
61
|
+
* @param el HTML element.
|
|
62
|
+
* @param options Component options.
|
|
63
|
+
*/
|
|
64
|
+
static init(el: HTMLElement, options?: Partial<MessageScrollerOptions>): MessageScroller;
|
|
65
|
+
/**
|
|
66
|
+
* Initializes instances of MessageScroller.
|
|
67
|
+
* @param els HTML elements.
|
|
68
|
+
* @param options Component options.
|
|
69
|
+
*/
|
|
70
|
+
static init(els: InitElements<InitElement>, options?: Partial<MessageScrollerOptions>): MessageScroller[];
|
|
71
|
+
static getInstance(el: HTMLElement): MessageScroller;
|
|
72
|
+
destroy(): void;
|
|
73
|
+
/** Scrolls to the latest message and resumes following. */
|
|
74
|
+
scrollToEnd(): void;
|
|
75
|
+
/** Scrolls to the first message. */
|
|
76
|
+
scrollToStart(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Scrolls the element with this id to the top of the viewport, below the
|
|
79
|
+
* peek, and stops following.
|
|
80
|
+
* @returns false when no such element is inside the viewport.
|
|
81
|
+
*/
|
|
82
|
+
scrollToMessage(id: string): boolean;
|
|
83
|
+
private _open;
|
|
84
|
+
/**
|
|
85
|
+
* Records where the reader is once no programmatic scroll is running.
|
|
86
|
+
* Content can grow between a scroll and the resize that re-pins the end,
|
|
87
|
+
* so only moving toward the start releases following.
|
|
88
|
+
*/
|
|
89
|
+
private _settle;
|
|
90
|
+
private _handleScroll;
|
|
91
|
+
private _handleUserScroll;
|
|
92
|
+
private _handleRelease;
|
|
93
|
+
private _handleButtonClick;
|
|
94
|
+
private _handleMutations;
|
|
95
|
+
private _handleResize;
|
|
96
|
+
private _scrollTo;
|
|
97
|
+
private _resolve;
|
|
98
|
+
private _atEnd;
|
|
99
|
+
/** Offset of an element from the top of the scrolled content. */
|
|
100
|
+
private _top;
|
|
101
|
+
/** Bottom of the content without the spacer, padding included. */
|
|
102
|
+
private _contentEnd;
|
|
103
|
+
/** Remembers the first visible message so prepends can keep it in place. */
|
|
104
|
+
private _capture;
|
|
105
|
+
/** Moves the remembered message back to where the reader last saw it. */
|
|
106
|
+
private _restore;
|
|
107
|
+
/** Sizes the blank space that lets the latest anchored turn reach the top. */
|
|
108
|
+
private _updateSpacer;
|
|
109
|
+
/** The button is inert while there is nothing below. */
|
|
110
|
+
private _sync;
|
|
111
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InitElements, InitElement } from '../core/component';
|
|
2
|
+
import { ColumnChart } from './columnChart';
|
|
3
|
+
import { LineChartOptions, Series } from './lineChart';
|
|
4
|
+
export type MixedChartOptions = LineChartOptions;
|
|
5
|
+
/**
|
|
6
|
+
* Mixed chart. It reads its <table> like LineChart, and draws each series
|
|
7
|
+
* by its header cell's class: `column` as columns from zero, `area` as a
|
|
8
|
+
* line with a fill under it, and anything else as a line. Series with
|
|
9
|
+
* `end` are drawn against a second scale, set by `data-end-min` and
|
|
10
|
+
* `data-end-max`, so values of different sizes or units share the plot.
|
|
11
|
+
*
|
|
12
|
+
* Re-run `MixedChart.init(el)` after changing the table.
|
|
13
|
+
*/
|
|
14
|
+
export declare class MixedChart extends ColumnChart {
|
|
15
|
+
protected get _type(): string;
|
|
16
|
+
protected get _key(): string;
|
|
17
|
+
protected get _points(): boolean;
|
|
18
|
+
static init(el: HTMLElement, options?: Partial<MixedChartOptions>): MixedChart;
|
|
19
|
+
static init(els: InitElements<InitElement>, options?: Partial<MixedChartOptions>): MixedChart[];
|
|
20
|
+
static getInstance(el: HTMLElement): MixedChart;
|
|
21
|
+
/** The start scale, then the end scale; each includes zero if it has columns. */
|
|
22
|
+
protected _scale(series: Series[], min: number | null, max: number | null): (value: number) => number;
|
|
23
|
+
/** Columns behind, then the lines and areas over them. */
|
|
24
|
+
protected _draw(): Element;
|
|
25
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { InitElements, InitElement } from '../core/component';
|
|
2
|
+
import { LineChart, LineChartOptions } from './lineChart';
|
|
3
|
+
export type PieChartOptions = LineChartOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Pie chart. It reads its <table> like LineChart, but draws each row of the
|
|
6
|
+
* first value column as a slice of the whole, clockwise from the top, with
|
|
7
|
+
* a legend of every row and its share. With `.donut`, a <tfoot> row is the
|
|
8
|
+
* total in the middle. Further columns show in the tooltip.
|
|
9
|
+
*
|
|
10
|
+
* Re-run `PieChart.init(el)` after changing the table.
|
|
11
|
+
*/
|
|
12
|
+
export declare class PieChart extends LineChart {
|
|
13
|
+
/** Each row's start and end, as fractions of a turn clockwise from the top. */
|
|
14
|
+
private _turns;
|
|
15
|
+
/** Each row's color, or undefined for a row with no slice. */
|
|
16
|
+
private _colors;
|
|
17
|
+
private _slices;
|
|
18
|
+
protected get _type(): string;
|
|
19
|
+
protected get _key(): string;
|
|
20
|
+
protected get _points(): boolean;
|
|
21
|
+
protected get _circular(): boolean;
|
|
22
|
+
static init(el: HTMLElement, options?: Partial<PieChartOptions>): PieChart;
|
|
23
|
+
static init(els: InitElements<InitElement>, options?: Partial<PieChartOptions>): PieChart[];
|
|
24
|
+
static getInstance(el: HTMLElement): PieChart;
|
|
25
|
+
show(index: number): void;
|
|
26
|
+
/** CSS places the tooltip on the slice's middle from --turn. */
|
|
27
|
+
protected _place(index: number): void;
|
|
28
|
+
/** The row's share of the whole as a percentage, or '' for none. */
|
|
29
|
+
private _share;
|
|
30
|
+
/** The legend: every row with its color, its cell and its share. */
|
|
31
|
+
protected _guides(): Element[];
|
|
32
|
+
/** The row under the pointer by its angle from the middle, or -1 off the slices. */
|
|
33
|
+
protected _indexAt(e: PointerEvent): number;
|
|
34
|
+
/**
|
|
35
|
+
* An SVG of slices in a -50 to 50 box, under a mask that cuts the gaps
|
|
36
|
+
* between them and the donut's hole, which CSS sizes. The values and the
|
|
37
|
+
* total are HTML over it.
|
|
38
|
+
*/
|
|
39
|
+
protected _draw(): Element;
|
|
40
|
+
}
|