@moderneinc/design-system-components 6.0.0 → 6.0.1-next.18d0a9
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/ActivityHeader/ActivityHeader.d.ts +1 -1
- package/dist/DataGridFilterPanel/DataGridFilterPanel.d.ts +13 -2
- package/dist/InputField/InputField.d.ts +3 -3
- package/dist/ListItem/ListItem.d.ts +8 -0
- package/dist/MenuItem/MenuItem.d.ts +11 -7
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/TypologyControl/TypologyControl.d.ts +1 -1
- package/dist/index.d.ts +132 -48
- package/dist/index.esm.js +55 -976
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +96 -1017
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -9,8 +9,9 @@ var MuiAvatar = require('@mui/material/Avatar');
|
|
|
9
9
|
var SvgIcon = require('@mui/material/SvgIcon');
|
|
10
10
|
var Alert = require('@mui/material/Alert');
|
|
11
11
|
var ButtonBase = require('@mui/material/ButtonBase');
|
|
12
|
-
var
|
|
12
|
+
var lucideReact = require('lucide-react');
|
|
13
13
|
var IconButton = require('@mui/material/IconButton');
|
|
14
|
+
var React = require('react');
|
|
14
15
|
var Breadcrumbs = require('@mui/material/Breadcrumbs');
|
|
15
16
|
var Link = require('@mui/material/Link');
|
|
16
17
|
var CircularProgress = require('@mui/material/CircularProgress');
|
|
@@ -38,6 +39,7 @@ var PickersCalendarHeader = require('@mui/x-date-pickers/PickersCalendarHeader')
|
|
|
38
39
|
var PickersShortcuts = require('@mui/x-date-pickers/PickersShortcuts');
|
|
39
40
|
var DateRangePicker = require('@mui/x-date-pickers-pro/DateRangePicker');
|
|
40
41
|
var DateRangePickerDay = require('@mui/x-date-pickers-pro/DateRangePickerDay');
|
|
42
|
+
var dateFns = require('date-fns');
|
|
41
43
|
var LinearProgress = require('@mui/material/LinearProgress');
|
|
42
44
|
var Paper = require('@mui/material/Paper');
|
|
43
45
|
var Stack = require('@mui/material/Stack');
|
|
@@ -359,7 +361,7 @@ const ActivityDot = styles.styled('div')(({ color }) => ({
|
|
|
359
361
|
* field: 'activity',
|
|
360
362
|
* headerName: '',
|
|
361
363
|
* width: 34,
|
|
362
|
-
* renderHeader: () => <ModActivityHeader size="
|
|
364
|
+
* renderHeader: () => <ModActivityHeader size="compact" color="commitJob" />,
|
|
363
365
|
* renderCell: (params) => (
|
|
364
366
|
* <ModActivityIndicatorCell
|
|
365
367
|
* event={params.row.eventType}
|
|
@@ -457,499 +459,6 @@ const ModActivityIndicatorCell = ({ event = 'commit-job', secondaryEvent, scene
|
|
|
457
459
|
};
|
|
458
460
|
ModActivityIndicatorCell.displayName = 'ModActivityIndicatorCell';
|
|
459
461
|
|
|
460
|
-
/**
|
|
461
|
-
* @license lucide-react v1.28.0 - ISC
|
|
462
|
-
*
|
|
463
|
-
* This source code is licensed under the ISC license.
|
|
464
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
-
*/
|
|
466
|
-
|
|
467
|
-
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
468
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
469
|
-
}).join(" ").trim();
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* @license lucide-react v1.28.0 - ISC
|
|
473
|
-
*
|
|
474
|
-
* This source code is licensed under the ISC license.
|
|
475
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
476
|
-
*/
|
|
477
|
-
|
|
478
|
-
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* @license lucide-react v1.28.0 - ISC
|
|
482
|
-
*
|
|
483
|
-
* This source code is licensed under the ISC license.
|
|
484
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
485
|
-
*/
|
|
486
|
-
|
|
487
|
-
const toCamelCase = (string) => string.replace(
|
|
488
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
489
|
-
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
490
|
-
);
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* @license lucide-react v1.28.0 - ISC
|
|
494
|
-
*
|
|
495
|
-
* This source code is licensed under the ISC license.
|
|
496
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
497
|
-
*/
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
const toPascalCase = (string) => {
|
|
501
|
-
const camelCase = toCamelCase(string);
|
|
502
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* @license lucide-react v1.28.0 - ISC
|
|
507
|
-
*
|
|
508
|
-
* This source code is licensed under the ISC license.
|
|
509
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
510
|
-
*/
|
|
511
|
-
|
|
512
|
-
var defaultAttributes = {
|
|
513
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
514
|
-
width: 24,
|
|
515
|
-
height: 24,
|
|
516
|
-
viewBox: "0 0 24 24",
|
|
517
|
-
fill: "none",
|
|
518
|
-
stroke: "currentColor",
|
|
519
|
-
strokeWidth: 2,
|
|
520
|
-
strokeLinecap: "round",
|
|
521
|
-
strokeLinejoin: "round"
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* @license lucide-react v1.28.0 - ISC
|
|
526
|
-
*
|
|
527
|
-
* This source code is licensed under the ISC license.
|
|
528
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
529
|
-
*/
|
|
530
|
-
|
|
531
|
-
const hasA11yProp = (props) => {
|
|
532
|
-
for (const prop in props) {
|
|
533
|
-
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
534
|
-
return true;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
return false;
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
const LucideContext = React.createContext({});
|
|
541
|
-
const useLucideContext = () => React.useContext(LucideContext);
|
|
542
|
-
|
|
543
|
-
const Icon = React.forwardRef(
|
|
544
|
-
({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
|
|
545
|
-
const {
|
|
546
|
-
size: contextSize = 24,
|
|
547
|
-
strokeWidth: contextStrokeWidth = 2,
|
|
548
|
-
absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
|
|
549
|
-
color: contextColor = "currentColor",
|
|
550
|
-
className: contextClass = ""
|
|
551
|
-
} = useLucideContext() ?? {};
|
|
552
|
-
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
553
|
-
return React.createElement(
|
|
554
|
-
"svg",
|
|
555
|
-
{
|
|
556
|
-
ref,
|
|
557
|
-
...defaultAttributes,
|
|
558
|
-
width: size ?? contextSize ?? defaultAttributes.width,
|
|
559
|
-
height: size ?? contextSize ?? defaultAttributes.height,
|
|
560
|
-
stroke: color ?? contextColor,
|
|
561
|
-
strokeWidth: calculatedStrokeWidth,
|
|
562
|
-
className: mergeClasses("lucide", contextClass, className),
|
|
563
|
-
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
564
|
-
...rest
|
|
565
|
-
},
|
|
566
|
-
[
|
|
567
|
-
...iconNode.map(([tag, attrs]) => React.createElement(tag, attrs)),
|
|
568
|
-
...Array.isArray(children) ? children : [children]
|
|
569
|
-
]
|
|
570
|
-
);
|
|
571
|
-
}
|
|
572
|
-
);
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* @license lucide-react v1.28.0 - ISC
|
|
576
|
-
*
|
|
577
|
-
* This source code is licensed under the ISC license.
|
|
578
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
579
|
-
*/
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
const createLucideIcon = (iconName, iconNode) => {
|
|
583
|
-
const Component = React.forwardRef(
|
|
584
|
-
({ className, ...props }, ref) => React.createElement(Icon, {
|
|
585
|
-
ref,
|
|
586
|
-
iconNode,
|
|
587
|
-
className: mergeClasses(
|
|
588
|
-
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
589
|
-
`lucide-${iconName}`,
|
|
590
|
-
className
|
|
591
|
-
),
|
|
592
|
-
...props
|
|
593
|
-
})
|
|
594
|
-
);
|
|
595
|
-
Component.displayName = toPascalCase(iconName);
|
|
596
|
-
return Component;
|
|
597
|
-
};
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* @license lucide-react v1.28.0 - ISC
|
|
601
|
-
*
|
|
602
|
-
* This source code is licensed under the ISC license.
|
|
603
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
604
|
-
*/
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
const __iconNode$n = [
|
|
608
|
-
["path", { d: "M12 5v14", key: "s699le" }],
|
|
609
|
-
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
610
|
-
];
|
|
611
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$n);
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* @license lucide-react v1.28.0 - ISC
|
|
615
|
-
*
|
|
616
|
-
* This source code is licensed under the ISC license.
|
|
617
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
618
|
-
*/
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
const __iconNode$m = [
|
|
622
|
-
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
623
|
-
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
624
|
-
];
|
|
625
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$m);
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* @license lucide-react v1.28.0 - ISC
|
|
629
|
-
*
|
|
630
|
-
* This source code is licensed under the ISC license.
|
|
631
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
632
|
-
*/
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
const __iconNode$l = [
|
|
636
|
-
[
|
|
637
|
-
"path",
|
|
638
|
-
{
|
|
639
|
-
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
|
|
640
|
-
key: "3c2336"
|
|
641
|
-
}
|
|
642
|
-
],
|
|
643
|
-
["line", { x1: "12", x2: "12", y1: "16", y2: "12", key: "1y1yb1" }],
|
|
644
|
-
["line", { x1: "12", x2: "12.01", y1: "8", y2: "8", key: "110wyk" }]
|
|
645
|
-
];
|
|
646
|
-
const BadgeInfo = createLucideIcon("badge-info", __iconNode$l);
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* @license lucide-react v1.28.0 - ISC
|
|
650
|
-
*
|
|
651
|
-
* This source code is licensed under the ISC license.
|
|
652
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
653
|
-
*/
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
const __iconNode$k = [
|
|
657
|
-
["path", { d: "M8 2v3", key: "1ioesn" }],
|
|
658
|
-
["path", { d: "M16 2v3", key: "otl347" }],
|
|
659
|
-
["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", key: "h1oib" }],
|
|
660
|
-
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
661
|
-
["path", { d: "M8 13h.01", key: "1sbv64" }],
|
|
662
|
-
["path", { d: "M12 13h.01", key: "y0uutt" }],
|
|
663
|
-
["path", { d: "M16 13h.01", key: "wip0gl" }],
|
|
664
|
-
["path", { d: "M8 17h.01", key: "p3bg7i" }],
|
|
665
|
-
["path", { d: "M12 17h.01", key: "p32p05" }],
|
|
666
|
-
["path", { d: "M16 17h.01", key: "ql8jdd" }]
|
|
667
|
-
];
|
|
668
|
-
const CalendarDays = createLucideIcon("calendar-days", __iconNode$k);
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* @license lucide-react v1.28.0 - ISC
|
|
672
|
-
*
|
|
673
|
-
* This source code is licensed under the ISC license.
|
|
674
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
675
|
-
*/
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
const __iconNode$j = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
679
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$j);
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* @license lucide-react v1.28.0 - ISC
|
|
683
|
-
*
|
|
684
|
-
* This source code is licensed under the ISC license.
|
|
685
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
686
|
-
*/
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
const __iconNode$i = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
690
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$i);
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* @license lucide-react v1.28.0 - ISC
|
|
694
|
-
*
|
|
695
|
-
* This source code is licensed under the ISC license.
|
|
696
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
697
|
-
*/
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
const __iconNode$h = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
701
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$h);
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @license lucide-react v1.28.0 - ISC
|
|
705
|
-
*
|
|
706
|
-
* This source code is licensed under the ISC license.
|
|
707
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
708
|
-
*/
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
const __iconNode$g = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
712
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$g);
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* @license lucide-react v1.28.0 - ISC
|
|
716
|
-
*
|
|
717
|
-
* This source code is licensed under the ISC license.
|
|
718
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
719
|
-
*/
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
const __iconNode$f = [
|
|
723
|
-
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
724
|
-
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
725
|
-
];
|
|
726
|
-
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$f);
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* @license lucide-react v1.28.0 - ISC
|
|
730
|
-
*
|
|
731
|
-
* This source code is licensed under the ISC license.
|
|
732
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
733
|
-
*/
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
const __iconNode$e = [
|
|
737
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
738
|
-
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
739
|
-
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
740
|
-
];
|
|
741
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$e);
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* @license lucide-react v1.28.0 - ISC
|
|
745
|
-
*
|
|
746
|
-
* This source code is licensed under the ISC license.
|
|
747
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
748
|
-
*/
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
const __iconNode$d = [
|
|
752
|
-
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
753
|
-
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
754
|
-
];
|
|
755
|
-
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$d);
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* @license lucide-react v1.28.0 - ISC
|
|
759
|
-
*
|
|
760
|
-
* This source code is licensed under the ISC license.
|
|
761
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
762
|
-
*/
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
const __iconNode$c = [
|
|
766
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
767
|
-
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
768
|
-
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
769
|
-
];
|
|
770
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$c);
|
|
771
|
-
|
|
772
|
-
/**
|
|
773
|
-
* @license lucide-react v1.28.0 - ISC
|
|
774
|
-
*
|
|
775
|
-
* This source code is licensed under the ISC license.
|
|
776
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
777
|
-
*/
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
const __iconNode$b = [
|
|
781
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
782
|
-
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
783
|
-
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
784
|
-
];
|
|
785
|
-
const Columns3 = createLucideIcon("columns-3", __iconNode$b);
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* @license lucide-react v1.28.0 - ISC
|
|
789
|
-
*
|
|
790
|
-
* This source code is licensed under the ISC license.
|
|
791
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
792
|
-
*/
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
const __iconNode$a = [
|
|
796
|
-
["path", { d: "M2 5h20", key: "1fs1ex" }],
|
|
797
|
-
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
798
|
-
["path", { d: "M9 19h6", key: "456am0" }]
|
|
799
|
-
];
|
|
800
|
-
const ListFilter = createLucideIcon("list-filter", __iconNode$a);
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* @license lucide-react v1.28.0 - ISC
|
|
804
|
-
*
|
|
805
|
-
* This source code is licensed under the ISC license.
|
|
806
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
807
|
-
*/
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
const __iconNode$9 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
811
|
-
const Minus = createLucideIcon("minus", __iconNode$9);
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* @license lucide-react v1.28.0 - ISC
|
|
815
|
-
*
|
|
816
|
-
* This source code is licensed under the ISC license.
|
|
817
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
818
|
-
*/
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
const __iconNode$8 = [
|
|
822
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
823
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
824
|
-
];
|
|
825
|
-
const Plus = createLucideIcon("plus", __iconNode$8);
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* @license lucide-react v1.28.0 - ISC
|
|
829
|
-
*
|
|
830
|
-
* This source code is licensed under the ISC license.
|
|
831
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
832
|
-
*/
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
const __iconNode$7 = [
|
|
836
|
-
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
837
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
838
|
-
];
|
|
839
|
-
const Search = createLucideIcon("search", __iconNode$7);
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* @license lucide-react v1.28.0 - ISC
|
|
843
|
-
*
|
|
844
|
-
* This source code is licensed under the ISC license.
|
|
845
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
846
|
-
*/
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
const __iconNode$6 = [
|
|
850
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
851
|
-
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
852
|
-
];
|
|
853
|
-
const SquareCheck = createLucideIcon("square-check", __iconNode$6);
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* @license lucide-react v1.28.0 - ISC
|
|
857
|
-
*
|
|
858
|
-
* This source code is licensed under the ISC license.
|
|
859
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
860
|
-
*/
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
const __iconNode$5 = [
|
|
864
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
865
|
-
["path", { d: "M8 12h8", key: "1wcyev" }]
|
|
866
|
-
];
|
|
867
|
-
const SquareMinus = createLucideIcon("square-minus", __iconNode$5);
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* @license lucide-react v1.28.0 - ISC
|
|
871
|
-
*
|
|
872
|
-
* This source code is licensed under the ISC license.
|
|
873
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
874
|
-
*/
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
const __iconNode$4 = [
|
|
878
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
879
|
-
];
|
|
880
|
-
const Square = createLucideIcon("square", __iconNode$4);
|
|
881
|
-
|
|
882
|
-
/**
|
|
883
|
-
* @license lucide-react v1.28.0 - ISC
|
|
884
|
-
*
|
|
885
|
-
* This source code is licensed under the ISC license.
|
|
886
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
887
|
-
*/
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
const __iconNode$3 = [
|
|
891
|
-
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
892
|
-
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
893
|
-
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
894
|
-
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
895
|
-
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
896
|
-
];
|
|
897
|
-
const Trash2 = createLucideIcon("trash-2", __iconNode$3);
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* @license lucide-react v1.28.0 - ISC
|
|
901
|
-
*
|
|
902
|
-
* This source code is licensed under the ISC license.
|
|
903
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
904
|
-
*/
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
const __iconNode$2 = [
|
|
908
|
-
[
|
|
909
|
-
"path",
|
|
910
|
-
{
|
|
911
|
-
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
912
|
-
key: "wmoenq"
|
|
913
|
-
}
|
|
914
|
-
],
|
|
915
|
-
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
916
|
-
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
917
|
-
];
|
|
918
|
-
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* @license lucide-react v1.28.0 - ISC
|
|
922
|
-
*
|
|
923
|
-
* This source code is licensed under the ISC license.
|
|
924
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
925
|
-
*/
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
const __iconNode$1 = [
|
|
929
|
-
["path", { d: "M12 20h.01", key: "zekei9" }],
|
|
930
|
-
["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }],
|
|
931
|
-
["path", { d: "M5 12.859a10 10 0 0 1 5.17-2.69", key: "1dl1wf" }],
|
|
932
|
-
["path", { d: "M19 12.859a10 10 0 0 0-2.007-1.523", key: "4k23kn" }],
|
|
933
|
-
["path", { d: "M2 8.82a15 15 0 0 1 4.177-2.643", key: "1grhjp" }],
|
|
934
|
-
["path", { d: "M22 8.82a15 15 0 0 0-11.288-3.764", key: "z3jwby" }],
|
|
935
|
-
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
936
|
-
];
|
|
937
|
-
const WifiOff = createLucideIcon("wifi-off", __iconNode$1);
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* @license lucide-react v1.28.0 - ISC
|
|
941
|
-
*
|
|
942
|
-
* This source code is licensed under the ISC license.
|
|
943
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
944
|
-
*/
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
const __iconNode = [
|
|
948
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
949
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
950
|
-
];
|
|
951
|
-
const X = createLucideIcon("x", __iconNode);
|
|
952
|
-
|
|
953
462
|
const neutralSmallShadow = `${designSystemTokens.shadows.neutral.small.x}px ${designSystemTokens.shadows.neutral.small.y}px ${designSystemTokens.shadows.neutral.small.blur}px ${designSystemTokens.shadows.neutral.small.spread}px ${designSystemTokens.shadows.neutral.small.shadow}`;
|
|
954
463
|
const intentColors$1 = {
|
|
955
464
|
success: designSystemTokens.semanticColors.status.success,
|
|
@@ -1022,11 +531,11 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
1022
531
|
};
|
|
1023
532
|
});
|
|
1024
533
|
const iconMap = {
|
|
1025
|
-
success: jsxRuntime.jsx(CircleCheckBig, { size: 24 }),
|
|
1026
|
-
error: jsxRuntime.jsx(CircleAlert, { size: 24 }),
|
|
1027
|
-
warning: jsxRuntime.jsx(TriangleAlert, { size: 24 }),
|
|
1028
|
-
offline: jsxRuntime.jsx(WifiOff, { size: 24 }),
|
|
1029
|
-
info: jsxRuntime.jsx(BadgeInfo, { size: 24 }),
|
|
534
|
+
success: jsxRuntime.jsx(lucideReact.CircleCheckBig, { size: 24 }),
|
|
535
|
+
error: jsxRuntime.jsx(lucideReact.CircleAlert, { size: 24 }),
|
|
536
|
+
warning: jsxRuntime.jsx(lucideReact.TriangleAlert, { size: 24 }),
|
|
537
|
+
offline: jsxRuntime.jsx(lucideReact.WifiOff, { size: 24 }),
|
|
538
|
+
info: jsxRuntime.jsx(lucideReact.BadgeInfo, { size: 24 }),
|
|
1030
539
|
};
|
|
1031
540
|
/**
|
|
1032
541
|
* ModAlert - Alert component for displaying contextual status messages
|
|
@@ -1134,7 +643,7 @@ const ModBanner = ({ intent = 'info', type = 'outlined', message, messagePositio
|
|
|
1134
643
|
return null;
|
|
1135
644
|
}
|
|
1136
645
|
const closeIconColor = type === 'filled' ? designSystemTokens.semanticColors.surfaces.white : intentColors[intent].default;
|
|
1137
|
-
return (jsxRuntime.jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsxRuntime.jsx(StyledIconButton, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: messagePosition === 'center' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
646
|
+
return (jsxRuntime.jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsxRuntime.jsx(StyledIconButton, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })) : undefined, children: messagePosition === 'center' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1138
647
|
};
|
|
1139
648
|
ModBanner.displayName = 'ModBanner';
|
|
1140
649
|
|
|
@@ -1200,7 +709,7 @@ function ModBreadcrumbLink({ current = false, children, component, ...props }) {
|
|
|
1200
709
|
* ```
|
|
1201
710
|
*/
|
|
1202
711
|
function ModBreadcrumbs({ children, className }) {
|
|
1203
|
-
return (jsxRuntime.jsx(StyledBreadcrumbs, { separator: jsxRuntime.jsx(ChevronRight, { size: 10.67, color: designSystemTokens.semanticColors.icons.utility }), className: className, "aria-label": "breadcrumb", children: children }));
|
|
712
|
+
return (jsxRuntime.jsx(StyledBreadcrumbs, { separator: jsxRuntime.jsx(lucideReact.ChevronRight, { size: 10.67, color: designSystemTokens.semanticColors.icons.utility }), className: className, "aria-label": "breadcrumb", children: children }));
|
|
1204
713
|
}
|
|
1205
714
|
|
|
1206
715
|
// Props that should not be forwarded to ButtonBase (Button-specific props that ButtonBase doesn't support)
|
|
@@ -1862,18 +1371,11 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1862
1371
|
*/
|
|
1863
1372
|
const ModCheckbox = ({ size = 'medium', label, helperText, disabled, icon, checkedIcon, indeterminateIcon, className, ...props }) => {
|
|
1864
1373
|
// Identifies ModCheckbox instances to consumer stylesheets.
|
|
1865
|
-
|
|
1866
|
-
// `neo-checkbox` ships alongside for one major. Consumers select on these
|
|
1867
|
-
// names from their own CSS, where nothing type-checks the string — moderne-ui
|
|
1868
|
-
// has `'&:not(.neo-checkbox)'`, which on a bare rename would stop excluding
|
|
1869
|
-
// anything and silently start overriding every checkbox. Remove the legacy
|
|
1870
|
-
// name once consumers have migrated.
|
|
1871
|
-
const ownClassNames = 'mod-checkbox neo-checkbox';
|
|
1872
|
-
const combinedClassName = className ? `${ownClassNames} ${className}` : ownClassNames;
|
|
1374
|
+
const combinedClassName = className ? `mod-checkbox ${className}` : 'mod-checkbox';
|
|
1873
1375
|
// Default icons (sized via CSS on the SVG); overridable per instance
|
|
1874
|
-
const defaultIcon = icon || jsxRuntime.jsx(Square, {});
|
|
1875
|
-
const defaultCheckedIcon = checkedIcon || jsxRuntime.jsx(SquareCheck, {});
|
|
1876
|
-
const defaultIndeterminateIcon = indeterminateIcon || jsxRuntime.jsx(SquareMinus, {});
|
|
1376
|
+
const defaultIcon = icon || jsxRuntime.jsx(lucideReact.Square, {});
|
|
1377
|
+
const defaultCheckedIcon = checkedIcon || jsxRuntime.jsx(lucideReact.SquareCheck, {});
|
|
1378
|
+
const defaultIndeterminateIcon = indeterminateIcon || jsxRuntime.jsx(lucideReact.SquareMinus, {});
|
|
1877
1379
|
// If no label, return just the checkbox
|
|
1878
1380
|
if (!label && !helperText) {
|
|
1879
1381
|
return (jsxRuntime.jsx(StyledCheckbox, { size: size, disabled: disabled, icon: defaultIcon, checkedIcon: defaultCheckedIcon, indeterminateIcon: defaultIndeterminateIcon, className: combinedClassName, ...props }));
|
|
@@ -2251,7 +1753,7 @@ sx: _sx, theme: _theme, ...props }) => {
|
|
|
2251
1753
|
const hasChanges = Object.keys(columnVisibilityModel).length > 0;
|
|
2252
1754
|
return (jsxRuntime.jsx(PanelWrapper, { ...props, children: jsxRuntime.jsxs(PanelContent, { sx: { width: 320 }, children: [showSearch && (jsxRuntime.jsx(StyledSearchField, { placeholder: "Search", variant: "standard", value: searchText, onChange: e => setSearchText(e.target.value), slotProps: {
|
|
2253
1755
|
input: {
|
|
2254
|
-
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(Search, {}) })),
|
|
1756
|
+
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(lucideReact.Search, {}) })),
|
|
2255
1757
|
disableUnderline: true,
|
|
2256
1758
|
},
|
|
2257
1759
|
} })), filteredColumns.map(column => {
|
|
@@ -2354,11 +1856,11 @@ const Shortcut = styles.styled('span')(({ theme }) => ({
|
|
|
2354
1856
|
* // Disabled state
|
|
2355
1857
|
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
2356
1858
|
*
|
|
2357
|
-
* // As an anchor —
|
|
2358
|
-
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
1859
|
+
* // As an anchor — `component="a"` is required, see #722
|
|
1860
|
+
* <ModMenuItem component="a" href="/api-explorer">API explorer</ModMenuItem>
|
|
2359
1861
|
*
|
|
2360
1862
|
* // External link
|
|
2361
|
-
* <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
1863
|
+
* <ModMenuItem component="a" href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
|
|
2362
1864
|
* Documentation
|
|
2363
1865
|
* </ModMenuItem>
|
|
2364
1866
|
*
|
|
@@ -2375,7 +1877,7 @@ ModMenuItem.displayName = 'ModMenuItem';
|
|
|
2375
1877
|
* Custom chevron icon for select
|
|
2376
1878
|
* Must accept props from MUI Select to work correctly
|
|
2377
1879
|
*/
|
|
2378
|
-
const ChevronDownIcon = (props) => (jsxRuntime.jsx(ChevronDown, { ...props, size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.typography.input.default, style: { ...props.style } }));
|
|
1880
|
+
const ChevronDownIcon = (props) => (jsxRuntime.jsx(lucideReact.ChevronDown, { ...props, size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.typography.input.default, style: { ...props.style } }));
|
|
2379
1881
|
/**
|
|
2380
1882
|
* Styled Select component with design system styling
|
|
2381
1883
|
*/
|
|
@@ -2453,11 +1955,11 @@ ModSelect.displayName = 'ModSelect';
|
|
|
2453
1955
|
* Icon components for DataGrid filter panel slots
|
|
2454
1956
|
* These must be passed to the DataGrid's slots prop
|
|
2455
1957
|
*/
|
|
2456
|
-
const ModDataGridFilterPanelAddIcon = () => (jsxRuntime.jsx(Plus, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.buttons.tertiary.default }));
|
|
1958
|
+
const ModDataGridFilterPanelAddIcon = () => (jsxRuntime.jsx(lucideReact.Plus, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.buttons.tertiary.default }));
|
|
2457
1959
|
ModDataGridFilterPanelAddIcon.displayName = 'ModDataGridFilterPanelAddIcon';
|
|
2458
|
-
const ModDataGridFilterPanelDeleteIcon = () => (jsxRuntime.jsx(X, { size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.icons.default }));
|
|
1960
|
+
const ModDataGridFilterPanelDeleteIcon = () => (jsxRuntime.jsx(lucideReact.X, { size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.icons.default }));
|
|
2459
1961
|
ModDataGridFilterPanelDeleteIcon.displayName = 'ModDataGridFilterPanelDeleteIcon';
|
|
2460
|
-
const ModDataGridFilterPanelRemoveAllIcon = () => (jsxRuntime.jsx(Trash2, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.buttons.tertiary.default }));
|
|
1962
|
+
const ModDataGridFilterPanelRemoveAllIcon = () => (jsxRuntime.jsx(lucideReact.Trash2, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.buttons.tertiary.default }));
|
|
2461
1963
|
ModDataGridFilterPanelRemoveAllIcon.displayName = 'ModDataGridFilterPanelRemoveAllIcon';
|
|
2462
1964
|
/**
|
|
2463
1965
|
* Base styled GridFilterPanel with design system styling
|
|
@@ -2631,6 +2133,48 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2631
2133
|
},
|
|
2632
2134
|
});
|
|
2633
2135
|
StyledGridFilterPanel.displayName = 'StyledGridFilterPanel';
|
|
2136
|
+
/**
|
|
2137
|
+
* ModSelect, typed for the DataGrid `baseSelect` slot.
|
|
2138
|
+
*
|
|
2139
|
+
* The grid's own `SelectProps` shares MUI's prop names and semantics, but types
|
|
2140
|
+
* `onChange` as a bare `ChangeEventHandler` and adds `aria-*`/`data-*` index
|
|
2141
|
+
* signatures — structurally incompatible, behaviourally identical. Asserted
|
|
2142
|
+
* once here rather than at every call site; #721 tracks replacing the assertion
|
|
2143
|
+
* with a real adapter. Intersected rather than replaced so direct consumers keep
|
|
2144
|
+
* `ModSelectProps` — casting to the slot type alone drops `variant`, `MenuProps`
|
|
2145
|
+
* and the `SelectChangeEvent` signature.
|
|
2146
|
+
*/
|
|
2147
|
+
const ModDataGridSelect = ModSelect;
|
|
2148
|
+
/**
|
|
2149
|
+
* ModDataGridFilterPanel - MUI GridFilterPanel with design system styling and Lucide icons
|
|
2150
|
+
*
|
|
2151
|
+
* A styled version of MUI's GridFilterPanel that applies design system tokens.
|
|
2152
|
+
* The per-row delete icon uses Lucide Trash2 internally.
|
|
2153
|
+
*
|
|
2154
|
+
* For footer button icons ("Add filter" and "Remove all"), you must also pass the icon components
|
|
2155
|
+
* to the DataGrid's slots prop.
|
|
2156
|
+
*
|
|
2157
|
+
* @example
|
|
2158
|
+
* ```tsx
|
|
2159
|
+
* import {
|
|
2160
|
+
* ModDataGridFilterPanel,
|
|
2161
|
+
* FilterPanelAddIcon,
|
|
2162
|
+
* FilterPanelDeleteIcon,
|
|
2163
|
+
* FilterPanelRemoveAllIcon
|
|
2164
|
+
* } from '@moderneinc/design-system-components'
|
|
2165
|
+
*
|
|
2166
|
+
* <DataGridPro
|
|
2167
|
+
* rows={rows}
|
|
2168
|
+
* columns={columns}
|
|
2169
|
+
* slots={{
|
|
2170
|
+
* filterPanel: ModDataGridFilterPanel,
|
|
2171
|
+
* filterPanelAddIcon: FilterPanelAddIcon,
|
|
2172
|
+
* filterPanelDeleteIcon: FilterPanelDeleteIcon,
|
|
2173
|
+
* filterPanelRemoveAllIcon: FilterPanelRemoveAllIcon,
|
|
2174
|
+
* }}
|
|
2175
|
+
* />
|
|
2176
|
+
* ```
|
|
2177
|
+
*/
|
|
2634
2178
|
const ModDataGridFilterPanel = (props) => {
|
|
2635
2179
|
return jsxRuntime.jsx(StyledGridFilterPanel, { ...props });
|
|
2636
2180
|
};
|
|
@@ -2642,13 +2186,13 @@ ModDataGridFilterPanel.displayName = 'ModDataGridFilterPanel';
|
|
|
2642
2186
|
* Use these with DataGrid's slots API to replace default sort indicators.
|
|
2643
2187
|
*/
|
|
2644
2188
|
function SortedDescendingIcon() {
|
|
2645
|
-
return jsxRuntime.jsx(ArrowDown, { size: 16, color: designSystemTokens.semanticColors.icons.utility });
|
|
2189
|
+
return jsxRuntime.jsx(lucideReact.ArrowDown, { size: 16, color: designSystemTokens.semanticColors.icons.utility });
|
|
2646
2190
|
}
|
|
2647
2191
|
function SortedAscendingIcon() {
|
|
2648
|
-
return jsxRuntime.jsx(ArrowUp, { size: 16, color: designSystemTokens.semanticColors.icons.utility });
|
|
2192
|
+
return jsxRuntime.jsx(lucideReact.ArrowUp, { size: 16, color: designSystemTokens.semanticColors.icons.utility });
|
|
2649
2193
|
}
|
|
2650
2194
|
function UnsortedIcon() {
|
|
2651
|
-
return jsxRuntime.jsx(ChevronsUpDown, { size: 16, color: designSystemTokens.semanticColors.icons.utility });
|
|
2195
|
+
return jsxRuntime.jsx(lucideReact.ChevronsUpDown, { size: 16, color: designSystemTokens.semanticColors.icons.utility });
|
|
2652
2196
|
}
|
|
2653
2197
|
|
|
2654
2198
|
/**
|
|
@@ -2810,7 +2354,7 @@ ModDataGrid.displayName = 'ModDataGrid';
|
|
|
2810
2354
|
* ```
|
|
2811
2355
|
*/
|
|
2812
2356
|
function ModDataGridColumnsButton() {
|
|
2813
|
-
return (jsxRuntime.jsx(xDataGrid.ColumnsPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(Columns3, { size: 16, color: designSystemTokens.semanticColors.buttons.primary.default }), "Columns"] }) }) }));
|
|
2357
|
+
return (jsxRuntime.jsx(xDataGrid.ColumnsPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(lucideReact.Columns3, { size: 16, color: designSystemTokens.semanticColors.buttons.primary.default }), "Columns"] }) }) }));
|
|
2814
2358
|
}
|
|
2815
2359
|
ModDataGridColumnsButton.displayName = 'ModDataGridColumnsButton';
|
|
2816
2360
|
|
|
@@ -2952,7 +2496,7 @@ function ModDataGridFiltersButton() {
|
|
|
2952
2496
|
const filterModel = xDataGrid.useGridSelector(apiRef, xDataGrid.gridFilterModelSelector);
|
|
2953
2497
|
const activeFilters = filterModel.items.filter(item => item.value != null && item.value !== '');
|
|
2954
2498
|
const filterCount = activeFilters.length;
|
|
2955
|
-
return (jsxRuntime.jsx(xDataGrid.FilterPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(ListFilter, { size: 16, color: designSystemTokens.semanticColors.buttons.primary.default }), "Filters", filterCount > 0 && (jsxRuntime.jsx(ModTag, { size: "medium", variant: "filled", intent: "info", label: String(filterCount) }))] }) }) }));
|
|
2499
|
+
return (jsxRuntime.jsx(xDataGrid.FilterPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(lucideReact.ListFilter, { size: 16, color: designSystemTokens.semanticColors.buttons.primary.default }), "Filters", filterCount > 0 && (jsxRuntime.jsx(ModTag, { size: "medium", variant: "filled", intent: "info", label: String(filterCount) }))] }) }) }));
|
|
2956
2500
|
}
|
|
2957
2501
|
ModDataGridFiltersButton.displayName = 'ModDataGridFiltersButton';
|
|
2958
2502
|
|
|
@@ -3011,472 +2555,7 @@ const IconWrapper = styles.styled('div')({
|
|
|
3011
2555
|
},
|
|
3012
2556
|
});
|
|
3013
2557
|
function ModDataGridHeaderLabel({ children, helpTooltip, className, }) {
|
|
3014
|
-
return (jsxRuntime.jsxs(LabelContainer$2, { className: className, "data-mod-header-label": true, children: [children && jsxRuntime.jsx(LabelText$1, { children: children }), helpTooltip && (jsxRuntime.jsx(Tooltip, { title: helpTooltip, placement: "top", children: jsxRuntime.jsx(IconWrapper, { children: jsxRuntime.jsx(
|
|
3015
|
-
}
|
|
3016
|
-
|
|
3017
|
-
/**
|
|
3018
|
-
* @module constants
|
|
3019
|
-
* @summary Useful constants
|
|
3020
|
-
* @description
|
|
3021
|
-
* Collection of useful date constants.
|
|
3022
|
-
*
|
|
3023
|
-
* The constants could be imported from `date-fns/constants`:
|
|
3024
|
-
*
|
|
3025
|
-
* ```ts
|
|
3026
|
-
* import { maxTime, minTime } from "./constants/date-fns/constants";
|
|
3027
|
-
*
|
|
3028
|
-
* function isAllowedTime(time) {
|
|
3029
|
-
* return time <= maxTime && time >= minTime;
|
|
3030
|
-
* }
|
|
3031
|
-
* ```
|
|
3032
|
-
*/
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
/**
|
|
3036
|
-
* @constant
|
|
3037
|
-
* @name constructFromSymbol
|
|
3038
|
-
* @summary Symbol enabling Date extensions to inherit properties from the reference date.
|
|
3039
|
-
*
|
|
3040
|
-
* The symbol is used to enable the `constructFrom` function to construct a date
|
|
3041
|
-
* using a reference date and a value. It allows to transfer extra properties
|
|
3042
|
-
* from the reference date to the new date. It's useful for extensions like
|
|
3043
|
-
* [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
|
|
3044
|
-
* a constructor argument.
|
|
3045
|
-
*/
|
|
3046
|
-
const constructFromSymbol = Symbol.for("constructDateFrom");
|
|
3047
|
-
|
|
3048
|
-
/**
|
|
3049
|
-
* @name constructFrom
|
|
3050
|
-
* @category Generic Helpers
|
|
3051
|
-
* @summary Constructs a date using the reference date and the value
|
|
3052
|
-
*
|
|
3053
|
-
* @description
|
|
3054
|
-
* The function constructs a new date using the constructor from the reference
|
|
3055
|
-
* date and the given value. It helps to build generic functions that accept
|
|
3056
|
-
* date extensions.
|
|
3057
|
-
*
|
|
3058
|
-
* It defaults to `Date` if the passed reference date is a number or a string.
|
|
3059
|
-
*
|
|
3060
|
-
* Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
|
|
3061
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
3062
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
3063
|
-
* that accept a time zone as a constructor argument.
|
|
3064
|
-
*
|
|
3065
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3066
|
-
*
|
|
3067
|
-
* @param date - The reference date to take constructor from
|
|
3068
|
-
* @param value - The value to create the date
|
|
3069
|
-
*
|
|
3070
|
-
* @returns Date initialized using the given date and value
|
|
3071
|
-
*
|
|
3072
|
-
* @example
|
|
3073
|
-
* import { constructFrom } from "./constructFrom/date-fns";
|
|
3074
|
-
*
|
|
3075
|
-
* // A function that clones a date preserving the original type
|
|
3076
|
-
* function cloneDate<DateType extends Date>(date: DateType): DateType {
|
|
3077
|
-
* return constructFrom(
|
|
3078
|
-
* date, // Use constructor from the given date
|
|
3079
|
-
* date.getTime() // Use the date value to create a new date
|
|
3080
|
-
* );
|
|
3081
|
-
* }
|
|
3082
|
-
*/
|
|
3083
|
-
function constructFrom(date, value) {
|
|
3084
|
-
if (typeof date === "function") return date(value);
|
|
3085
|
-
|
|
3086
|
-
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
3087
|
-
return date[constructFromSymbol](value);
|
|
3088
|
-
|
|
3089
|
-
if (date instanceof Date) return new date.constructor(value);
|
|
3090
|
-
|
|
3091
|
-
return new Date(value);
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
/**
|
|
3095
|
-
* @name toDate
|
|
3096
|
-
* @category Common Helpers
|
|
3097
|
-
* @summary Convert the given argument to an instance of Date.
|
|
3098
|
-
*
|
|
3099
|
-
* @description
|
|
3100
|
-
* Convert the given argument to an instance of Date.
|
|
3101
|
-
*
|
|
3102
|
-
* If the argument is an instance of Date, the function returns its clone.
|
|
3103
|
-
*
|
|
3104
|
-
* If the argument is a number, it is treated as a timestamp.
|
|
3105
|
-
*
|
|
3106
|
-
* If the argument is none of the above, the function returns Invalid Date.
|
|
3107
|
-
*
|
|
3108
|
-
* Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
|
|
3109
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
3110
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
3111
|
-
* that accept a time zone as a constructor argument.
|
|
3112
|
-
*
|
|
3113
|
-
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
3114
|
-
*
|
|
3115
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3116
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3117
|
-
*
|
|
3118
|
-
* @param argument - The value to convert
|
|
3119
|
-
*
|
|
3120
|
-
* @returns The parsed date in the local time zone
|
|
3121
|
-
*
|
|
3122
|
-
* @example
|
|
3123
|
-
* // Clone the date:
|
|
3124
|
-
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
3125
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
3126
|
-
*
|
|
3127
|
-
* @example
|
|
3128
|
-
* // Convert the timestamp to date:
|
|
3129
|
-
* const result = toDate(1392098430000)
|
|
3130
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
3131
|
-
*/
|
|
3132
|
-
function toDate(argument, context) {
|
|
3133
|
-
// [TODO] Get rid of `toDate` or `constructFrom`?
|
|
3134
|
-
return constructFrom(argument, argument);
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
/**
|
|
3138
|
-
* The {@link addDays} function options.
|
|
3139
|
-
*/
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* @name addDays
|
|
3143
|
-
* @category Day Helpers
|
|
3144
|
-
* @summary Add the specified number of days to the given date.
|
|
3145
|
-
*
|
|
3146
|
-
* @description
|
|
3147
|
-
* Add the specified number of days to the given date.
|
|
3148
|
-
*
|
|
3149
|
-
* **You don't need date-fns\***:
|
|
3150
|
-
*
|
|
3151
|
-
* Temporal has a built-in `add` method on all its classes:
|
|
3152
|
-
*
|
|
3153
|
-
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
|
3154
|
-
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
|
3155
|
-
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
|
3156
|
-
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
|
3157
|
-
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
|
3158
|
-
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
|
3159
|
-
*
|
|
3160
|
-
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
|
3161
|
-
*
|
|
3162
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3163
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3164
|
-
*
|
|
3165
|
-
* @param date - The date to be changed
|
|
3166
|
-
* @param amount - The amount of days to be added.
|
|
3167
|
-
* @param options - An object with options
|
|
3168
|
-
*
|
|
3169
|
-
* @returns The new date with the days added
|
|
3170
|
-
*
|
|
3171
|
-
* @example
|
|
3172
|
-
* // Add 10 days to 1 September 2014:
|
|
3173
|
-
* const result = addDays(new Date(2014, 8, 1), 10)
|
|
3174
|
-
* //=> Thu Sep 11 2014 00:00:00
|
|
3175
|
-
*
|
|
3176
|
-
* @example
|
|
3177
|
-
* // Using Temporal:
|
|
3178
|
-
* // Add 10 days to 1 September 2014:
|
|
3179
|
-
* Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
|
|
3180
|
-
* //=> "2014-09-11"
|
|
3181
|
-
*/
|
|
3182
|
-
function addDays(date, amount, options) {
|
|
3183
|
-
const _date = toDate(date);
|
|
3184
|
-
if (isNaN(amount)) return constructFrom(date, NaN);
|
|
3185
|
-
|
|
3186
|
-
// If 0 days, no-op to avoid changing times in the hour before end of DST
|
|
3187
|
-
if (!amount) return _date;
|
|
3188
|
-
|
|
3189
|
-
_date.setDate(_date.getDate() + amount);
|
|
3190
|
-
return _date;
|
|
3191
|
-
}
|
|
3192
|
-
|
|
3193
|
-
/**
|
|
3194
|
-
* The {@link addMonths} function options.
|
|
3195
|
-
*/
|
|
3196
|
-
|
|
3197
|
-
/**
|
|
3198
|
-
* @name addMonths
|
|
3199
|
-
* @category Month Helpers
|
|
3200
|
-
* @summary Add the specified number of months to the given date.
|
|
3201
|
-
*
|
|
3202
|
-
* @description
|
|
3203
|
-
* Add the specified number of months to the given date.
|
|
3204
|
-
*
|
|
3205
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3206
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3207
|
-
*
|
|
3208
|
-
* @param date - The date to be changed
|
|
3209
|
-
* @param amount - The amount of months to be added.
|
|
3210
|
-
* @param options - The options object
|
|
3211
|
-
*
|
|
3212
|
-
* @returns The new date with the months added
|
|
3213
|
-
*
|
|
3214
|
-
* @example
|
|
3215
|
-
* // Add 5 months to 1 September 2014:
|
|
3216
|
-
* const result = addMonths(new Date(2014, 8, 1), 5)
|
|
3217
|
-
* //=> Sun Feb 01 2015 00:00:00
|
|
3218
|
-
*
|
|
3219
|
-
* // Add one month to 30 January 2023:
|
|
3220
|
-
* const result = addMonths(new Date(2023, 0, 30), 1)
|
|
3221
|
-
* //=> Tue Feb 28 2023 00:00:00
|
|
3222
|
-
*/
|
|
3223
|
-
function addMonths(date, amount, options) {
|
|
3224
|
-
const _date = toDate(date);
|
|
3225
|
-
if (isNaN(amount)) return constructFrom(date, NaN);
|
|
3226
|
-
const dayOfMonth = _date.getDate();
|
|
3227
|
-
|
|
3228
|
-
// The JS Date object supports date math by accepting out-of-bounds values for
|
|
3229
|
-
// month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
|
|
3230
|
-
// new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
|
|
3231
|
-
// want except that dates will wrap around the end of a month, meaning that
|
|
3232
|
-
// new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
|
|
3233
|
-
// we'll default to the end of the desired month by adding 1 to the desired
|
|
3234
|
-
// month and using a date of 0 to back up one day to the end of the desired
|
|
3235
|
-
// month.
|
|
3236
|
-
const endOfDesiredMonth = constructFrom(date, _date.getTime());
|
|
3237
|
-
endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
|
|
3238
|
-
const daysInMonth = endOfDesiredMonth.getDate();
|
|
3239
|
-
if (dayOfMonth >= daysInMonth) {
|
|
3240
|
-
// If we're already at the end of the month, then this is the correct date
|
|
3241
|
-
// and we're done.
|
|
3242
|
-
return endOfDesiredMonth;
|
|
3243
|
-
} else {
|
|
3244
|
-
// Otherwise, we now know that setting the original day-of-month value won't
|
|
3245
|
-
// cause an overflow, so set the desired day-of-month. Note that we can't
|
|
3246
|
-
// just set the date of `endOfDesiredMonth` because that object may have had
|
|
3247
|
-
// its time changed in the unusual case where where a DST transition was on
|
|
3248
|
-
// the last day of the month and its local time was in the hour skipped or
|
|
3249
|
-
// repeated next to a DST transition. So we use `date` instead which is
|
|
3250
|
-
// guaranteed to still have the original time.
|
|
3251
|
-
_date.setFullYear(
|
|
3252
|
-
endOfDesiredMonth.getFullYear(),
|
|
3253
|
-
endOfDesiredMonth.getMonth(),
|
|
3254
|
-
dayOfMonth,
|
|
3255
|
-
);
|
|
3256
|
-
return _date;
|
|
3257
|
-
}
|
|
3258
|
-
}
|
|
3259
|
-
|
|
3260
|
-
/**
|
|
3261
|
-
* The {@link startOfDay} function options.
|
|
3262
|
-
*/
|
|
3263
|
-
|
|
3264
|
-
/**
|
|
3265
|
-
* @name startOfDay
|
|
3266
|
-
* @category Day Helpers
|
|
3267
|
-
* @summary Return the start of a day for the given date.
|
|
3268
|
-
*
|
|
3269
|
-
* @description
|
|
3270
|
-
* Return the start of a day for the given date.
|
|
3271
|
-
* The result will be in the local timezone.
|
|
3272
|
-
*
|
|
3273
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3274
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3275
|
-
*
|
|
3276
|
-
* @param date - The original date
|
|
3277
|
-
* @param options - The options
|
|
3278
|
-
*
|
|
3279
|
-
* @returns The start of a day
|
|
3280
|
-
*
|
|
3281
|
-
* @example
|
|
3282
|
-
* // The start of a day for 2 September 2014 11:55:00:
|
|
3283
|
-
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
3284
|
-
* //=> Tue Sep 02 2014 00:00:00
|
|
3285
|
-
*/
|
|
3286
|
-
function startOfDay(date, options) {
|
|
3287
|
-
const _date = toDate(date);
|
|
3288
|
-
_date.setHours(0, 0, 0, 0);
|
|
3289
|
-
return _date;
|
|
3290
|
-
}
|
|
3291
|
-
|
|
3292
|
-
/**
|
|
3293
|
-
* The {@link endOfDay} function options.
|
|
3294
|
-
*/
|
|
3295
|
-
|
|
3296
|
-
/**
|
|
3297
|
-
* @name endOfDay
|
|
3298
|
-
* @category Day Helpers
|
|
3299
|
-
* @summary Return the end of a day for the given date.
|
|
3300
|
-
*
|
|
3301
|
-
* @description
|
|
3302
|
-
* Return the end of a day for the given date.
|
|
3303
|
-
* The result will be in the local timezone.
|
|
3304
|
-
*
|
|
3305
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3306
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3307
|
-
*
|
|
3308
|
-
* @param date - The original date
|
|
3309
|
-
* @param options - An object with options
|
|
3310
|
-
*
|
|
3311
|
-
* @returns The end of a day
|
|
3312
|
-
*
|
|
3313
|
-
* @example
|
|
3314
|
-
* // The end of a day for 2 September 2014 11:55:00:
|
|
3315
|
-
* const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
3316
|
-
* //=> Tue Sep 02 2014 23:59:59.999
|
|
3317
|
-
*/
|
|
3318
|
-
function endOfDay(date, options) {
|
|
3319
|
-
const _date = toDate(date);
|
|
3320
|
-
_date.setHours(23, 59, 59, 999);
|
|
3321
|
-
return _date;
|
|
3322
|
-
}
|
|
3323
|
-
|
|
3324
|
-
/**
|
|
3325
|
-
* The {@link endOfMonth} function options.
|
|
3326
|
-
*/
|
|
3327
|
-
|
|
3328
|
-
/**
|
|
3329
|
-
* @name endOfMonth
|
|
3330
|
-
* @category Month Helpers
|
|
3331
|
-
* @summary Return the end of a month for the given date.
|
|
3332
|
-
*
|
|
3333
|
-
* @description
|
|
3334
|
-
* Return the end of a month for the given date.
|
|
3335
|
-
* The result will be in the local timezone.
|
|
3336
|
-
*
|
|
3337
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3338
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3339
|
-
*
|
|
3340
|
-
* @param date - The original date
|
|
3341
|
-
* @param options - An object with options
|
|
3342
|
-
*
|
|
3343
|
-
* @returns The end of a month
|
|
3344
|
-
*
|
|
3345
|
-
* @example
|
|
3346
|
-
* // The end of a month for 2 September 2014 11:55:00:
|
|
3347
|
-
* const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
|
3348
|
-
* //=> Tue Sep 30 2014 23:59:59.999
|
|
3349
|
-
*/
|
|
3350
|
-
function endOfMonth(date, options) {
|
|
3351
|
-
const _date = toDate(date);
|
|
3352
|
-
const month = _date.getMonth();
|
|
3353
|
-
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
3354
|
-
_date.setHours(23, 59, 59, 999);
|
|
3355
|
-
return _date;
|
|
3356
|
-
}
|
|
3357
|
-
|
|
3358
|
-
/**
|
|
3359
|
-
* The {@link startOfMonth} function options.
|
|
3360
|
-
*/
|
|
3361
|
-
|
|
3362
|
-
/**
|
|
3363
|
-
* @name startOfMonth
|
|
3364
|
-
* @category Month Helpers
|
|
3365
|
-
* @summary Return the start of a month for the given date.
|
|
3366
|
-
*
|
|
3367
|
-
* @description
|
|
3368
|
-
* Return the start of a month for the given date. The result will be in the local timezone.
|
|
3369
|
-
*
|
|
3370
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
|
|
3371
|
-
* Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3372
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,
|
|
3373
|
-
* or inferred from the arguments.
|
|
3374
|
-
*
|
|
3375
|
-
* @param date - The original date
|
|
3376
|
-
* @param options - An object with options
|
|
3377
|
-
*
|
|
3378
|
-
* @returns The start of a month
|
|
3379
|
-
*
|
|
3380
|
-
* @example
|
|
3381
|
-
* // The start of a month for 2 September 2014 11:55:00:
|
|
3382
|
-
* const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
|
3383
|
-
* //=> Mon Sep 01 2014 00:00:00
|
|
3384
|
-
*/
|
|
3385
|
-
function startOfMonth(date, options) {
|
|
3386
|
-
const _date = toDate(date);
|
|
3387
|
-
_date.setDate(1);
|
|
3388
|
-
_date.setHours(0, 0, 0, 0);
|
|
3389
|
-
return _date;
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
/**
|
|
3393
|
-
* The {@link startOfYear} function options.
|
|
3394
|
-
*/
|
|
3395
|
-
|
|
3396
|
-
/**
|
|
3397
|
-
* @name startOfYear
|
|
3398
|
-
* @category Year Helpers
|
|
3399
|
-
* @summary Return the start of a year for the given date.
|
|
3400
|
-
*
|
|
3401
|
-
* @description
|
|
3402
|
-
* Return the start of a year for the given date.
|
|
3403
|
-
* The result will be in the local timezone.
|
|
3404
|
-
*
|
|
3405
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3406
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3407
|
-
*
|
|
3408
|
-
* @param date - The original date
|
|
3409
|
-
* @param options - The options
|
|
3410
|
-
*
|
|
3411
|
-
* @returns The start of a year
|
|
3412
|
-
*
|
|
3413
|
-
* @example
|
|
3414
|
-
* // The start of a year for 2 September 2014 11:55:00:
|
|
3415
|
-
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
|
3416
|
-
* //=> Wed Jan 01 2014 00:00:00
|
|
3417
|
-
*/
|
|
3418
|
-
function startOfYear(date, options) {
|
|
3419
|
-
const date_ = toDate(date);
|
|
3420
|
-
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
3421
|
-
date_.setHours(0, 0, 0, 0);
|
|
3422
|
-
return date_;
|
|
3423
|
-
}
|
|
3424
|
-
|
|
3425
|
-
/**
|
|
3426
|
-
* The {@link subDays} function options.
|
|
3427
|
-
*/
|
|
3428
|
-
|
|
3429
|
-
/**
|
|
3430
|
-
* @name subDays
|
|
3431
|
-
* @category Day Helpers
|
|
3432
|
-
* @summary Subtract the specified number of days from the given date.
|
|
3433
|
-
*
|
|
3434
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3435
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3436
|
-
*
|
|
3437
|
-
* @param date - The date to be changed
|
|
3438
|
-
* @param amount - The amount of days to be subtracted.
|
|
3439
|
-
* @param options - An object with options
|
|
3440
|
-
*
|
|
3441
|
-
* @returns The new date with the days subtracted
|
|
3442
|
-
*
|
|
3443
|
-
* @example
|
|
3444
|
-
* // Subtract 10 days from 1 September 2014:
|
|
3445
|
-
* const result = subDays(new Date(2014, 8, 1), 10)
|
|
3446
|
-
* //=> Fri Aug 22 2014 00:00:00
|
|
3447
|
-
*/
|
|
3448
|
-
function subDays(date, amount, options) {
|
|
3449
|
-
return addDays(date, -amount);
|
|
3450
|
-
}
|
|
3451
|
-
|
|
3452
|
-
/**
|
|
3453
|
-
* The subMonths function options.
|
|
3454
|
-
*/
|
|
3455
|
-
|
|
3456
|
-
/**
|
|
3457
|
-
* @name subMonths
|
|
3458
|
-
* @category Month Helpers
|
|
3459
|
-
* @summary Subtract the specified number of months from the given date.
|
|
3460
|
-
*
|
|
3461
|
-
* @description
|
|
3462
|
-
* Subtract the specified number of months from the given date.
|
|
3463
|
-
*
|
|
3464
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3465
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3466
|
-
*
|
|
3467
|
-
* @param date - The date to be changed
|
|
3468
|
-
* @param amount - The amount of months to be subtracted.
|
|
3469
|
-
* @param options - An object with options
|
|
3470
|
-
*
|
|
3471
|
-
* @returns The new date with the months subtracted
|
|
3472
|
-
*
|
|
3473
|
-
* @example
|
|
3474
|
-
* // Subtract 5 months from 1 February 2015:
|
|
3475
|
-
* const result = subMonths(new Date(2015, 1, 1), 5)
|
|
3476
|
-
* //=> Mon Sep 01 2014 00:00:00
|
|
3477
|
-
*/
|
|
3478
|
-
function subMonths(date, amount, options) {
|
|
3479
|
-
return addMonths(date, -1);
|
|
2558
|
+
return (jsxRuntime.jsxs(LabelContainer$2, { className: className, "data-mod-header-label": true, children: [children && jsxRuntime.jsx(LabelText$1, { children: children }), helpTooltip && (jsxRuntime.jsx(Tooltip, { title: helpTooltip, placement: "top", children: jsxRuntime.jsx(IconWrapper, { children: jsxRuntime.jsx(lucideReact.HelpCircle, {}) }) }))] }));
|
|
3480
2559
|
}
|
|
3481
2560
|
|
|
3482
2561
|
// Cast ModButton to a simpler type for styled() compatibility (avoids generic inference issues)
|
|
@@ -3569,50 +2648,50 @@ const defaultRangeShortcuts = [
|
|
|
3569
2648
|
label: 'Today',
|
|
3570
2649
|
getValue: () => {
|
|
3571
2650
|
const today = new Date();
|
|
3572
|
-
return [startOfDay(today), endOfDay(today)];
|
|
2651
|
+
return [dateFns.startOfDay(today), dateFns.endOfDay(today)];
|
|
3573
2652
|
},
|
|
3574
2653
|
},
|
|
3575
2654
|
{
|
|
3576
2655
|
label: 'Last 7 days',
|
|
3577
2656
|
getValue: () => {
|
|
3578
2657
|
const today = new Date();
|
|
3579
|
-
return [startOfDay(subDays(today, 6)), endOfDay(today)];
|
|
2658
|
+
return [dateFns.startOfDay(dateFns.subDays(today, 6)), dateFns.endOfDay(today)];
|
|
3580
2659
|
},
|
|
3581
2660
|
},
|
|
3582
2661
|
{
|
|
3583
2662
|
label: 'Last 30 days',
|
|
3584
2663
|
getValue: () => {
|
|
3585
2664
|
const today = new Date();
|
|
3586
|
-
return [startOfDay(subDays(today, 29)), endOfDay(today)];
|
|
2665
|
+
return [dateFns.startOfDay(dateFns.subDays(today, 29)), dateFns.endOfDay(today)];
|
|
3587
2666
|
},
|
|
3588
2667
|
},
|
|
3589
2668
|
{
|
|
3590
2669
|
label: 'Last 60 days',
|
|
3591
2670
|
getValue: () => {
|
|
3592
2671
|
const today = new Date();
|
|
3593
|
-
return [startOfDay(subDays(today, 59)), endOfDay(today)];
|
|
2672
|
+
return [dateFns.startOfDay(dateFns.subDays(today, 59)), dateFns.endOfDay(today)];
|
|
3594
2673
|
},
|
|
3595
2674
|
},
|
|
3596
2675
|
{
|
|
3597
2676
|
label: 'Month to date',
|
|
3598
2677
|
getValue: () => {
|
|
3599
2678
|
const today = new Date();
|
|
3600
|
-
return [startOfMonth(today), endOfDay(today)];
|
|
2679
|
+
return [dateFns.startOfMonth(today), dateFns.endOfDay(today)];
|
|
3601
2680
|
},
|
|
3602
2681
|
},
|
|
3603
2682
|
{
|
|
3604
2683
|
label: 'Last month',
|
|
3605
2684
|
getValue: () => {
|
|
3606
2685
|
const today = new Date();
|
|
3607
|
-
const lastMonth = subMonths(today);
|
|
3608
|
-
return [startOfMonth(lastMonth), endOfMonth(lastMonth)];
|
|
2686
|
+
const lastMonth = dateFns.subMonths(today, 1);
|
|
2687
|
+
return [dateFns.startOfMonth(lastMonth), dateFns.endOfMonth(lastMonth)];
|
|
3609
2688
|
},
|
|
3610
2689
|
},
|
|
3611
2690
|
{
|
|
3612
2691
|
label: 'Year to date',
|
|
3613
2692
|
getValue: () => {
|
|
3614
2693
|
const today = new Date();
|
|
3615
|
-
return [startOfYear(today), endOfDay(today)];
|
|
2694
|
+
return [dateFns.startOfYear(today), dateFns.endOfDay(today)];
|
|
3616
2695
|
},
|
|
3617
2696
|
},
|
|
3618
2697
|
];
|
|
@@ -3690,9 +2769,9 @@ const StyledDateRangePicker = styles.styled(DateRangePicker.DateRangePicker)(({
|
|
|
3690
2769
|
color: designSystemTokens.semanticColors.typography.body,
|
|
3691
2770
|
},
|
|
3692
2771
|
}));
|
|
3693
|
-
const ClearIcon = () => jsxRuntime.jsx(X, { size: 20, color: designSystemTokens.semanticColors.icons.placeholder });
|
|
2772
|
+
const ClearIcon = () => jsxRuntime.jsx(lucideReact.X, { size: 20, color: designSystemTokens.semanticColors.icons.placeholder });
|
|
3694
2773
|
// Custom calendar icon component
|
|
3695
|
-
const CalendarIcon = () => jsxRuntime.jsx(CalendarDays, { size: 20, color: designSystemTokens.semanticColors.icons.placeholder });
|
|
2774
|
+
const CalendarIcon = () => jsxRuntime.jsx(lucideReact.CalendarDays, { size: 20, color: designSystemTokens.semanticColors.icons.placeholder });
|
|
3696
2775
|
// Shortcut styles to match Figma list item design (no borders, plain text)
|
|
3697
2776
|
const shortcutChipStyles = {
|
|
3698
2777
|
// Container (MuiList) styles
|
|
@@ -3955,7 +3034,7 @@ const ModDownloadToast = ({ title, fileName, progress, showClose = true, showPau
|
|
|
3955
3034
|
const hasActions = showPause || showClose;
|
|
3956
3035
|
if (!hasActions)
|
|
3957
3036
|
return null;
|
|
3958
|
-
return (jsxRuntime.jsxs(Stack, { direction: "row", sx: { alignItems: 'center', gap: `${designSystemTokens.spacing.spacing_2}px` }, children: [showPause && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onPause, "aria-label": "Pause download", children: jsxRuntime.jsx(Minus, { size: designSystemTokens.spacing.spacing_2 }) })), showClose && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(X, { size: designSystemTokens.spacing.spacing_2 }) }))] }));
|
|
3037
|
+
return (jsxRuntime.jsxs(Stack, { direction: "row", sx: { alignItems: 'center', gap: `${designSystemTokens.spacing.spacing_2}px` }, children: [showPause && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onPause, "aria-label": "Pause download", children: jsxRuntime.jsx(lucideReact.Minus, { size: designSystemTokens.spacing.spacing_2 }) })), showClose && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(lucideReact.X, { size: designSystemTokens.spacing.spacing_2 }) }))] }));
|
|
3959
3038
|
};
|
|
3960
3039
|
return (jsxRuntime.jsxs(StyledRoot$1, { elevation: 0, role: "status", ...props, children: [jsxRuntime.jsxs(Stack, { direction: "row", sx: {
|
|
3961
3040
|
alignItems: 'flex-start',
|
|
@@ -4109,7 +3188,7 @@ const CountBadge = styles.styled('span')(({ theme }) => ({
|
|
|
4109
3188
|
*/
|
|
4110
3189
|
const ModFilterChip = ({ label, selected = false, expanded, selectedLabel, count = 0, onClear, onClick, ...props }) => {
|
|
4111
3190
|
const chipLabel = selected ? (jsxRuntime.jsxs(LabelContent, { children: [jsxRuntime.jsxs(TextStack, { children: [jsxRuntime.jsx(HeaderLabel, { children: label }), jsxRuntime.jsx(SelectedLabel, { children: selectedLabel ?? label })] }), count > 0 && jsxRuntime.jsx(CountBadge, { children: count })] })) : (label);
|
|
4112
|
-
return (jsxRuntime.jsx(StyledChip$1, { label: chipLabel, selected: selected, clickable: true, onClick: onClick, onDelete: selected && onClear ? onClear : undefined, deleteIcon: jsxRuntime.jsx(X, { size: 24 }), "aria-expanded": expanded, ...props }));
|
|
3191
|
+
return (jsxRuntime.jsx(StyledChip$1, { label: chipLabel, selected: selected, clickable: true, onClick: onClick, onDelete: selected && onClear ? onClear : undefined, deleteIcon: jsxRuntime.jsx(lucideReact.X, { size: 24 }), "aria-expanded": expanded, ...props }));
|
|
4113
3192
|
};
|
|
4114
3193
|
ModFilterChip.displayName = 'ModFilterChip';
|
|
4115
3194
|
|
|
@@ -4356,7 +3435,7 @@ const ModFooter = ({ variant = 'pagination', showShadow = false, loading = false
|
|
|
4356
3435
|
}, children: jsxRuntime.jsx(ModLoadingSpinner, {}) }), jsxRuntime.jsxs(ResultText, { children: [rowCount, " results "] })] }), jsxRuntime.jsx(LoadMoreButton, { onClick: onLoadMore, disabled: !hasMore, children: "Load more" })] }));
|
|
4357
3436
|
}
|
|
4358
3437
|
// Pagination variant
|
|
4359
|
-
return (jsxRuntime.jsxs(StyledFooter, { showShadow: showShadow, sx: { justifyContent: 'space-between' }, children: [showSelected ? jsxRuntime.jsxs(SelectedText, { children: [selectedCount, " selected"] }) : jsxRuntime.jsx(Box, {}), jsxRuntime.jsxs(PaginationContainer, { children: [jsxRuntime.jsx(PaginationText, { children: derivePaginationInfo() }), jsxRuntime.jsxs(Box, { sx: { display: 'flex', gap: `${designSystemTokens.spacing.spacing_1_4}px` }, children: [jsxRuntime.jsx(PaginationButton, { onClick: handlePreviousPage, disabled: !deriveHasPreviousPage(), "aria-label": "Previous page", children: jsxRuntime.jsx(ChevronLeft, {}) }), jsxRuntime.jsx(PaginationButton, { onClick: handleNextPage, disabled: !deriveHasNextPage(), "aria-label": "Next page", children: jsxRuntime.jsx(ChevronRight, {}) })] })] })] }));
|
|
3438
|
+
return (jsxRuntime.jsxs(StyledFooter, { showShadow: showShadow, sx: { justifyContent: 'space-between' }, children: [showSelected ? jsxRuntime.jsxs(SelectedText, { children: [selectedCount, " selected"] }) : jsxRuntime.jsx(Box, {}), jsxRuntime.jsxs(PaginationContainer, { children: [jsxRuntime.jsx(PaginationText, { children: derivePaginationInfo() }), jsxRuntime.jsxs(Box, { sx: { display: 'flex', gap: `${designSystemTokens.spacing.spacing_1_4}px` }, children: [jsxRuntime.jsx(PaginationButton, { onClick: handlePreviousPage, disabled: !deriveHasPreviousPage(), "aria-label": "Previous page", children: jsxRuntime.jsx(lucideReact.ChevronLeft, {}) }), jsxRuntime.jsx(PaginationButton, { onClick: handleNextPage, disabled: !deriveHasNextPage(), "aria-label": "Next page", children: jsxRuntime.jsx(lucideReact.ChevronRight, {}) })] })] })] }));
|
|
4360
3439
|
};
|
|
4361
3440
|
ModFooter.displayName = 'ModFooter';
|
|
4362
3441
|
|
|
@@ -4611,7 +3690,7 @@ const StyledFormHelperText = styles.styled(FormHelperText, {
|
|
|
4611
3690
|
const ModInputField = ({ size = 'medium', destructive = false, label, required = false, infoIcon, helperText, errorMessage, startIcon, endIcon, disabled, id, ...props }) => {
|
|
4612
3691
|
const inputId = id || `mod-input-${Math.random().toString(36).substring(7)}`;
|
|
4613
3692
|
const helperTextId = helperText || errorMessage ? `${inputId}-helper-text` : undefined;
|
|
4614
|
-
return (jsxRuntime.jsxs(StyledFormControl, { size: size, error: destructive, disabled: disabled, children: [label && (jsxRuntime.jsxs(StyledInputLabel, { htmlFor: inputId, size: size, infoIcon: !!infoIcon, disabled: disabled, error: destructive, shrink: true, children: [label, required && jsxRuntime.jsx("span", { "aria-hidden": "true", children: "*" }), infoIcon && jsxRuntime.jsx(InfoIconWrapper, { children: infoIcon })] })), jsxRuntime.jsx(StyledInputBase, { id: inputId, size: size, destructive: destructive, disabled: disabled, error: destructive, "aria-describedby": helperTextId, startAdornment: startIcon ? (jsxRuntime.jsx(InputAdornment, { position: "start", style: { paddingLeft: size === 'small' ? designSystemTokens.spacing.spacing_1_1_2 : designSystemTokens.spacing.spacing_2 }, children: startIcon })) : undefined, endAdornment: destructive ? (jsxRuntime.jsx(InputAdornment, { position: "end", style: { paddingRight: designSystemTokens.spacing.spacing_1_1_2 }, children: jsxRuntime.jsx(
|
|
3693
|
+
return (jsxRuntime.jsxs(StyledFormControl, { size: size, error: destructive, disabled: disabled, children: [label && (jsxRuntime.jsxs(StyledInputLabel, { htmlFor: inputId, size: size, infoIcon: !!infoIcon, disabled: disabled, error: destructive, shrink: true, children: [label, required && jsxRuntime.jsx("span", { "aria-hidden": "true", children: "*" }), infoIcon && jsxRuntime.jsx(InfoIconWrapper, { children: infoIcon })] })), jsxRuntime.jsx(StyledInputBase, { id: inputId, size: size, destructive: destructive, disabled: disabled, error: destructive, "aria-describedby": helperTextId, startAdornment: startIcon ? (jsxRuntime.jsx(InputAdornment, { position: "start", style: { paddingLeft: size === 'small' ? designSystemTokens.spacing.spacing_1_1_2 : designSystemTokens.spacing.spacing_2 }, children: startIcon })) : undefined, endAdornment: destructive ? (jsxRuntime.jsx(InputAdornment, { position: "end", style: { paddingRight: designSystemTokens.spacing.spacing_1_1_2 }, children: jsxRuntime.jsx(lucideReact.AlertCircle, { size: 20 }) })) : endIcon ? (jsxRuntime.jsx(InputAdornment, { position: "end", style: { paddingRight: designSystemTokens.spacing.spacing_1_1_2 }, children: endIcon })) : undefined, ...props }), (helperText || errorMessage) && (jsxRuntime.jsx(StyledFormHelperText, { id: helperTextId, error: destructive, disabled: disabled, children: destructive ? errorMessage : helperText }))] }));
|
|
4615
3694
|
};
|
|
4616
3695
|
ModInputField.displayName = 'ModInputField';
|
|
4617
3696
|
|
|
@@ -5232,7 +4311,7 @@ const ModModalHeader = ({ title, subtitle, href, LinkComponent, onClose, hideClo
|
|
|
5232
4311
|
}
|
|
5233
4312
|
return jsxRuntime.jsx(ModalHeaderTitle, { children: title });
|
|
5234
4313
|
};
|
|
5235
|
-
return (jsxRuntime.jsxs(ModalHeaderRoot, { children: [jsxRuntime.jsxs(ModalHeaderTitleRow, { children: [jsxRuntime.jsxs(ModalHeaderTextContainer, { children: [renderTitle(), subtitle && jsxRuntime.jsx(ModalHeaderSubtitle, { children: subtitle })] }), !hideCloseButton && onClose && (jsxRuntime.jsx(StyledCloseButton, { onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(X, { size: 24 }) }))] }), children] }));
|
|
4314
|
+
return (jsxRuntime.jsxs(ModalHeaderRoot, { children: [jsxRuntime.jsxs(ModalHeaderTitleRow, { children: [jsxRuntime.jsxs(ModalHeaderTextContainer, { children: [renderTitle(), subtitle && jsxRuntime.jsx(ModalHeaderSubtitle, { children: subtitle })] }), !hideCloseButton && onClose && (jsxRuntime.jsx(StyledCloseButton, { onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(lucideReact.X, { size: 24 }) }))] }), children] }));
|
|
5236
4315
|
};
|
|
5237
4316
|
ModModalHeader.displayName = 'ModModalHeader';
|
|
5238
4317
|
// ============================================================================
|
|
@@ -5713,7 +4792,7 @@ function ModNavigationItem({ icon, label, selected = false, tag, tooltip, slotPr
|
|
|
5713
4792
|
// When collapsed the label is hidden, so fall back to it for the tooltip and
|
|
5714
4793
|
// accessible name — otherwise an icon-only button has no name (WCAG 4.1.2).
|
|
5715
4794
|
const collapsedTooltip = tooltip ?? label;
|
|
5716
|
-
const item = (jsxRuntime.jsxs(StyledRoot, { selected: selected, "aria-label": collapsed && typeof label === 'string' ? label : undefined, disableRipple: true, ...props, children: [jsxRuntime.jsx(IconPadding, { className: "mod-nav-icon-padding
|
|
4795
|
+
const item = (jsxRuntime.jsxs(StyledRoot, { selected: selected, "aria-label": collapsed && typeof label === 'string' ? label : undefined, disableRipple: true, ...props, children: [jsxRuntime.jsx(IconPadding, { className: "mod-nav-icon-padding", children: icon }), !collapsed && label && jsxRuntime.jsx(Label$2, { className: "mod-nav-label", children: label }), !collapsed && tag && (jsxRuntime.jsx(ModTag, { size: "medium", variant: "filled", intent: "beta", shape: "rounded", label: tag, ...slotProps?.badge })), children] }));
|
|
5717
4796
|
if (collapsed && collapsedTooltip) {
|
|
5718
4797
|
return (jsxRuntime.jsx(ModTooltip, { title: collapsedTooltip, placement: "right", arrow: true, children: item }));
|
|
5719
4798
|
}
|
|
@@ -5888,7 +4967,7 @@ function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = fal
|
|
|
5888
4967
|
'&:hover': {
|
|
5889
4968
|
backgroundColor: `color-mix(in srgb, ${designSystemTokens.semanticColors.buttons.primary.default} 18.8%, transparent)`,
|
|
5890
4969
|
},
|
|
5891
|
-
}, title: "Back to top", size: "small", onClick: handleScrollToTop, children: jsxRuntime.jsx(ChevronUp, { size: 20 }) }) }) }))] }));
|
|
4970
|
+
}, title: "Back to top", size: "small", onClick: handleScrollToTop, children: jsxRuntime.jsx(lucideReact.ChevronUp, { size: 20 }) }) }) }))] }));
|
|
5892
4971
|
}
|
|
5893
4972
|
ModPageContent.displayName = 'ModPageContent';
|
|
5894
4973
|
|
|
@@ -6022,8 +5101,8 @@ const ModQuickFilter = ({ placeholder = 'Search...', onKeyDown, autoFocus = fals
|
|
|
6022
5101
|
...controlSlotProps,
|
|
6023
5102
|
input: {
|
|
6024
5103
|
...controlSlotProps?.input,
|
|
6025
|
-
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(Search, {}) })),
|
|
6026
|
-
endAdornment: (jsxRuntime.jsx(InputAdornment, { position: "end", sx: { visibility: props.value ? 'visible' : 'hidden' }, children: jsxRuntime.jsx(xDataGrid.QuickFilterClear, { size: "small", edge: "end", "aria-label": "Clear search", children: jsxRuntime.jsx(X, { size: 16 }) }) })),
|
|
5104
|
+
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(lucideReact.Search, {}) })),
|
|
5105
|
+
endAdornment: (jsxRuntime.jsx(InputAdornment, { position: "end", sx: { visibility: props.value ? 'visible' : 'hidden' }, children: jsxRuntime.jsx(xDataGrid.QuickFilterClear, { size: "small", edge: "end", "aria-label": "Clear search", children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) }) })),
|
|
6027
5106
|
disableUnderline: true,
|
|
6028
5107
|
},
|
|
6029
5108
|
} })) }) }));
|
|
@@ -6281,7 +5360,7 @@ const ClearButton = styles.styled(ButtonBase)({
|
|
|
6281
5360
|
*/
|
|
6282
5361
|
const ModSearchChip = ({ onClear, value, ...props }) => {
|
|
6283
5362
|
const hasValue = Boolean(value && String(value).length > 0);
|
|
6284
|
-
return (jsxRuntime.jsx(StyledSearchChip, { type: "search", value: value, startAdornment: jsxRuntime.jsx(Search, { size: 16, color: designSystemTokens.semanticColors.icons.placeholder, style: { flexShrink: 0 } }), endAdornment: hasValue && onClear ? (jsxRuntime.jsx(ClearButton, { type: "button", onClick: onClear, "aria-label": "Clear search", children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, ...props }));
|
|
5363
|
+
return (jsxRuntime.jsx(StyledSearchChip, { type: "search", value: value, startAdornment: jsxRuntime.jsx(lucideReact.Search, { size: 16, color: designSystemTokens.semanticColors.icons.placeholder, style: { flexShrink: 0 } }), endAdornment: hasValue && onClear ? (jsxRuntime.jsx(ClearButton, { type: "button", onClick: onClear, "aria-label": "Clear search", children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })) : undefined, ...props }));
|
|
6285
5364
|
};
|
|
6286
5365
|
ModSearchChip.displayName = 'ModSearchChip';
|
|
6287
5366
|
|
|
@@ -6500,7 +5579,7 @@ function useScrollEdges() {
|
|
|
6500
5579
|
function ModSideNav({ collapsed, onCollapsedChange, header, footer, children, className, id, 'aria-label': ariaLabel, }) {
|
|
6501
5580
|
const contextValue = React.useMemo(() => ({ collapsed }), [collapsed]);
|
|
6502
5581
|
const { ref: scrollRef, contentRef, onScroll, canScrollUp, canScrollDown } = useScrollEdges();
|
|
6503
|
-
const HandleIcon = collapsed ? ChevronRight : ChevronLeft;
|
|
5582
|
+
const HandleIcon = collapsed ? lucideReact.ChevronRight : lucideReact.ChevronLeft;
|
|
6504
5583
|
return (jsxRuntime.jsx(ModSideNavContext.Provider, { value: contextValue, children: jsxRuntime.jsxs(Frame, { collapsed: collapsed, children: [jsxRuntime.jsxs(Root, { collapsed: collapsed, "aria-label": ariaLabel, className: className, id: id, children: [jsxRuntime.jsxs(HeaderRegion, { children: [header, jsxRuntime.jsx(Fade, { edge: "header", visible: canScrollUp })] }), jsxRuntime.jsx(Scroll, { ref: scrollRef, onScroll: onScroll, "data-testid": "mod-side-nav-scroll", children: jsxRuntime.jsx(Stack, { ref: contentRef, sx: {
|
|
6505
5584
|
alignItems: 'center',
|
|
6506
5585
|
gap: `${designSystemTokens.spacing.spacing_1_2}px`,
|
|
@@ -6839,7 +5918,7 @@ const ToastButton = styles.styled(Button, {
|
|
|
6839
5918
|
* ModToast - Notification/Toast component based on MUI Alert
|
|
6840
5919
|
*/
|
|
6841
5920
|
const ModToast = ({ intent = 'neutral', type: _type, title, message, showClose = false, actions, onClose, ...props }) => {
|
|
6842
|
-
return (jsxRuntime.jsxs(StyledAlert, { ...props, intent: intent, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: designSystemTokens.semanticColors.icons.utility }, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: [jsxRuntime.jsxs(Stack, { sx: { gap: `${designSystemTokens.spacing.spacing_1}px`, width: '100%' }, children: [title && jsxRuntime.jsx(ToastTitle, { intent: intent, children: title }), message && jsxRuntime.jsx(ToastMessage, { intent: intent, children: message })] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
5921
|
+
return (jsxRuntime.jsxs(StyledAlert, { ...props, intent: intent, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: designSystemTokens.semanticColors.icons.utility }, children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })) : undefined, children: [jsxRuntime.jsxs(Stack, { sx: { gap: `${designSystemTokens.spacing.spacing_1}px`, width: '100%' }, children: [title && jsxRuntime.jsx(ToastTitle, { intent: intent, children: title }), message && jsxRuntime.jsx(ToastMessage, { intent: intent, children: message })] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6843
5922
|
};
|
|
6844
5923
|
/**
|
|
6845
5924
|
* Helper component for creating toast action buttons with proper styling
|
|
@@ -7271,8 +6350,8 @@ const ModTreeView = ({ slots, ...props }) => {
|
|
|
7271
6350
|
}, itemChildrenIndentation: designSystemTokens.spacing.spacing_2_1_2, ...props }));
|
|
7272
6351
|
};
|
|
7273
6352
|
ModTreeView.displayName = 'ModTreeView';
|
|
7274
|
-
const CollapseIcon = () => jsxRuntime.jsx(ChevronDown, { size: 16 });
|
|
7275
|
-
const ExpandIcon = () => jsxRuntime.jsx(ChevronRight, { size: 16 });
|
|
6353
|
+
const CollapseIcon = () => jsxRuntime.jsx(lucideReact.ChevronDown, { size: 16 });
|
|
6354
|
+
const ExpandIcon = () => jsxRuntime.jsx(lucideReact.ChevronRight, { size: 16 });
|
|
7276
6355
|
const StyledTreeView = styles.styled(RichTreeViewPro.RichTreeViewPro)({
|
|
7277
6356
|
[`& .${TreeItem.treeItemClasses.content}`]: {
|
|
7278
6357
|
height: 28,
|
|
@@ -7440,7 +6519,7 @@ exports.ModDataGridFilterPanelDeleteIcon = ModDataGridFilterPanelDeleteIcon;
|
|
|
7440
6519
|
exports.ModDataGridFilterPanelRemoveAllIcon = ModDataGridFilterPanelRemoveAllIcon;
|
|
7441
6520
|
exports.ModDataGridFiltersButton = ModDataGridFiltersButton;
|
|
7442
6521
|
exports.ModDataGridHeaderLabel = ModDataGridHeaderLabel;
|
|
7443
|
-
exports.ModDataGridSelect =
|
|
6522
|
+
exports.ModDataGridSelect = ModDataGridSelect;
|
|
7444
6523
|
exports.ModDatePicker = ModDatePicker;
|
|
7445
6524
|
exports.ModDatePickerListItem = ModDatePickerListItem;
|
|
7446
6525
|
exports.ModDatePickerMenu = ModDatePickerMenu;
|