@expressivecss/expressive 0.13.1 → 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 (158) hide show
  1. package/CHANGELOG.md +109 -1
  2. package/README.md +2 -1
  3. package/dist/css/expressive.css +234 -72
  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/js/chunks/{chunk-55IA2XUC.mjs → chunk-3GVFZ4XO.mjs} +3 -3
  8. package/dist/js/chunks/{chunk-3CLXLPYS.mjs → chunk-4HZMB7LI.mjs} +22 -8
  9. package/dist/js/chunks/chunk-4HZMB7LI.mjs.map +7 -0
  10. package/dist/js/chunks/{chunk-DTKR54I6.mjs → chunk-4KMNFIFZ.mjs} +2 -2
  11. package/dist/js/chunks/{chunk-K4CJCRGE.mjs → chunk-4TKTLGEM.mjs} +2 -2
  12. package/dist/js/chunks/{chunk-3VOK6J7U.mjs → chunk-5BKHWHYY.mjs} +13 -6
  13. package/dist/js/chunks/chunk-5BKHWHYY.mjs.map +7 -0
  14. package/dist/js/chunks/{chunk-PLYXLSH3.mjs → chunk-5HQSGDZ5.mjs} +18 -9
  15. package/dist/js/chunks/chunk-5HQSGDZ5.mjs.map +7 -0
  16. package/dist/js/chunks/{chunk-LWBQIX5J.mjs → chunk-A7ALMYUR.mjs} +41 -44
  17. package/dist/js/chunks/chunk-A7ALMYUR.mjs.map +7 -0
  18. package/dist/js/chunks/chunk-BG6ZRB5H.mjs +154 -0
  19. package/dist/js/chunks/chunk-BG6ZRB5H.mjs.map +7 -0
  20. package/dist/js/chunks/{chunk-DLWYKFEI.mjs → chunk-CUQPB25U.mjs} +3 -3
  21. package/dist/js/chunks/{chunk-6WLSDZ4O.mjs → chunk-DAIU5SLG.mjs} +2 -2
  22. package/dist/js/chunks/{chunk-VTLBW7QS.mjs → chunk-FS7XY3HT.mjs} +2 -2
  23. package/dist/js/chunks/{chunk-WJXDBPXQ.mjs → chunk-GIW4K4SE.mjs} +8 -12
  24. package/dist/js/chunks/chunk-GIW4K4SE.mjs.map +7 -0
  25. package/dist/js/chunks/{chunk-LNCCYGPC.mjs → chunk-GUB3TNO2.mjs} +6 -5
  26. package/dist/js/chunks/chunk-GUB3TNO2.mjs.map +7 -0
  27. package/dist/js/chunks/{chunk-XH6BEEMY.mjs → chunk-GZKEFWPM.mjs} +39 -31
  28. package/dist/js/chunks/chunk-GZKEFWPM.mjs.map +7 -0
  29. package/dist/js/chunks/{chunk-QKWPQK5N.mjs → chunk-ILP3PDTL.mjs} +11 -3
  30. package/dist/js/chunks/chunk-ILP3PDTL.mjs.map +7 -0
  31. package/dist/js/chunks/{chunk-U2OTHOTI.mjs → chunk-JIDMQGK6.mjs} +3 -2
  32. package/dist/js/chunks/{chunk-U2OTHOTI.mjs.map → chunk-JIDMQGK6.mjs.map} +2 -2
  33. package/dist/js/chunks/chunk-KBNN3QDH.mjs +7 -0
  34. package/dist/js/chunks/{chunk-4PWAPV6F.mjs.map → chunk-KBNN3QDH.mjs.map} +1 -1
  35. package/dist/js/chunks/{chunk-NNYP33NB.mjs → chunk-KHV6DZXX.mjs} +5 -4
  36. package/dist/js/chunks/chunk-KHV6DZXX.mjs.map +7 -0
  37. package/dist/js/chunks/{chunk-XGHORT7J.mjs → chunk-KY6U46SM.mjs} +3 -3
  38. package/dist/js/chunks/{chunk-CKQP6P76.mjs → chunk-LRZMJZ3T.mjs} +4 -3
  39. package/dist/js/chunks/chunk-LRZMJZ3T.mjs.map +7 -0
  40. package/dist/js/chunks/{chunk-6OMRGML6.mjs → chunk-MNPROCZF.mjs} +4 -4
  41. package/dist/js/chunks/{chunk-6OMRGML6.mjs.map → chunk-MNPROCZF.mjs.map} +2 -2
  42. package/dist/js/chunks/{chunk-QV2JAWIZ.mjs → chunk-MZ6Z24BX.mjs} +3 -2
  43. package/dist/js/chunks/{chunk-QV2JAWIZ.mjs.map → chunk-MZ6Z24BX.mjs.map} +2 -2
  44. package/dist/js/chunks/{chunk-CCWDV5CR.mjs → chunk-NS2UMNZV.mjs} +2 -2
  45. package/dist/js/chunks/{chunk-UBLRRJ7N.mjs → chunk-PM655FXL.mjs} +2 -2
  46. package/dist/js/chunks/{chunk-IFXVDDDH.mjs → chunk-QERLECVU.mjs} +3 -3
  47. package/dist/js/chunks/{chunk-GZWPXXY6.mjs → chunk-QJABDLSD.mjs} +5 -2
  48. package/dist/js/chunks/chunk-QJABDLSD.mjs.map +7 -0
  49. package/dist/js/chunks/{chunk-UNEMYWEW.mjs → chunk-S3XDFGSZ.mjs} +2 -2
  50. package/dist/js/chunks/chunk-TBM3FT7G.mjs +398 -0
  51. package/dist/js/chunks/chunk-TBM3FT7G.mjs.map +7 -0
  52. package/dist/js/chunks/chunk-UEXCIMJZ.mjs +214 -0
  53. package/dist/js/chunks/chunk-UEXCIMJZ.mjs.map +7 -0
  54. package/dist/js/chunks/{chunk-P3G3QHII.mjs → chunk-VGZSAFTX.mjs} +11 -4
  55. package/dist/js/chunks/{chunk-P3G3QHII.mjs.map → chunk-VGZSAFTX.mjs.map} +2 -2
  56. package/dist/js/chunks/{chunk-UAEAQBRC.mjs → chunk-X7OCHZVF.mjs} +2 -2
  57. package/dist/js/chunks/{chunk-EC63CHXU.mjs → chunk-YMSXJON6.mjs} +7 -6
  58. package/dist/js/chunks/chunk-YMSXJON6.mjs.map +7 -0
  59. package/dist/js/chunks/{chunk-QVVEWBOF.mjs → chunk-Z2NRKI7R.mjs} +2 -2
  60. package/dist/js/chunks/{chunk-PIJ2TAR3.mjs → chunk-ZAS25YFD.mjs} +2 -2
  61. package/dist/js/chunks/chunk-ZKZKNSLC.mjs +1 -0
  62. package/dist/js/expressive.cjs +905 -117
  63. package/dist/js/expressive.cjs.map +4 -4
  64. package/dist/js/expressive.js +905 -117
  65. package/dist/js/expressive.js.map +4 -4
  66. package/dist/js/expressive.min.js +10 -10
  67. package/dist/js/expressive.min.js.map +4 -4
  68. package/dist/js/expressive.mjs +57 -45
  69. package/dist/js/expressive.mjs.map +1 -1
  70. package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
  71. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  72. package/dist/js/internal/behaviors/forms.mjs +2 -2
  73. package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
  74. package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
  75. package/dist/js/internal/components/autocomplete.mjs +3 -3
  76. package/dist/js/internal/components/buttons.mjs +2 -2
  77. package/dist/js/internal/components/cards.mjs +2 -2
  78. package/dist/js/internal/components/carousel.mjs +2 -2
  79. package/dist/js/internal/components/chips.mjs +4 -4
  80. package/dist/js/internal/components/commandPalette.mjs +2 -2
  81. package/dist/js/internal/components/confetti.mjs +8 -0
  82. package/dist/js/internal/components/confetti.mjs.map +7 -0
  83. package/dist/js/internal/components/datepicker.mjs +5 -5
  84. package/dist/js/internal/components/expandingCard.mjs +2 -2
  85. package/dist/js/internal/components/heatmapChart.mjs +1 -1
  86. package/dist/js/internal/components/index.mjs +50 -38
  87. package/dist/js/internal/components/lightbox.mjs +2 -2
  88. package/dist/js/internal/components/mapView.mjs +9 -0
  89. package/dist/js/internal/components/mapView.mjs.map +7 -0
  90. package/dist/js/internal/components/menu.mjs +2 -2
  91. package/dist/js/internal/components/messageScroller.mjs +2 -2
  92. package/dist/js/internal/components/particles.mjs +8 -0
  93. package/dist/js/internal/components/particles.mjs.map +7 -0
  94. package/dist/js/internal/components/pieChart.mjs +1 -1
  95. package/dist/js/internal/components/questionnaire.mjs +2 -2
  96. package/dist/js/internal/components/registry.mjs +31 -28
  97. package/dist/js/internal/components/richTextEditor.mjs +2 -2
  98. package/dist/js/internal/components/scrollspy.mjs +1 -1
  99. package/dist/js/internal/components/select.mjs +3 -3
  100. package/dist/js/internal/components/slider.mjs +2 -2
  101. package/dist/js/internal/components/snackbar.mjs +2 -2
  102. package/dist/js/internal/components/tabs.mjs +3 -3
  103. package/dist/js/internal/components/timepicker.mjs +3 -3
  104. package/dist/js/internal/components/tooltip.mjs +2 -2
  105. package/dist/js/internal/core/utils.mjs +1 -1
  106. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  107. package/dist/js/modular.mjs +57 -45
  108. package/dist/types/behaviors/forms.d.ts +5 -0
  109. package/dist/types/components/carousel.d.ts +2 -0
  110. package/dist/types/components/confetti.d.ts +103 -0
  111. package/dist/types/components/datepicker.d.ts +2 -0
  112. package/dist/types/components/index.d.ts +3 -0
  113. package/dist/types/components/mapView.d.ts +151 -0
  114. package/dist/types/components/particles.d.ts +72 -0
  115. package/dist/types/components/pieChart.d.ts +3 -0
  116. package/dist/types/components/registry.d.ts +8 -0
  117. package/dist/types/components/slider.d.ts +1 -1
  118. package/dist/types/components/snackbar.d.ts +2 -0
  119. package/dist/types/components/tabs.d.ts +1 -1
  120. package/dist/types/modular.d.ts +1 -1
  121. package/dist/types/plugins/dockedDisplayPlugin.d.ts +3 -3
  122. package/package.json +2 -1
  123. package/src/sass/components/_buttons.scss +1 -1
  124. package/src/sass/components/_confetti.scss +14 -0
  125. package/src/sass/components/_index.scss +3 -0
  126. package/src/sass/components/_map.scss +188 -0
  127. package/src/sass/components/_particles.scss +14 -0
  128. package/src/sass/components/_table_of_contents.scss +3 -1
  129. package/src/sass/components/forms/_checkboxes.scss +7 -2
  130. package/dist/js/chunks/chunk-3CLXLPYS.mjs.map +0 -7
  131. package/dist/js/chunks/chunk-3VOK6J7U.mjs.map +0 -7
  132. package/dist/js/chunks/chunk-4PWAPV6F.mjs +0 -7
  133. package/dist/js/chunks/chunk-CKQP6P76.mjs.map +0 -7
  134. package/dist/js/chunks/chunk-EC63CHXU.mjs.map +0 -7
  135. package/dist/js/chunks/chunk-GZWPXXY6.mjs.map +0 -7
  136. package/dist/js/chunks/chunk-LNCCYGPC.mjs.map +0 -7
  137. package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +0 -7
  138. package/dist/js/chunks/chunk-NNYP33NB.mjs.map +0 -7
  139. package/dist/js/chunks/chunk-NQLC3YMW.mjs +0 -1
  140. package/dist/js/chunks/chunk-PLYXLSH3.mjs.map +0 -7
  141. package/dist/js/chunks/chunk-QKWPQK5N.mjs.map +0 -7
  142. package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +0 -7
  143. package/dist/js/chunks/chunk-XH6BEEMY.mjs.map +0 -7
  144. /package/dist/js/chunks/{chunk-55IA2XUC.mjs.map → chunk-3GVFZ4XO.mjs.map} +0 -0
  145. /package/dist/js/chunks/{chunk-DTKR54I6.mjs.map → chunk-4KMNFIFZ.mjs.map} +0 -0
  146. /package/dist/js/chunks/{chunk-K4CJCRGE.mjs.map → chunk-4TKTLGEM.mjs.map} +0 -0
  147. /package/dist/js/chunks/{chunk-DLWYKFEI.mjs.map → chunk-CUQPB25U.mjs.map} +0 -0
  148. /package/dist/js/chunks/{chunk-6WLSDZ4O.mjs.map → chunk-DAIU5SLG.mjs.map} +0 -0
  149. /package/dist/js/chunks/{chunk-VTLBW7QS.mjs.map → chunk-FS7XY3HT.mjs.map} +0 -0
  150. /package/dist/js/chunks/{chunk-XGHORT7J.mjs.map → chunk-KY6U46SM.mjs.map} +0 -0
  151. /package/dist/js/chunks/{chunk-CCWDV5CR.mjs.map → chunk-NS2UMNZV.mjs.map} +0 -0
  152. /package/dist/js/chunks/{chunk-UBLRRJ7N.mjs.map → chunk-PM655FXL.mjs.map} +0 -0
  153. /package/dist/js/chunks/{chunk-IFXVDDDH.mjs.map → chunk-QERLECVU.mjs.map} +0 -0
  154. /package/dist/js/chunks/{chunk-UNEMYWEW.mjs.map → chunk-S3XDFGSZ.mjs.map} +0 -0
  155. /package/dist/js/chunks/{chunk-UAEAQBRC.mjs.map → chunk-X7OCHZVF.mjs.map} +0 -0
  156. /package/dist/js/chunks/{chunk-QVVEWBOF.mjs.map → chunk-Z2NRKI7R.mjs.map} +0 -0
  157. /package/dist/js/chunks/{chunk-PIJ2TAR3.mjs.map → chunk-ZAS25YFD.mjs.map} +0 -0
  158. /package/dist/js/chunks/{chunk-NQLC3YMW.mjs.map → chunk-ZKZKNSLC.mjs.map} +0 -0
@@ -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
+ }
@@ -0,0 +1,72 @@
1
+ import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
2
+ export interface ParticlesOptions extends BaseOptions {
3
+ /**
4
+ * Number of particles.
5
+ * @default 100
6
+ */
7
+ quantity: number;
8
+ /**
9
+ * How firmly particles hold their place against the pointer. Lower
10
+ * follows the pointer further.
11
+ * @default 50
12
+ */
13
+ staticity: number;
14
+ /**
15
+ * Frames a particle takes to catch up with the pointer. Higher is slower.
16
+ * @default 50
17
+ */
18
+ ease: number;
19
+ /**
20
+ * Base radius in pixels. Each particle adds 0 or 1 to it.
21
+ * @default 0.4
22
+ */
23
+ size: number;
24
+ /**
25
+ * A CSS color. Empty uses the canvas's CSS `color`, which defaults to the
26
+ * theme's on-surface color.
27
+ * @default ''
28
+ */
29
+ color: string;
30
+ /**
31
+ * Horizontal drift in pixels per frame. Negative drifts left.
32
+ * @default 0
33
+ */
34
+ vx: number;
35
+ /**
36
+ * Vertical drift in pixels per frame. Negative drifts up.
37
+ * @default 0
38
+ */
39
+ vy: number;
40
+ }
41
+ /**
42
+ * Particles. A `<canvas class="particles">` covers its nearest positioned
43
+ * ancestor with slowly drifting dots that lean toward the pointer. Under
44
+ * reduced motion the dots are drawn once and stay still.
45
+ */
46
+ export declare class Particles extends Component<ParticlesOptions> {
47
+ el: HTMLCanvasElement;
48
+ private _ctx;
49
+ private _style;
50
+ private _particles;
51
+ private _width;
52
+ private _height;
53
+ private _frame;
54
+ private _last;
55
+ private _mouse;
56
+ private _still;
57
+ private _resizeObserver;
58
+ private _visibility;
59
+ constructor(el: HTMLElement, options: Partial<ParticlesOptions>);
60
+ static get defaults(): ParticlesOptions;
61
+ static init(el: HTMLElement, options?: Partial<ParticlesOptions>): Particles;
62
+ static init(els: InitElements<InitElement>, options?: Partial<ParticlesOptions>): Particles[];
63
+ static getInstance(el: HTMLElement): Particles;
64
+ destroy(): void;
65
+ private _start;
66
+ private _stop;
67
+ private _onPointerMove;
68
+ private _reset;
69
+ private _particle;
70
+ private _draw;
71
+ private _paint;
72
+ }
@@ -15,6 +15,8 @@ export declare class PieChart extends LineChart {
15
15
  /** Each row's color, or undefined for a row with no slice. */
16
16
  private _colors;
17
17
  private _slices;
18
+ /** Percent formatters by fraction digits, rebuilt once per legend. */
19
+ private _percents;
18
20
  protected get _type(): string;
19
21
  protected get _key(): string;
20
22
  protected get _points(): boolean;
@@ -27,6 +29,7 @@ export declare class PieChart extends LineChart {
27
29
  protected _place(index: number): void;
28
30
  /** The row's share of the whole as a percentage, or '' for none. */
29
31
  private _share;
32
+ private _percent;
30
33
  /** The legend: every row with its color, its cell and its share. */
31
34
  protected _guides(): Element[];
32
35
  /** The row under the pointer by its angle from the middle, or -1 off the slices. */
@@ -43,6 +43,14 @@ export declare const AUTO_INIT_COMPONENTS: {
43
43
  component: typeof Components.Chips;
44
44
  selector: string;
45
45
  };
46
+ Confetti: {
47
+ component: typeof Components.Confetti;
48
+ selector: string;
49
+ };
50
+ Particles: {
51
+ component: typeof Components.Particles;
52
+ selector: string;
53
+ };
46
54
  ColumnChart: {
47
55
  component: typeof Components.ColumnChart;
48
56
  selector: string;
@@ -28,7 +28,7 @@ export declare class Slider extends Component<SliderOptions> {
28
28
  _removeEventHandlers(): void;
29
29
  _handleRangeChange: () => void;
30
30
  _handleRangePointerDown: (e: PointerEvent) => void;
31
- _handleRangeInputOrMove: (e: Event) => void;
31
+ _handleRangeInput: () => void;
32
32
  _handleRangePointerUp: (e: PointerEvent) => void;
33
33
  _handleRangeRelease: () => void;
34
34
  _setupThumb(): void;
@@ -90,6 +90,8 @@ export declare class Snackbar {
90
90
  time: number;
91
91
  deltaX: number;
92
92
  velocityX: number;
93
+ /** Swipe distance that dismisses, measured once when the drag starts. */
94
+ private _activationDistance;
93
95
  private _dismissed;
94
96
  private _returnFocus;
95
97
  private _events;
@@ -57,7 +57,7 @@ export declare class Tabs extends Component<TabsOptions> {
57
57
  get index(): number;
58
58
  _setupEventHandlers(): void;
59
59
  _removeEventHandlers(): void;
60
- _handleWindowResize: () => void;
60
+ _handleWindowResize: (...args: unknown[]) => void;
61
61
  _queryTabLinks(): NodeListOf<HTMLAnchorElement>;
62
62
  _handleTabClick: (e: MouseEvent) => void;
63
63
  _createIndicator(): void;
@@ -5,7 +5,7 @@ export { SideSheets } from './behaviors/sideSheets';
5
5
  export { Forms } from './behaviors/forms';
6
6
  export { AutoInit } from './components/registry';
7
7
  export type { AutoInitOptions } from './components/registry';
8
- export declare const version = "0.13.1";
8
+ export declare const version = "0.14.1";
9
9
  export type * from './components/autocomplete';
10
10
  export type * from './components/appBar';
11
11
  export type * from './components/buttons';
@@ -24,9 +24,9 @@ export declare class DockedDisplayPlugin {
24
24
  constructor(el: HTMLElement, container: HTMLElement, options: Partial<DockedDisplayPluginOptions>);
25
25
  private _handleDocumentClick;
26
26
  /**
27
- * Tears the plugin down. The document listener holds a reference to this
28
- * instance - and through it the whole picker subtree - so the owning
29
- * component must call this from its own destroy().
27
+ * Tears the plugin down. While shown, the document listener holds a
28
+ * reference to this instance - and through it the whole picker subtree - so
29
+ * the owning component must call this from its own destroy().
30
30
  */
31
31
  destroy: () => void;
32
32
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressivecss/expressive",
3
- "version": "0.13.1",
3
+ "version": "0.14.1",
4
4
  "description": "ExpressiveCSS - a Material Design 3 front-end framework.",
5
5
  "license": "MIT",
6
6
  "author": "BaezFJ <baezdevs@gmail.com>",
@@ -137,6 +137,7 @@
137
137
  "esbuild": "^0.28.2",
138
138
  "fallow": "^3.23.0",
139
139
  "jsdom": "^30.0.1",
140
+ "maplibre-gl": "^6.13.0",
140
141
  "npm-run-all2": "^9.0.3",
141
142
  "sass": "^1.102.0",
142
143
  "smol-toml": "^1.8.0",
@@ -51,7 +51,7 @@
51
51
  // specificity; `.chip .close` would make it two and shift every button rule.
52
52
  // The delete button needs no entry: `.chip .close` is already two classes, so
53
53
  // it ties the state rules and wins on order.
54
- $_not-btn: ".datepicker-day-button, .date-picker-day-button, .month-prev, .month-next, .chip, .icon-button";
54
+ $_not-btn: ".datepicker-day-button, .date-picker-day-button, .month-prev, .month-next, .chip, .icon-button, .map-marker, .maplibregl-popup-close-button, .maplibregl-ctrl-attrib-button";
55
55
 
56
56
  // `label.button` is here for the file input: the control has to be a <label>
57
57
  // so that clicking it reaches the <input type="file"> it wraps, but it is a
@@ -0,0 +1,14 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Confetti. A <canvas class="confetti"> covers its nearest positioned
4
+ // ancestor and lets clicks through to what is under it. The Confetti script
5
+ // draws on it. A burst over the whole viewport needs no markup; the script
6
+ // styles its own canvas inline.
7
+
8
+ canvas.confetti {
9
+ position: absolute;
10
+ inset: 0;
11
+ width: 100%;
12
+ height: 100%;
13
+ pointer-events: none;
14
+ }
@@ -50,6 +50,7 @@
50
50
  @forward "message";
51
51
  @forward "message-scroller";
52
52
  @forward "rich-text-editor";
53
+ @forward "map";
53
54
  @forward "accordion";
54
55
  @forward "data-table";
55
56
  @forward "avatar";
@@ -74,3 +75,5 @@
74
75
  @forward "aura";
75
76
  @forward "kpi";
76
77
  @forward "marquee";
78
+ @forward "confetti";
79
+ @forward "particles";
@@ -0,0 +1,188 @@
1
+ @use "sass:map";
2
+ @use "../abstracts" as *;
3
+
4
+ // Map. A MapLibre map in a .map frame. The page loads maplibre-gl.css; these
5
+ // rules restyle what MapLibre draws and add the ExpressiveCSS parts:
6
+ //
7
+ // .map-marker a point at data-lng-lat. With no content of its own it is
8
+ // a primary dot; anything else inside replaces the dot.
9
+ // A .map-marker-label shows below it (.top: above), and a
10
+ // child .tooltip works as on any button.
11
+ // .map-popup moved into a MapLibre popup, drawn as a surface card.
12
+ // .map-controls a corner stack of .icon-button controls, top right
13
+ // unless .top-left, .bottom-left or .bottom-right. A
14
+ // .map-control-group joins buttons on one surface.
15
+ //
16
+ // Until the script starts the map, markers, popups and controls are hidden.
17
+ // MapLibre moves markers and popups out of the frame, so the hiding rules
18
+ // stop matching them once the map runs.
19
+ //
20
+ // Tokens:
21
+ // --md-comp-map-height 400px
22
+ // --md-comp-map-shape 16px
23
+ // --md-comp-map-marker-color primary
24
+ // --md-comp-map-marker-ring-color surface
25
+ // --md-comp-map-route-color primary
26
+ // --md-comp-map-arc-color tertiary
27
+ // --md-comp-map-cluster-color primary
28
+ // --md-comp-map-cluster-label-color on-primary
29
+ // --md-comp-map-popup-max-width 280px
30
+ // --md-comp-map-control-offset 12px
31
+ //
32
+ // The script sets --md-comp-map-bearing, so a [data-action="compass"] icon
33
+ // points north.
34
+
35
+ .map {
36
+ --md-comp-map-height: 400px;
37
+ --md-comp-map-shape: 16px;
38
+ --md-comp-map-marker-color: var(--md-sys-color-primary);
39
+ --md-comp-map-marker-ring-color: var(--md-sys-color-surface);
40
+ --md-comp-map-route-color: var(--md-sys-color-primary);
41
+ --md-comp-map-arc-color: var(--md-sys-color-tertiary);
42
+ --md-comp-map-cluster-color: var(--md-sys-color-primary);
43
+ --md-comp-map-cluster-label-color: var(--md-sys-color-on-primary);
44
+ --md-comp-map-popup-max-width: 280px;
45
+ --md-comp-map-control-offset: 12px;
46
+
47
+ position: relative;
48
+ overflow: hidden;
49
+ block-size: var(--md-comp-map-height);
50
+ border-radius: var(--md-comp-map-shape);
51
+ background-color: var(--md-sys-color-surface-container);
52
+
53
+ &:fullscreen {
54
+ border-radius: 0;
55
+ }
56
+
57
+ > :is(.map-marker, .map-popup),
58
+ &:not(.maplibregl-map) > .map-controls {
59
+ display: none;
60
+ }
61
+ }
62
+
63
+ // Absolute, as MapLibre places it; a child .tooltip would otherwise make
64
+ // the marker relative.
65
+ .map .map-marker {
66
+ position: absolute;
67
+ display: grid;
68
+ place-items: center;
69
+ padding: 0;
70
+ border: none;
71
+ background: none;
72
+ color: inherit;
73
+ cursor: pointer;
74
+ @include focus-visible;
75
+
76
+ &:not(:has(> :not(.tooltip, .map-marker-label))) {
77
+ inline-size: 16px;
78
+ block-size: 16px;
79
+ border: 2px solid var(--md-comp-map-marker-ring-color);
80
+ border-radius: 50%;
81
+ background-color: var(--md-comp-map-marker-color);
82
+ @include z-depth(1);
83
+ }
84
+
85
+ &.location {
86
+ --md-comp-map-marker-color: var(--md-sys-color-tertiary);
87
+
88
+ box-shadow: 0 0 0 8px color-mix(in srgb, var(--md-comp-map-marker-color) 24%, transparent);
89
+ cursor: default;
90
+ }
91
+ }
92
+
93
+ .map-marker-label {
94
+ position: absolute;
95
+ inset-block-start: calc(100% + 4px);
96
+ padding: 2px 8px;
97
+ border-radius: 8px;
98
+ background-color: var(--md-sys-color-surface-container-highest);
99
+ color: var(--md-sys-color-on-surface);
100
+ @include typescale("label-medium");
101
+ white-space: nowrap;
102
+ pointer-events: none;
103
+
104
+ &.top {
105
+ inset-block: auto calc(100% + 4px);
106
+ }
107
+ }
108
+
109
+ // MapLibre's popup, as an M3 surface card. The tip is dropped; the offset
110
+ // keeps the card clear of its marker.
111
+ //
112
+ // maplibre-gl.css is unlayered, so it beats this layer wherever both set a
113
+ // property. Those declarations are !important; an important declaration in
114
+ // a layer outranks a normal unlayered one.
115
+ .map {
116
+ .maplibregl-popup-content {
117
+ max-inline-size: var(--md-comp-map-popup-max-width);
118
+ padding: 12px 16px !important;
119
+ border-radius: 12px !important;
120
+ background: var(--md-sys-color-surface-container-low) !important;
121
+ color: var(--md-sys-color-on-surface);
122
+ @include typescale("body-medium");
123
+ box-shadow: map.get($elevations, "2") !important;
124
+
125
+ &:has(> .maplibregl-popup-close-button) {
126
+ padding-inline-end: 44px;
127
+ }
128
+
129
+ :is(h1, h2, h3, h4, h5, h6) {
130
+ margin: 0 0 4px;
131
+ @include typescale("title-small");
132
+ }
133
+
134
+ p {
135
+ margin: 0;
136
+ font: inherit;
137
+ }
138
+ }
139
+
140
+ .maplibregl-popup-tip {
141
+ display: none;
142
+ }
143
+
144
+ .maplibregl-popup-close-button {
145
+ inset: 4px 4px auto auto !important;
146
+ inline-size: 32px;
147
+ block-size: 32px;
148
+ border-radius: 50% !important;
149
+ color: var(--md-sys-color-on-surface-variant);
150
+ font-size: 20px;
151
+ line-height: 1;
152
+
153
+ &:hover {
154
+ background-color: color-mix(in srgb, currentColor 8%, transparent) !important;
155
+ }
156
+
157
+ @include focus-visible;
158
+ }
159
+ }
160
+
161
+ .map-controls {
162
+ position: absolute;
163
+ inset: var(--md-comp-map-control-offset) var(--md-comp-map-control-offset) auto auto;
164
+ z-index: 2;
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: 8px;
168
+
169
+ &.top-left { inset: var(--md-comp-map-control-offset) auto auto var(--md-comp-map-control-offset); }
170
+ &.bottom-left { inset: auto auto var(--md-comp-map-control-offset) var(--md-comp-map-control-offset); }
171
+ &.bottom-right { inset: auto var(--md-comp-map-control-offset) var(--md-comp-map-control-offset) auto; }
172
+
173
+ > .icon-button,
174
+ > .map-control-group {
175
+ border-radius: 9999px;
176
+ background-color: var(--md-sys-color-surface-container-low);
177
+ @include z-depth(2);
178
+ }
179
+
180
+ [data-action="compass"] > .material-symbols {
181
+ rotate: var(--md-comp-map-bearing, 0deg);
182
+ }
183
+ }
184
+
185
+ .map-control-group {
186
+ display: flex;
187
+ flex-direction: column;
188
+ }
@@ -0,0 +1,14 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Particles. A <canvas class="particles"> covers its nearest positioned
4
+ // ancestor and lets clicks through to what is under it. The Particles script
5
+ // paints the dots in the canvas's `color`.
6
+
7
+ canvas.particles {
8
+ position: absolute;
9
+ inset: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ color: var(--md-sys-color-on-surface);
13
+ pointer-events: none;
14
+ }
@@ -7,11 +7,13 @@
7
7
  // --md-comp-toc-label-color
8
8
  // --md-comp-toc-active-color
9
9
  // --md-comp-toc-indicator
10
+ // --md-comp-toc-item-height 48px, the Material touch target
10
11
 
11
12
  .table-of-contents {
12
13
  --md-comp-toc-label-color: var(--md-sys-color-on-surface-variant);
13
14
  --md-comp-toc-active-color: var(--md-sys-color-primary);
14
15
  --md-comp-toc-indicator: 2px;
16
+ --md-comp-toc-item-height: 48px;
15
17
 
16
18
  list-style: none;
17
19
  margin: 0;
@@ -29,7 +31,7 @@
29
31
  display: inline-flex;
30
32
  align-items: center;
31
33
  box-sizing: border-box;
32
- min-height: 2rem;
34
+ min-height: var(--md-comp-toc-item-height);
33
35
  padding-inline-start: 16px;
34
36
  border-inline-start: var(--md-comp-toc-indicator) solid transparent;
35
37
  color: var(--md-comp-toc-label-color);
@@ -210,11 +210,16 @@ label:has(> [type="checkbox"]:disabled):not(.switch),
210
210
  // 18dp anatomy. Exclude .switch — that file paints the track on a span.
211
211
  $_cb-span: "*:not(.switch) > [type='checkbox'] + span:not(.lever, .supporting-text, .character-counter, .file-path)";
212
212
 
213
+ // inline-block, not inline-flex: a flex span turns each text run and link
214
+ // inside it into its own item, which drops the spaces around a link and
215
+ // splits "I agree to the <a>Terms</a>" into columns. The block padding
216
+ // centers one line in the 48px target, as align-items did.
213
217
  #{$_cb-span} {
214
218
  position: relative;
215
- display: inline-flex;
216
- align-items: center;
219
+ display: inline-block;
220
+ box-sizing: border-box;
217
221
  min-height: 48px;
222
+ padding-block: calc((48px - 1lh) / 2);
218
223
  padding-left: 30px;
219
224
  cursor: pointer;
220
225
  user-select: none;