victory-box-plot 37.1.1 → 37.2.0

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.
@@ -6456,31 +6456,34 @@ __webpack_require__.r(__webpack_exports__);
6456
6456
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6457
6457
  /* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
6458
6458
  /* harmony export */ });
6459
- /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
6460
- /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
6461
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
6462
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
6463
- /* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
6464
- /* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
6465
- /* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
6459
+ /* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
6460
+ /* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__);
6461
+ /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
6462
+ /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
6463
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
6464
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
6465
+ /* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
6466
+ /* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
6467
+ /* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
6468
+
6466
6469
 
6467
6470
 
6468
6471
 
6469
6472
 
6470
6473
 
6471
6474
  const defaultProps = {
6472
- groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
6475
+ groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("g", null)
6473
6476
  };
6474
6477
  const VictoryPortal = initialProps => {
6475
6478
  const props = {
6476
6479
  ...defaultProps,
6477
6480
  ...initialProps
6478
6481
  };
6479
- const id = react__WEBPACK_IMPORTED_MODULE_1___default().useId();
6480
- const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_2__.usePortalContext)();
6482
+ const id = lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default()();
6483
+ const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
6481
6484
  if (!portalContext) {
6482
6485
  const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
6483
- _victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
6486
+ _victory_util_log__WEBPACK_IMPORTED_MODULE_4__.warn(msg);
6484
6487
  }
6485
6488
  const children = Array.isArray(props.children) ? props.children[0] : props.children;
6486
6489
  const {
@@ -6491,15 +6494,15 @@ const VictoryPortal = initialProps => {
6491
6494
  groupComponent,
6492
6495
  standalone: false
6493
6496
  } : {};
6494
- const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]), {
6497
+ const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
6495
6498
  key: childProps.key ?? id
6496
6499
  });
6497
- const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
6498
- react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6500
+ const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(children, newProps);
6501
+ react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
6499
6502
  portalContext?.addChild(id, child);
6500
6503
  // eslint-disable-next-line react-hooks/exhaustive-deps
6501
6504
  }, [props.children]);
6502
- react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6505
+ react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
6503
6506
  return () => portalContext?.removeChild(id);
6504
6507
  // eslint-disable-next-line react-hooks/exhaustive-deps
6505
6508
  }, []);
@@ -6904,6 +6907,477 @@ const Whisker = initialProps => {
6904
6907
 
6905
6908
  /***/ }),
6906
6909
 
6910
+ /***/ "../../victory-core/es/victory-theme/clean.js":
6911
+ /*!****************************************************!*\
6912
+ !*** ../../victory-core/es/victory-theme/clean.js ***!
6913
+ \****************************************************/
6914
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6915
+
6916
+ "use strict";
6917
+ __webpack_require__.r(__webpack_exports__);
6918
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6919
+ /* harmony export */ "clean": function() { return /* binding */ clean; }
6920
+ /* harmony export */ });
6921
+ // *
6922
+ // * Colors
6923
+ // *
6924
+
6925
+ const gray = {
6926
+ white: "#FFFFFF",
6927
+ "50": "#FAFAFA",
6928
+ "100": "#F2F2F2",
6929
+ "200": "#E8E8E8",
6930
+ "300": "#E0E0E0",
6931
+ "400": "#D1D1D1",
6932
+ "500": "#757575",
6933
+ "600": "#5C5C5C",
6934
+ "700": "#424242",
6935
+ "800": "#333333",
6936
+ "900": "#292929",
6937
+ black: "#0F0F0F"
6938
+ };
6939
+ const yellow = {
6940
+ "100": "#FFEAB6",
6941
+ "300": "#FFD66E",
6942
+ "500": "#FCB400",
6943
+ "900": "#B87503"
6944
+ };
6945
+ const orange = {
6946
+ "100": "#FEE2D5",
6947
+ "300": "#FFA981",
6948
+ "500": "#FF6F2C",
6949
+ "900": "#D74D26"
6950
+ };
6951
+ const red = {
6952
+ "100": "#FFDCE5",
6953
+ "300": "#FF9EB7",
6954
+ "500": "#F82B60",
6955
+ "900": "#BA1E45"
6956
+ };
6957
+ const pink = {
6958
+ "100": "#FFDAF6",
6959
+ "300": "#F99DE2",
6960
+ "500": "#FF08C2",
6961
+ "900": "#B2158B"
6962
+ };
6963
+ const purple = {
6964
+ "100": "#EDE3FE",
6965
+ "300": "#CDB0FF",
6966
+ "500": "#8B46FF",
6967
+ "900": "#6B1CB0"
6968
+ };
6969
+ const blue = {
6970
+ "100": "#CFDFFF",
6971
+ "300": "#9CC7FF",
6972
+ "500": "#2D7FF9",
6973
+ "900": "#2750AE"
6974
+ };
6975
+ const cyan = {
6976
+ "100": "#D0F0FD",
6977
+ "300": "#77D1F3",
6978
+ "500": "#18BFFF",
6979
+ "900": "#0B76B7"
6980
+ };
6981
+ const teal = {
6982
+ "100": "#C2F5E9",
6983
+ "300": "#72DDC3",
6984
+ "500": "#20D9D2",
6985
+ "900": "#06A09B"
6986
+ };
6987
+ const green = {
6988
+ "100": "#D1F7C4",
6989
+ "300": "#93E088",
6990
+ "500": "#20C933",
6991
+ "900": "#338A17"
6992
+ };
6993
+ const colors = {
6994
+ blue: blue["500"],
6995
+ pink: pink["500"],
6996
+ teal: teal["500"],
6997
+ purple: purple["500"],
6998
+ green: green["500"],
6999
+ orange: orange["500"],
7000
+ cyan: cyan["500"],
7001
+ red: red["500"],
7002
+ yellow: yellow["500"]
7003
+ };
7004
+ const colorScale = Object.values(colors);
7005
+ const grayscale = [gray["200"], gray["400"], gray["600"], gray["900"]];
7006
+ const warm = [yellow["500"], orange["500"], red["500"], pink["500"]];
7007
+ const cool = [cyan["500"], teal["500"], blue["500"], purple["500"]];
7008
+ const heatmap = [green["500"], yellow["500"], red["500"]];
7009
+ const redPalette = [red["500"], red["300"], red["100"]];
7010
+ const greenPalette = [green["500"], green["300"], green["100"]];
7011
+ const bluePalette = [blue["500"], blue["300"], blue["100"]];
7012
+
7013
+ // *
7014
+ // * Typography
7015
+ // *
7016
+ const sansSerif = "'Inter', 'Helvetica Neue', 'Seravek', 'Helvetica', sans-serif";
7017
+ const letterSpacing = "normal";
7018
+ const fontSize = 12;
7019
+ // *
7020
+ // * Layout
7021
+ // *
7022
+ const padding = 8;
7023
+ const baseProps = {
7024
+ width: 450,
7025
+ height: 300,
7026
+ padding: 50,
7027
+ colorScale
7028
+ };
7029
+ // *
7030
+ // * Labels
7031
+ // *
7032
+ const baseLabelStyles = {
7033
+ fontFamily: sansSerif,
7034
+ fontSize,
7035
+ fontWeight: 300,
7036
+ letterSpacing,
7037
+ padding,
7038
+ fill: gray["900"],
7039
+ stroke: "transparent"
7040
+ };
7041
+ const centeredLabelStyles = Object.assign({
7042
+ textAnchor: "middle"
7043
+ }, baseLabelStyles);
7044
+
7045
+ // *
7046
+ // * Strokes
7047
+ // *
7048
+ const strokeDasharray = "10, 5";
7049
+ const strokeLinecap = "round";
7050
+ const strokeLinejoin = "round";
7051
+ const borderRadius = 1;
7052
+ // *
7053
+ // * Theme
7054
+ // *
7055
+ const clean = {
7056
+ palette: {
7057
+ colors,
7058
+ grayscale,
7059
+ qualitative: colorScale,
7060
+ heatmap,
7061
+ warm,
7062
+ cool,
7063
+ red: redPalette,
7064
+ green: greenPalette,
7065
+ blue: bluePalette
7066
+ },
7067
+ area: Object.assign({
7068
+ style: {
7069
+ data: {
7070
+ fill: blue["500"],
7071
+ strokeWidth: 2,
7072
+ fillOpacity: 0.5
7073
+ },
7074
+ labels: baseLabelStyles
7075
+ }
7076
+ }, baseProps),
7077
+ axis: Object.assign({
7078
+ style: {
7079
+ axis: {
7080
+ fill: "transparent",
7081
+ stroke: gray["500"],
7082
+ strokeWidth: 1,
7083
+ strokeLinecap,
7084
+ strokeLinejoin
7085
+ },
7086
+ axisLabel: Object.assign({}, centeredLabelStyles, {
7087
+ padding,
7088
+ stroke: "transparent"
7089
+ }),
7090
+ grid: {
7091
+ fill: "none",
7092
+ stroke: "none",
7093
+ painterEvents: "painted"
7094
+ },
7095
+ ticks: {
7096
+ fill: "transparent",
7097
+ size: 5,
7098
+ stroke: "transparent"
7099
+ },
7100
+ tickLabels: baseLabelStyles
7101
+ }
7102
+ }, baseProps),
7103
+ polarAxis: Object.assign({
7104
+ style: {
7105
+ axis: {
7106
+ stroke: gray["500"]
7107
+ },
7108
+ grid: {
7109
+ stroke: gray["400"],
7110
+ strokeDasharray,
7111
+ strokeLinecap,
7112
+ strokeLinejoin,
7113
+ pointerEvents: "painted"
7114
+ },
7115
+ ticks: {
7116
+ fill: "transparent",
7117
+ size: 5,
7118
+ stroke: gray["400"],
7119
+ strokeWidth: 1,
7120
+ strokeLinecap,
7121
+ strokeLinejoin
7122
+ },
7123
+ tickLabels: baseLabelStyles
7124
+ }
7125
+ }),
7126
+ polarDependentAxis: Object.assign({
7127
+ style: {
7128
+ axis: {
7129
+ stroke: gray["500"]
7130
+ },
7131
+ grid: {
7132
+ stroke: gray["400"],
7133
+ strokeDasharray,
7134
+ strokeLinecap,
7135
+ strokeLinejoin,
7136
+ pointerEvents: "painted"
7137
+ },
7138
+ ticks: {
7139
+ fill: "transparent",
7140
+ size: 5,
7141
+ stroke: gray["300"],
7142
+ strokeWidth: 1,
7143
+ strokeLinecap,
7144
+ strokeLinejoin
7145
+ },
7146
+ tickLabels: baseLabelStyles
7147
+ }
7148
+ }),
7149
+ bar: Object.assign({
7150
+ style: {
7151
+ data: {
7152
+ fill: blue["500"],
7153
+ padding,
7154
+ strokeWidth: 1,
7155
+ fillOpacity: 0.5
7156
+ },
7157
+ labels: baseLabelStyles
7158
+ },
7159
+ cornerRadius: {
7160
+ top: borderRadius
7161
+ }
7162
+ }, baseProps),
7163
+ boxplot: Object.assign({
7164
+ style: {
7165
+ max: {
7166
+ padding,
7167
+ stroke: gray["400"],
7168
+ strokeWidth: 2
7169
+ },
7170
+ maxLabels: Object.assign({}, baseLabelStyles, {
7171
+ padding: 3
7172
+ }),
7173
+ median: {
7174
+ padding,
7175
+ stroke: gray.white,
7176
+ strokeWidth: 2
7177
+ },
7178
+ medianLabels: Object.assign({}, baseLabelStyles, {
7179
+ padding: 3
7180
+ }),
7181
+ min: {
7182
+ padding,
7183
+ stroke: gray["400"],
7184
+ strokeWidth: 2
7185
+ },
7186
+ minLabels: Object.assign({}, baseLabelStyles, {
7187
+ padding: 3
7188
+ }),
7189
+ q1: {
7190
+ padding,
7191
+ fill: teal["500"],
7192
+ rx: borderRadius,
7193
+ strokeWidth: 2
7194
+ },
7195
+ q1Labels: Object.assign({}, baseLabelStyles, {
7196
+ padding: 3
7197
+ }),
7198
+ q3: {
7199
+ padding,
7200
+ fill: cyan["500"],
7201
+ rx: borderRadius
7202
+ },
7203
+ q3Labels: Object.assign({}, baseLabelStyles, {
7204
+ padding: 3
7205
+ })
7206
+ },
7207
+ boxWidth: 20
7208
+ }, baseProps),
7209
+ candlestick: Object.assign({
7210
+ style: {
7211
+ data: {
7212
+ stroke: gray["300"],
7213
+ strokeWidth: 0,
7214
+ rx: borderRadius
7215
+ },
7216
+ labels: Object.assign({}, baseLabelStyles, {
7217
+ padding: 5
7218
+ })
7219
+ },
7220
+ candleColors: {
7221
+ positive: teal["500"],
7222
+ negative: orange["500"]
7223
+ },
7224
+ wickStrokeWidth: 2
7225
+ }, baseProps),
7226
+ chart: baseProps,
7227
+ errorbar: Object.assign({
7228
+ borderWidth: 8,
7229
+ style: {
7230
+ data: {
7231
+ fill: "transparent",
7232
+ opacity: 1,
7233
+ stroke: gray["700"],
7234
+ strokeWidth: 2,
7235
+ strokeLinecap
7236
+ },
7237
+ labels: baseLabelStyles
7238
+ }
7239
+ }, baseProps),
7240
+ group: Object.assign({
7241
+ colorScale
7242
+ }, baseProps),
7243
+ histogram: Object.assign({
7244
+ style: {
7245
+ data: {
7246
+ fill: cyan["500"],
7247
+ fillOpacity: 0.5
7248
+ },
7249
+ labels: baseLabelStyles
7250
+ },
7251
+ binSpacing: 4,
7252
+ cornerRadius: {
7253
+ top: borderRadius
7254
+ }
7255
+ }, baseProps),
7256
+ label: baseLabelStyles,
7257
+ legend: {
7258
+ colorScale,
7259
+ gutter: 24,
7260
+ borderPadding: 10,
7261
+ orientation: "horizontal",
7262
+ titleOrientation: "top",
7263
+ centerTitle: true,
7264
+ style: {
7265
+ data: {
7266
+ type: "circle"
7267
+ },
7268
+ labels: {
7269
+ ...baseLabelStyles,
7270
+ fontSize: 12
7271
+ },
7272
+ title: Object.assign({}, baseLabelStyles, {
7273
+ padding,
7274
+ fontSize: 16
7275
+ }),
7276
+ border: {
7277
+ stroke: gray["200"],
7278
+ strokeWidth: 2,
7279
+ padding: 16
7280
+ }
7281
+ }
7282
+ },
7283
+ line: Object.assign({
7284
+ style: {
7285
+ data: {
7286
+ fill: "transparent",
7287
+ opacity: 1,
7288
+ stroke: blue["500"],
7289
+ strokeWidth: 2,
7290
+ strokeLinecap,
7291
+ strokeLinejoin
7292
+ },
7293
+ labels: baseLabelStyles
7294
+ }
7295
+ }, baseProps),
7296
+ pie: Object.assign({
7297
+ style: {
7298
+ parent: {
7299
+ backgroundColor: gray.white
7300
+ },
7301
+ data: {
7302
+ padding,
7303
+ stroke: gray.white,
7304
+ strokeWidth: 1
7305
+ },
7306
+ labels: {
7307
+ ...baseLabelStyles,
7308
+ padding: 20,
7309
+ fill: gray["600"],
7310
+ fontSize: 10
7311
+ }
7312
+ },
7313
+ colorScale,
7314
+ cornerRadius: borderRadius
7315
+ }, baseProps),
7316
+ scatter: Object.assign({
7317
+ style: {
7318
+ data: {
7319
+ fill: purple["500"],
7320
+ opacity: 1,
7321
+ stroke: "transparent",
7322
+ strokeWidth: 0
7323
+ },
7324
+ labels: {
7325
+ ...baseLabelStyles,
7326
+ padding: 20
7327
+ }
7328
+ }
7329
+ }, baseProps),
7330
+ stack: Object.assign({
7331
+ colorScale
7332
+ }, baseProps),
7333
+ tooltip: {
7334
+ style: Object.assign({}, baseLabelStyles, {
7335
+ padding: 0,
7336
+ pointerEvents: "none"
7337
+ }),
7338
+ flyoutStyle: {
7339
+ stroke: gray["300"],
7340
+ strokeWidth: 2,
7341
+ fill: gray.white,
7342
+ pointerEvents: "none"
7343
+ },
7344
+ flyoutPadding: {
7345
+ top: 8,
7346
+ bottom: 8,
7347
+ left: 16,
7348
+ right: 16
7349
+ },
7350
+ cornerRadius: borderRadius,
7351
+ pointerLength: 4
7352
+ },
7353
+ voronoi: Object.assign({
7354
+ style: {
7355
+ data: {
7356
+ fill: blue["100"],
7357
+ stroke: blue["500"],
7358
+ strokeWidth: 2,
7359
+ opacity: 0.4
7360
+ },
7361
+ labels: Object.assign({}, baseLabelStyles, {
7362
+ padding: 5,
7363
+ pointerEvents: "none"
7364
+ }),
7365
+ flyout: {
7366
+ stroke: gray["900"],
7367
+ strokeWidth: 1,
7368
+ fill: gray["100"],
7369
+ pointerEvents: "none"
7370
+ },
7371
+ padding: {
7372
+ left: 2,
7373
+ bottom: 2
7374
+ }
7375
+ }
7376
+ }, baseProps)
7377
+ };
7378
+
7379
+ /***/ }),
7380
+
6907
7381
  /***/ "../../victory-core/es/victory-theme/grayscale.js":
6908
7382
  /*!********************************************************!*\
6909
7383
  !*** ../../victory-core/es/victory-theme/grayscale.js ***!
@@ -6918,9 +7392,28 @@ __webpack_require__.r(__webpack_exports__);
6918
7392
  // *
6919
7393
  // * Colors
6920
7394
  // *
6921
- const colors = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
7395
+ const colors = {
7396
+ blue: "#4F7DA1",
7397
+ pink: "#E2A37F",
7398
+ teal: "#00796B",
7399
+ purple: "#DF948A",
7400
+ green: "#8BC34A",
7401
+ orange: "#F4511E",
7402
+ cyan: "#006064",
7403
+ red: "#DF5A49",
7404
+ yellow: "#FFF59D"
7405
+ };
7406
+ const colorScale = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
6922
7407
  const charcoal = "#252525";
6923
7408
  const grey = "#969696";
7409
+ const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
7410
+ const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
7411
+ const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
7412
+ const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
7413
+ const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
7414
+ const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
7415
+ const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
7416
+
6924
7417
  // *
6925
7418
  // * Typography
6926
7419
  // *
@@ -6934,7 +7427,7 @@ const baseProps = {
6934
7427
  width: 450,
6935
7428
  height: 300,
6936
7429
  padding: 50,
6937
- colorScale: colors
7430
+ colorScale
6938
7431
  };
6939
7432
  // *
6940
7433
  // * Labels
@@ -6956,6 +7449,17 @@ const centeredLabelStyles = Object.assign({
6956
7449
  const strokeLinecap = "round";
6957
7450
  const strokeLinejoin = "round";
6958
7451
  const grayscale = {
7452
+ palette: {
7453
+ colors,
7454
+ grayscale: colorScale,
7455
+ qualitative,
7456
+ heatmap,
7457
+ warm,
7458
+ cool,
7459
+ red,
7460
+ green,
7461
+ blue
7462
+ },
6959
7463
  area: Object.assign({
6960
7464
  style: {
6961
7465
  data: {
@@ -7070,7 +7574,7 @@ const grayscale = {
7070
7574
  }
7071
7575
  }, baseProps),
7072
7576
  group: Object.assign({
7073
- colorScale: colors
7577
+ colorScale
7074
7578
  }, baseProps),
7075
7579
  histogram: Object.assign({
7076
7580
  style: {
@@ -7083,7 +7587,7 @@ const grayscale = {
7083
7587
  }
7084
7588
  }, baseProps),
7085
7589
  legend: {
7086
- colorScale: colors,
7590
+ colorScale,
7087
7591
  gutter: 10,
7088
7592
  orientation: "vertical",
7089
7593
  titleOrientation: "top",
@@ -7118,7 +7622,7 @@ const grayscale = {
7118
7622
  padding: 20
7119
7623
  })
7120
7624
  },
7121
- colorScale: colors,
7625
+ colorScale,
7122
7626
  width: 400,
7123
7627
  height: 400,
7124
7628
  padding: 50
@@ -7134,7 +7638,7 @@ const grayscale = {
7134
7638
  }
7135
7639
  }, baseProps),
7136
7640
  stack: Object.assign({
7137
- colorScale: colors
7641
+ colorScale
7138
7642
  }, baseProps),
7139
7643
  tooltip: {
7140
7644
  style: Object.assign({}, baseLabelStyles, {
@@ -7194,11 +7698,31 @@ const lime300 = "#DCE775";
7194
7698
  const lightGreen500 = "#8BC34A";
7195
7699
  const teal700 = "#00796B";
7196
7700
  const cyan900 = "#006064";
7197
- const colors = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
7701
+ const colorScale = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
7198
7702
  const blueGrey50 = "#ECEFF1";
7199
7703
  const blueGrey300 = "#90A4AE";
7200
7704
  const blueGrey700 = "#455A64";
7201
7705
  const grey900 = "#212121";
7706
+ const colors = {
7707
+ blue: "#4F7DA1",
7708
+ pink: "#E2A37F",
7709
+ teal: teal700,
7710
+ purple: "#DF948A",
7711
+ green: lightGreen500,
7712
+ orange: deepOrange600,
7713
+ cyan: cyan900,
7714
+ red: "#DF5A49",
7715
+ yellow: yellow200
7716
+ };
7717
+ const grayscale = [blueGrey50, blueGrey300, blueGrey700, grey900];
7718
+ const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
7719
+ const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
7720
+ const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
7721
+ const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
7722
+ const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
7723
+ const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
7724
+ const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
7725
+
7202
7726
  // *
7203
7727
  // * Typography
7204
7728
  // *
@@ -7236,6 +7760,17 @@ const strokeDasharray = "10, 5";
7236
7760
  const strokeLinecap = "round";
7237
7761
  const strokeLinejoin = "round";
7238
7762
  const material = {
7763
+ palette: {
7764
+ colors,
7765
+ grayscale,
7766
+ qualitative,
7767
+ heatmap,
7768
+ warm,
7769
+ cool,
7770
+ red,
7771
+ green,
7772
+ blue
7773
+ },
7239
7774
  area: Object.assign({
7240
7775
  style: {
7241
7776
  data: {
@@ -7368,7 +7903,7 @@ const material = {
7368
7903
  }
7369
7904
  }, baseProps),
7370
7905
  group: Object.assign({
7371
- colorScale: colors
7906
+ colorScale
7372
7907
  }, baseProps),
7373
7908
  histogram: Object.assign({
7374
7909
  style: {
@@ -7381,7 +7916,7 @@ const material = {
7381
7916
  }
7382
7917
  }, baseProps),
7383
7918
  legend: {
7384
- colorScale: colors,
7919
+ colorScale,
7385
7920
  gutter: 10,
7386
7921
  orientation: "vertical",
7387
7922
  titleOrientation: "top",
@@ -7407,7 +7942,7 @@ const material = {
7407
7942
  }
7408
7943
  }, baseProps),
7409
7944
  pie: Object.assign({
7410
- colorScale: colors,
7945
+ colorScale,
7411
7946
  style: {
7412
7947
  data: {
7413
7948
  padding,
@@ -7431,7 +7966,7 @@ const material = {
7431
7966
  }
7432
7967
  }, baseProps),
7433
7968
  stack: Object.assign({
7434
- colorScale: colors
7969
+ colorScale
7435
7970
  }, baseProps),
7436
7971
  tooltip: {
7437
7972
  style: Object.assign({}, baseLabelStyles, {
@@ -7484,12 +8019,15 @@ __webpack_require__.r(__webpack_exports__);
7484
8019
  /* harmony export */ });
7485
8020
  /* harmony import */ var _grayscale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grayscale */ "../../victory-core/es/victory-theme/grayscale.js");
7486
8021
  /* harmony import */ var _material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./material */ "../../victory-core/es/victory-theme/material.js");
8022
+ /* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./clean */ "../../victory-core/es/victory-theme/clean.js");
8023
+
7487
8024
 
7488
8025
 
7489
8026
 
7490
8027
  const VictoryTheme = {
7491
8028
  grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
7492
- material: _material__WEBPACK_IMPORTED_MODULE_1__.material
8029
+ material: _material__WEBPACK_IMPORTED_MODULE_1__.material,
8030
+ clean: _clean__WEBPACK_IMPORTED_MODULE_2__.clean
7493
8031
  };
7494
8032
 
7495
8033
  /***/ }),
@@ -10394,6 +10932,9 @@ __webpack_require__.r(__webpack_exports__);
10394
10932
  /* harmony export */ "getColorScale": function() { return /* binding */ getColorScale; },
10395
10933
  /* harmony export */ "toTransformString": function() { return /* binding */ toTransformString; }
10396
10934
  /* harmony export */ });
10935
+ /* harmony import */ var _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../victory-theme/victory-theme */ "../../victory-core/es/victory-theme/victory-theme.js");
10936
+
10937
+
10397
10938
  /**
10398
10939
  * Given an object with CSS/SVG transform definitions, return the string value
10399
10940
  * for use with the `transform` CSS property or SVG attribute. Note that we
@@ -10430,20 +10971,37 @@ const toTransformString = function (obj) {
10430
10971
  * of 5 hex string values in that color scale. If no 'name' parameter
10431
10972
  * is given, it will return the Victory default grayscale.
10432
10973
  * @param {String} name The name of the color scale to return (optional).
10974
+ * @param {Object} theme The theme object to retrieve the color scale from (optional).
10433
10975
  * @returns {Array} An array of 5 hex string values composing a color scale.
10434
10976
  */
10435
- function getColorScale(name) {
10977
+ function getColorScale(name, theme) {
10978
+ if (theme === void 0) {
10979
+ theme = _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__.VictoryTheme.material;
10980
+ }
10981
+ const {
10982
+ palette: {
10983
+ grayscale = ["#cccccc", "#969696", "#636363", "#252525"],
10984
+ qualitative = [],
10985
+ heatmap = [],
10986
+ warm = [],
10987
+ cool = [],
10988
+ red = [],
10989
+ blue = [],
10990
+ green = []
10991
+ } = {}
10992
+ } = theme;
10436
10993
  const scales = {
10437
- grayscale: ["#cccccc", "#969696", "#636363", "#252525"],
10438
- qualitative: ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"],
10439
- heatmap: ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"],
10440
- warm: ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"],
10441
- cool: ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"],
10442
- red: ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"],
10443
- blue: ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"],
10444
- green: ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"]
10994
+ grayscale,
10995
+ qualitative,
10996
+ heatmap,
10997
+ warm,
10998
+ cool,
10999
+ red,
11000
+ blue,
11001
+ green
10445
11002
  };
10446
- return name ? scales[name] : scales.grayscale;
11003
+ const selectedScale = name && scales[name]?.length ? scales[name] : scales.grayscale;
11004
+ return selectedScale;
10447
11005
  }
10448
11006
 
10449
11007
  /***/ }),
@@ -10470,6 +11028,7 @@ __webpack_require__.r(__webpack_exports__);
10470
11028
  /* eslint-disable no-magic-numbers */
10471
11029
  // Based on measuring specific character widths
10472
11030
  // as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
11031
+ // For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
10473
11032
  // prettier-ignore
10474
11033
  const fonts = {
10475
11034
  "American Typewriter": {
@@ -10528,6 +11087,10 @@ const fonts = {
10528
11087
  widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2359375, 0.2234375, 0.3921875, 0.7125, 0.49375, 0.8859375, 0.771875, 0.2125, 0.3078125, 0.309375, 0.375, 0.4234375, 0.234375, 0.3125, 0.234375, 0.3, 0.5828125, 0.365625, 0.434375, 0.3921875, 0.5234375, 0.3984375, 0.5125, 0.4328125, 0.46875, 0.5125, 0.234375, 0.234375, 0.515625, 0.4234375, 0.515625, 0.340625, 0.7609375, 0.7359375, 0.6359375, 0.721875, 0.8125, 0.6375, 0.5875, 0.8078125, 0.853125, 0.4296875, 0.503125, 0.78125, 0.609375, 0.9609375, 0.8515625, 0.8140625, 0.6125, 0.8140625, 0.71875, 0.49375, 0.7125, 0.76875, 0.771875, 1.125, 0.7765625, 0.7734375, 0.65625, 0.321875, 0.3078125, 0.321875, 0.3546875, 0.5, 0.3375, 0.446875, 0.5359375, 0.45, 0.5296875, 0.4546875, 0.425, 0.4921875, 0.54375, 0.2671875, 0.240625, 0.5390625, 0.25, 0.815625, 0.5375, 0.5234375, 0.5390625, 0.5421875, 0.365625, 0.36875, 0.35625, 0.5171875, 0.5015625, 0.75, 0.5, 0.509375, 0.44375, 0.2421875, 0.14375, 0.2421875, 0.35],
10529
11088
  avg: 0.5116447368421051
10530
11089
  },
11090
+ "Inter": {
11091
+ widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2796875, 0.2890625, 0.4671875, 0.634375, 0.6421875, 0.9828125, 0.6453125, 0.3, 0.365625, 0.365625, 0.5015625, 0.6625, 0.2890625, 0.4609375, 0.2890625, 0.3609375, 0.63125, 0.4078125, 0.6109375, 0.61875, 0.646875, 0.59375, 0.6203125, 0.5671875, 0.61875, 0.6203125, 0.2890625, 0.303125, 0.6625, 0.6625, 0.6625, 0.5125, 0.9671875, 0.690625, 0.6546875, 0.73125, 0.721875, 0.6015625, 0.590625, 0.746875, 0.74375, 0.26875, 0.571875, 0.671875, 0.565625, 0.9046875, 0.7546875, 0.765625, 0.6390625, 0.765625, 0.64375, 0.6421875, 0.646875, 0.7453125, 0.690625, 0.9859375, 0.6828125, 0.6796875, 0.6296875, 0.365625, 0.3609375, 0.365625, 0.471875, 0.45625, 0.3234375, 0.5625, 0.6125, 0.571875, 0.6125, 0.584375, 0.3703125, 0.6140625, 0.5921875, 0.2421875, 0.2548828125, 0.55, 0.2421875, 0.8765625, 0.5921875, 0.6, 0.6125, 0.6125, 0.3765625, 0.528125, 0.328125, 0.5921875, 0.5625, 0.81875, 0.546875, 0.5625, 0.553125, 0.4265625, 0.3328125, 0.4265625, 0.6625],
11092
+ avg: 0.5624362664473683
11093
+ },
10531
11094
  "Montserrat": {
10532
11095
  widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2625, 0.2609375, 0.3734375, 0.696875, 0.615625, 0.8296875, 0.6703125, 0.203125, 0.3296875, 0.3296875, 0.3875, 0.575, 0.2125, 0.3828125, 0.2125, 0.3953125, 0.6625, 0.3625, 0.56875, 0.5640625, 0.6625, 0.5671875, 0.609375, 0.5890625, 0.6390625, 0.609375, 0.2125, 0.2125, 0.575, 0.575, 0.575, 0.5671875, 1.034375, 0.7171875, 0.7546875, 0.7203125, 0.8265625, 0.6703125, 0.634375, 0.7734375, 0.8140625, 0.303125, 0.5078125, 0.7125, 0.5890625, 0.95625, 0.8140625, 0.8390625, 0.71875, 0.8390625, 0.7234375, 0.615625, 0.575, 0.7921875, 0.6984375, 1.1125, 0.65625, 0.6359375, 0.6515625, 0.31875, 0.396875, 0.31875, 0.5765625, 0.5, 0.6, 0.590625, 0.678125, 0.5640625, 0.678125, 0.6046875, 0.375, 0.6875, 0.678125, 0.2703125, 0.365625, 0.6015625, 0.2703125, 1.0625, 0.678125, 0.628125, 0.678125, 0.678125, 0.4015625, 0.4890625, 0.40625, 0.6734375, 0.5421875, 0.8796875, 0.534375, 0.5671875, 0.5125, 0.334375, 0.2953125, 0.334375, 0.575],
10533
11096
  avg: 0.571792763157895