@adyen/lume 0.6.1 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- import { LumeAlluvialDiagram as m, LumeAlluvialGroup as o, LumeAxis as i, LumeBar as n, LumeBarChart as L, LumeBarGroup as p, LumeChart as h, LumeChartContainer as C, LumeChartLegend as s, LumeGroupedBarChart as d, LumeLine as c, LumeLineChart as B, LumeLineGroup as f, LumeOverlayGroup as g, LumePoint as S, LumeSingleBarChart as y, LumeSparklineChart as G, LumeStackedBarChart as b, LumeTooltip as k, LumeTooltipItem as v, LumeTooltipSummary as T, LumeTooltipTitle as w } from "./index.js";
1
+ import { LumeAlluvialDiagram as m, LumeAlluvialGroup as o, LumeAlluvialNodeLabel as i, LumeAlluvialNodeValue as n, LumeAxis as L, LumeBar as p, LumeBarChart as h, LumeBarGroup as C, LumeChart as s, LumeChartContainer as d, LumeChartLegend as c, LumeGroupedBarChart as B, LumeLine as f, LumeLineChart as g, LumeLineGroup as S, LumeOverlayGroup as b, LumePoint as v, LumeSingleBarChart as y, LumeSparklineChart as G, LumeStackedBarChart as A, LumeTooltip as k, LumeTooltipItem as T, LumeTooltipSummary as w, LumeTooltipTitle as O } from "./index.js";
2
2
  import "vue";
3
3
  import "d3";
4
4
  import "@popperjs/core";
@@ -7,37 +7,39 @@ const r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7
7
  __proto__: null,
8
8
  LumeAlluvialDiagram: m,
9
9
  LumeAlluvialGroup: o,
10
- LumeAxis: i,
11
- LumeBar: n,
12
- LumeBarChart: L,
13
- LumeBarGroup: p,
14
- LumeChart: h,
15
- LumeChartContainer: C,
16
- LumeChartLegend: s,
17
- LumeGroupedBarChart: d,
18
- LumeLine: c,
19
- LumeLineChart: B,
20
- LumeLineGroup: f,
21
- LumeOverlayGroup: g,
22
- LumePoint: S,
10
+ LumeAlluvialNodeLabel: i,
11
+ LumeAlluvialNodeValue: n,
12
+ LumeAxis: L,
13
+ LumeBar: p,
14
+ LumeBarChart: h,
15
+ LumeBarGroup: C,
16
+ LumeChart: s,
17
+ LumeChartContainer: d,
18
+ LumeChartLegend: c,
19
+ LumeGroupedBarChart: B,
20
+ LumeLine: f,
21
+ LumeLineChart: g,
22
+ LumeLineGroup: S,
23
+ LumeOverlayGroup: b,
24
+ LumePoint: v,
23
25
  LumeSingleBarChart: y,
24
26
  LumeSparklineChart: G,
25
- LumeStackedBarChart: b,
27
+ LumeStackedBarChart: A,
26
28
  LumeTooltip: k,
27
- LumeTooltipItem: v,
28
- LumeTooltipSummary: T,
29
- LumeTooltipTitle: w
30
- }, Symbol.toStringTag, { value: "Module" })), t = (u) => {
31
- if (!t.installed) {
32
- t.installed = !0;
29
+ LumeTooltipItem: T,
30
+ LumeTooltipSummary: w,
31
+ LumeTooltipTitle: O
32
+ }, Symbol.toStringTag, { value: "Module" })), u = (l) => {
33
+ if (!u.installed) {
34
+ u.installed = !0;
33
35
  for (const a in r)
34
36
  if (Object.prototype.hasOwnProperty.call(r, a)) {
35
- const l = r[a];
36
- u.component(a, l);
37
+ const t = r[a];
38
+ l.component(a, t);
37
39
  }
38
40
  }
39
- }, A = { install: t };
41
+ }, V = { install: u };
40
42
  let e = null;
41
43
  typeof window < "u" ? e = window.Vue : typeof global < "u" && (e = global.Vue);
42
- e && e.use(A);
44
+ e && e.use(V);
43
45
  //# sourceMappingURL=plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["../../lib/src/plugin.ts"],"sourcesContent":["import { PluginFunction, PluginObject } from 'vue';\n\nimport * as components from './components';\n\ninterface LumePluginFunction extends PluginFunction<null> {\n installed?: boolean;\n}\n\nconst install: LumePluginFunction = (Vue) => {\n if (install.installed) return;\n install.installed = true;\n\n // Register components\n for (const prop in components) {\n if (Object.prototype.hasOwnProperty.call(components, prop)) {\n const component = components[prop];\n Vue.component(prop, component);\n }\n }\n};\n\nconst plugin: PluginObject<null> = { install };\n\n// Auto-install when vue is found (eg. in browser via <script> tag)\nlet GlobalVue = null;\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue;\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.Vue;\n}\nif (GlobalVue) {\n GlobalVue.use(plugin);\n}\n\nexport default plugin;\n"],"names":["install","Vue","prop","components","component","plugin","GlobalVue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAQMA,IAA8B,CAACC,MAAQ;AAC3C,MAAI,CAAAD,EAAQ,WACZ;AAAA,IAAAA,EAAQ,YAAY;AAGpB,eAAWE,KAAQC;AACjB,UAAI,OAAO,UAAU,eAAe,KAAKA,GAAYD,CAAI,GAAG;AACpD,cAAAE,IAAYD,EAAWD,CAAI;AAC7B,QAAAD,EAAA,UAAUC,GAAME,CAAS;AAAA;AAAA;AAGnC,GAEMC,IAA6B,EAAE,SAAAL;AAGrC,IAAIM,IAAY;AACZ,OAAO,SAAW,MACpBA,IAAY,OAAO,MACV,OAAO,SAAW,QAC3BA,IAAY,OAAO;AAEjBA,KACFA,EAAU,IAAID,CAAM;"}
1
+ {"version":3,"file":"plugin.js","sources":["../../lib/src/plugin.ts"],"sourcesContent":["import { PluginFunction, PluginObject } from 'vue';\n\nimport * as components from './components';\n\ninterface LumePluginFunction extends PluginFunction<null> {\n installed?: boolean;\n}\n\nconst install: LumePluginFunction = (Vue) => {\n if (install.installed) return;\n install.installed = true;\n\n // Register components\n for (const prop in components) {\n if (Object.prototype.hasOwnProperty.call(components, prop)) {\n const component = components[prop];\n Vue.component(prop, component);\n }\n }\n};\n\nconst plugin: PluginObject<null> = { install };\n\n// Auto-install when vue is found (eg. in browser via <script> tag)\nlet GlobalVue = null;\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue;\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.Vue;\n}\nif (GlobalVue) {\n GlobalVue.use(plugin);\n}\n\nexport default plugin;\n"],"names":["install","Vue","prop","components","component","plugin","GlobalVue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAQMA,IAA8B,CAACC,MAAQ;AAC3C,MAAI,CAAAD,EAAQ,WACZ;AAAA,IAAAA,EAAQ,YAAY;AAGpB,eAAWE,KAAQC;AACjB,UAAI,OAAO,UAAU,eAAe,KAAKA,GAAYD,CAAI,GAAG;AACpD,cAAAE,IAAYD,EAAWD,CAAI;AAC7B,QAAAD,EAAA,UAAUC,GAAME,CAAS;AAAA,MAC/B;AAAA;AAEJ,GAEMC,IAA6B,EAAE,SAAAL;AAGrC,IAAIM,IAAY;AACZ,OAAO,SAAW,MACpBA,IAAY,OAAO,MACV,OAAO,SAAW,QAC3BA,IAAY,OAAO;AAEjBA,KACFA,EAAU,IAAID,CAAM;"}
@@ -41,9 +41,9 @@
41
41
  }
42
42
  }
43
43
 
44
- @each $color, $map in $lume-legacy-colors {
44
+ @each $color, $value in $lume-legacy-colors {
45
45
  &--#{$color} {
46
- background-color: nth($map, 1);
46
+ background-color: $value;
47
47
  }
48
48
  }
49
49
  }
@@ -58,9 +58,9 @@
58
58
  opacity: 0;
59
59
  }
60
60
 
61
- @each $color, $map in $lume-legacy-colors {
61
+ @each $color, $value in $lume-legacy-colors {
62
62
  &--#{$color} {
63
- stroke: nth($map, 1);
63
+ stroke: $value;
64
64
  }
65
65
  }
66
66
  }
@@ -96,12 +96,12 @@
96
96
  }
97
97
  }
98
98
 
99
- @each $color, $map in $lume-legacy-colors {
99
+ @each $color, $value in $lume-legacy-colors {
100
100
  &--#{$color} {
101
- fill: nth($map, 1);
101
+ fill: $value;
102
102
 
103
103
  &#{$b}--faded {
104
- fill: fade-color(nth($map, 1));
104
+ fill: fade-color($value);
105
105
  }
106
106
  }
107
107
  }
@@ -2,47 +2,43 @@
2
2
 
3
3
  $lume-alluvial-text-color: $lume-color-grey-80;
4
4
 
5
- $lume-alluvial-link-opacity: 0.5 !default;
6
- $lume-alluvial-link-opacity-faded: 0.2 !default;
5
+ $lume-alluvial-node-opacity: 0.7 !default;
6
+ $lume-alluvial-node-opacity-faded: 0.3 !default;
7
+ $lume-alluvial-node-opacity-focused: 1 !default;
8
+
9
+ $lume-alluvial-link-opacity: 0.3 !default;
10
+ $lume-alluvial-link-opacity-faded: 0.1 !default;
11
+ $lume-alluvial-link-opacity-focused: 0.5 !default;
7
12
 
8
13
  .lume-alluvial-group {
9
- &__node {
10
- opacity: 1;
11
- transition: opacity $lume-transition-time-long;
14
+ $b: &;
12
15
 
16
+ &__node {
13
17
  &--faded {
14
- opacity: 0.5;
15
- }
16
- }
17
-
18
- &__node-block {
19
- @each $color, $map in $lume-categorical-colors {
20
- &--#{$color} {
21
- $fill: nth($map, 1);
22
- fill: $fill;
18
+ #{$b}__node-block,
19
+ #{$b}__node-text {
20
+ opacity: $lume-alluvial-node-opacity-faded;
23
21
  }
24
22
  }
25
23
 
26
- @each $color, $map in $lume-other-colors {
27
- &--#{$color} {
28
- $fill: nth($map, 1);
29
- fill: $fill;
24
+ &--focused {
25
+ #{$b}__node-block {
26
+ opacity: $lume-alluvial-node-opacity-focused;
30
27
  }
31
28
  }
29
+ }
32
30
 
33
- @each $color, $map in $lume-legacy-colors {
34
- &--#{$color} {
35
- $fill: nth($map, 1);
36
- fill: $fill;
37
- }
38
- }
31
+ &__node-block {
32
+ transition: opacity $lume-transition-time-long;
33
+ opacity: $lume-alluvial-node-opacity;
39
34
  }
40
35
 
41
36
  &__node-text {
42
37
  cursor: default;
43
38
  fill: $lume-alluvial-text-color;
39
+ transition: opacity $lume-transition-time-long;
44
40
 
45
- &--right {
41
+ &--left {
46
42
  text-anchor: end;
47
43
  }
48
44
  }
@@ -66,6 +62,10 @@ $lume-alluvial-link-opacity-faded: 0.2 !default;
66
62
  stroke-opacity: $lume-alluvial-link-opacity-faded;
67
63
  }
68
64
 
65
+ &--focused {
66
+ stroke-opacity: $lume-alluvial-link-opacity-focused;
67
+ }
68
+
69
69
  &--ghost {
70
70
  stroke-opacity: 0;
71
71
  animation: unset;
@@ -6,6 +6,8 @@ $lume-sparkline-area-opacity: 0.3333 !default;
6
6
  &__area {
7
7
  pointer-events: none;
8
8
  opacity: $lume-sparkline-area-opacity;
9
- transition: all $lume-transition-time-long ease;
9
+ &--transition {
10
+ transition: all $lume-transition-time-long ease;
11
+ }
10
12
  }
11
13
  }
@@ -81,3 +81,12 @@
81
81
  }
82
82
  }
83
83
  }
84
+
85
+ //
86
+ //// Generates CSS variables from a $map of colors.
87
+ //
88
+ @mixin generate-color-variables($map) {
89
+ @each $name, $value in $map {
90
+ --lume-color--#{$name}: #{$value};
91
+ }
92
+ }
@@ -1,25 +1,5 @@
1
1
  @use '../functions/colors' as *;
2
2
 
3
- // Neutrals
4
-
5
- $lume-color-white: #ffffff !default;
6
- $lume-color-black: #00112c !default;
7
-
8
- // Greys
9
-
10
- $lume-color-grey-10: #f7f8f9 !default;
11
- $lume-color-grey-20: #eef0f3 !default;
12
- $lume-color-grey-30: #dee1e6 !default;
13
- $lume-color-grey-40: #bfc4ca !default;
14
- $lume-color-grey-50: #9fa6b0 !default;
15
- $lume-color-grey-60: #818890 !default;
16
- $lume-color-grey-70: #6f7988 !default;
17
- $lume-color-grey-80: #404d61 !default;
18
- $lume-color-grey-90: #202f46 !default;
19
- $lume-color-grey-100: #00112c !default;
20
-
21
- $lume-color-grey-transparent: rgba(210, 218, 225, 0.7) !default;
22
-
23
3
  // Sky blue
24
4
 
25
5
  $lume-color-skyblue-10: #f6fbff !default;
@@ -167,12 +147,46 @@ $lume-color-gold-map: (
167
147
 
168
148
  // Other
169
149
 
150
+ // Neutrals
151
+
152
+ $lume-color-white: #ffffff !default;
153
+ $lume-color-black: #00112c !default;
154
+
155
+ // Greys
156
+
157
+ $lume-color-grey-10: #f7f8f9 !default;
158
+ $lume-color-grey-20: #eef0f3 !default;
159
+ $lume-color-grey-30: #dee1e6 !default;
160
+ $lume-color-grey-40: #bfc4ca !default;
161
+ $lume-color-grey-50: #9fa6b0 !default;
162
+ $lume-color-grey-60: #818890 !default;
163
+ $lume-color-grey-70: #6f7988 !default;
164
+ $lume-color-grey-80: #404d61 !default;
165
+ $lume-color-grey-90: #202f46 !default;
166
+ $lume-color-grey-100: #00112c !default;
167
+
168
+ $lume-color-grey-transparent: rgba(210, 218, 225, 0.7) !default;
169
+
170
170
  $lume-color-green: #0abf53 !default;
171
171
  $lume-color-orange: #ff9000 !default;
172
172
  $lume-color-red: #f33030 !default;
173
173
 
174
174
  $lume-other-colors: (
175
+ 'white': $lume-color-white,
176
+ 'black': $lume-color-black,
177
+
178
+ 'grey-10': $lume-color-grey-10,
179
+ 'grey-20': $lume-color-grey-20,
180
+ 'grey-30': $lume-color-grey-30,
181
+ 'grey-40': $lume-color-grey-40,
182
+ 'grey-50': $lume-color-grey-50,
183
+ 'grey-60': $lume-color-grey-60,
184
+ 'grey-70': $lume-color-grey-70,
185
+ 'grey-80': $lume-color-grey-80,
186
+ 'grey-90': $lume-color-grey-90,
187
+ 'grey-100': $lume-color-grey-100,
175
188
  'grey': $lume-color-grey-50,
189
+
176
190
  'green': $lume-color-green,
177
191
  'orange': $lume-color-orange,
178
192
  'red': $lume-color-red,
@@ -231,72 +245,37 @@ $lume-divergent-colors: (
231
245
  // Legacy colors
232
246
 
233
247
  $lume-legacy-color-yellow: #ffda00 !default;
234
- $lume-legacy-color-yellow-darker: #cbb009 !default;
235
-
236
248
  $lume-legacy-color-green: #99e487 !default;
237
- $lume-legacy-color-green-darker: #79b874 !default;
238
-
239
249
  $lume-legacy-color-turquoise: #04c9ca !default;
240
- $lume-legacy-color-turquoise-darker: #03a3a9 !default;
241
-
242
250
  $lume-legacy-color-blue: #025f89 !default;
243
- $lume-legacy-color-blue-darker: #014e76 !default;
244
-
245
251
  $lume-legacy-color-navy: #00112c !default;
246
- $lume-legacy-color-navy-darker: #00112c !default;
247
-
248
252
  $lume-legacy-color-grey: #90a2bd !default;
249
- $lume-legacy-color-grey-darker: #183057 !default;
250
-
251
253
  $lume-legacy-color-orange: #ff9501 !default;
252
- $lume-legacy-color-orange-darker: #b36900 !default;
253
-
254
254
  $lume-legacy-color-teal: #5bc6c8 !default;
255
- $lume-legacy-color-teal-darker: #204546 !default;
256
255
 
257
256
  // Chart
258
257
 
259
258
  $lume-legacy-colors: (
260
- '01': (
261
- $lume-legacy-color-yellow,
262
- $lume-legacy-color-yellow-darker,
263
- ),
264
- '02': (
265
- $lume-legacy-color-green,
266
- $lume-legacy-color-green-darker,
267
- ),
268
- '03': (
269
- $lume-legacy-color-turquoise,
270
- $lume-legacy-color-turquoise-darker,
271
- ),
272
- '04': (
273
- $lume-legacy-color-blue,
274
- $lume-legacy-color-blue-darker,
275
- ),
276
- '05': (
277
- $lume-legacy-color-navy,
278
- $lume-legacy-color-navy-darker,
279
- ),
280
- '06': (
281
- $lume-legacy-color-grey,
282
- $lume-legacy-color-grey-darker,
283
- ),
284
- '07': (
285
- $lume-legacy-color-orange,
286
- $lume-legacy-color-orange-darker,
287
- ),
288
- '08': (
289
- $lume-legacy-color-teal,
290
- $lume-legacy-color-teal-darker,
291
- ),
292
- '09': (
293
- $lume-color-red,
294
- $lume-color-red,
295
- ),
259
+ '01': $lume-legacy-color-yellow,
260
+ '02': $lume-legacy-color-green,
261
+ '03': $lume-legacy-color-turquoise,
262
+ '04': $lume-legacy-color-blue,
263
+ '05': $lume-legacy-color-navy,
264
+ '06': $lume-legacy-color-grey,
265
+ '07': $lume-legacy-color-orange,
266
+ '08': $lume-legacy-color-teal,
267
+ '09': $lume-color-red,
296
268
  ) !default;
297
269
 
298
270
  $lume-chart-background-color: $lume-color-white !default;
299
271
 
300
272
  :root {
273
+ @include generate-color-variables($lume-categorical-colors);
274
+ @each $map in $lume-sequential-colors {
275
+ @include generate-color-variables($map);
276
+ }
277
+ @include generate-color-variables($lume-other-colors);
278
+ @include generate-color-variables($lume-legacy-colors);
279
+
301
280
  --lume-chart-background-color: #{$lume-chart-background-color};
302
281
  }