sag_components 2.0.0-beta174 → 2.0.0-beta176

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/index.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import React$1, { useState, useRef, useEffect, useMemo, useCallback, useImperativeHandle } from 'react';
2
2
  import styled, { keyframes, css, styled as styled$1 } from 'styled-components';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
4
  import { ResponsiveContainer, PieChart as PieChart$1, Pie, Cell, Tooltip as Tooltip$3, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Bar, LabelList, ReferenceLine, LineChart, Line, AreaChart as AreaChart$1, Legend, Area, ScatterChart, ZAxis, Scatter, Brush, ComposedChart } from 'recharts';
4
5
  import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
5
6
  import { motion, AnimatePresence } from 'framer-motion';
@@ -449,6 +450,120 @@ const Calendar = () => /*#__PURE__*/React$1.createElement("svg", {
449
450
  fill: "#568202"
450
451
  }));
451
452
 
453
+ // eslint-disable-next-line react/prop-types
454
+ const ErrorIcon = _ref => {
455
+ let {
456
+ color = '#FF3949',
457
+ width = '18',
458
+ height = '18'
459
+ } = _ref;
460
+ return /*#__PURE__*/React$1.createElement("svg", {
461
+ width: width,
462
+ height: height,
463
+ viewBox: "0 0 14 13",
464
+ fill: "none",
465
+ xmlns: "http://www.w3.org/2000/svg"
466
+ }, /*#__PURE__*/React$1.createElement("path", {
467
+ d: "M7 1.625C5.24219 1.625 3.64844 2.5625 2.75781 4.0625C1.89062 5.58594 1.89062 7.4375 2.75781 8.9375C3.64844 10.4609 5.24219 11.375 7 11.375C8.73438 11.375 10.3281 10.4609 11.2188 8.9375C12.0859 7.4375 12.0859 5.58594 11.2188 4.0625C10.3281 2.5625 8.73438 1.625 7 1.625ZM7 12.5C4.84375 12.5 2.875 11.375 1.79688 9.5C0.71875 7.64844 0.71875 5.375 1.79688 3.5C2.875 1.64844 4.84375 0.5 7 0.5C9.13281 0.5 11.1016 1.64844 12.1797 3.5C13.2578 5.375 13.2578 7.64844 12.1797 9.5C11.1016 11.375 9.13281 12.5 7 12.5ZM7 3.5C7.30469 3.5 7.5625 3.75781 7.5625 4.0625V6.6875C7.5625 7.01562 7.30469 7.25 7 7.25C6.67188 7.25 6.4375 7.01562 6.4375 6.6875V4.0625C6.4375 3.75781 6.67188 3.5 7 3.5ZM7.75 8.75C7.75 9.17188 7.39844 9.5 7 9.5C6.57812 9.5 6.25 9.17188 6.25 8.75C6.25 8.35156 6.57812 8 7 8C7.39844 8 7.75 8.35156 7.75 8.75Z",
468
+ fill: color
469
+ }));
470
+ };
471
+
472
+ /******************************************************************************
473
+ Copyright (c) Microsoft Corporation.
474
+
475
+ Permission to use, copy, modify, and/or distribute this software for any
476
+ purpose with or without fee is hereby granted.
477
+
478
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
479
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
480
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
481
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
482
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
483
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
484
+ PERFORMANCE OF THIS SOFTWARE.
485
+ ***************************************************************************** */
486
+
487
+ var __assign = function() {
488
+ __assign = Object.assign || function __assign(t) {
489
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
490
+ s = arguments[i];
491
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
492
+ }
493
+ return t;
494
+ };
495
+ return __assign.apply(this, arguments);
496
+ };
497
+
498
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
499
+ var e = new Error(message);
500
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
501
+ };
502
+
503
+ var VIcon = function (_a) {
504
+ var _b = _a.width,
505
+ width = _b === void 0 ? "12" : _b,
506
+ _c = _a.height,
507
+ height = _c === void 0 ? "8" : _c,
508
+ _d = _a.color,
509
+ color = _d === void 0 ? "#D0D0D0" : _d;
510
+ return jsxs("svg", __assign({
511
+ width: width,
512
+ height: height,
513
+ viewBox: "0 0 20 20",
514
+ fill: "none",
515
+ xmlns: "http://www.w3.org/2000/svg"
516
+ }, {
517
+ children: [jsx("g", __assign({
518
+ filter: "url(#filter0_d_3431_32168)"
519
+ }, {
520
+ children: jsx("path", {
521
+ d: "M15.8754 4.12241C16.0415 4.28562 16.0415 4.55413 15.8754 4.71734L8.58808 11.8776C8.42197 12.0408 8.14869 12.0408 7.98259 11.8776L4.12458 8.08687C3.95847 7.92366 3.95847 7.65515 4.12458 7.49194C4.29069 7.32873 4.56397 7.32873 4.73007 7.49194L8.28533 10.9852L15.2699 4.12241C15.436 3.9592 15.7093 3.9592 15.8754 4.12241Z",
522
+ fill: color
523
+ })
524
+ })), jsx("defs", {
525
+ children: jsxs("filter", __assign({
526
+ id: "filter0_d_3431_32168",
527
+ x: "-2",
528
+ y: "0",
529
+ width: "24",
530
+ height: "24",
531
+ filterUnits: "userSpaceOnUse",
532
+ "color-interpolation-filters": "sRGB"
533
+ }, {
534
+ children: [jsx("feFlood", {
535
+ "flood-opacity": "0",
536
+ result: "BackgroundImageFix"
537
+ }), jsx("feColorMatrix", {
538
+ "in": "SourceAlpha",
539
+ type: "matrix",
540
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
541
+ result: "hardAlpha"
542
+ }), jsx("feOffset", {
543
+ dy: "4"
544
+ }), jsx("feGaussianBlur", {
545
+ stdDeviation: "2"
546
+ }), jsx("feComposite", {
547
+ in2: "hardAlpha",
548
+ operator: "out"
549
+ }), jsx("feColorMatrix", {
550
+ type: "matrix",
551
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
552
+ }), jsx("feBlend", {
553
+ mode: "normal",
554
+ in2: "BackgroundImageFix",
555
+ result: "effect1_dropShadow_3431_32168"
556
+ }), jsx("feBlend", {
557
+ mode: "normal",
558
+ "in": "SourceGraphic",
559
+ in2: "effect1_dropShadow_3431_32168",
560
+ result: "shape"
561
+ })]
562
+ }))
563
+ })]
564
+ }));
565
+ };
566
+
452
567
  const ChervronRightIcon = _ref => {
453
568
  let {
454
569
  width = "8",
@@ -530,7 +645,8 @@ const Button$1 = props => {
530
645
  reselect: ReselectIcon,
531
646
  plus: Plus,
532
647
  left: ChervronLeftIcon,
533
- right: ChervronRightIcon
648
+ right: ChervronRightIcon,
649
+ vicon: VIcon
534
650
  };
535
651
  const getIcon = icon => {
536
652
  if (!icon || icon === "none") return null;
@@ -34201,25 +34317,6 @@ const InsightsCarousel = _ref => {
34201
34317
  })))));
34202
34318
  };
34203
34319
 
34204
- // eslint-disable-next-line react/prop-types
34205
- const ErrorIcon = _ref => {
34206
- let {
34207
- color = '#FF3949',
34208
- width = '18',
34209
- height = '18'
34210
- } = _ref;
34211
- return /*#__PURE__*/React$1.createElement("svg", {
34212
- width: width,
34213
- height: height,
34214
- viewBox: "0 0 14 13",
34215
- fill: "none",
34216
- xmlns: "http://www.w3.org/2000/svg"
34217
- }, /*#__PURE__*/React$1.createElement("path", {
34218
- d: "M7 1.625C5.24219 1.625 3.64844 2.5625 2.75781 4.0625C1.89062 5.58594 1.89062 7.4375 2.75781 8.9375C3.64844 10.4609 5.24219 11.375 7 11.375C8.73438 11.375 10.3281 10.4609 11.2188 8.9375C12.0859 7.4375 12.0859 5.58594 11.2188 4.0625C10.3281 2.5625 8.73438 1.625 7 1.625ZM7 12.5C4.84375 12.5 2.875 11.375 1.79688 9.5C0.71875 7.64844 0.71875 5.375 1.79688 3.5C2.875 1.64844 4.84375 0.5 7 0.5C9.13281 0.5 11.1016 1.64844 12.1797 3.5C13.2578 5.375 13.2578 7.64844 12.1797 9.5C11.1016 11.375 9.13281 12.5 7 12.5ZM7 3.5C7.30469 3.5 7.5625 3.75781 7.5625 4.0625V6.6875C7.5625 7.01562 7.30469 7.25 7 7.25C6.67188 7.25 6.4375 7.01562 6.4375 6.6875V4.0625C6.4375 3.75781 6.67188 3.5 7 3.5ZM7.75 8.75C7.75 9.17188 7.39844 9.5 7 9.5C6.57812 9.5 6.25 9.17188 6.25 8.75C6.25 8.35156 6.57812 8 7 8C7.39844 8 7.75 8.35156 7.75 8.75Z",
34219
- fill: color
34220
- }));
34221
- };
34222
-
34223
34320
  // eslint-disable-next-line react/prop-types
34224
34321
  const SucceededIcon = _ref => {
34225
34322
  let {
@@ -35616,9 +35713,12 @@ const ToggleSwitchLabel = styled.label`
35616
35713
  position: relative;
35617
35714
  cursor: pointer;
35618
35715
  user-select: none;
35619
- opacity: ${({
35620
- disabled
35621
- }) => disabled ? 0.5 : 1};
35716
+ opacity: ${_ref => {
35717
+ let {
35718
+ disabled
35719
+ } = _ref;
35720
+ return disabled ? 0.5 : 1;
35721
+ }};
35622
35722
  `;
35623
35723
  const ToggleInput = styled.input`
35624
35724
  display: none;
@@ -35626,15 +35726,19 @@ const ToggleInput = styled.input`
35626
35726
  const ToggleSlider = styled.span`
35627
35727
  display: block;
35628
35728
  position: relative;
35629
- background: ${({
35630
- checked,
35631
- disabled
35632
- }) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
35729
+ background: ${_ref2 => {
35730
+ let {
35731
+ checked,
35732
+ disabled
35733
+ } = _ref2;
35734
+ return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
35735
+ }};
35633
35736
  border-radius: 999px;
35634
35737
  transition: background 0.2s;
35635
- ${({
35636
- size
35637
- }) => {
35738
+ ${_ref3 => {
35739
+ let {
35740
+ size
35741
+ } = _ref3;
35638
35742
  switch (size) {
35639
35743
  case "s":
35640
35744
  return css`width: 40px; height: 20px;`;
@@ -35653,9 +35757,10 @@ const ToggleSlider = styled.span`
35653
35757
  background: #fff;
35654
35758
  border-radius: 50%;
35655
35759
  transition: left 0.2s, width 0.2s, height 0.2s;
35656
- ${({
35657
- size
35658
- }) => {
35760
+ ${_ref4 => {
35761
+ let {
35762
+ size
35763
+ } = _ref4;
35659
35764
  switch (size) {
35660
35765
  case "s":
35661
35766
  return css`width: 14px; height: 14px;`;
@@ -35665,10 +35770,11 @@ const ToggleSlider = styled.span`
35665
35770
  return css`width: 20px; height: 20px;`;
35666
35771
  }
35667
35772
  }}
35668
- left: ${({
35669
- checked,
35670
- size
35671
- }) => {
35773
+ left: ${_ref5 => {
35774
+ let {
35775
+ checked,
35776
+ size
35777
+ } = _ref5;
35672
35778
  if (!checked) return "3px";
35673
35779
  switch (size) {
35674
35780
  case "s":
@@ -54284,7 +54390,7 @@ const tagTemplates = {
54284
54390
  received: {
54285
54391
  backgroundColor: '#B9D5D54D',
54286
54392
  borderColor: '#B9D5D5',
54287
- textColor: '#000000',
54393
+ textColor: '#084141',
54288
54394
  text: 'Received'
54289
54395
  },
54290
54396
  approved: {
@@ -54293,16 +54399,16 @@ const tagTemplates = {
54293
54399
  textColor: '#074310',
54294
54400
  text: 'Approved'
54295
54401
  },
54296
- canceled: {
54402
+ cancelled: {
54297
54403
  backgroundColor: '#EBA6AF4D',
54298
54404
  borderColor: '#EBA6AF',
54299
54405
  textColor: '#44070F',
54300
- text: 'Canceled'
54406
+ text: 'Cancelled'
54301
54407
  }
54302
54408
  };
54303
54409
  const Tag = props => {
54304
54410
  const {
54305
- type = 'pending',
54411
+ type,
54306
54412
  size = 'small',
54307
54413
  backgroundColor,
54308
54414
  borderColor,
@@ -54310,15 +54416,15 @@ const Tag = props => {
54310
54416
  borderRadius = "62px",
54311
54417
  text
54312
54418
  } = props;
54313
- const template = tagTemplates[type];
54419
+ const template = type ? tagTemplates[type] : null;
54314
54420
  const height = size === 'small' ? '21px' : size === 'medium' ? '32px' : '35px';
54315
54421
  return /*#__PURE__*/React$1.createElement(StatusCell, {
54316
- backgroundColor: backgroundColor || template.backgroundColor,
54317
- borderColor: borderColor || template.borderColor,
54318
- color: textColor || template.textColor,
54422
+ backgroundColor: backgroundColor || template?.backgroundColor,
54423
+ borderColor: borderColor || template?.borderColor,
54424
+ color: textColor || template?.textColor,
54319
54425
  height: height,
54320
54426
  borderRadius: borderRadius
54321
- }, /*#__PURE__*/React$1.createElement("span", null, text || template.text));
54427
+ }, /*#__PURE__*/React$1.createElement("span", null, text || template?.text));
54322
54428
  };
54323
54429
 
54324
54430
  export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button$1 as Button, Campaigns, CheckBox, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay$1 as DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton$1 as IconButton, Input$2 as Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, Tag, ToasterMessageBox, ToggleSwitch, Tooltip$2 as Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };