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 +152 -46
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +152 -46
- package/dist/index.js.map +1 -1
- package/dist/types/icons/VIcon.d.ts +6 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React$1 = require('react');
|
|
6
6
|
var styled = require('styled-components');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
var recharts = require('recharts');
|
|
8
9
|
var Skeleton = require('react-loading-skeleton');
|
|
9
10
|
var framerMotion = require('framer-motion');
|
|
@@ -459,6 +460,120 @@ const Calendar = () => /*#__PURE__*/React__default["default"].createElement("svg
|
|
|
459
460
|
fill: "#568202"
|
|
460
461
|
}));
|
|
461
462
|
|
|
463
|
+
// eslint-disable-next-line react/prop-types
|
|
464
|
+
const ErrorIcon = _ref => {
|
|
465
|
+
let {
|
|
466
|
+
color = '#FF3949',
|
|
467
|
+
width = '18',
|
|
468
|
+
height = '18'
|
|
469
|
+
} = _ref;
|
|
470
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
471
|
+
width: width,
|
|
472
|
+
height: height,
|
|
473
|
+
viewBox: "0 0 14 13",
|
|
474
|
+
fill: "none",
|
|
475
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
476
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
477
|
+
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",
|
|
478
|
+
fill: color
|
|
479
|
+
}));
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
/******************************************************************************
|
|
483
|
+
Copyright (c) Microsoft Corporation.
|
|
484
|
+
|
|
485
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
486
|
+
purpose with or without fee is hereby granted.
|
|
487
|
+
|
|
488
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
489
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
490
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
491
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
492
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
493
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
494
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
495
|
+
***************************************************************************** */
|
|
496
|
+
|
|
497
|
+
var __assign = function() {
|
|
498
|
+
__assign = Object.assign || function __assign(t) {
|
|
499
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
500
|
+
s = arguments[i];
|
|
501
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
502
|
+
}
|
|
503
|
+
return t;
|
|
504
|
+
};
|
|
505
|
+
return __assign.apply(this, arguments);
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
509
|
+
var e = new Error(message);
|
|
510
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
var VIcon = function (_a) {
|
|
514
|
+
var _b = _a.width,
|
|
515
|
+
width = _b === void 0 ? "12" : _b,
|
|
516
|
+
_c = _a.height,
|
|
517
|
+
height = _c === void 0 ? "8" : _c,
|
|
518
|
+
_d = _a.color,
|
|
519
|
+
color = _d === void 0 ? "#D0D0D0" : _d;
|
|
520
|
+
return jsxRuntime.jsxs("svg", __assign({
|
|
521
|
+
width: width,
|
|
522
|
+
height: height,
|
|
523
|
+
viewBox: "0 0 20 20",
|
|
524
|
+
fill: "none",
|
|
525
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
526
|
+
}, {
|
|
527
|
+
children: [jsxRuntime.jsx("g", __assign({
|
|
528
|
+
filter: "url(#filter0_d_3431_32168)"
|
|
529
|
+
}, {
|
|
530
|
+
children: jsxRuntime.jsx("path", {
|
|
531
|
+
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",
|
|
532
|
+
fill: color
|
|
533
|
+
})
|
|
534
|
+
})), jsxRuntime.jsx("defs", {
|
|
535
|
+
children: jsxRuntime.jsxs("filter", __assign({
|
|
536
|
+
id: "filter0_d_3431_32168",
|
|
537
|
+
x: "-2",
|
|
538
|
+
y: "0",
|
|
539
|
+
width: "24",
|
|
540
|
+
height: "24",
|
|
541
|
+
filterUnits: "userSpaceOnUse",
|
|
542
|
+
"color-interpolation-filters": "sRGB"
|
|
543
|
+
}, {
|
|
544
|
+
children: [jsxRuntime.jsx("feFlood", {
|
|
545
|
+
"flood-opacity": "0",
|
|
546
|
+
result: "BackgroundImageFix"
|
|
547
|
+
}), jsxRuntime.jsx("feColorMatrix", {
|
|
548
|
+
"in": "SourceAlpha",
|
|
549
|
+
type: "matrix",
|
|
550
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
551
|
+
result: "hardAlpha"
|
|
552
|
+
}), jsxRuntime.jsx("feOffset", {
|
|
553
|
+
dy: "4"
|
|
554
|
+
}), jsxRuntime.jsx("feGaussianBlur", {
|
|
555
|
+
stdDeviation: "2"
|
|
556
|
+
}), jsxRuntime.jsx("feComposite", {
|
|
557
|
+
in2: "hardAlpha",
|
|
558
|
+
operator: "out"
|
|
559
|
+
}), jsxRuntime.jsx("feColorMatrix", {
|
|
560
|
+
type: "matrix",
|
|
561
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
|
562
|
+
}), jsxRuntime.jsx("feBlend", {
|
|
563
|
+
mode: "normal",
|
|
564
|
+
in2: "BackgroundImageFix",
|
|
565
|
+
result: "effect1_dropShadow_3431_32168"
|
|
566
|
+
}), jsxRuntime.jsx("feBlend", {
|
|
567
|
+
mode: "normal",
|
|
568
|
+
"in": "SourceGraphic",
|
|
569
|
+
in2: "effect1_dropShadow_3431_32168",
|
|
570
|
+
result: "shape"
|
|
571
|
+
})]
|
|
572
|
+
}))
|
|
573
|
+
})]
|
|
574
|
+
}));
|
|
575
|
+
};
|
|
576
|
+
|
|
462
577
|
const ChervronRightIcon = _ref => {
|
|
463
578
|
let {
|
|
464
579
|
width = "8",
|
|
@@ -540,7 +655,8 @@ const Button$1 = props => {
|
|
|
540
655
|
reselect: ReselectIcon,
|
|
541
656
|
plus: Plus,
|
|
542
657
|
left: ChervronLeftIcon,
|
|
543
|
-
right: ChervronRightIcon
|
|
658
|
+
right: ChervronRightIcon,
|
|
659
|
+
vicon: VIcon
|
|
544
660
|
};
|
|
545
661
|
const getIcon = icon => {
|
|
546
662
|
if (!icon || icon === "none") return null;
|
|
@@ -34211,25 +34327,6 @@ const InsightsCarousel = _ref => {
|
|
|
34211
34327
|
})))));
|
|
34212
34328
|
};
|
|
34213
34329
|
|
|
34214
|
-
// eslint-disable-next-line react/prop-types
|
|
34215
|
-
const ErrorIcon = _ref => {
|
|
34216
|
-
let {
|
|
34217
|
-
color = '#FF3949',
|
|
34218
|
-
width = '18',
|
|
34219
|
-
height = '18'
|
|
34220
|
-
} = _ref;
|
|
34221
|
-
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
34222
|
-
width: width,
|
|
34223
|
-
height: height,
|
|
34224
|
-
viewBox: "0 0 14 13",
|
|
34225
|
-
fill: "none",
|
|
34226
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
34227
|
-
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
34228
|
-
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",
|
|
34229
|
-
fill: color
|
|
34230
|
-
}));
|
|
34231
|
-
};
|
|
34232
|
-
|
|
34233
34330
|
// eslint-disable-next-line react/prop-types
|
|
34234
34331
|
const SucceededIcon = _ref => {
|
|
34235
34332
|
let {
|
|
@@ -35626,9 +35723,12 @@ const ToggleSwitchLabel = styled__default["default"].label`
|
|
|
35626
35723
|
position: relative;
|
|
35627
35724
|
cursor: pointer;
|
|
35628
35725
|
user-select: none;
|
|
35629
|
-
opacity: ${
|
|
35630
|
-
|
|
35631
|
-
|
|
35726
|
+
opacity: ${_ref => {
|
|
35727
|
+
let {
|
|
35728
|
+
disabled
|
|
35729
|
+
} = _ref;
|
|
35730
|
+
return disabled ? 0.5 : 1;
|
|
35731
|
+
}};
|
|
35632
35732
|
`;
|
|
35633
35733
|
const ToggleInput = styled__default["default"].input`
|
|
35634
35734
|
display: none;
|
|
@@ -35636,15 +35736,19 @@ const ToggleInput = styled__default["default"].input`
|
|
|
35636
35736
|
const ToggleSlider = styled__default["default"].span`
|
|
35637
35737
|
display: block;
|
|
35638
35738
|
position: relative;
|
|
35639
|
-
background: ${
|
|
35640
|
-
|
|
35641
|
-
|
|
35642
|
-
|
|
35739
|
+
background: ${_ref2 => {
|
|
35740
|
+
let {
|
|
35741
|
+
checked,
|
|
35742
|
+
disabled
|
|
35743
|
+
} = _ref2;
|
|
35744
|
+
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
35745
|
+
}};
|
|
35643
35746
|
border-radius: 999px;
|
|
35644
35747
|
transition: background 0.2s;
|
|
35645
|
-
${
|
|
35646
|
-
|
|
35647
|
-
|
|
35748
|
+
${_ref3 => {
|
|
35749
|
+
let {
|
|
35750
|
+
size
|
|
35751
|
+
} = _ref3;
|
|
35648
35752
|
switch (size) {
|
|
35649
35753
|
case "s":
|
|
35650
35754
|
return styled.css`width: 40px; height: 20px;`;
|
|
@@ -35663,9 +35767,10 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35663
35767
|
background: #fff;
|
|
35664
35768
|
border-radius: 50%;
|
|
35665
35769
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
35666
|
-
${
|
|
35667
|
-
|
|
35668
|
-
|
|
35770
|
+
${_ref4 => {
|
|
35771
|
+
let {
|
|
35772
|
+
size
|
|
35773
|
+
} = _ref4;
|
|
35669
35774
|
switch (size) {
|
|
35670
35775
|
case "s":
|
|
35671
35776
|
return styled.css`width: 14px; height: 14px;`;
|
|
@@ -35675,10 +35780,11 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35675
35780
|
return styled.css`width: 20px; height: 20px;`;
|
|
35676
35781
|
}
|
|
35677
35782
|
}}
|
|
35678
|
-
left: ${
|
|
35679
|
-
|
|
35680
|
-
|
|
35681
|
-
|
|
35783
|
+
left: ${_ref5 => {
|
|
35784
|
+
let {
|
|
35785
|
+
checked,
|
|
35786
|
+
size
|
|
35787
|
+
} = _ref5;
|
|
35682
35788
|
if (!checked) return "3px";
|
|
35683
35789
|
switch (size) {
|
|
35684
35790
|
case "s":
|
|
@@ -54294,7 +54400,7 @@ const tagTemplates = {
|
|
|
54294
54400
|
received: {
|
|
54295
54401
|
backgroundColor: '#B9D5D54D',
|
|
54296
54402
|
borderColor: '#B9D5D5',
|
|
54297
|
-
textColor: '#
|
|
54403
|
+
textColor: '#084141',
|
|
54298
54404
|
text: 'Received'
|
|
54299
54405
|
},
|
|
54300
54406
|
approved: {
|
|
@@ -54303,16 +54409,16 @@ const tagTemplates = {
|
|
|
54303
54409
|
textColor: '#074310',
|
|
54304
54410
|
text: 'Approved'
|
|
54305
54411
|
},
|
|
54306
|
-
|
|
54412
|
+
cancelled: {
|
|
54307
54413
|
backgroundColor: '#EBA6AF4D',
|
|
54308
54414
|
borderColor: '#EBA6AF',
|
|
54309
54415
|
textColor: '#44070F',
|
|
54310
|
-
text: '
|
|
54416
|
+
text: 'Cancelled'
|
|
54311
54417
|
}
|
|
54312
54418
|
};
|
|
54313
54419
|
const Tag = props => {
|
|
54314
54420
|
const {
|
|
54315
|
-
type
|
|
54421
|
+
type,
|
|
54316
54422
|
size = 'small',
|
|
54317
54423
|
backgroundColor,
|
|
54318
54424
|
borderColor,
|
|
@@ -54320,15 +54426,15 @@ const Tag = props => {
|
|
|
54320
54426
|
borderRadius = "62px",
|
|
54321
54427
|
text
|
|
54322
54428
|
} = props;
|
|
54323
|
-
const template = tagTemplates[type];
|
|
54429
|
+
const template = type ? tagTemplates[type] : null;
|
|
54324
54430
|
const height = size === 'small' ? '21px' : size === 'medium' ? '32px' : '35px';
|
|
54325
54431
|
return /*#__PURE__*/React__default["default"].createElement(StatusCell, {
|
|
54326
|
-
backgroundColor: backgroundColor || template
|
|
54327
|
-
borderColor: borderColor || template
|
|
54328
|
-
color: textColor || template
|
|
54432
|
+
backgroundColor: backgroundColor || template?.backgroundColor,
|
|
54433
|
+
borderColor: borderColor || template?.borderColor,
|
|
54434
|
+
color: textColor || template?.textColor,
|
|
54329
54435
|
height: height,
|
|
54330
54436
|
borderRadius: borderRadius
|
|
54331
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", null, text || template
|
|
54437
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, text || template?.text));
|
|
54332
54438
|
};
|
|
54333
54439
|
|
|
54334
54440
|
exports.AdvancedThresholds = AdvancedThresholds;
|