@expressivecss/expressive 0.12.0 → 0.14.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 (258) hide show
  1. package/CHANGELOG.md +339 -1
  2. package/README.md +38 -1
  3. package/dist/css/expressive.css +5342 -105
  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-3DHK5CZU.mjs +105 -0
  11. package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
  12. package/dist/js/chunks/{chunk-HB6IW7QQ.mjs → chunk-3GVFZ4XO.mjs} +3 -3
  13. package/dist/js/chunks/{chunk-HLDXZ7XB.mjs → chunk-4HZMB7LI.mjs} +22 -8
  14. package/dist/js/chunks/chunk-4HZMB7LI.mjs.map +7 -0
  15. package/dist/js/chunks/chunk-4KMNFIFZ.mjs +270 -0
  16. package/dist/js/chunks/chunk-4KMNFIFZ.mjs.map +7 -0
  17. package/dist/js/chunks/chunk-4TKTLGEM.mjs +262 -0
  18. package/dist/js/chunks/chunk-4TKTLGEM.mjs.map +7 -0
  19. package/dist/js/chunks/{chunk-3VOK6J7U.mjs → chunk-5BKHWHYY.mjs} +13 -6
  20. package/dist/js/chunks/chunk-5BKHWHYY.mjs.map +7 -0
  21. package/dist/js/chunks/{chunk-H2WA4XHH.mjs → chunk-5HQSGDZ5.mjs} +16 -7
  22. package/dist/js/chunks/chunk-5HQSGDZ5.mjs.map +7 -0
  23. package/dist/js/chunks/{chunk-LWBQIX5J.mjs → chunk-A7ALMYUR.mjs} +41 -44
  24. package/dist/js/chunks/chunk-A7ALMYUR.mjs.map +7 -0
  25. package/dist/js/chunks/chunk-BG6ZRB5H.mjs +154 -0
  26. package/dist/js/chunks/chunk-BG6ZRB5H.mjs.map +7 -0
  27. package/dist/js/chunks/{chunk-DLWYKFEI.mjs → chunk-CUQPB25U.mjs} +3 -3
  28. package/dist/js/chunks/{chunk-6WLSDZ4O.mjs → chunk-DAIU5SLG.mjs} +2 -2
  29. package/dist/js/chunks/chunk-FS7XY3HT.mjs +124 -0
  30. package/dist/js/chunks/chunk-FS7XY3HT.mjs.map +7 -0
  31. package/dist/js/chunks/{chunk-WJXDBPXQ.mjs → chunk-GIW4K4SE.mjs} +8 -12
  32. package/dist/js/chunks/chunk-GIW4K4SE.mjs.map +7 -0
  33. package/dist/js/chunks/chunk-GUB3TNO2.mjs +164 -0
  34. package/dist/js/chunks/chunk-GUB3TNO2.mjs.map +7 -0
  35. package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
  36. package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
  37. package/dist/js/chunks/{chunk-HNFSMIBY.mjs → chunk-GZKEFWPM.mjs} +83 -22
  38. package/dist/js/chunks/chunk-GZKEFWPM.mjs.map +7 -0
  39. package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
  40. package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
  41. package/dist/js/chunks/chunk-ILP3PDTL.mjs +187 -0
  42. package/dist/js/chunks/chunk-ILP3PDTL.mjs.map +7 -0
  43. package/dist/js/chunks/{chunk-YSBCHYXP.mjs → chunk-JIDMQGK6.mjs} +118 -13
  44. package/dist/js/chunks/chunk-JIDMQGK6.mjs.map +7 -0
  45. package/dist/js/chunks/chunk-KBNN3QDH.mjs +7 -0
  46. package/dist/js/chunks/chunk-KBNN3QDH.mjs.map +7 -0
  47. package/dist/js/chunks/{chunk-NNYP33NB.mjs → chunk-KHV6DZXX.mjs} +5 -4
  48. package/dist/js/chunks/chunk-KHV6DZXX.mjs.map +7 -0
  49. package/dist/js/chunks/{chunk-RFZZCYVU.mjs → chunk-KY6U46SM.mjs} +3 -3
  50. package/dist/js/chunks/{chunk-CKQP6P76.mjs → chunk-LRZMJZ3T.mjs} +4 -3
  51. package/dist/js/chunks/chunk-LRZMJZ3T.mjs.map +7 -0
  52. package/dist/js/chunks/{chunk-6OMRGML6.mjs → chunk-MNPROCZF.mjs} +4 -4
  53. package/dist/js/chunks/{chunk-6OMRGML6.mjs.map → chunk-MNPROCZF.mjs.map} +2 -2
  54. package/dist/js/chunks/{chunk-QV2JAWIZ.mjs → chunk-MZ6Z24BX.mjs} +3 -2
  55. package/dist/js/chunks/{chunk-QV2JAWIZ.mjs.map → chunk-MZ6Z24BX.mjs.map} +2 -2
  56. package/dist/js/chunks/chunk-NS2UMNZV.mjs +292 -0
  57. package/dist/js/chunks/chunk-NS2UMNZV.mjs.map +7 -0
  58. package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
  59. package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
  60. package/dist/js/chunks/{chunk-UBLRRJ7N.mjs → chunk-PM655FXL.mjs} +2 -2
  61. package/dist/js/chunks/{chunk-IFXVDDDH.mjs → chunk-QERLECVU.mjs} +3 -3
  62. package/dist/js/chunks/{chunk-GZWPXXY6.mjs → chunk-QJABDLSD.mjs} +5 -2
  63. package/dist/js/chunks/chunk-QJABDLSD.mjs.map +7 -0
  64. package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
  65. package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
  66. package/dist/js/chunks/{chunk-UNEMYWEW.mjs → chunk-S3XDFGSZ.mjs} +2 -2
  67. package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
  68. package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
  69. package/dist/js/chunks/chunk-TBM3FT7G.mjs +398 -0
  70. package/dist/js/chunks/chunk-TBM3FT7G.mjs.map +7 -0
  71. package/dist/js/chunks/chunk-UEXCIMJZ.mjs +214 -0
  72. package/dist/js/chunks/chunk-UEXCIMJZ.mjs.map +7 -0
  73. package/dist/js/chunks/chunk-VGZSAFTX.mjs +173 -0
  74. package/dist/js/chunks/chunk-VGZSAFTX.mjs.map +7 -0
  75. package/dist/js/chunks/{chunk-UAEAQBRC.mjs → chunk-X7OCHZVF.mjs} +2 -2
  76. package/dist/js/chunks/{chunk-EC63CHXU.mjs → chunk-YMSXJON6.mjs} +7 -6
  77. package/dist/js/chunks/chunk-YMSXJON6.mjs.map +7 -0
  78. package/dist/js/chunks/{chunk-QVVEWBOF.mjs → chunk-Z2NRKI7R.mjs} +2 -2
  79. package/dist/js/chunks/{chunk-PIJ2TAR3.mjs → chunk-ZAS25YFD.mjs} +2 -2
  80. package/dist/js/chunks/chunk-ZKZKNSLC.mjs +1 -0
  81. package/dist/js/expressive.cjs +3113 -148
  82. package/dist/js/expressive.cjs.map +4 -4
  83. package/dist/js/expressive.js +3113 -148
  84. package/dist/js/expressive.js.map +4 -4
  85. package/dist/js/expressive.min.js +11 -11
  86. package/dist/js/expressive.min.js.map +4 -4
  87. package/dist/js/expressive.mjs +95 -35
  88. package/dist/js/expressive.mjs.map +1 -1
  89. package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
  90. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  91. package/dist/js/internal/behaviors/forms.mjs +2 -2
  92. package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
  93. package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
  94. package/dist/js/internal/components/autocomplete.mjs +3 -3
  95. package/dist/js/internal/components/barChart.mjs +10 -0
  96. package/dist/js/internal/components/barChart.mjs.map +7 -0
  97. package/dist/js/internal/components/buttons.mjs +2 -2
  98. package/dist/js/internal/components/cards.mjs +2 -2
  99. package/dist/js/internal/components/carousel.mjs +2 -2
  100. package/dist/js/internal/components/chips.mjs +4 -4
  101. package/dist/js/internal/components/columnChart.mjs +9 -0
  102. package/dist/js/internal/components/columnChart.mjs.map +7 -0
  103. package/dist/js/internal/components/commandPalette.mjs +9 -0
  104. package/dist/js/internal/components/commandPalette.mjs.map +7 -0
  105. package/dist/js/internal/components/confetti.mjs +8 -0
  106. package/dist/js/internal/components/confetti.mjs.map +7 -0
  107. package/dist/js/internal/components/datepicker.mjs +5 -5
  108. package/dist/js/internal/components/expandingCard.mjs +2 -2
  109. package/dist/js/internal/components/heatmapChart.mjs +9 -0
  110. package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
  111. package/dist/js/internal/components/index.mjs +88 -28
  112. package/dist/js/internal/components/lightbox.mjs +2 -2
  113. package/dist/js/internal/components/lineChart.mjs +12 -0
  114. package/dist/js/internal/components/lineChart.mjs.map +7 -0
  115. package/dist/js/internal/components/mapView.mjs +9 -0
  116. package/dist/js/internal/components/mapView.mjs.map +7 -0
  117. package/dist/js/internal/components/menu.mjs +2 -2
  118. package/dist/js/internal/components/messageScroller.mjs +9 -0
  119. package/dist/js/internal/components/messageScroller.mjs.map +7 -0
  120. package/dist/js/internal/components/mixedChart.mjs +10 -0
  121. package/dist/js/internal/components/mixedChart.mjs.map +7 -0
  122. package/dist/js/internal/components/particles.mjs +8 -0
  123. package/dist/js/internal/components/particles.mjs.map +7 -0
  124. package/dist/js/internal/components/pieChart.mjs +9 -0
  125. package/dist/js/internal/components/pieChart.mjs.map +7 -0
  126. package/dist/js/internal/components/questionnaire.mjs +9 -0
  127. package/dist/js/internal/components/questionnaire.mjs.map +7 -0
  128. package/dist/js/internal/components/radarChart.mjs +9 -0
  129. package/dist/js/internal/components/radarChart.mjs.map +7 -0
  130. package/dist/js/internal/components/radialChart.mjs +9 -0
  131. package/dist/js/internal/components/radialChart.mjs.map +7 -0
  132. package/dist/js/internal/components/registry.mjs +35 -20
  133. package/dist/js/internal/components/richTextEditor.mjs +9 -0
  134. package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
  135. package/dist/js/internal/components/scrollspy.mjs +1 -1
  136. package/dist/js/internal/components/select.mjs +3 -3
  137. package/dist/js/internal/components/slider.mjs +2 -2
  138. package/dist/js/internal/components/snackbar.mjs +2 -2
  139. package/dist/js/internal/components/tabs.mjs +3 -3
  140. package/dist/js/internal/components/timepicker.mjs +3 -3
  141. package/dist/js/internal/components/tooltip.mjs +2 -2
  142. package/dist/js/internal/core/utils.mjs +1 -1
  143. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  144. package/dist/js/modular.mjs +95 -35
  145. package/dist/types/behaviors/forms.d.ts +27 -0
  146. package/dist/types/components/barChart.d.ts +24 -0
  147. package/dist/types/components/carousel.d.ts +2 -0
  148. package/dist/types/components/columnChart.d.ts +21 -0
  149. package/dist/types/components/commandPalette.d.ts +96 -0
  150. package/dist/types/components/confetti.d.ts +103 -0
  151. package/dist/types/components/datepicker.d.ts +2 -0
  152. package/dist/types/components/heatmapChart.d.ts +49 -0
  153. package/dist/types/components/index.d.ts +15 -0
  154. package/dist/types/components/lineChart.d.ts +134 -0
  155. package/dist/types/components/mapView.d.ts +151 -0
  156. package/dist/types/components/menu.d.ts +31 -0
  157. package/dist/types/components/messageScroller.d.ts +111 -0
  158. package/dist/types/components/mixedChart.d.ts +25 -0
  159. package/dist/types/components/particles.d.ts +72 -0
  160. package/dist/types/components/pieChart.d.ts +43 -0
  161. package/dist/types/components/questionnaire.d.ts +96 -0
  162. package/dist/types/components/radarChart.d.ts +39 -0
  163. package/dist/types/components/radialChart.d.ts +45 -0
  164. package/dist/types/components/registry.d.ts +52 -0
  165. package/dist/types/components/richTextEditor.d.ts +71 -0
  166. package/dist/types/components/slider.d.ts +1 -1
  167. package/dist/types/components/snackbar.d.ts +2 -0
  168. package/dist/types/components/tabs.d.ts +1 -1
  169. package/dist/types/modular.d.ts +10 -1
  170. package/dist/types/plugins/dockedDisplayPlugin.d.ts +3 -3
  171. package/package.json +5 -1
  172. package/src/sass/README.md +3 -6
  173. package/src/sass/abstracts/_index.scss +1 -1
  174. package/src/sass/abstracts/_mixins.scss +226 -0
  175. package/src/sass/abstracts/_variables.scss +14 -0
  176. package/src/sass/base/_typography.scss +45 -0
  177. package/src/sass/components/_accordion.scss +161 -0
  178. package/src/sass/components/_aura.scss +119 -0
  179. package/src/sass/components/_avatar.scss +86 -0
  180. package/src/sass/components/_bar-chart.scss +285 -0
  181. package/src/sass/components/_bottom-sheet.scss +1 -0
  182. package/src/sass/components/_button-groups.scss +13 -3
  183. package/src/sass/components/_buttons.scss +1 -1
  184. package/src/sass/components/_cards.scss +16 -13
  185. package/src/sass/components/_column-chart.scss +134 -0
  186. package/src/sass/components/_command-palette.scss +140 -0
  187. package/src/sass/components/_confetti.scss +14 -0
  188. package/src/sass/components/_countdown.scss +89 -0
  189. package/src/sass/components/_data-table.scss +188 -0
  190. package/src/sass/components/_dialog.scss +1 -0
  191. package/src/sass/components/_empty-state.scss +78 -0
  192. package/src/sass/components/_expanding-card.scss +3 -0
  193. package/src/sass/components/_heatmap-chart.scss +156 -0
  194. package/src/sass/components/_index.scss +30 -0
  195. package/src/sass/components/_kpi.scss +162 -0
  196. package/src/sass/components/_line-chart.scss +102 -0
  197. package/src/sass/components/_map.scss +188 -0
  198. package/src/sass/components/_marquee.scss +111 -0
  199. package/src/sass/components/_menu.scss +10 -0
  200. package/src/sass/components/_message-scroller.scss +66 -0
  201. package/src/sass/components/_message.scss +202 -0
  202. package/src/sass/components/_mixed-chart.scss +157 -0
  203. package/src/sass/components/_navigation-bar.scss +1 -0
  204. package/src/sass/components/_navigation-rail.scss +9 -0
  205. package/src/sass/components/_particles.scss +14 -0
  206. package/src/sass/components/_pie-chart.scss +203 -0
  207. package/src/sass/components/_popover.scss +112 -0
  208. package/src/sass/components/_questionnaire.scss +144 -0
  209. package/src/sass/components/_radar-chart.scss +205 -0
  210. package/src/sass/components/_radial-chart.scss +174 -0
  211. package/src/sass/components/_rich-text-editor.scss +99 -0
  212. package/src/sass/components/_search.scss +1 -0
  213. package/src/sass/components/_side-sheet.scss +1 -0
  214. package/src/sass/components/_skeleton.scss +81 -0
  215. package/src/sass/components/_snackbar.scss +1 -0
  216. package/src/sass/components/_stat.scss +86 -0
  217. package/src/sass/components/_stepper.scss +190 -0
  218. package/src/sass/components/_table_of_contents.scss +3 -1
  219. package/src/sass/components/_timeline.scss +114 -0
  220. package/src/sass/components/_toolbar.scss +1 -0
  221. package/src/sass/components/_tooltip.scss +2 -0
  222. package/src/sass/components/_tree.scss +139 -0
  223. package/src/sass/components/forms/_checkboxes.scss +7 -2
  224. package/src/sass/components/forms/_drop-zone.scss +128 -0
  225. package/src/sass/components/forms/_index.scss +2 -0
  226. package/src/sass/components/forms/_input-fields.scss +133 -2
  227. package/src/sass/components/forms/_rating.scss +165 -0
  228. package/src/sass/tokens/_reference.scss +3 -15
  229. package/src/sass/utilities/_index.scss +2 -0
  230. package/src/sass/utilities/_scroll-area.scss +35 -0
  231. package/src/sass/utilities/_shapes.scss +164 -0
  232. package/dist/js/chunks/chunk-3VOK6J7U.mjs.map +0 -7
  233. package/dist/js/chunks/chunk-CKQP6P76.mjs.map +0 -7
  234. package/dist/js/chunks/chunk-EC63CHXU.mjs.map +0 -7
  235. package/dist/js/chunks/chunk-G3I5H2U3.mjs +0 -7
  236. package/dist/js/chunks/chunk-G3I5H2U3.mjs.map +0 -7
  237. package/dist/js/chunks/chunk-GZWPXXY6.mjs.map +0 -7
  238. package/dist/js/chunks/chunk-H2WA4XHH.mjs.map +0 -7
  239. package/dist/js/chunks/chunk-HLDXZ7XB.mjs.map +0 -7
  240. package/dist/js/chunks/chunk-HNFSMIBY.mjs.map +0 -7
  241. package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +0 -7
  242. package/dist/js/chunks/chunk-NNYP33NB.mjs.map +0 -7
  243. package/dist/js/chunks/chunk-PSSHQWCX.mjs +0 -100
  244. package/dist/js/chunks/chunk-PSSHQWCX.mjs.map +0 -7
  245. package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +0 -7
  246. package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
  247. package/dist/js/chunks/chunk-YSBCHYXP.mjs.map +0 -7
  248. /package/dist/js/chunks/{chunk-HB6IW7QQ.mjs.map → chunk-3GVFZ4XO.mjs.map} +0 -0
  249. /package/dist/js/chunks/{chunk-DLWYKFEI.mjs.map → chunk-CUQPB25U.mjs.map} +0 -0
  250. /package/dist/js/chunks/{chunk-6WLSDZ4O.mjs.map → chunk-DAIU5SLG.mjs.map} +0 -0
  251. /package/dist/js/chunks/{chunk-RFZZCYVU.mjs.map → chunk-KY6U46SM.mjs.map} +0 -0
  252. /package/dist/js/chunks/{chunk-UBLRRJ7N.mjs.map → chunk-PM655FXL.mjs.map} +0 -0
  253. /package/dist/js/chunks/{chunk-IFXVDDDH.mjs.map → chunk-QERLECVU.mjs.map} +0 -0
  254. /package/dist/js/chunks/{chunk-UNEMYWEW.mjs.map → chunk-S3XDFGSZ.mjs.map} +0 -0
  255. /package/dist/js/chunks/{chunk-UAEAQBRC.mjs.map → chunk-X7OCHZVF.mjs.map} +0 -0
  256. /package/dist/js/chunks/{chunk-QVVEWBOF.mjs.map → chunk-Z2NRKI7R.mjs.map} +0 -0
  257. /package/dist/js/chunks/{chunk-PIJ2TAR3.mjs.map → chunk-ZAS25YFD.mjs.map} +0 -0
  258. /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-ZKZKNSLC.mjs.map} +0 -0
@@ -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,103 @@
1
+ import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
2
+ export type ConfettiShape = 'square' | 'circle' | 'star';
3
+ export interface ConfettiOptions extends BaseOptions {
4
+ /**
5
+ * Pieces per burst.
6
+ * @default 50
7
+ */
8
+ particleCount: number;
9
+ /**
10
+ * Launch direction in degrees. 90 is straight up, 0 is right.
11
+ * @default 90
12
+ */
13
+ angle: number;
14
+ /**
15
+ * How far the pieces fan out from the angle, in degrees.
16
+ * @default 45
17
+ */
18
+ spread: number;
19
+ /**
20
+ * Launch speed in pixels per frame.
21
+ * @default 45
22
+ */
23
+ startVelocity: number;
24
+ /**
25
+ * Share of its speed a piece keeps each frame.
26
+ * @default 0.9
27
+ */
28
+ decay: number;
29
+ /**
30
+ * Pull toward the bottom. 0 floats, 1 is normal.
31
+ * @default 1
32
+ */
33
+ gravity: number;
34
+ /**
35
+ * Sideways push per frame. Negative drifts left.
36
+ * @default 0
37
+ */
38
+ drift: number;
39
+ /**
40
+ * Frames a piece lives while it fades out.
41
+ * @default 200
42
+ */
43
+ ticks: number;
44
+ /**
45
+ * Launch point as fractions of the canvas, 0 to 1. A missing side is
46
+ * 0.5. A trigger element ignores it and launches from its own center.
47
+ * @default { x: 0.5, y: 0.5 }
48
+ */
49
+ origin: {
50
+ x?: number;
51
+ y?: number;
52
+ };
53
+ /**
54
+ * CSS colors. Empty uses the theme's primary, secondary and tertiary
55
+ * colors and their containers.
56
+ * @default []
57
+ */
58
+ colors: string[];
59
+ /**
60
+ * @default ['square', 'circle']
61
+ */
62
+ shapes: ConfettiShape[];
63
+ /**
64
+ * Piece size multiplier.
65
+ * @default 1
66
+ */
67
+ scalar: number;
68
+ /**
69
+ * On a canvas, wait for `fire()` instead of bursting once at init.
70
+ * @default false
71
+ */
72
+ manualStart: boolean;
73
+ }
74
+ /**
75
+ * Confetti. Bursts of theme-colored pieces drawn on a canvas.
76
+ *
77
+ * - `Confetti.fire(options)` bursts over the whole viewport.
78
+ * - Any other `.confetti` element bursts from its center when clicked.
79
+ * - A `<canvas class="confetti">` bursts inside its own box, once at init
80
+ * unless `manualStart`, and again on each `fire()`.
81
+ *
82
+ * The viewport canvas is a manual popover, so it draws above an open modal
83
+ * dialog, and it ignores the pointer. Nothing is drawn when the reader
84
+ * prefers reduced motion.
85
+ */
86
+ export declare class Confetti extends Component<ConfettiOptions> {
87
+ private _onClick;
88
+ constructor(el: HTMLElement, options: Partial<ConfettiOptions>);
89
+ static get defaults(): ConfettiOptions;
90
+ static init(el: HTMLElement, options?: Partial<ConfettiOptions>): Confetti;
91
+ static init(els: InitElements<InitElement>, options?: Partial<ConfettiOptions>): Confetti[];
92
+ static getInstance(el: HTMLElement): Confetti;
93
+ /**
94
+ * Bursts over the whole viewport. Resolves when the last piece is gone.
95
+ */
96
+ static fire(options?: Partial<ConfettiOptions>): Promise<void>;
97
+ /**
98
+ * Bursts on this canvas, or from this element's center over the viewport.
99
+ * Resolves when the last piece is gone.
100
+ */
101
+ fire(options?: Partial<ConfettiOptions>): Promise<void>;
102
+ destroy(): void;
103
+ }
@@ -209,6 +209,8 @@ export declare class Datepicker extends Component<DatepickerOptions> {
209
209
  private _y;
210
210
  private _m;
211
211
  private displayPlugin;
212
+ /** Rows renderRow has already checked, so renderBody does not parse them again. */
213
+ private _checkedRows;
212
214
  private footer;
213
215
  /** Nesting depth of {@link _batchDraws}; > 0 means draws are being collected. */
214
216
  private _drawDepth;
@@ -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
+ }
@@ -6,9 +6,24 @@ export { Cards } from "./cards";
6
6
  export { ExpandingCard } from "./expandingCard";
7
7
  export { Carousel } from "./carousel";
8
8
  export { CharacterCounter } from "./characterCounter";
9
+ export { Confetti } from "./confetti";
10
+ export { Particles } from "./particles";
9
11
  export { Chips } from "./chips";
12
+ export { CommandPalette } from "./commandPalette";
13
+ export { Questionnaire } from "./questionnaire";
14
+ export { LineChart } from "./lineChart";
15
+ export { ColumnChart } from "./columnChart";
16
+ export { BarChart } from "./barChart";
17
+ export { PieChart } from "./pieChart";
18
+ export { HeatmapChart } from "./heatmapChart";
19
+ export { RadarChart } from "./radarChart";
20
+ export { RadialChart } from "./radialChart";
21
+ export { MixedChart } from "./mixedChart";
10
22
  export { Datepicker } from "./datepicker";
11
23
  export { Menu } from "./menu";
24
+ export { MessageScroller } from "./messageScroller";
25
+ export { RichTextEditor } from "./richTextEditor";
26
+ export { MapView } from "./mapView";
12
27
  export { Lightbox } from "./lightbox";
13
28
  export { Slider } from "./slider";
14
29
  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
+ }
@@ -0,0 +1,151 @@
1
+ import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
2
+ /** `[longitude, latitude]`, MapLibre's order. */
3
+ export type LngLat = [number, number];
4
+ /**
5
+ * The parts of the `maplibre-gl` module this component uses. Declared here so
6
+ * the published types do not depend on MapLibre.
7
+ */
8
+ export interface MapLibre {
9
+ Map: new (options: object) => any;
10
+ Marker: new (options: object) => any;
11
+ Popup: new (options: object) => any;
12
+ }
13
+ /** A style for each color scheme. The map follows the page's theme. */
14
+ export interface MapThemedStyle {
15
+ light: string | object;
16
+ dark: string | object;
17
+ }
18
+ export interface MapViewOptions extends BaseOptions {
19
+ /**
20
+ * The `maplibre-gl` module. ExpressiveCSS does not bundle MapLibre, so the
21
+ * page imports it and passes it in.
22
+ * @default null
23
+ */
24
+ maplibregl: MapLibre | null;
25
+ /**
26
+ * A MapLibre style URL or object, or `{ light, dark }` to follow the theme.
27
+ * @default OpenFreeMap Positron and Dark
28
+ */
29
+ style: string | object | MapThemedStyle;
30
+ /**
31
+ * Starting `[longitude, latitude]`.
32
+ * @default [0, 20]
33
+ */
34
+ center: LngLat;
35
+ /**
36
+ * Starting zoom level.
37
+ * @default 1
38
+ */
39
+ zoom: number;
40
+ /**
41
+ * More MapLibre `Map` options, such as `maxZoom` or `bearing`.
42
+ * @default {}
43
+ */
44
+ mapOptions: object;
45
+ }
46
+ export interface MapLineOptions {
47
+ /** CSS color. Defaults to the route or arc color token. */
48
+ color?: string;
49
+ /** Width in pixels. Routes default to 4, arcs to 2. */
50
+ width?: number;
51
+ /** 0 to 1. */
52
+ opacity?: number;
53
+ /** Dash and gap lengths in line widths, such as `[2, 2]`. */
54
+ dashArray?: number[];
55
+ }
56
+ export interface MapArc {
57
+ from: LngLat;
58
+ to: LngLat;
59
+ }
60
+ export interface MapClusterOptions {
61
+ /** CSS color. Defaults to the cluster color token. */
62
+ color?: string;
63
+ /**
64
+ * Pixels within which points join a cluster.
65
+ * @default 50
66
+ */
67
+ radius?: number;
68
+ /**
69
+ * Last zoom level that clusters points.
70
+ * @default 14
71
+ */
72
+ maxZoom?: number;
73
+ }
74
+ /**
75
+ * An interactive map built on MapLibre: a `.map` holding `.map-marker`,
76
+ * `.map-popup` and `.map-controls` children.
77
+ *
78
+ * Each marker sits at its `data-lng-lat`. A marker button with
79
+ * `aria-controls` opens the `.map-popup` it names; a popup with its own
80
+ * `data-lng-lat` and no marker opens at init. Buttons in `.map-controls`
81
+ * run their `data-action`: `zoom-in`, `zoom-out`, `compass`, `locate` or
82
+ * `fullscreen`. Routes, arcs and clusters are data, so they are added from
83
+ * script. The default style follows the page's light or dark theme, and
84
+ * line and cluster colors come from the theme.
85
+ *
86
+ * The class is `MapView` rather than `Map` so importing it does not shadow
87
+ * JavaScript's `Map`.
88
+ */
89
+ export declare class MapView extends Component<MapViewOptions> {
90
+ /** The MapLibre map. */
91
+ map: any;
92
+ /** The MapLibre markers made from `.map-marker` children, in order. */
93
+ markers: any[];
94
+ private _children;
95
+ private _popups;
96
+ private _markerPopups;
97
+ private _overlays;
98
+ private _styleReady;
99
+ private _dark;
100
+ private _location;
101
+ private _media;
102
+ private _observer;
103
+ private _zoomIn;
104
+ private _zoomOut;
105
+ constructor(el: HTMLElement, options: Partial<MapViewOptions>);
106
+ static get defaults(): MapViewOptions;
107
+ /**
108
+ * Initializes instance of MapView.
109
+ * @param el HTML element.
110
+ * @param options Component options.
111
+ */
112
+ static init(el: HTMLElement, options?: Partial<MapViewOptions>): MapView;
113
+ /**
114
+ * Initializes instances of MapView.
115
+ * @param els HTML elements.
116
+ * @param options Component options.
117
+ */
118
+ static init(els: InitElements<InitElement>, options?: Partial<MapViewOptions>): MapView[];
119
+ static getInstance(el: HTMLElement): MapView;
120
+ destroy(): void;
121
+ /** Draws a line through `[longitude, latitude]` points. Replaces an overlay with the same id. */
122
+ addRoute(id: string, coordinates: LngLat[], options?: MapLineOptions): void;
123
+ /** Draws a curved line for each `{ from, to }`. Replaces an overlay with the same id. */
124
+ addArcs(id: string, arcs: MapArc[], options?: MapLineOptions): void;
125
+ /**
126
+ * Draws GeoJSON points, or the URL of a GeoJSON file, as clusters that
127
+ * show their count and zoom in when clicked. The layers are
128
+ * `${id}-clusters`, `${id}-count` and `${id}-points`.
129
+ */
130
+ addClusters(id: string, data: object | string, options?: MapClusterOptions): void;
131
+ /** Removes a route, arcs or clusters added with this id. */
132
+ removeOverlay(id: string): void;
133
+ private _line;
134
+ private _draw;
135
+ private _addMarker;
136
+ private _popup;
137
+ private _toggle;
138
+ private _buttons;
139
+ private _locate;
140
+ private _color;
141
+ private _isDark;
142
+ private _themed;
143
+ private _style;
144
+ private _handleStyleLoad;
145
+ private _handleScheme;
146
+ private _sync;
147
+ private _handleFullscreen;
148
+ private _handleClick;
149
+ private _handleMapClick;
150
+ private _handleKeydown;
151
+ }
@@ -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
  */