victory-core 37.1.1 → 37.1.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # victory-core
2
2
 
3
+ ## 37.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix victory-native container styles ([`eae3fe5dd`](https://github.com/FormidableLabs/victory/commit/eae3fe5dde175e68e146576655cb2e8054ad6456))
8
+
3
9
  ## 37.1.1
4
10
 
5
11
  ## 37.1.0
@@ -2272,6 +2272,432 @@ const Whisker = initialProps => {
2272
2272
 
2273
2273
  /***/ }),
2274
2274
 
2275
+ /***/ "./victory-theme/clean.tsx":
2276
+ /*!*********************************!*\
2277
+ !*** ./victory-theme/clean.tsx ***!
2278
+ \*********************************/
2279
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2280
+
2281
+ "use strict";
2282
+ __webpack_require__.r(__webpack_exports__);
2283
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2284
+ /* harmony export */ "clean": function() { return /* binding */ clean; }
2285
+ /* harmony export */ });
2286
+ // *
2287
+ // * Colors
2288
+ // *
2289
+
2290
+ const gray = {
2291
+ white: "#FFFFFF",
2292
+ "50": "#FAFAFA",
2293
+ "100": "#F2F2F2",
2294
+ "200": "#E8E8E8",
2295
+ "300": "#E0E0E0",
2296
+ "400": "#D1D1D1",
2297
+ "500": "#757575",
2298
+ "600": "#5C5C5C",
2299
+ "700": "#424242",
2300
+ "800": "#333333",
2301
+ "900": "#292929",
2302
+ black: "#0F0F0F"
2303
+ };
2304
+ const yellow = {
2305
+ "100": "#FFEAB6",
2306
+ "300": "#FFD66E",
2307
+ "500": "#FCB400",
2308
+ "900": "#B87503"
2309
+ };
2310
+ const orange = {
2311
+ "100": "#FEE2D5",
2312
+ "300": "#FFA981",
2313
+ "500": "#FF6F2C",
2314
+ "900": "#D74D26"
2315
+ };
2316
+ const red = {
2317
+ "100": "#FFDCE5",
2318
+ "300": "#FF9EB7",
2319
+ "500": "#F82B60",
2320
+ "900": "#BA1E45"
2321
+ };
2322
+ const pink = {
2323
+ "100": "#FFDAF6",
2324
+ "300": "#F99DE2",
2325
+ "500": "#FF08C2",
2326
+ "900": "#B2158B"
2327
+ };
2328
+ const purple = {
2329
+ "100": "#EDE3FE",
2330
+ "300": "#CDB0FF",
2331
+ "500": "#8B46FF",
2332
+ "900": "#6B1CB0"
2333
+ };
2334
+ const blue = {
2335
+ "100": "#CFDFFF",
2336
+ "300": "#9CC7FF",
2337
+ "500": "#2D7FF9",
2338
+ "900": "#2750AE"
2339
+ };
2340
+ const cyan = {
2341
+ "100": "#D0F0FD",
2342
+ "300": "#77D1F3",
2343
+ "500": "#18BFFF",
2344
+ "900": "#0B76B7"
2345
+ };
2346
+ const teal = {
2347
+ "100": "#C2F5E9",
2348
+ "300": "#72DDC3",
2349
+ "500": "#20D9D2",
2350
+ "900": "#06A09B"
2351
+ };
2352
+ const green = {
2353
+ "100": "#D1F7C4",
2354
+ "300": "#93E088",
2355
+ "500": "#20C933",
2356
+ "900": "#338A17"
2357
+ };
2358
+ const colors = [blue["500"], pink["500"], teal["500"], purple["500"], green["500"], orange["500"], cyan["500"], red["500"], yellow["500"]];
2359
+ // *
2360
+ // * Typography
2361
+ // *
2362
+ const sansSerif = "'Inter', 'Helvetica Neue', 'Seravek', 'Helvetica', sans-serif";
2363
+ const letterSpacing = "normal";
2364
+ const fontSize = 12;
2365
+ // *
2366
+ // * Layout
2367
+ // *
2368
+ const padding = 8;
2369
+ const baseProps = {
2370
+ width: 450,
2371
+ height: 300,
2372
+ padding: 50,
2373
+ colorScale: colors
2374
+ };
2375
+ // *
2376
+ // * Labels
2377
+ // *
2378
+ const baseLabelStyles = {
2379
+ fontFamily: sansSerif,
2380
+ fontSize,
2381
+ fontWeight: 300,
2382
+ letterSpacing,
2383
+ padding,
2384
+ fill: gray["900"],
2385
+ stroke: "transparent"
2386
+ };
2387
+ const centeredLabelStyles = Object.assign({
2388
+ textAnchor: "middle"
2389
+ }, baseLabelStyles);
2390
+
2391
+ // *
2392
+ // * Strokes
2393
+ // *
2394
+ const strokeDasharray = "10, 5";
2395
+ const strokeLinecap = "round";
2396
+ const strokeLinejoin = "round";
2397
+ const borderRadius = 1;
2398
+ // *
2399
+ // * Theme
2400
+ // *
2401
+ const clean = {
2402
+ area: Object.assign({
2403
+ style: {
2404
+ data: {
2405
+ fill: cyan["500"]
2406
+ },
2407
+ labels: baseLabelStyles
2408
+ }
2409
+ }, baseProps),
2410
+ axis: Object.assign({
2411
+ style: {
2412
+ axis: {
2413
+ fill: "transparent",
2414
+ stroke: gray["300"],
2415
+ strokeWidth: 1,
2416
+ strokeLinecap,
2417
+ strokeLinejoin
2418
+ },
2419
+ axisLabel: Object.assign({}, centeredLabelStyles, {
2420
+ padding,
2421
+ stroke: "transparent"
2422
+ }),
2423
+ grid: {
2424
+ fill: "none",
2425
+ stroke: "none",
2426
+ painterEvents: "painted"
2427
+ },
2428
+ ticks: {
2429
+ fill: "transparent",
2430
+ size: 5,
2431
+ stroke: "transparent"
2432
+ },
2433
+ tickLabels: baseLabelStyles
2434
+ }
2435
+ }, baseProps),
2436
+ polarAxis: Object.assign({
2437
+ style: {
2438
+ axis: {
2439
+ stroke: gray["300"]
2440
+ },
2441
+ grid: {
2442
+ stroke: gray["200"],
2443
+ strokeDasharray,
2444
+ strokeLinecap,
2445
+ strokeLinejoin,
2446
+ pointerEvents: "painted"
2447
+ },
2448
+ ticks: {
2449
+ fill: "transparent",
2450
+ size: 5,
2451
+ stroke: gray["200"],
2452
+ strokeWidth: 1,
2453
+ strokeLinecap,
2454
+ strokeLinejoin
2455
+ },
2456
+ tickLabels: baseLabelStyles
2457
+ }
2458
+ }),
2459
+ polarDependentAxis: Object.assign({
2460
+ style: {
2461
+ axis: {
2462
+ stroke: gray["300"]
2463
+ },
2464
+ grid: {
2465
+ stroke: gray["200"],
2466
+ strokeDasharray,
2467
+ strokeLinecap,
2468
+ strokeLinejoin,
2469
+ pointerEvents: "painted"
2470
+ },
2471
+ ticks: {
2472
+ fill: "transparent",
2473
+ size: 5,
2474
+ stroke: gray["200"],
2475
+ strokeWidth: 1,
2476
+ strokeLinecap,
2477
+ strokeLinejoin
2478
+ },
2479
+ tickLabels: baseLabelStyles
2480
+ }
2481
+ }),
2482
+ bar: Object.assign({
2483
+ style: {
2484
+ data: {
2485
+ fill: blue["500"],
2486
+ padding,
2487
+ strokeWidth: 0
2488
+ },
2489
+ labels: baseLabelStyles
2490
+ },
2491
+ cornerRadius: {
2492
+ top: borderRadius
2493
+ }
2494
+ }, baseProps),
2495
+ boxplot: Object.assign({
2496
+ style: {
2497
+ max: {
2498
+ padding,
2499
+ stroke: gray["400"],
2500
+ strokeWidth: 2
2501
+ },
2502
+ maxLabels: Object.assign({}, baseLabelStyles, {
2503
+ padding: 3
2504
+ }),
2505
+ median: {
2506
+ padding,
2507
+ stroke: gray.white,
2508
+ strokeWidth: 2
2509
+ },
2510
+ medianLabels: Object.assign({}, baseLabelStyles, {
2511
+ padding: 3
2512
+ }),
2513
+ min: {
2514
+ padding,
2515
+ stroke: gray["400"],
2516
+ strokeWidth: 2
2517
+ },
2518
+ minLabels: Object.assign({}, baseLabelStyles, {
2519
+ padding: 3
2520
+ }),
2521
+ q1: {
2522
+ padding,
2523
+ fill: teal["500"],
2524
+ rx: borderRadius
2525
+ },
2526
+ q1Labels: Object.assign({}, baseLabelStyles, {
2527
+ padding: 3
2528
+ }),
2529
+ q3: {
2530
+ padding,
2531
+ fill: teal["500"],
2532
+ rx: borderRadius
2533
+ },
2534
+ q3Labels: Object.assign({}, baseLabelStyles, {
2535
+ padding: 3
2536
+ })
2537
+ },
2538
+ boxWidth: 20
2539
+ }, baseProps),
2540
+ candlestick: Object.assign({
2541
+ style: {
2542
+ data: {
2543
+ stroke: gray["300"],
2544
+ strokeWidth: 0,
2545
+ rx: borderRadius
2546
+ },
2547
+ labels: Object.assign({}, baseLabelStyles, {
2548
+ padding: 5
2549
+ })
2550
+ },
2551
+ candleColors: {
2552
+ positive: teal["500"],
2553
+ negative: orange["500"]
2554
+ },
2555
+ wickStrokeWidth: 2
2556
+ }, baseProps),
2557
+ chart: baseProps,
2558
+ errorbar: Object.assign({
2559
+ borderWidth: 8,
2560
+ style: {
2561
+ data: {
2562
+ fill: "transparent",
2563
+ opacity: 1,
2564
+ stroke: gray["700"],
2565
+ strokeWidth: 2,
2566
+ strokeLinecap
2567
+ },
2568
+ labels: baseLabelStyles
2569
+ }
2570
+ }, baseProps),
2571
+ group: Object.assign({
2572
+ colorScale: colors
2573
+ }, baseProps),
2574
+ histogram: Object.assign({
2575
+ style: {
2576
+ data: {
2577
+ fill: cyan["500"],
2578
+ stroke: "transparent",
2579
+ strokeWidth: 0
2580
+ },
2581
+ labels: baseLabelStyles
2582
+ },
2583
+ binSpacing: 4,
2584
+ cornerRadius: {
2585
+ top: borderRadius
2586
+ }
2587
+ }, baseProps),
2588
+ label: baseLabelStyles,
2589
+ legend: {
2590
+ colorScale: colors,
2591
+ gutter: 10,
2592
+ orientation: "vertical",
2593
+ titleOrientation: "top",
2594
+ style: {
2595
+ data: {
2596
+ type: "circle"
2597
+ },
2598
+ labels: {
2599
+ ...baseLabelStyles,
2600
+ fontSize: 14
2601
+ },
2602
+ title: Object.assign({}, baseLabelStyles, {
2603
+ padding,
2604
+ fontSize: 20
2605
+ }),
2606
+ border: {
2607
+ stroke: gray["200"],
2608
+ strokeWidth: 2,
2609
+ padding: 16
2610
+ }
2611
+ }
2612
+ },
2613
+ line: Object.assign({
2614
+ style: {
2615
+ data: {
2616
+ fill: "transparent",
2617
+ opacity: 1,
2618
+ stroke: pink["500"],
2619
+ strokeWidth: 2,
2620
+ strokeLinecap,
2621
+ strokeLinejoin
2622
+ },
2623
+ labels: baseLabelStyles
2624
+ }
2625
+ }, baseProps),
2626
+ pie: Object.assign({
2627
+ style: {
2628
+ data: {
2629
+ padding,
2630
+ stroke: gray.white,
2631
+ strokeWidth: 1
2632
+ },
2633
+ labels: Object.assign({}, baseLabelStyles, {
2634
+ padding: 20
2635
+ })
2636
+ },
2637
+ colorScale: colors,
2638
+ cornerRadius: borderRadius
2639
+ }, baseProps),
2640
+ scatter: Object.assign({
2641
+ style: {
2642
+ data: {
2643
+ fill: purple["500"],
2644
+ opacity: 1,
2645
+ stroke: "transparent",
2646
+ strokeWidth: 0
2647
+ },
2648
+ labels: baseLabelStyles
2649
+ }
2650
+ }, baseProps),
2651
+ stack: Object.assign({
2652
+ colorScale: colors
2653
+ }, baseProps),
2654
+ tooltip: {
2655
+ style: Object.assign({}, baseLabelStyles, {
2656
+ padding: 0,
2657
+ pointerEvents: "none"
2658
+ }),
2659
+ flyoutStyle: {
2660
+ stroke: gray["500"],
2661
+ strokeWidth: 2,
2662
+ fill: gray.white,
2663
+ pointerEvents: "none"
2664
+ },
2665
+ flyoutPadding: {
2666
+ top: 8,
2667
+ bottom: 8,
2668
+ left: 16,
2669
+ right: 16
2670
+ },
2671
+ cornerRadius: borderRadius,
2672
+ pointerLength: 4
2673
+ },
2674
+ voronoi: Object.assign({
2675
+ style: {
2676
+ data: {
2677
+ fill: red["100"],
2678
+ stroke: red["500"],
2679
+ strokeWidth: 2
2680
+ },
2681
+ labels: Object.assign({}, baseLabelStyles, {
2682
+ padding: 5,
2683
+ pointerEvents: "none"
2684
+ }),
2685
+ flyout: {
2686
+ stroke: gray["900"],
2687
+ strokeWidth: 1,
2688
+ fill: gray["100"],
2689
+ pointerEvents: "none"
2690
+ },
2691
+ padding: {
2692
+ left: 2,
2693
+ bottom: 2
2694
+ }
2695
+ }
2696
+ }, baseProps)
2697
+ };
2698
+
2699
+ /***/ }),
2700
+
2275
2701
  /***/ "./victory-theme/grayscale.tsx":
2276
2702
  /*!*************************************!*\
2277
2703
  !*** ./victory-theme/grayscale.tsx ***!
@@ -2852,12 +3278,15 @@ __webpack_require__.r(__webpack_exports__);
2852
3278
  /* harmony export */ });
2853
3279
  /* harmony import */ var _grayscale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grayscale */ "./victory-theme/grayscale.tsx");
2854
3280
  /* harmony import */ var _material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./material */ "./victory-theme/material.tsx");
3281
+ /* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./clean */ "./victory-theme/clean.tsx");
3282
+
2855
3283
 
2856
3284
 
2857
3285
 
2858
3286
  const VictoryTheme = {
2859
3287
  grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
2860
- material: _material__WEBPACK_IMPORTED_MODULE_1__.material
3288
+ material: _material__WEBPACK_IMPORTED_MODULE_1__.material,
3289
+ clean: _clean__WEBPACK_IMPORTED_MODULE_2__.clean
2861
3290
  };
2862
3291
 
2863
3292
  /***/ }),
@@ -6820,6 +7249,7 @@ __webpack_require__.r(__webpack_exports__);
6820
7249
  /* eslint-disable no-magic-numbers */
6821
7250
  // Based on measuring specific character widths
6822
7251
  // as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
7252
+ // For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
6823
7253
  // prettier-ignore
6824
7254
  const fonts = {
6825
7255
  "American Typewriter": {
@@ -6878,6 +7308,10 @@ const fonts = {
6878
7308
  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],
6879
7309
  avg: 0.5116447368421051
6880
7310
  },
7311
+ "Inter": {
7312
+ 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],
7313
+ avg: 0.5624362664473683
7314
+ },
6881
7315
  "Montserrat": {
6882
7316
  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],
6883
7317
  avg: 0.571792763157895