@expressivecss/expressive 0.12.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.
Files changed (171) hide show
  1. package/CHANGELOG.md +231 -1
  2. package/README.md +37 -1
  3. package/dist/css/expressive.css +5111 -36
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/fonts/material-symbols-outlined.woff2 +0 -0
  8. package/dist/fonts/material-symbols-rounded.woff2 +0 -0
  9. package/dist/fonts/material-symbols-sharp.woff2 +0 -0
  10. package/dist/js/chunks/{chunk-HLDXZ7XB.mjs → chunk-3CLXLPYS.mjs} +2 -2
  11. package/dist/js/chunks/chunk-3DHK5CZU.mjs +105 -0
  12. package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
  13. package/dist/js/chunks/chunk-4PWAPV6F.mjs +7 -0
  14. package/dist/js/chunks/chunk-4PWAPV6F.mjs.map +7 -0
  15. package/dist/js/chunks/{chunk-HB6IW7QQ.mjs → chunk-55IA2XUC.mjs} +2 -2
  16. package/dist/js/chunks/chunk-CCWDV5CR.mjs +292 -0
  17. package/dist/js/chunks/chunk-CCWDV5CR.mjs.map +7 -0
  18. package/dist/js/chunks/chunk-DTKR54I6.mjs +270 -0
  19. package/dist/js/chunks/chunk-DTKR54I6.mjs.map +7 -0
  20. package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
  21. package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
  22. package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
  23. package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
  24. package/dist/js/chunks/chunk-K4CJCRGE.mjs +262 -0
  25. package/dist/js/chunks/chunk-K4CJCRGE.mjs.map +7 -0
  26. package/dist/js/chunks/chunk-LNCCYGPC.mjs +163 -0
  27. package/dist/js/chunks/chunk-LNCCYGPC.mjs.map +7 -0
  28. package/dist/js/chunks/chunk-NQLC3YMW.mjs +1 -0
  29. package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
  30. package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
  31. package/dist/js/chunks/chunk-P3G3QHII.mjs +166 -0
  32. package/dist/js/chunks/chunk-P3G3QHII.mjs.map +7 -0
  33. package/dist/js/chunks/{chunk-H2WA4XHH.mjs → chunk-PLYXLSH3.mjs} +4 -4
  34. package/dist/js/chunks/chunk-QKWPQK5N.mjs +179 -0
  35. package/dist/js/chunks/chunk-QKWPQK5N.mjs.map +7 -0
  36. package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
  37. package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
  38. package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
  39. package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
  40. package/dist/js/chunks/{chunk-YSBCHYXP.mjs → chunk-U2OTHOTI.mjs} +116 -12
  41. package/dist/js/chunks/chunk-U2OTHOTI.mjs.map +7 -0
  42. package/dist/js/chunks/chunk-VTLBW7QS.mjs +124 -0
  43. package/dist/js/chunks/chunk-VTLBW7QS.mjs.map +7 -0
  44. package/dist/js/chunks/{chunk-RFZZCYVU.mjs → chunk-XGHORT7J.mjs} +2 -2
  45. package/dist/js/chunks/{chunk-HNFSMIBY.mjs → chunk-XH6BEEMY.mjs} +69 -16
  46. package/dist/js/chunks/chunk-XH6BEEMY.mjs.map +7 -0
  47. package/dist/js/expressive.cjs +2209 -32
  48. package/dist/js/expressive.cjs.map +4 -4
  49. package/dist/js/expressive.js +2209 -32
  50. package/dist/js/expressive.js.map +4 -4
  51. package/dist/js/expressive.min.js +10 -10
  52. package/dist/js/expressive.min.js.map +4 -4
  53. package/dist/js/expressive.mjs +68 -20
  54. package/dist/js/expressive.mjs.map +1 -1
  55. package/dist/js/internal/behaviors/forms.mjs +1 -1
  56. package/dist/js/internal/components/autocomplete.mjs +2 -2
  57. package/dist/js/internal/components/barChart.mjs +10 -0
  58. package/dist/js/internal/components/barChart.mjs.map +7 -0
  59. package/dist/js/internal/components/chips.mjs +3 -3
  60. package/dist/js/internal/components/columnChart.mjs +9 -0
  61. package/dist/js/internal/components/columnChart.mjs.map +7 -0
  62. package/dist/js/internal/components/commandPalette.mjs +9 -0
  63. package/dist/js/internal/components/commandPalette.mjs.map +7 -0
  64. package/dist/js/internal/components/datepicker.mjs +3 -3
  65. package/dist/js/internal/components/heatmapChart.mjs +9 -0
  66. package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
  67. package/dist/js/internal/components/index.mjs +65 -17
  68. package/dist/js/internal/components/lineChart.mjs +12 -0
  69. package/dist/js/internal/components/lineChart.mjs.map +7 -0
  70. package/dist/js/internal/components/menu.mjs +1 -1
  71. package/dist/js/internal/components/messageScroller.mjs +9 -0
  72. package/dist/js/internal/components/messageScroller.mjs.map +7 -0
  73. package/dist/js/internal/components/mixedChart.mjs +10 -0
  74. package/dist/js/internal/components/mixedChart.mjs.map +7 -0
  75. package/dist/js/internal/components/pieChart.mjs +9 -0
  76. package/dist/js/internal/components/pieChart.mjs.map +7 -0
  77. package/dist/js/internal/components/questionnaire.mjs +9 -0
  78. package/dist/js/internal/components/questionnaire.mjs.map +7 -0
  79. package/dist/js/internal/components/radarChart.mjs +9 -0
  80. package/dist/js/internal/components/radarChart.mjs.map +7 -0
  81. package/dist/js/internal/components/radialChart.mjs +9 -0
  82. package/dist/js/internal/components/radialChart.mjs.map +7 -0
  83. package/dist/js/internal/components/registry.mjs +23 -11
  84. package/dist/js/internal/components/richTextEditor.mjs +9 -0
  85. package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
  86. package/dist/js/internal/components/select.mjs +2 -2
  87. package/dist/js/modular.mjs +68 -20
  88. package/dist/types/behaviors/forms.d.ts +22 -0
  89. package/dist/types/components/barChart.d.ts +24 -0
  90. package/dist/types/components/columnChart.d.ts +21 -0
  91. package/dist/types/components/commandPalette.d.ts +96 -0
  92. package/dist/types/components/heatmapChart.d.ts +49 -0
  93. package/dist/types/components/index.d.ts +12 -0
  94. package/dist/types/components/lineChart.d.ts +134 -0
  95. package/dist/types/components/menu.d.ts +31 -0
  96. package/dist/types/components/messageScroller.d.ts +111 -0
  97. package/dist/types/components/mixedChart.d.ts +25 -0
  98. package/dist/types/components/pieChart.d.ts +40 -0
  99. package/dist/types/components/questionnaire.d.ts +96 -0
  100. package/dist/types/components/radarChart.d.ts +39 -0
  101. package/dist/types/components/radialChart.d.ts +45 -0
  102. package/dist/types/components/registry.d.ts +44 -0
  103. package/dist/types/components/richTextEditor.d.ts +71 -0
  104. package/dist/types/modular.d.ts +10 -1
  105. package/package.json +4 -1
  106. package/src/sass/README.md +3 -6
  107. package/src/sass/abstracts/_index.scss +1 -1
  108. package/src/sass/abstracts/_mixins.scss +226 -0
  109. package/src/sass/abstracts/_variables.scss +14 -0
  110. package/src/sass/base/_typography.scss +45 -0
  111. package/src/sass/components/_accordion.scss +161 -0
  112. package/src/sass/components/_aura.scss +119 -0
  113. package/src/sass/components/_avatar.scss +86 -0
  114. package/src/sass/components/_bar-chart.scss +285 -0
  115. package/src/sass/components/_bottom-sheet.scss +1 -0
  116. package/src/sass/components/_button-groups.scss +13 -3
  117. package/src/sass/components/_cards.scss +16 -13
  118. package/src/sass/components/_column-chart.scss +134 -0
  119. package/src/sass/components/_command-palette.scss +140 -0
  120. package/src/sass/components/_countdown.scss +89 -0
  121. package/src/sass/components/_data-table.scss +188 -0
  122. package/src/sass/components/_dialog.scss +1 -0
  123. package/src/sass/components/_empty-state.scss +78 -0
  124. package/src/sass/components/_expanding-card.scss +3 -0
  125. package/src/sass/components/_heatmap-chart.scss +156 -0
  126. package/src/sass/components/_index.scss +27 -0
  127. package/src/sass/components/_kpi.scss +162 -0
  128. package/src/sass/components/_line-chart.scss +102 -0
  129. package/src/sass/components/_marquee.scss +111 -0
  130. package/src/sass/components/_menu.scss +10 -0
  131. package/src/sass/components/_message-scroller.scss +66 -0
  132. package/src/sass/components/_message.scss +202 -0
  133. package/src/sass/components/_mixed-chart.scss +157 -0
  134. package/src/sass/components/_navigation-bar.scss +1 -0
  135. package/src/sass/components/_navigation-rail.scss +9 -0
  136. package/src/sass/components/_pie-chart.scss +203 -0
  137. package/src/sass/components/_popover.scss +112 -0
  138. package/src/sass/components/_questionnaire.scss +144 -0
  139. package/src/sass/components/_radar-chart.scss +205 -0
  140. package/src/sass/components/_radial-chart.scss +174 -0
  141. package/src/sass/components/_rich-text-editor.scss +99 -0
  142. package/src/sass/components/_search.scss +1 -0
  143. package/src/sass/components/_side-sheet.scss +1 -0
  144. package/src/sass/components/_skeleton.scss +81 -0
  145. package/src/sass/components/_snackbar.scss +1 -0
  146. package/src/sass/components/_stat.scss +86 -0
  147. package/src/sass/components/_stepper.scss +190 -0
  148. package/src/sass/components/_timeline.scss +114 -0
  149. package/src/sass/components/_toolbar.scss +1 -0
  150. package/src/sass/components/_tooltip.scss +2 -0
  151. package/src/sass/components/_tree.scss +139 -0
  152. package/src/sass/components/forms/_drop-zone.scss +128 -0
  153. package/src/sass/components/forms/_index.scss +2 -0
  154. package/src/sass/components/forms/_input-fields.scss +133 -2
  155. package/src/sass/components/forms/_rating.scss +165 -0
  156. package/src/sass/tokens/_reference.scss +3 -15
  157. package/src/sass/utilities/_index.scss +2 -0
  158. package/src/sass/utilities/_scroll-area.scss +35 -0
  159. package/src/sass/utilities/_shapes.scss +164 -0
  160. package/dist/js/chunks/chunk-G3I5H2U3.mjs +0 -7
  161. package/dist/js/chunks/chunk-G3I5H2U3.mjs.map +0 -7
  162. package/dist/js/chunks/chunk-HNFSMIBY.mjs.map +0 -7
  163. package/dist/js/chunks/chunk-PSSHQWCX.mjs +0 -100
  164. package/dist/js/chunks/chunk-PSSHQWCX.mjs.map +0 -7
  165. package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
  166. package/dist/js/chunks/chunk-YSBCHYXP.mjs.map +0 -7
  167. /package/dist/js/chunks/{chunk-HLDXZ7XB.mjs.map → chunk-3CLXLPYS.mjs.map} +0 -0
  168. /package/dist/js/chunks/{chunk-HB6IW7QQ.mjs.map → chunk-55IA2XUC.mjs.map} +0 -0
  169. /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-NQLC3YMW.mjs.map} +0 -0
  170. /package/dist/js/chunks/{chunk-H2WA4XHH.mjs.map → chunk-PLYXLSH3.mjs.map} +0 -0
  171. /package/dist/js/chunks/{chunk-RFZZCYVU.mjs.map → chunk-XGHORT7J.mjs.map} +0 -0
@@ -1,10 +1,19 @@
1
1
  import {
2
2
  version
3
- } from "./chunks/chunk-G3I5H2U3.mjs";
3
+ } from "./chunks/chunk-4PWAPV6F.mjs";
4
4
  import {
5
5
  AutoInit
6
- } from "./chunks/chunk-HNFSMIBY.mjs";
7
- import "./chunks/chunk-WWPAPHMA.mjs";
6
+ } from "./chunks/chunk-XH6BEEMY.mjs";
7
+ import "./chunks/chunk-NQLC3YMW.mjs";
8
+ import {
9
+ Tooltip
10
+ } from "./chunks/chunk-CKQP6P76.mjs";
11
+ import {
12
+ RichTextEditor
13
+ } from "./chunks/chunk-VTLBW7QS.mjs";
14
+ import {
15
+ ScrollSpy
16
+ } from "./chunks/chunk-QV2JAWIZ.mjs";
8
17
  import {
9
18
  Slider
10
19
  } from "./chunks/chunk-WJXDBPXQ.mjs";
@@ -18,20 +27,54 @@ import {
18
27
  Timepicker
19
28
  } from "./chunks/chunk-IFXVDDDH.mjs";
20
29
  import {
21
- Tooltip
22
- } from "./chunks/chunk-CKQP6P76.mjs";
30
+ MessageScroller
31
+ } from "./chunks/chunk-CCWDV5CR.mjs";
32
+ import {
33
+ MixedChart
34
+ } from "./chunks/chunk-HKT2S7VM.mjs";
35
+ import {
36
+ NavigationRail
37
+ } from "./chunks/chunk-6N2XAEFK.mjs";
38
+ import {
39
+ PieChart
40
+ } from "./chunks/chunk-P3G3QHII.mjs";
41
+ import {
42
+ Questionnaire
43
+ } from "./chunks/chunk-DTKR54I6.mjs";
44
+ import {
45
+ RadarChart
46
+ } from "./chunks/chunk-3DHK5CZU.mjs";
47
+ import {
48
+ RadialChart
49
+ } from "./chunks/chunk-RHRQKTTX.mjs";
50
+ import {
51
+ CommandPalette
52
+ } from "./chunks/chunk-K4CJCRGE.mjs";
53
+ import {
54
+ Datepicker
55
+ } from "./chunks/chunk-PLYXLSH3.mjs";
56
+ import {
57
+ FormSelect
58
+ } from "./chunks/chunk-55IA2XUC.mjs";
59
+ import "./chunks/chunk-EC63CHXU.mjs";
23
60
  import {
24
61
  ExpandingCard
25
62
  } from "./chunks/chunk-QVVEWBOF.mjs";
63
+ import {
64
+ HeatmapChart
65
+ } from "./chunks/chunk-LNCCYGPC.mjs";
26
66
  import {
27
67
  Lightbox
28
68
  } from "./chunks/chunk-UNEMYWEW.mjs";
29
69
  import {
30
- NavigationRail
31
- } from "./chunks/chunk-6N2XAEFK.mjs";
70
+ BarChart
71
+ } from "./chunks/chunk-GVGT6MIU.mjs";
32
72
  import {
33
- ScrollSpy
34
- } from "./chunks/chunk-QV2JAWIZ.mjs";
73
+ ColumnChart
74
+ } from "./chunks/chunk-SPETGK25.mjs";
75
+ import {
76
+ LineChart
77
+ } from "./chunks/chunk-O5XPWXIQ.mjs";
35
78
  import {
36
79
  ButtonGroup
37
80
  } from "./chunks/chunk-YDCS5S3J.mjs";
@@ -49,20 +92,13 @@ import {
49
92
  } from "./chunks/chunk-QDAL4IYN.mjs";
50
93
  import {
51
94
  Chips
52
- } from "./chunks/chunk-RFZZCYVU.mjs";
95
+ } from "./chunks/chunk-XGHORT7J.mjs";
53
96
  import {
54
97
  Autocomplete
55
- } from "./chunks/chunk-HLDXZ7XB.mjs";
56
- import {
57
- Datepicker
58
- } from "./chunks/chunk-H2WA4XHH.mjs";
59
- import "./chunks/chunk-EC63CHXU.mjs";
60
- import {
61
- FormSelect
62
- } from "./chunks/chunk-HB6IW7QQ.mjs";
98
+ } from "./chunks/chunk-3CLXLPYS.mjs";
63
99
  import {
64
100
  Menu
65
- } from "./chunks/chunk-YSBCHYXP.mjs";
101
+ } from "./chunks/chunk-U2OTHOTI.mjs";
66
102
  import {
67
103
  BottomSheets
68
104
  } from "./chunks/chunk-DLWYKFEI.mjs";
@@ -71,7 +107,7 @@ import {
71
107
  } from "./chunks/chunk-UAEAQBRC.mjs";
72
108
  import {
73
109
  Forms
74
- } from "./chunks/chunk-PSSHQWCX.mjs";
110
+ } from "./chunks/chunk-QKWPQK5N.mjs";
75
111
  import {
76
112
  SideSheets
77
113
  } from "./chunks/chunk-6WLSDZ4O.mjs";
@@ -85,22 +121,34 @@ export {
85
121
  AppBar,
86
122
  AutoInit,
87
123
  Autocomplete,
124
+ BarChart,
88
125
  BottomSheets,
89
126
  ButtonGroup,
90
127
  Cards,
91
128
  Carousel,
92
129
  CharacterCounter,
93
130
  Chips,
131
+ ColumnChart,
132
+ CommandPalette,
94
133
  Datepicker,
95
134
  Dialogs,
96
135
  ExpandingCard,
97
136
  FloatingActionButton,
98
137
  FormSelect,
99
138
  Forms,
139
+ HeatmapChart,
100
140
  Lightbox,
141
+ LineChart,
101
142
  Menu,
143
+ MessageScroller,
144
+ MixedChart,
102
145
  NavigationRail,
146
+ PieChart,
147
+ Questionnaire,
148
+ RadarChart,
149
+ RadialChart,
103
150
  Slider as Range,
151
+ RichTextEditor,
104
152
  ScrollSpy,
105
153
  SideSheets,
106
154
  Slider,
@@ -12,6 +12,28 @@ export declare class Forms {
12
12
  */
13
13
  static textareaAutoResize(e: EventTarget): void;
14
14
  static Init(): void;
15
+ /**
16
+ * A .password-toggle button shows or hides the password in its field. The
17
+ * button's own name stays put ("Show password"); aria-pressed carries the
18
+ * state, so there is no generated text to translate.
19
+ */
20
+ static togglePassword(e: MouseEvent): void;
21
+ /**
22
+ * A revealed password goes back to type="password" when its form is
23
+ * submitted or reset, so it is never sent or autofilled as plain text and
24
+ * a reset field does not stay revealed. A reset form also drops the file
25
+ * lists it would otherwise leave showing: reset fires no change event.
26
+ */
27
+ static resetFormExtras(e: Event): void;
28
+ /**
29
+ * The native file input covers its .drop-zone, so the browser already takes
30
+ * a dropped file. This only shows the drag: the input is the topmost
31
+ * element, so every drag event over the zone targets it and leaving it is
32
+ * leaving the zone.
33
+ */
34
+ static markDropZone(e: DragEvent): void;
35
+ /** Lists the chosen files, name and size, in the zone's .drop-zone-files. */
36
+ static listDropZoneFiles(zone: Element, input: HTMLInputElement): void;
15
37
  static InitTextarea(textarea: HTMLTextAreaElement): void;
16
38
  static InitFileInputPath(fileInput: HTMLInputElement): void;
17
39
  }
@@ -0,0 +1,24 @@
1
+ import { InitElements, InitElement } from '../core/component';
2
+ import { ColumnChart, ColumnChartOptions } from './columnChart';
3
+ export type BarChartOptions = ColumnChartOptions;
4
+ /**
5
+ * Bar chart. A column chart turned on its side: each row of the <table> is
6
+ * a band of bars that grow from zero along the inline axis, with its label
7
+ * beside it. The up and down arrows move the tooltip between rows.
8
+ *
9
+ * Re-run `BarChart.init(el)` after changing the table.
10
+ */
11
+ export declare class BarChart extends ColumnChart {
12
+ protected get _type(): string;
13
+ protected get _key(): string;
14
+ protected get _horizontal(): boolean;
15
+ static init(el: HTMLElement, options?: Partial<BarChartOptions>): BarChart;
16
+ static init(els: InitElements<InitElement>, options?: Partial<BarChartOptions>): BarChart[];
17
+ static getInstance(el: HTMLElement): BarChart;
18
+ /**
19
+ * The column chart's spans; CSS reads their --top and --bottom across the
20
+ * plot. With .values, a copy of the bars without their clipping holds each
21
+ * cell's text, so text longer than a short bar can run past its end.
22
+ */
23
+ protected _draw(): Element;
24
+ }
@@ -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
+ }
@@ -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
@@ -95,6 +102,14 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
95
102
  private _transition;
96
103
  private _originalInert;
97
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;
98
113
  constructor(el: HTMLElement, options: Partial<MenuOptions>);
99
114
  static get defaults(): MenuOptions;
100
115
  /**
@@ -115,6 +130,8 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
115
130
  _removeEventHandlers(): void;
116
131
  _setupTemporaryEventHandlers(): void;
117
132
  _removeTemporaryEventHandlers(): void;
133
+ _handleContextMenu: (e: MouseEvent) => void;
134
+ _handleDocumentContextMenu: (e: MouseEvent) => void;
118
135
  _handleClick: (e: MouseEvent) => void;
119
136
  _handleMouseEnter: () => void;
120
137
  _handleMouseLeave: (e: MouseEvent) => void;
@@ -157,6 +174,20 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
157
174
  _animateOut(): void;
158
175
  private _getClosestAncestor;
159
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;
160
191
  /**
161
192
  * Open menu.
162
193
  */